1 /* Public domain */ 2 3 #ifndef _AGAR_WIDGET_FONT_SELECTOR_H_ 4 #define _AGAR_WIDGET_FONT_SELECTOR_H_ 5 6 #include <agar/gui/pane.h> 7 #include <agar/gui/box.h> 8 #include <agar/gui/tlist.h> 9 #include <agar/gui/numerical.h> 10 11 #include <agar/gui/begin.h> 12 13 typedef struct ag_font_selector { 14 AG_Widget wid; 15 Uint flags; 16 #define AG_FONTSELECTOR_UPDATE 0x01 /* Refresh listing */ 17 #define AG_FONTSELECTOR_HFILL 0x100 18 #define AG_FONTSELECTOR_VFILL 0x200 19 #define AG_FONTSELECTOR_EXPAND (AG_FONTSELECTOR_HFILL|AG_FONTSELECTOR_VFILL) 20 21 AG_Pane *hPane, *hPane2; /* Containers */ 22 AG_Box *sizeBox; /* Container for sizes */ 23 AG_Tlist *tlFaces; /* List of font faces */ 24 AG_Tlist *tlStyles; /* List of font styles */ 25 AG_Tlist *tlSizes; /* List of available sizes */ 26 27 char curFace[AG_OBJECT_NAME_MAX]; /* Current font face */ 28 Uint curStyle; /* Current style flags */ 29 int curSize; /* Current size */ 30 AG_Rect rPreview; /* Preview area */ 31 int sPreview; /* Preview surface */ 32 AG_Font *font; /* Default `font' binding */ 33 34 } AG_FontSelector; 35 36 __BEGIN_DECLS 37 extern AG_WidgetClass agFontSelectorClass; 38 39 AG_FontSelector *AG_FontSelectorNew(void *, Uint); 40 __END_DECLS 41 42 #include <agar/gui/close.h> 43 #endif /* _AGAR_WIDGET_FONT_SELECTOR_H_ */ 44