1 /* Public domain */ 2 3 #ifndef _AGAR_WIDGET_SEPARATOR_H_ 4 #define _AGAR_WIDGET_SEPARATOR_H_ 5 6 #include <agar/gui/widget.h> 7 8 #include <agar/gui/begin.h> 9 10 enum ag_separator_type { 11 AG_SEPARATOR_HORIZ, 12 AG_SEPARATOR_VERT 13 }; 14 15 typedef struct ag_separator { 16 struct ag_widget wid; 17 enum ag_separator_type type; 18 Uint padding; /* Padding in pixels */ 19 int visible; /* Visible flag */ 20 } AG_Separator; 21 22 __BEGIN_DECLS 23 extern AG_WidgetClass agSeparatorClass; 24 25 AG_Separator *AG_SeparatorNew(void *, enum ag_separator_type); 26 AG_Separator *AG_SpacerNew(void *, enum ag_separator_type); 27 void AG_SeparatorSetPadding(AG_Separator *, Uint); 28 29 #define AG_SeparatorNewHoriz(p) AG_SeparatorNew((p),AG_SEPARATOR_HORIZ) 30 #define AG_SeparatorNewVert(p) AG_SeparatorNew((p),AG_SEPARATOR_VERT) 31 #define AG_SpacerNewHoriz(p) AG_SpacerNew((p),AG_SEPARATOR_HORIZ) 32 #define AG_SpacerNewVert(p) AG_SpacerNew((p),AG_SEPARATOR_VERT) 33 __END_DECLS 34 35 #include <agar/gui/close.h> 36 #endif /* _AGAR_WIDGET_SEPARATOR_H_ */ 37