File: libglade-dtd.html

package info (click to toggle)
libglade2 1%3A2.4.2-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,148 kB
  • ctags: 461
  • sloc: sh: 8,376; ansic: 4,260; xml: 1,764; makefile: 116
file content (104 lines) | stat: -rw-r--r-- 7,010 bytes parent folder | download
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">&lt;!-- proposed DTD for new glade format --&gt;

&lt;!ELEMENT glade-interface (requires*, widget*) &gt;
&lt;!ATTLIST glade-interface
  xmlns CDATA #FIXED 'http://glade.gnome.org/glade-2.0.dtd' &gt;

&lt;!ELEMENT requires EMPTY &gt;
&lt;!ATTLIST requires
  lib CDATA #REQUIRED &gt;

&lt;!ELEMENT widget (property*, accessibility?, signal*, accelerator*, child*) &gt;
&lt;!ATTLIST widget
  class CDATA #REQUIRED
  id ID #REQUIRED &gt;

&lt;!ELEMENT property (#PCDATA) &gt;
&lt;!-- type is an optional tag, and should be the string name of the
     GType for the property --&gt;
&lt;!-- translatable specifies whether the property should be translated
     before use. --&gt;
&lt;!-- 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.--&gt;
&lt;!ATTLIST property
  name CDATA #REQUIRED
  type CDATA #IMPLIED
  translatable (yes|no) 'no'
  context (yes|no) 'no'
  comments CDATA #IMPLIED
  agent CDATA #IMPLIED &gt;

&lt;!ELEMENT atkproperty (#PCDATA | accessibility)* &gt;
&lt;!ATTLIST atkproperty
  name CDATA #REQUIRED
  type CDATA #IMPLIED
  translatable (yes|no) 'no'
  context (yes|no) 'no'
  comments CDATA #IMPLIED &gt;

&lt;!ELEMENT atkrelation EMPTY &gt;
&lt;!ATTLIST atkrelation
  target CDATA #REQUIRED
  type CDATA #REQUIRED &gt;

&lt;!-- description is assumed to be a translatable string --&gt;
&lt;!ELEMENT atkaction EMPTY &gt;
&lt;!ATTLIST atkaction
  action_name CDATA #REQUIRED
  description CDATA #IMPLIED &gt;

&lt;!ELEMENT accessibility (atkrelation | atkaction | atkproperty)* &gt;

&lt;!ELEMENT signal (property*) &gt;
&lt;!ATTLIST signal
  name CDATA #REQUIRED
  handler CDATA #REQUIRED
  after (yes|no) 'no'
  object IDREF #IMPLIED
  last_modification_time CDATA #IMPLIED &gt;

&lt;!ELEMENT accelerator EMPTY &gt;
&lt;!ATTLIST accelerator
  key CDATA #REQUIRED
  modifiers CDATA #REQUIRED
  signal CDATA #REQUIRED &gt;

&lt;!ELEMENT child ((widget|placeholder), packing?) &gt;
&lt;!-- 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). --&gt;
&lt;!ATTLIST child
  internal-child CDATA #IMPLIED &gt;

&lt;!ELEMENT packing (property+) &gt;

&lt;!ELEMENT placeholder EMPTY &gt;
</pre><p>The <tt class="sgmltag-element">&lt;widget&gt;</tt> elements contain
    <tt class="sgmltag-element">&lt;property&gt;</tt> elements which define widget
    properties.  In general these map to
    <tt class="classname">GObject</tt> properties.</p><p>The <tt class="sgmltag-element">&lt;signal&gt;</tt> and
    <tt class="sgmltag-element">&lt;accelerator&gt;</tt> elements are used to define
    signals and accelerators on the widget.</p><p>The <tt class="sgmltag-element">&lt;widget&gt;</tt> element may also
    contain an <tt class="sgmltag-element">&lt;accessibility&gt;</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">&lt;child&gt;</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">&lt;child&gt;</tt> element contains either
    a <tt class="sgmltag-element">&lt;widget&gt;</tt> element representing the child
    widget, or a <tt class="sgmltag-element">&lt;placeholder&gt;</tt> element, which
    is ignored when building the interface.  It may also contain a
    <tt class="sgmltag-element">&lt;packing&gt;</tt> element, which contains
    <tt class="sgmltag-element">&lt;property&gt;</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>&lt;&lt;Embedding Libglade Interfaces</b></a></td><td align="right"><a accesskey="n" href="libglade-dtd-exceptions.html"><b>Exceptions&gt;&gt;</b></a></td></tr></table></body></html>