Lines Matching refs:b

50 	Box *b;  in boxkey()  local
52 b = (Box*)c; in boxkey()
53 chanprint(b->event, "%q: key 0x%x", b->name, rp[0]); in boxkey()
59 Box *b; in boxmouse() local
61 b = (Box*)c; in boxmouse()
62 if (ptinrect(m->xy,b->rect)) in boxmouse()
63 chanprint(b->event, "%q: mouse %P %d %ld", b->name, in boxmouse()
74 boxshow(Box *b) in boxshow() argument
79 if(b->hidden) in boxshow()
81 if(b->border > 0){ in boxshow()
82 border(b->screen, b->rect, b->border, b->bordercolor->image, ZP); in boxshow()
83 r = insetrect(b->rect, b->border); in boxshow()
85 r = b->rect; in boxshow()
86 i = b->image->image; in boxshow()
88 draw(b->screen, r, i, nil, ZP); in boxshow()
96 Box *b; in boxctl() local
98 b = (Box*)c; in boxctl()
102 ctlerror("%q: unrecognized message '%s'", b->name, cp->str); in boxctl()
105 _ctlargcount(b, cp, 2); in boxctl()
106 b->align = _ctlalignment(cp->args[1]); in boxctl()
109 _ctlargcount(b, cp, 2); in boxctl()
111 ctlerror("%q: bad border: %c", b->name, cp->str); in boxctl()
112 b->border = cp->iargs[1]; in boxctl()
115 _ctlargcount(b, cp, 2); in boxctl()
116 _setctlimage(b, &b->bordercolor, cp->args[1]); in boxctl()
119 _ctlargcount(b, cp, 2); in boxctl()
120 chanprint(b->event, "%q: focus %s", b->name, cp->args[1]); in boxctl()
123 _ctlargcount(b, cp, 1); in boxctl()
124 b->hidden = 1; in boxctl()
127 _ctlargcount(b, cp, 2); in boxctl()
128 _setctlimage(b, &b->image, cp->args[1]); in boxctl()
131 _ctlargcount(b, cp, 5); in boxctl()
137 ctlerror("%q: bad rectangle: %s", b->name, cp->str); in boxctl()
138 b->rect = r; in boxctl()
141 _ctlargcount(b, cp, 1); in boxctl()
142 b->hidden = 0; in boxctl()
143 boxshow(b); in boxctl()
146 _ctlargcount(b, cp, 1); in boxctl()
147 boxshow(b); in boxctl()
153 _ctlargcount(b, cp, 5); in boxctl()
160 ctlerror("%q: bad sizes: %s", b->name, cp->str); in boxctl()
161 b->size.min = r.min; in boxctl()
162 b->size.max = r.max; in boxctl()
170 Box *b; in createbox() local
172 b = (Box *)_createctl(cs, "box", sizeof(Box), name); in createbox()
173 b->image = _getctlimage("white"); in createbox()
174 b->bordercolor = _getctlimage("black"); in createbox()
175 b->align = Aupperleft; in createbox()
176 b->key = boxkey; in createbox()
177 b->mouse = boxmouse; in createbox()
178 b->ctl = boxctl; in createbox()
179 b->exit = boxfree; in createbox()
180 return (Control *)b; in createbox()