1 | /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ |
---|
2 | /** |
---|
3 | * bonobo-ui-toolbar-button-item.h: a toolbar button |
---|
4 | * |
---|
5 | * Author: Ettore Perazzoli |
---|
6 | * |
---|
7 | * Copyright (C) 2000 Helix Code, Inc. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef _BONOBO_UI_TOOLBAR_BUTTON_ITEM_H_ |
---|
11 | #define _BONOBO_UI_TOOLBAR_BUTTON_ITEM_H_ |
---|
12 | |
---|
13 | #include <libgnome/gnome-defs.h> |
---|
14 | #include <gdk-pixbuf/gdk-pixbuf.h> |
---|
15 | |
---|
16 | #include "bonobo-ui-toolbar-item.h" |
---|
17 | |
---|
18 | BEGIN_GNOME_DECLS |
---|
19 | |
---|
20 | #define BONOBO_TYPE_UI_TOOLBAR_BUTTON_ITEM (bonobo_ui_toolbar_button_item_get_type ()) |
---|
21 | #define BONOBO_UI_TOOLBAR_BUTTON_ITEM(obj) (GTK_CHECK_CAST ((obj), BONOBO_TYPE_UI_TOOLBAR_BUTTON_ITEM, BonoboUIToolbarButtonItem)) |
---|
22 | #define BONOBO_UI_TOOLBAR_BUTTON_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), BONOBO_TYPE_UI_TOOLBAR_BUTTON_ITEM, BonoboUIToolbarButtonItemClass)) |
---|
23 | #define BONOBO_IS_UI_TOOLBAR_BUTTON_ITEM(obj) (GTK_CHECK_TYPE ((obj), BONOBO_TYPE_UI_TOOLBAR_BUTTON_ITEM)) |
---|
24 | #define BONOBO_IS_UI_TOOLBAR_BUTTON_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), BONOBO_TYPE_UI_TOOLBAR_BUTTON_ITEM)) |
---|
25 | |
---|
26 | typedef struct _BonoboUIToolbarButtonItemPrivate BonoboUIToolbarButtonItemPrivate; |
---|
27 | |
---|
28 | typedef struct { |
---|
29 | BonoboUIToolbarItem parent; |
---|
30 | |
---|
31 | BonoboUIToolbarButtonItemPrivate *priv; |
---|
32 | } BonoboUIToolbarButtonItem; |
---|
33 | |
---|
34 | typedef struct { |
---|
35 | BonoboUIToolbarItemClass parent_class; |
---|
36 | |
---|
37 | /* Virtual methods */ |
---|
38 | void (* set_icon) (BonoboUIToolbarButtonItem *button_item, |
---|
39 | GdkPixbuf *icon); |
---|
40 | void (* set_label) (BonoboUIToolbarButtonItem *button_item, |
---|
41 | const char *label); |
---|
42 | |
---|
43 | /* Signals. */ |
---|
44 | void (* clicked) (BonoboUIToolbarButtonItem *toolbar_button_item); |
---|
45 | void (* set_want_label) (BonoboUIToolbarButtonItem *toolbar_button_item); |
---|
46 | } BonoboUIToolbarButtonItemClass; |
---|
47 | |
---|
48 | GtkType bonobo_ui_toolbar_button_item_get_type (void); |
---|
49 | void bonobo_ui_toolbar_button_item_construct (BonoboUIToolbarButtonItem *item, |
---|
50 | GtkButton *button_widget, |
---|
51 | GdkPixbuf *icon, |
---|
52 | const char *label); |
---|
53 | GtkWidget *bonobo_ui_toolbar_button_item_new (GdkPixbuf *icon, |
---|
54 | const char *label); |
---|
55 | |
---|
56 | void bonobo_ui_toolbar_button_item_set_icon (BonoboUIToolbarButtonItem *button_item, |
---|
57 | GdkPixbuf *icon); |
---|
58 | void bonobo_ui_toolbar_button_item_set_label (BonoboUIToolbarButtonItem *button_item, |
---|
59 | const char *label); |
---|
60 | |
---|
61 | GtkButton *bonobo_ui_toolbar_button_item_get_button_widget (BonoboUIToolbarButtonItem *button_item); |
---|
62 | |
---|
63 | END_GNOME_DECLS |
---|
64 | |
---|
65 | #endif /* _BONOBO_UI_TOOLBAR_BUTTON_ITEM_H_ */ |
---|