1 /*
2  * glade-palette.h
3  *
4  * Copyright (C) 2006 The GNOME Foundation.
5  * Copyright (C) 2001-2005 Ximian, Inc.
6  *
7  * Authors:
8  *   Chema Celorio
9  *   Joaquin Cuenca Abela <e98cuenc@yahoo.com>
10  *   Vincent Geddes <vgeddes@metroweb.co.za>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25  *
26  */
27 
28 #ifndef __GLADE_PALETTE_H__
29 #define __GLADE_PALETTE_H__
30 
31 #include <gladeui/glade.h>
32 
33 #include <gtk/gtk.h>
34 
35 G_BEGIN_DECLS
36 
37 #define GLADE_TYPE_PALETTE              (glade_palette_get_type ())
38 #define GLADE_PALETTE(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_PALETTE, GladePalette))
39 #define GLADE_PALETTE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_PALETTE, GladePaletteClass))
40 #define GLADE_IS_PALETTE(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_PALETTE))
41 #define GLADE_IS_PALETTE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_PALETTE))
42 #define GLADE_PALETTE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_PALETTE, GladePaletteClass))
43 
44 typedef struct _GladePalette         GladePalette;
45 typedef struct _GladePalettePrivate  GladePalettePrivate;
46 typedef struct _GladePaletteClass    GladePaletteClass;
47 
48 struct _GladePalette
49 {
50   GtkBox parent_instance;
51 
52   GladePalettePrivate *priv;
53 };
54 
55 struct _GladePaletteClass
56 {
57   GtkBoxClass parent_class;
58 
59   void   (* refresh)    (GladePalette *palette);
60 
61   void   (* glade_reserved1)   (void);
62   void   (* glade_reserved2)   (void);
63   void   (* glade_reserved3)   (void);
64   void   (* glade_reserved4)   (void);
65 };
66 
67 typedef enum
68 {
69   GLADE_ITEM_ICON_AND_LABEL,
70   GLADE_ITEM_ICON_ONLY,
71   GLADE_ITEM_LABEL_ONLY
72 } GladeItemAppearance;
73 
74 
75 GType                glade_palette_get_type                 (void) G_GNUC_CONST;
76 
77 GtkWidget           *glade_palette_new                      (void);
78 
79 GladeProject        *glade_palette_get_project              (GladePalette *palette);
80 void                 glade_palette_set_project              (GladePalette *palette,
81 							     GladeProject *project);
82 
83 GladeItemAppearance  glade_palette_get_item_appearance      (GladePalette *palette);
84 
85 void                 glade_palette_set_item_appearance      (GladePalette       *palette,
86 							     GladeItemAppearance item_appearance);
87 
88 gboolean             glade_palette_get_use_small_item_icons (GladePalette *palette);
89 
90 void		     glade_palette_set_use_small_item_icons (GladePalette *palette,
91 							     gboolean      use_small_item_icons);
92 
93 void		     glade_palette_set_show_selector_button (GladePalette *palette,
94 							     gboolean      show_selector_button);
95 
96 gboolean             glade_palette_get_show_selector_button (GladePalette *palette);
97 
98 GtkToolPalette      *glade_palette_get_tool_palette         (GladePalette *palette);
99 
100 G_END_DECLS
101 
102 #endif /* __GLADE_PALETTE_H__ */
103 
104