comparison console/libgnt/gntbox.h @ 13939:5d5c84239eea

[gaim-migrate @ 16470] Add an alignment option in a GntBox to align the widgets in it. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 09 Jul 2006 04:44:58 +0000
parents cc60d0861337
children 25be562aaca8
comparison
equal deleted inserted replaced
13938:82684a39f1ec 13939:5d5c84239eea
12 #define GNT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BOX, GntBoxClass)) 12 #define GNT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BOX, GntBoxClass))
13 13
14 typedef struct _GnBox GntBox; 14 typedef struct _GnBox GntBox;
15 typedef struct _GnBoxClass GntBoxClass; 15 typedef struct _GnBoxClass GntBoxClass;
16 16
17 typedef enum
18 {
19 /* These for vertical boxes */
20 GNT_ALIGN_LEFT,
21 GNT_ALIGN_RIGHT,
22
23 GNT_ALIGN_MID,
24
25 /* These for horizontal boxes */
26 GNT_ALIGN_TOP,
27 GNT_ALIGN_BOTTOM
28 } GntAlignment;
29
17 struct _GnBox 30 struct _GnBox
18 { 31 {
19 GntWidget parent; 32 GntWidget parent;
20 33
21 gboolean vertical; 34 gboolean vertical;
22 gboolean homogeneous; 35 gboolean homogeneous;
23 GList *list; /* List of widgets */ 36 GList *list; /* List of widgets */
24 37
25 GntWidget *active; 38 GntWidget *active;
26 int pad; /* Number of spaces to use between widgets */ 39 int pad; /* Number of spaces to use between widgets */
40 GntAlignment alignment; /* How are the widgets going to be aligned? */
27 41
28 char *title; 42 char *title;
29 GList *focus; /* List of widgets to cycle focus (only valid for parent boxes) */ 43 GList *focus; /* List of widgets to cycle focus (only valid for parent boxes) */
30 44
31 void (*gnt_reserved1)(void); 45 void (*gnt_reserved1)(void);
58 72
59 void gnt_box_set_toplevel(GntBox *box, gboolean set); 73 void gnt_box_set_toplevel(GntBox *box, gboolean set);
60 74
61 void gnt_box_sync_children(GntBox *box); 75 void gnt_box_sync_children(GntBox *box);
62 76
77 void gnt_box_set_alignment(GntBox *box, GntAlignment alignment);
78
63 G_END_DECLS 79 G_END_DECLS
64 80
65 #endif /* GNT_BOX_H */ 81 #endif /* GNT_BOX_H */
66 82