glade-palette.h 3.78 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/*
 * glade-palette.h
 *
 * Copyright (C) 2006 The GNOME Foundation.
 * Copyright (C) 2001-2005 Ximian, Inc.
 *
 * Authors:
 *   Chema Celorio
 *   Joaquin Cuenca Abela <e98cuenc@yahoo.com>
 *   Vincent Geddes <vgeddes@metroweb.co.za>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 */

Jose Maria Celorio's avatar
Jose Maria Celorio committed
28 29 30
#ifndef __GLADE_PALETTE_H__
#define __GLADE_PALETTE_H__

31
#include <gladeui/glade.h>
Jose Maria Celorio's avatar
Jose Maria Celorio committed
32

33
#include <gtk/gtk.h>
34 35

G_BEGIN_DECLS
Paolo Borelli's avatar
Paolo Borelli committed
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 40 41
#define GLADE_PALETTE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_PALETTE, GladePaletteClass))
#define GLADE_IS_PALETTE(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_PALETTE))
#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 45 46
typedef struct _GladePalette         GladePalette;
typedef struct _GladePalettePrivate  GladePalettePrivate;
typedef struct _GladePaletteClass    GladePaletteClass;
Jose Maria Celorio's avatar
Jose Maria Celorio committed
47 48 49

struct _GladePalette
{
50
  GtkBox parent_instance;
Jose Maria Celorio's avatar
Jose Maria Celorio committed
51

52
  GladePalettePrivate *priv;
Jose Maria Celorio's avatar
Jose Maria Celorio committed
53 54 55 56
};

struct _GladePaletteClass
{
57
  GtkBoxClass parent_class;
Jose Maria Celorio's avatar
Jose Maria Celorio committed
58

59 60 61 62 63 64
  void   (* refresh)    (GladePalette *palette);

  void   (* glade_reserved1)   (void);
  void   (* glade_reserved2)   (void);
  void   (* glade_reserved3)   (void);
  void   (* glade_reserved4)   (void);
Jose Maria Celorio's avatar
Jose Maria Celorio committed
65 66
};

67
typedef enum
68
{
69 70 71
  GLADE_ITEM_ICON_AND_LABEL,
  GLADE_ITEM_ICON_ONLY,
  GLADE_ITEM_LABEL_ONLY
72 73
} GladeItemAppearance;

74

75
GType                glade_palette_get_type                 (void) G_GNUC_CONST;
76

77
GtkWidget           *glade_palette_new                      (void);
78

79 80
GladeProject        *glade_palette_get_project              (GladePalette *palette);
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 87
                                                             GladeItemAppearance item_appearance);
                                                             
88
gboolean             glade_palette_get_use_small_item_icons (GladePalette *palette);
89

90 91 92 93 94 95
void                     glade_palette_set_use_small_item_icons (GladePalette *palette,
                                                                 gboolean      use_small_item_icons);
                                                             
void                     glade_palette_set_show_selector_button (GladePalette *palette,
                                                                 gboolean      show_selector_button);
                                                             
96
gboolean             glade_palette_get_show_selector_button (GladePalette *palette);
97

98 99
GtkToolPalette      *glade_palette_get_tool_palette         (GladePalette *palette);

Jose Maria Celorio's avatar
Jose Maria Celorio committed
100 101 102
G_END_DECLS

#endif /* __GLADE_PALETTE_H__ */
103