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
|
<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="PartI.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
user interface. Unlike the previous format, this one does not
introduce a new element for each new property. This was done so
that the format could be described with a fairly small DTD:</p><pre class="programlisting"><!-- proposed DTD for new glade format -->
<!ELEMENT glade-interface (requires*, widget*) >
<!ATTLIST glade-interface
xmlns CDATA #FIXED 'http://glade.gnome.org/glade-2.0.dtd' >
<!ELEMENT requires EMPTY >
<!ATTLIST requires
lib CDATA #REQUIRED >
<!ELEMENT widget (property*, accessibility?, signal*, accelerator*, child*) >
<!ATTLIST widget
class CDATA #REQUIRED
id ID #REQUIRED >
<!ELEMENT property (#PCDATA) >
<!-- type is an optional tag, and should be the string name of the
GType for the property -->
<!-- translatable specifies whether the property should be translated
before use. -->
<!-- context indicates that the value has a |-separated
context which must be stripped before use, look up g_strip_context()
in the GLib API documentation for details.-->
<!ATTLIST property
name CDATA #REQUIRED
type CDATA #IMPLIED
translatable (yes|no) 'no'
context (yes|no) 'no'
comments CDATA #IMPLIED
agent CDATA #IMPLIED >
<!ELEMENT atkproperty (#PCDATA | accessibility)* >
<!ATTLIST atkproperty
name CDATA #REQUIRED
type CDATA #IMPLIED
translatable (yes|no) 'no'
context (yes|no) 'no'
comments CDATA #IMPLIED >
<!ELEMENT atkrelation EMPTY >
<!ATTLIST atkrelation
target CDATA #REQUIRED
type CDATA #REQUIRED >
<!-- description is assumed to be a translatable string -->
<!ELEMENT atkaction EMPTY >
<!ATTLIST atkaction
action_name CDATA #REQUIRED
description CDATA #IMPLIED >
<!ELEMENT accessibility (atkrelation | atkaction | atkproperty)* >
<!ELEMENT signal (property*) >
<!ATTLIST signal
name CDATA #REQUIRED
handler CDATA #REQUIRED
after (yes|no) 'no'
object IDREF #IMPLIED
last_modification_time CDATA #IMPLIED >
<!ELEMENT accelerator EMPTY >
<!ATTLIST accelerator
key CDATA #REQUIRED
modifiers CDATA #REQUIRED
signal CDATA #REQUIRED >
<!ELEMENT child ((widget|placeholder), packing?) >
<!-- internal children should not have any properties set on them.
(Internal children are things like the scrollbars in a
GtkScrolledWindow, or the vbox in a GtkDialog). -->
<!ATTLIST child
internal-child CDATA #IMPLIED >
<!ELEMENT packing (property+) >
<!ELEMENT placeholder EMPTY >
</pre><p>The <tt class="sgmltag-element"><widget></tt> elements contain
<tt class="sgmltag-element"><property></tt> elements which define widget
properties. In general these map to
<tt class="classname">GObject</tt> properties.</p><p>The <tt class="sgmltag-element"><signal></tt> and
<tt class="sgmltag-element"><accelerator></tt> elements are used to define
signals and accelerators on the widget.</p><p>The <tt class="sgmltag-element"><widget></tt> element may also
contain an <tt class="sgmltag-element"><accessibility></tt> element, which
contains accessibility related properties. These set various ATK
options (such as ATK properties, relations and actions).</p><p>For each child of the widget, there is an
<tt class="sgmltag-element"><child></tt> element. The
<i class="parameter"><tt>internal-child</tt></i> attribute is used to mark
"internal children of the parent. These children are widgets that
are created when the parent is constructed, such as the
<tt class="classname">GtkVBox</tt> and
<tt class="classname">GtkHButtonBox</tt> in a
<tt class="classname">GtkDialog</tt>.</p><p>The <tt class="sgmltag-element"><child></tt> element contains either
a <tt class="sgmltag-element"><widget></tt> element representing the child
widget, or a <tt class="sgmltag-element"><placeholder></tt> element, which
is ignored when building the interface. It may also contain a
<tt class="sgmltag-element"><packing></tt> element, which contains
<tt class="sgmltag-element"><property></tt> elements defining packing
properties. These map to GtkContainer child packing
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
glade file. All programs working with glade files must
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>
|