4
>Glade 2.0 File Format</TITLE
7
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
10
TITLE="Libglade Reference Manual"
11
HREF="libglade.html"><LINK
13
TITLE="Libglade Build"
14
HREF="libglade-libglade-build.html"><LINK
17
HREF="libglade-dtd-exceptions.html"></HEAD
40
>Libglade Reference Manual</FONT
49
HREF="libglade-libglade-build.html"
54
><<< Previous Page</B
94
HREF="libglade-dtd-exceptions.html"
99
>Next Page >>></B
110
NAME="LIBGLADE-DTD">Glade 2.0 File Format</H1
116
>Table of Contents</B
120
HREF="libglade-dtd.html#PROPERTY-REPRESENTATIONS"
121
>Property Representations</A
125
HREF="libglade-dtd-exceptions.html"
131
>Libglade 2.0 introduces a new file format for storing the
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Glade 2.0 File Format</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="Libglade Reference Manual"><link rel="up" href="index.html" title="Libglade Reference Manual"><link rel="prev" href="libglade-embedding.html" title="Embedding Libglade Interfaces"><link rel="next" href="libglade-dtd-exceptions.html" title="Exceptions"><meta name="generator" content="GTK-Doc V1.3 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="chapter" href="libglade-notes.html" title="Libglade Programming Notes"><link rel="chapter" href="libglade-dtd.html" title="Glade 2.0 File Format"><link rel="part" href="libglade-lib.html" title="Part�I.�Libglade Library Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libglade-embedding.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">Libglade Reference Manual</th><td><a accesskey="n" href="libglade-dtd-exceptions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="libglade-dtd"></a>Glade 2.0 File Format</h2></div></div></div><div class="toc"><dl><dt><span class="sect1"><a href="libglade-dtd.html#property-representations">Property Representations</a></span></dt><dt><span class="sect1"><a href="libglade-dtd-exceptions.html">Exceptions</a></span></dt></dl></div><p>Libglade 2.0 introduces a new file format for storing the
132
2
user interface. Unlike the previous format, this one does not
133
3
introduce a new element for each new property. This was done so
134
that the format could be described with a fairly small DTD:</P
143
CLASS="PROGRAMLISTING"
144
><!-- proposed DTD for new glade format -->
146
<!ELEMENT glade-interface (requires*, widget*) >
147
<!ATTLIST glade-interface
148
xmlns CDATA #FIXED 'http://glade.gnome.org/glade-2.0.dtd' >
150
<!ELEMENT requires EMPTY >
151
<!ATTLIST requires
152
lib CDATA #REQUIRED >
154
<!ELEMENT widget (property*, accessibility?, signal*, accelerator*, child*) >
4
that the format could be described with a fairly small DTD:</p><pre class="programlisting"><!-- proposed DTD for new glade format -->
6
<!ELEMENT glade-interface (requires*, widget*) >
7
<!ATTLIST glade-interface
8
xmlns CDATA #FIXED 'http://glade.gnome.org/glade-2.0.dtd' >
10
<!ELEMENT requires EMPTY >
12
lib CDATA #REQUIRED >
14
<!ELEMENT widget (property*, accessibility?, signal*, accelerator*, child*) >
156
16
class CDATA #REQUIRED
157
id ID #REQUIRED >
159
<!ELEMENT property (#PCDATA) >
160
<!-- type is an optional tag, and should be the string name of the
161
GType for the property -->
162
<!-- translatable specifies whether the property should be translated
164
<!ATTLIST property
167
translatable (yes|no) 'no'
168
agent CDATA #IMPLIED >
170
<!ELEMENT atkproperty (#PCDATA | accessibility)* >
171
<!ATTLIST atkproperty
173
type CDATA #IMPLIED >
175
<!ELEMENT atkrelation EMPTY >
176
<!ATTLIST atkrelation
19
<!ELEMENT property (#PCDATA) >
20
<!-- type is an optional tag, and should be the string name of the
21
GType for the property -->
22
<!-- translatable specifies whether the property should be translated
24
<!-- context indicates that the value has a |-separated
25
context which must be stripped before use, look up g_strip_context()
26
in the GLib API documentation for details.-->
30
translatable (yes|no) 'no'
32
comments CDATA #IMPLIED
33
agent CDATA #IMPLIED >
35
<!ELEMENT atkproperty (#PCDATA | accessibility)* >
36
<!ATTLIST atkproperty
39
translatable (yes|no) 'no'
41
comments CDATA #IMPLIED >
43
<!ELEMENT atkrelation EMPTY >
44
<!ATTLIST atkrelation
177
45
target CDATA #REQUIRED
178
type CDATA #REQUIRED >
46
type CDATA #REQUIRED >
180
<!ELEMENT atkaction EMPTY >
181
<!ATTLIST atkaction
48
<!-- description is assumed to be a translatable string -->
49
<!ELEMENT atkaction EMPTY >
50
<!ATTLIST atkaction
182
51
action_name CDATA #REQUIRED
183
description CDATA #IMPLIED >
185
<!ELEMENT accessibility (atkrelation | atkaction | atkproperty)* >
187
<!ELEMENT signal EMPTY >
52
description CDATA #IMPLIED >
54
<!ELEMENT accessibility (atkrelation | atkaction | atkproperty)* >
56
<!ELEMENT signal (property*) >
189
58
name CDATA #REQUIRED
190
59
handler CDATA #REQUIRED
191
60
after (yes|no) 'no'
192
61
object IDREF #IMPLIED
193
last_modification_time CDATA #IMPLIED >
62
last_modification_time CDATA #IMPLIED >
195
<!ELEMENT accelerator EMPTY >
196
<!ATTLIST accelerator
64
<!ELEMENT accelerator EMPTY >
65
<!ATTLIST accelerator
197
66
key CDATA #REQUIRED
198
67
modifiers CDATA #REQUIRED
199
signal CDATA #REQUIRED >
68
signal CDATA #REQUIRED >
201
<!ELEMENT child ((widget|placeholder), packing?) >
202
<!-- internal children should not have any properties set on them.
70
<!ELEMENT child ((widget|placeholder), packing?) >
71
<!-- internal children should not have any properties set on them.
203
72
(Internal children are things like the scrollbars in a
204
GtkScrolledWindow, or the vbox in a GtkDialog). -->
206
internal-child CDATA #IMPLIED >
208
<!ELEMENT packing (property+) >
210
<!ELEMENT placeholder EMPTY ></PRE
221
><property></TT
222
> elements which define widget
73
GtkScrolledWindow, or the vbox in a GtkDialog). -->
75
internal-child CDATA #IMPLIED >
77
<!ELEMENT packing (property+) >
79
<!ELEMENT placeholder EMPTY >
80
</pre><p>The <tt class="sgmltag-element"><widget></tt> elements contain
81
<tt class="sgmltag-element"><property></tt> elements which define widget
223
82
properties. In general these map to
235
><accelerator></TT
236
> elements are used to define
237
signals and accelerators on the widget.</P
245
><accessibility></TT
83
<tt class="classname">GObject</tt> properties.</p><p>The <tt class="sgmltag-element"><signal></tt> and
84
<tt class="sgmltag-element"><accelerator></tt> elements are used to define
85
signals and accelerators on the widget.</p><p>The <tt class="sgmltag-element"><widget></tt> element may also
86
contain an <tt class="sgmltag-element"><accessibility></tt> element, which
247
87
contains accessibility related properties. These set various ATK
248
options (such as ATK properties, relations and actions).</P
250
>For each child of the widget, there is an
260
> attribute is used to mark
88
options (such as ATK properties, relations and actions).</p><p>For each child of the widget, there is an
89
<tt class="sgmltag-element"><child></tt> element. The
90
<i class="parameter"><tt>internal-child</tt></i> attribute is used to mark
261
91
"internal children of the parent. These children are widgets that
262
92
are created when the parent is constructed, such as the
279
> element contains either
283
> element representing the child
286
><placeholder></TT
93
<tt class="classname">GtkVBox</tt> and
94
<tt class="classname">GtkHButtonBox</tt> in a
95
<tt class="classname">GtkDialog</tt>.</p><p>The <tt class="sgmltag-element"><child></tt> element contains either
96
a <tt class="sgmltag-element"><widget></tt> element representing the child
97
widget, or a <tt class="sgmltag-element"><placeholder></tt> element, which
288
98
is ignored when building the interface. It may also contain a
292
> element, which contains
295
><property></TT
296
> elements defining packing
99
<tt class="sgmltag-element"><packing></tt> element, which contains
100
<tt class="sgmltag-element"><property></tt> elements defining packing
297
101
properties. These map to GtkContainer child packing
305
NAME="PROPERTY-REPRESENTATIONS">Property Representations</H1
307
>Properties are represented as straight content data in the
102
properties.</p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="property-representations"></a>Property Representations</h2></div></div></div><p>Properties are represented as straight content data in the
308
103
glade file. All programs working with glade files must
309
represent the various types in the same way.</P
315
CLEAR="all"><BR><TABLE
327
HREF="libglade-libglade-build.html"
332
><<< Previous Page</B
372
HREF="libglade-dtd-exceptions.html"
377
>Next Page >>></B
b'\\ No newline at end of file'
104
represent the various types in the same way.</p></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libglade-embedding.html"><b><<�Embedding Libglade Interfaces</b></a></td><td align="right"><a accesskey="n" href="libglade-dtd-exceptions.html"><b>Exceptions�>></b></a></td></tr></table></body></html>