Beispiel #1
0
static void
Init(void *obj)
{
	AG_Titlebar *tbar = obj;
	AG_Box *box = obj;

	WIDGET(tbar)->flags |= AG_WIDGET_HFILL|
	                       AG_WIDGET_UNFOCUSED_BUTTONUP;

	AG_BoxSetType(box, AG_BOX_HORIZ);
	AG_BoxSetPadding(&tbar->hb, 3);
	AG_BoxSetSpacing(&tbar->hb, 1);

	tbar->flags = 0;
	tbar->pressed = 0;
	tbar->win = NULL;
	tbar->maximize_btn = NULL;
	tbar->minimize_btn = NULL;
	tbar->close_btn = NULL;
	
	tbar->label = AG_LabelNewS(tbar, AG_LABEL_HFILL|AG_LABEL_NOMINSIZE,
	    _("Untitled"));
	AG_LabelSizeHint(tbar->label, 1, "X");
	AG_LabelSetPadding(tbar->label, 5,5,2,2);

	AG_SetEvent(tbar, "mouse-button-down", MouseButtonDown, NULL);
	AG_SetEvent(tbar, "mouse-button-up", MouseButtonUp, NULL);
}
Beispiel #2
0
static void
Init(void *obj)
{
	AG_Statusbar *sbar = obj;
	AG_Box *box = obj;

	AG_BoxSetType(box, AG_BOX_VERT);
	AG_BoxSetPadding(box, 2);
	AG_BoxSetSpacing(box, 1);
	sbar->flags = 0;
	sbar->nlabels = 0;
}
Beispiel #3
0
Datei: mpane.c Projekt: adsr/agar
static void
Init(void *obj)
{
	AG_MPane *mp = obj;
	int i;

	AG_BoxSetType(&mp->box, AG_BOX_VERT);
	AG_BoxSetPadding(&mp->box, 0);
	AG_BoxSetSpacing(&mp->box, 0);
	for (i = 0; i < 4; i++) {
		mp->panes[i] = AG_BoxNew(NULL, AG_BOX_VERT, AG_BOX_FRAME);
		AG_BoxSetSpacing(mp->panes[i], 0);
		AG_BoxSetPadding(mp->panes[i], 0);
	}
	mp->flags = 0;
	mp->npanes = 0;

#ifdef AG_DEBUG
	AG_BindUint(mp, "flags", &mp->flags);
	AG_BindUint(mp, "layout", &mp->layout);
	AG_BindUint(mp, "npanes", &mp->npanes);
#endif
}