gntbox.h
Go to the documentation of this file.00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef GNT_BOX_H
00028 #define GNT_BOX_H
00029
00030 #include "gnt.h"
00031 #include "gntwidget.h"
00032
00033 #define GNT_TYPE_BOX (gnt_box_get_gtype())
00034 #define GNT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_BOX, GntBox))
00035 #define GNT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_BOX, GntBoxClass))
00036 #define GNT_IS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_BOX))
00037 #define GNT_IS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_BOX))
00038 #define GNT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BOX, GntBoxClass))
00039
00040 typedef struct _GntBox GntBox;
00041 typedef struct _GntBoxClass GntBoxClass;
00042
00043 typedef enum
00044 {
00045
00046 GNT_ALIGN_LEFT,
00047 GNT_ALIGN_RIGHT,
00048
00049 GNT_ALIGN_MID,
00050
00051
00052 GNT_ALIGN_TOP,
00053 GNT_ALIGN_BOTTOM
00054 } GntAlignment;
00055
00056 struct _GntBox
00057 {
00058 GntWidget parent;
00059
00060 gboolean vertical;
00061 gboolean homogeneous;
00062 gboolean fill;
00063 GList *list;
00064
00065 GntWidget *active;
00066 int pad;
00067 GntAlignment alignment;
00068
00069 char *title;
00070 GList *focus;
00071
00072 void (*gnt_reserved1)(void);
00073 void (*gnt_reserved2)(void);
00074 void (*gnt_reserved3)(void);
00075 void (*gnt_reserved4)(void);
00076 };
00077
00078 struct _GntBoxClass
00079 {
00080 GntWidgetClass parent;
00081
00082 void (*gnt_reserved1)(void);
00083 void (*gnt_reserved2)(void);
00084 void (*gnt_reserved3)(void);
00085 void (*gnt_reserved4)(void);
00086 };
00087
00088 G_BEGIN_DECLS
00089
00094 GType gnt_box_get_gtype(void);
00095
00096 #define gnt_vbox_new(homo) gnt_box_new(homo, TRUE)
00097 #define gnt_hbox_new(homo) gnt_box_new(homo, FALSE)
00098
00108 GntWidget * gnt_box_new(gboolean homo, gboolean vert);
00109
00116 void gnt_box_add_widget(GntBox *box, GntWidget *widget);
00117
00124 void gnt_box_set_title(GntBox *box, const char *title);
00125
00132 void gnt_box_set_pad(GntBox *box, int pad);
00133
00142 void gnt_box_set_toplevel(GntBox *box, gboolean set);
00143
00149 void gnt_box_sync_children(GntBox *box);
00150
00157 void gnt_box_set_alignment(GntBox *box, GntAlignment alignment);
00158
00165 void gnt_box_remove(GntBox *box, GntWidget *widget);
00166
00172 void gnt_box_remove_all(GntBox *box);
00173
00180 void gnt_box_readjust(GntBox *box);
00181
00188 void gnt_box_set_fill(GntBox *box, gboolean fill);
00189
00197 void gnt_box_move_focus(GntBox *box, int dir);
00198
00205 void gnt_box_give_focus_to_child(GntBox *box, GntWidget *widget);
00206
00207 G_END_DECLS
00208
00209 #endif
00210