8 frinit(Frame *f, Rectangle r, Font *ft, Image *b, Image *cols[NCOL])
11 f->display = b->display;
12 f->maxtab = 8*stringwidth(ft, "0");
22 memmove(f->cols, cols, sizeof f->cols);
24 if(f->tick==nil && f->cols[BACK]!=0)
34 b = f->display->screenimage;
38 f->tick = allocimage(f->display, Rect(0, 0, FRTICKW, ft->height), b->chan, 0, DWhite);
42 freeimage(f->tickback);
43 f->tickback = allocimage(f->display, f->tick->r, b->chan, 0, DWhite);
49 /* background color */
50 draw(f->tick, f->tick->r, f->cols[BACK], nil, ZP);
52 draw(f->tick, Rect(FRTICKW/2, 0, FRTICKW/2+1, ft->height), f->display->black, nil, ZP);
54 draw(f->tick, Rect(0, 0, FRTICKW, FRTICKW), f->cols[TEXT], nil, ZP);
55 draw(f->tick, Rect(0, ft->height-FRTICKW, FRTICKW, ft->height), f->cols[TEXT], nil, ZP);
59 frsetrects(Frame *f, Rectangle r, Image *b)
64 f->r.max.y -= (r.max.y-r.min.y)%f->font->height;
65 f->maxlines = (r.max.y-r.min.y)/f->font->height;
69 frclear(Frame *f, int freeall)
72 _frdelbox(f, 0, f->nbox-1);
77 freeimage(f->tickback);