summaryrefslogtreecommitdiff
path: root/gtk/gtktoolbar.h
diff options
context:
space:
mode:
authorAndrew T. Veliath <andrewtv@src.gnome.org>1998-12-08 13:25:35 +0000
committerAndrew T. Veliath <andrewtv@src.gnome.org>1998-12-08 13:25:35 +0000
commitd6acd1ecd3779096e96d63e07d10ab01869ce7ed (patch)
treea3f4c7fc5deb1fab548457cf1e9a90637297f4c6 /gtk/gtktoolbar.h
parent287b0ce008925385958a0c1fb0c3da7c63902c05 (diff)
downloadgdk-pixbuf-d6acd1ecd3779096e96d63e07d10ab01869ce7ed.tar.gz
Functions to test the toolbar space style.
* gtk/testgtk.c: Functions to test the toolbar space style. * gtk/gtktoolbar.c: Add a private GtkToolbarChildSpace subclass of GtkToolbarChild to hold allocation. Set default space style to GTK_TOOLBAR_SPACE_EMPTY, define SPACE_LINE_* for separator fraction defaults. (gtk_toolbar_paint_space_line): New function; paints the separator line, using "toolbar" as the detail. (gtk_toolbar_expose): (gtk_toolbar_draw): Handle CHILD_SPACE when style is set to SPACE_LINE. (gtk_toolbar_size_allocate): Store space allocations. (gtk_toolbar_insert_element): If we are a space, allocate and initialize a GtkToolbarChildSpace instead of a GtkToolbarChild. (gtk_toolbar_set_space_style): New function. * gtk/gtktoolbar.h: Add GtkToolbarSpaceStyle, with styles of EMPTY and LINE. Add prototype for gtk_toolbar_set_space_style.
Diffstat (limited to 'gtk/gtktoolbar.h')
-rw-r--r--gtk/gtktoolbar.h31
1 files changed, 20 insertions, 11 deletions
diff --git a/gtk/gtktoolbar.h b/gtk/gtktoolbar.h
index 17c05dddb..0f5a4f840 100644
--- a/gtk/gtktoolbar.h
+++ b/gtk/gtktoolbar.h
@@ -48,6 +48,12 @@ typedef enum
GTK_TOOLBAR_CHILD_WIDGET
} GtkToolbarChildType;
+typedef enum
+{
+ GTK_TOOLBAR_SPACE_EMPTY,
+ GTK_TOOLBAR_SPACE_LINE
+} GtkToolbarSpaceStyle;
+
typedef struct _GtkToolbarChild GtkToolbarChild;
typedef struct _GtkToolbar GtkToolbar;
typedef struct _GtkToolbarClass GtkToolbarClass;
@@ -69,6 +75,7 @@ struct _GtkToolbar
GtkOrientation orientation;
GtkToolbarStyle style;
gint space_size; /* big optional space between buttons */
+ GtkToolbarSpaceStyle space_style;
GtkTooltips *tooltips;
@@ -170,17 +177,19 @@ void gtk_toolbar_insert_widget (GtkToolbar *toolbar,
gint position);
/* Style functions */
-void gtk_toolbar_set_orientation (GtkToolbar *toolbar,
- GtkOrientation orientation);
-void gtk_toolbar_set_style (GtkToolbar *toolbar,
- GtkToolbarStyle style);
-void gtk_toolbar_set_space_size (GtkToolbar *toolbar,
- gint space_size);
-void gtk_toolbar_set_tooltips (GtkToolbar *toolbar,
- gint enable);
-void gtk_toolbar_set_button_relief (GtkToolbar *toolbar,
- GtkReliefStyle relief);
-GtkReliefStyle gtk_toolbar_get_button_relief (GtkToolbar *toolbar);
+void gtk_toolbar_set_orientation (GtkToolbar *toolbar,
+ GtkOrientation orientation);
+void gtk_toolbar_set_style (GtkToolbar *toolbar,
+ GtkToolbarStyle style);
+void gtk_toolbar_set_space_size (GtkToolbar *toolbar,
+ gint space_size);
+void gtk_toolbar_set_space_style (GtkToolbar *toolbar,
+ GtkToolbarSpaceStyle space_style);
+void gtk_toolbar_set_tooltips (GtkToolbar *toolbar,
+ gint enable);
+void gtk_toolbar_set_button_relief (GtkToolbar *toolbar,
+ GtkReliefStyle relief);
+GtkReliefStyle gtk_toolbar_get_button_relief (GtkToolbar *toolbar);
#ifdef __cplusplus