1 | /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ |
---|
2 | /** |
---|
3 | * bonobo-ui-toolbar-item.h |
---|
4 | * |
---|
5 | * Author: Ettore Perazzoli |
---|
6 | * |
---|
7 | * Copyright (C) 2000 Helix Code, Inc. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef _BONOBO_UI_TOOLBAR_ITEM_H_ |
---|
11 | #define _BONOBO_UI_TOOLBAR_ITEM_H_ |
---|
12 | |
---|
13 | #include <libgnome/gnome-defs.h> |
---|
14 | #include <gtk/gtk.h> |
---|
15 | |
---|
16 | BEGIN_GNOME_DECLS |
---|
17 | |
---|
18 | #define BONOBO_TYPE_UI_TOOLBAR_ITEM (bonobo_ui_toolbar_item_get_type ()) |
---|
19 | #define BONOBO_UI_TOOLBAR_ITEM(obj) (GTK_CHECK_CAST ((obj), BONOBO_TYPE_UI_TOOLBAR_ITEM, BonoboUIToolbarItem)) |
---|
20 | #define BONOBO_UI_TOOLBAR_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), BONOBO_TYPE_UI_TOOLBAR_ITEM, BonoboUIToolbarItemClass)) |
---|
21 | #define BONOBO_IS_UI_TOOLBAR_ITEM(obj) (GTK_CHECK_TYPE ((obj), BONOBO_TYPE_UI_TOOLBAR_ITEM)) |
---|
22 | #define BONOBO_IS_UI_TOOLBAR_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), BONOBO_TYPE_UI_TOOLBAR_ITEM)) |
---|
23 | |
---|
24 | |
---|
25 | typedef enum { |
---|
26 | BONOBO_UI_TOOLBAR_ITEM_STYLE_ICON_AND_TEXT_VERTICAL, |
---|
27 | BONOBO_UI_TOOLBAR_ITEM_STYLE_ICON_AND_TEXT_HORIZONTAL, |
---|
28 | BONOBO_UI_TOOLBAR_ITEM_STYLE_ICON_ONLY, |
---|
29 | BONOBO_UI_TOOLBAR_ITEM_STYLE_TEXT_ONLY |
---|
30 | } BonoboUIToolbarItemStyle; |
---|
31 | |
---|
32 | |
---|
33 | typedef struct _BonoboUIToolbarItemPrivate BonoboUIToolbarItemPrivate; |
---|
34 | |
---|
35 | typedef struct { |
---|
36 | GtkBin parent; |
---|
37 | |
---|
38 | BonoboUIToolbarItemPrivate *priv; |
---|
39 | } BonoboUIToolbarItem; |
---|
40 | |
---|
41 | typedef struct { |
---|
42 | GtkBinClass parent_class; |
---|
43 | |
---|
44 | /* Virtual method */ |
---|
45 | void (* set_state) (BonoboUIToolbarItem *item, |
---|
46 | const char *new_state); |
---|
47 | void (* set_tooltip) (BonoboUIToolbarItem *item, |
---|
48 | GtkTooltips *tooltips, |
---|
49 | const char *tooltip); |
---|
50 | |
---|
51 | /* Signals */ |
---|
52 | void (* set_orientation) (BonoboUIToolbarItem *item, |
---|
53 | GtkOrientation orientation); |
---|
54 | void (* set_style) (BonoboUIToolbarItem *item, |
---|
55 | BonoboUIToolbarItemStyle style); |
---|
56 | void (* set_want_label) (BonoboUIToolbarItem *item, |
---|
57 | gboolean want_label); |
---|
58 | void (* activate) (BonoboUIToolbarItem *item); |
---|
59 | } BonoboUIToolbarItemClass; |
---|
60 | |
---|
61 | |
---|
62 | GtkType bonobo_ui_toolbar_item_get_type (void); |
---|
63 | GtkWidget *bonobo_ui_toolbar_item_new (void); |
---|
64 | void bonobo_ui_toolbar_item_set_tooltip (BonoboUIToolbarItem *item, |
---|
65 | GtkTooltips *tooltips, |
---|
66 | const char *tooltip); |
---|
67 | void bonobo_ui_toolbar_item_set_state (BonoboUIToolbarItem *item, |
---|
68 | const char *new_state); |
---|
69 | void bonobo_ui_toolbar_item_set_orientation (BonoboUIToolbarItem *item, |
---|
70 | GtkOrientation orientation); |
---|
71 | GtkOrientation bonobo_ui_toolbar_item_get_orientation (BonoboUIToolbarItem *item); |
---|
72 | void bonobo_ui_toolbar_item_set_style (BonoboUIToolbarItem *item, |
---|
73 | BonoboUIToolbarItemStyle style); |
---|
74 | BonoboUIToolbarItemStyle bonobo_ui_toolbar_item_get_style (BonoboUIToolbarItem *item); |
---|
75 | |
---|
76 | void bonobo_ui_toolbar_item_set_minimum_width(BonoboUIToolbarItem *item, |
---|
77 | int minimum_width); |
---|
78 | |
---|
79 | /* FIXME ugly names. */ |
---|
80 | void bonobo_ui_toolbar_item_set_want_label (BonoboUIToolbarItem *button_item, |
---|
81 | gboolean prefer_text); |
---|
82 | gboolean bonobo_ui_toolbar_item_get_want_label (BonoboUIToolbarItem *button_item); |
---|
83 | |
---|
84 | void bonobo_ui_toolbar_item_set_expandable (BonoboUIToolbarItem *button_item, |
---|
85 | gboolean expandable); |
---|
86 | gboolean bonobo_ui_toolbar_item_get_expandable (BonoboUIToolbarItem *button_item); |
---|
87 | |
---|
88 | void bonobo_ui_toolbar_item_set_pack_end (BonoboUIToolbarItem *button_item, |
---|
89 | gboolean expandable); |
---|
90 | gboolean bonobo_ui_toolbar_item_get_pack_end (BonoboUIToolbarItem *button_item); |
---|
91 | |
---|
92 | void bonobo_ui_toolbar_item_activate (BonoboUIToolbarItem *item); |
---|
93 | |
---|
94 | END_GNOME_DECLS |
---|
95 | |
---|
96 | #endif /* __BONOBO_UI_TOOLBAR_ITEM_H__ */ |
---|