|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/gtk-doc/html/libglade/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Glade 2.0 File Format</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.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.6 (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" id="top" 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> </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 <code class="sgmltag-element"><widget></code> elements contain
<code class="sgmltag-element"><property></code> elements which define widget
properties. In general these map to
<code class="classname">GObject</code> properties.</p>
<p>The <code class="sgmltag-element"><signal></code> and
<code class="sgmltag-element"><accelerator></code> elements are used to define
signals and accelerators on the widget.</p>
<p>The <code class="sgmltag-element"><widget></code> element may also
contain an <code class="sgmltag-element"><accessibility></code> 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
<code class="sgmltag-element"><child></code> element. The
<em class="parameter"><code>internal-child</code></em> 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
<code class="classname">GtkVBox</code> and
<code class="classname">GtkHButtonBox</code> in a
<code class="classname">GtkDialog</code>.</p>
<p>The <code class="sgmltag-element"><child></code> element contains either
a <code class="sgmltag-element"><widget></code> element representing the child
widget, or a <code class="sgmltag-element"><placeholder></code> element, which
is ignored when building the interface. It may also contain a
<code class="sgmltag-element"><packing></code> element, which contains
<code class="sgmltag-element"><property></code> 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>
</body>
</html>