summaryrefslogtreecommitdiff
path: root/tools/glade/glade/gb.c
blob: 7c5ed61c12069a44e976dcf3c04182114ec76e4c (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/*  Gtk+ User Interface Builder
 *  Copyright (C) 2001  Damon Chaplin
 *
 *  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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

/*
 * Common data.
 */

#include <config.h>

#include <gtk/gtkenums.h>
#include <gtk/gtkdialog.h>
#include <gtk/gtkstock.h>
#include "gb.h"


/* Keys used to store a pointer to the parent widget. Currently we only need
   this for the GtkCombo popup window, as there is no way to step up to the
   GtkCombo. */
const gchar *GladeParentKey		= "GladeParentKey";


/* Keys used to store object data. */
const gchar *GladeButtonStockIDKey	= "GladeButtonStockIDKey";
const gchar *GladeDialogResponseIDKey	= "GladeDialogResponseIDKey";

const gchar *GladeToolButtonStockIDKey	= "GladeToolButtonStockIDKey";
const gchar *GladeToolButtonIconKey	= "GladeToolButtonIconKey";


/* Special child names. */
const gchar *GladeChildDialogVBox	= "vbox";
const gchar *GladeChildDialogActionArea	= "action_area";

const gchar *GladeChildOKButton		= "ok_button";
const gchar *GladeChildCancelButton	= "cancel_button";
const gchar *GladeChildApplyButton	= "apply_button";
const gchar *GladeChildHelpButton	= "help_button";
const gchar *GladeChildSaveButton	= "save_button";
const gchar *GladeChildCloseButton	= "close_button";

const gchar *GladeChildMenuItemImage	= "image";

const gchar *GladeChildComboEntry	= "entry";
const gchar *GladeChildComboList	= "list";

const gchar *GladeChildFontSelection	= "font_selection";
const gchar *GladeChildColorSelection	= "color_selection";

const gchar *GladeChildGnomeAppDock	= "dock";
const gchar *GladeChildGnomeAppBar	= "appbar";
const gchar *GladeChildGnomeEntry	= "entry";
const gchar *GladeChildGnomePBoxNotebook= "notebook";
const gchar *GladeChildGnomeDruidVBox	= "vbox";

const gchar *GladeChildBonoboWindowDock		= "dock";
const gchar *GladeChildBonoboWindowAppBar	= "appbar";

/* These aren't saved in the XML. */
const gchar *GladeChildCListTitle	= "clist_title";


/* Note the trailing NULL in Choices is for the property_add_choice() call,
   though it isn't included in the ChoicesSize. */

/*
 * Relief Choices.
 */
const gchar *GladeReliefChoices[] =
{
  "Normal",
  "Half",
  "None",
  NULL
};
const gint GladeReliefValues[] =
{
  GTK_RELIEF_NORMAL,
  GTK_RELIEF_HALF,
  GTK_RELIEF_NONE
};
const gchar *GladeReliefSymbols[] =
{
  "GTK_RELIEF_NORMAL",
  "GTK_RELIEF_HALF",
  "GTK_RELIEF_NONE"
};
const int GladeReliefChoicesSize = G_N_ELEMENTS (GladeReliefValues);


/*
 * Shadow Choices.
 */
const gchar *GladeShadowChoices[] =
{ "None", "In", "Out", "Etched In", "Etched Out", NULL};
const gint GladeShadowValues[] =
{
  GTK_SHADOW_NONE,
  GTK_SHADOW_IN,
  GTK_SHADOW_OUT,
  GTK_SHADOW_ETCHED_IN,
  GTK_SHADOW_ETCHED_OUT
};
const gchar *GladeShadowSymbols[] =
{
  "GTK_SHADOW_NONE",
  "GTK_SHADOW_IN",
  "GTK_SHADOW_OUT",
  "GTK_SHADOW_ETCHED_IN",
  "GTK_SHADOW_ETCHED_OUT"
};
const int GladeShadowChoicesSize = G_N_ELEMENTS (GladeShadowValues);


/*
 * Corner Choices.
 */
const gchar *GladeCornerChoices[] =
{ "Top Left", "Bottom Left", "Top Right", "Bottom Right", NULL};
const gint GladeCornerValues[] =
{
  GTK_CORNER_TOP_LEFT,
  GTK_CORNER_BOTTOM_LEFT,
  GTK_CORNER_TOP_RIGHT,
  GTK_CORNER_BOTTOM_RIGHT
};
const gchar *GladeCornerSymbols[] =
{
  "GTK_CORNER_TOP_LEFT",
  "GTK_CORNER_BOTTOM_LEFT",
  "GTK_CORNER_TOP_RIGHT",
  "GTK_CORNER_BOTTOM_RIGHT"
};
const int GladeCornerChoicesSize = G_N_ELEMENTS (GladeCornerValues);


GladeDialogResponse GladeStockResponses[] = {
  { "GTK_RESPONSE_OK",	   GTK_RESPONSE_OK,	GTK_STOCK_OK },
  { "GTK_RESPONSE_CANCEL", GTK_RESPONSE_CANCEL,	GTK_STOCK_CANCEL },
  { "GTK_RESPONSE_CLOSE",  GTK_RESPONSE_CLOSE,	GTK_STOCK_CLOSE },
  { "GTK_RESPONSE_YES",	   GTK_RESPONSE_YES,	GTK_STOCK_YES },
  { "GTK_RESPONSE_NO",	   GTK_RESPONSE_NO,	GTK_STOCK_NO },
  { "GTK_RESPONSE_APPLY",  GTK_RESPONSE_APPLY,	GTK_STOCK_APPLY },
  { "GTK_RESPONSE_HELP",   GTK_RESPONSE_HELP,	GTK_STOCK_HELP },
  { "GTK_RESPONSE_REJECT", GTK_RESPONSE_REJECT,	NULL },
  { "GTK_RESPONSE_ACCEPT", GTK_RESPONSE_ACCEPT,	NULL }
};
const gint GladeStockResponsesSize = G_N_ELEMENTS (GladeStockResponses);