2 * gtkcols.h - header file for a columns-based widget container
3 * capable of supporting the PuTTY portable dialog box layout
15 #endif /* __cplusplus */
17 #define TYPE_COLUMNS (columns_get_type())
18 #define COLUMNS(obj) (GTK_CHECK_CAST((obj), TYPE_COLUMNS, Columns))
19 #define COLUMNS_CLASS(klass) \
20 (GTK_CHECK_CLASS_CAST((klass), TYPE_COLUMNS, ColumnsClass))
21 #define IS_COLUMNS(obj) (GTK_CHECK_TYPE((obj), TYPE_COLUMNS))
22 #define IS_COLUMNS_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), TYPE_COLUMNS))
24 typedef struct Columns_tag Columns;
25 typedef struct ColumnsClass_tag ColumnsClass;
26 typedef struct ColumnsChild_tag ColumnsChild;
29 GtkContainer container;
30 /* private after here */
31 GList *children; /* this holds ColumnsChild structures */
32 GList *taborder; /* this just holds GtkWidgets */
36 struct ColumnsClass_tag {
37 GtkContainerClass parent_class;
40 struct ColumnsChild_tag {
41 /* If `widget' is non-NULL, this entry represents an actual widget. */
43 gint colstart, colspan;
44 gboolean force_left; /* for recalcitrant GtkLabels */
45 /* Otherwise, this entry represents a change in the column setup. */
50 GtkType columns_get_type(void);
51 GtkWidget *columns_new(gint spacing);
52 void columns_set_cols(Columns *cols, gint ncols, const gint *percentages);
53 void columns_add(Columns *cols, GtkWidget *child,
54 gint colstart, gint colspan);
55 void columns_taborder_last(Columns *cols, GtkWidget *child);
56 void columns_force_left_align(Columns *cols, GtkWidget *child);
60 #endif /* __cplusplus */
62 #endif /* COLUMNS_H */