1 /*	Public domain	*/
2 
3 #ifndef _AGAR_WIDGET_UCOMBO_H_
4 #define _AGAR_WIDGET_UCOMBO_H_
5 
6 #include <agar/gui/widget.h>
7 #include <agar/gui/button.h>
8 #include <agar/gui/window.h>
9 #include <agar/gui/tlist.h>
10 
11 #include <agar/gui/begin.h>
12 
13 typedef struct ag_ucombo {
14 	struct ag_widget wid;
15 	Uint flags;
16 #define AG_UCOMBO_HFILL	  	0x01
17 #define AG_UCOMBO_VFILL	  	0x02
18 #define AG_UCOMBO_SCROLLTOSEL	0x40	/* Scroll to initial selection */
19 #define AG_UCOMBO_EXPAND  (AG_UCOMBO_HFILL|AG_UCOMBO_VFILL)
20 	AG_Button *button;		/* Selection button */
21 	AG_Tlist *list;			/* Item list */
22 	AG_Window *panel;
23 	int wSaved, hSaved;		/* Saved popup list geometry */
24 	int wPreList, hPreList;		/* Size hints */
25 } AG_UCombo;
26 
27 __BEGIN_DECLS
28 extern AG_WidgetClass agUComboClass;
29 
30 AG_UCombo *AG_UComboNew(void *, Uint);
31 AG_UCombo *AG_UComboNewPolled(void *, Uint, AG_EventFn, const char *, ...);
32 void	   AG_UComboSizeHint(AG_UCombo *, const char *, int);
33 void	   AG_UComboSizeHintPixels(AG_UCombo *, int, int);
34 __END_DECLS
35 
36 #include <agar/gui/close.h>
37 #endif /* _AGAR_WIDGET_UCOMBO_H_ */
38