<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"/usr/share/sgml/docbook/xml-dtd-4.1.2-1.0-17/docbookx.dtd">
<book>
  <title>wxGlade manual</title>

  <bookinfo>
    <date>2013-07-08</date>

    <author>
      <firstname>Marcello</firstname>

      <surname>Semboli</surname>
    </author>

    <author>
      <firstname>Alberto</firstname>

      <surname>Griggio</surname>
    </author>

    <author>
      <firstname>Carsten</firstname>

      <surname>Grohmann</surname>
    </author>
  </bookinfo>

  <preface>
    <title>Preface</title>

    <para>This manual describes Alberto Griggio's wxGlade program, a Python,
    Perl, Lisp, C++ and XRC Graphical User Interface (<quote>GUI</quote>)
    editor for UNIX and Microsoft Windows. Each of the chapters in this manual
    is designed as a tutorial for using wxGlade and a reference for widgets
    supported until now.</para>

    <section>
      <title>Contacts</title>

      <para>Check the project homepage <ulink
      url="http://wxglade.sourceforge.net">http://wxglade.sourceforge.net</ulink>
      for the mailing list to discuss the project. Use the lists for
      questions, proposals, bug reports and collaboration. Information,
      support and bug reports can be addressed to the wxGlade mailing list
      too.</para>

      <para>Any kind of feedback is always welcome.</para>

      <para>Marcello Semboli <email>dinogen@siena.linux.it</email> has written
      the original version of this document. The current version of this
      document is maintained by Carsten Grohmann.</para>
    </section>

    <section>
      <title>Copyrights and Trademarks</title>

      <para>wxGlade is Copyright 2002-2007 by Alberto Griggio. Use and
      distribution of wxGlade is governed by the MIT license, located in
      Appendix A.</para>

      <para>wxWidgets is Copyright (C) 1998-2005 Julian Smart, Robert Roebling
      et al. See: <ulink
      url="http://www.wxwidgets.org">http://www.wxwidgets.org</ulink> for
      details.</para>

      <para>UNIX is a registered trademark of the X Open Group, Inc.</para>

      <para>Microsoft and Windows are registered trademarks of Microsoft
      Corporation.</para>
    </section>

    <section>
      <title>Abbreviations</title>

      <para>The following abbreviations are used in this manual: <variablelist>
          <varlistentry>
            <term><emphasis>GUI</emphasis></term>

            <listitem>
              <para>Graphical User Interface</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term><emphasis>OS</emphasis></term>

            <listitem>
              <para>Operating system</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>SAE</term>

            <listitem>
              <para>Standalone Edition</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term><emphasis>wx</emphasis></term>

            <listitem>
              <para>abbreviation for <acronym>wxWidgets</acronym></para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>wxg</term>

            <listitem>
              <para>File extension used by wxGlade to store the project in a
              XML file.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>wxWidgets</term>

            <listitem>
              <para>wxWidgets a widget toolkit and tools library for creating
              graphical user interfaces (GUIs) for cross-platform
              applications.</para>

              <para>wxWidgets is open source and written in C++.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term><emphasis>WYSIWYG</emphasis></term>

            <listitem>
              <para>What You See Is What You Get.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term><emphasis>X11</emphasis></term>

            <listitem>
              <para>The X Window System version 11.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>XRC</term>

            <listitem>
              <para>XML-based system for describing wxWidgets resources like
              dialogs, menus or toolbars.</para>

              <para>Those resources are loaded into the application at
              run-time.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>i18n</term>

            <listitem>
              <para>Numeronyms for internationalisation support.</para>

              <para>Internationalisation means adapting software to different
              languages, regional differences, ...</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>gettext</term>

            <listitem>
              <para>Widespread internationalisation (i18n) and localisation
              system.</para>
            </listitem>
          </varlistentry>
        </variablelist></para>
    </section>
  </preface>

  <chapter>
    <title>Introduction to wxGlade</title>

    <section>
      <title>What is wxGlade?</title>

      <para>wxGlade is an open source graphical user interface builder written
      in Python using popular widget toolkit wxWidgets.</para>

      <figure>
        <title>wxGlade windows</title>

        <mediaobject>
          <imageobject>
            <imagedata fileref="wxglade.png"/>
          </imageobject>
        </mediaobject>
      </figure>

      <para>wxGlade allows to create graphical user interfaces using
      wxWidgets. The designer can arrange different widgets using a drag and
      drop WYSIWYG editor. This simplifies the creation of a graphical user
      interface in comparison with manual coded graphical user
      interfaces.</para>

      <para>wxGlade is able to generate source code for Python, Perl, Lisp,
      C++ and XRC based on the designed GUI.</para>

      <para>As you can guess by the name, its model is Glade, the famous
      GTK+/GNOME GUI builder, with which wxGlade shares the philosophy and the
      look &amp; feel (but not a line of code).</para>
    </section>

    <section>
      <title>What Can You Do with wxGlade?</title>

      <para>With wxGlade you can:</para>

      <itemizedlist>
        <listitem>
          <para>Design the whole GUI of your application inclusive simple or
          complex dialogs as well as menu bars, different kinds of buttons and
          text widgets, bitmaps, ...</para>
        </listitem>

        <listitem>
          <para>Use the graphical editor for editing, cutting and pasting
          widgets</para>
        </listitem>

        <listitem>
          <para>Convert your design in source code of your favorite
          language</para>
        </listitem>

        <listitem>
          <para>Run wxGlade on a wide variety of operation systems since it is
          written in Python</para>
        </listitem>
      </itemizedlist>
    </section>

    <section>
      <title>What is wxGlade NOT?</title>

      <para>wxGlade is not a full featured IDE and will never be one. wxGlade
      is just a graphical user interface builder. The generated code does
      nothing apart from displaying the created widgets.</para>

      <para>If you are looking for a complete IDE, maybe Boa Constructor
      <ulink
      url="http://boa-constructor.sourceforge.net">http://boa-constructor.sourceforge.net</ulink>
      or PythonCard <ulink
      url="http://www.pythoncard.org">http://www.pythoncard.org</ulink> is the
      right tool.</para>
    </section>

    <section>
      <title>Basics</title>

      <para>You need to know the basics of wxWidgets or wxPython, as well as
      the basics of C++, Python, Perl or Lisp. You can't use wxGlade if you do
      not have any basic understanding of programming. You can't learn
      wxWidgets programming from reading this manual either.</para>
    </section>

    <section>
      <title>Requirements and Supported Platforms</title>

      <para>wxGlade has been tested and run on Windows, Linux, Mac OSX.</para>

      <para>Because wxGlade is written in Python using wxPython, it can also
      be run on any platform that supports Python and wxPython.</para>

      <para>Especially the wxGlade requirements are:</para>

      <itemizedlist>
        <listitem>
          <para>Python 2 - at least 2.3 or any later version of Python
          2</para>
        </listitem>

        <listitem>
          <para>wxPython 2.6, 2.8 or 30</para>
        </listitem>

        <listitem>
          <para>wxWidgets 2.6, 2.8 or 3.0, the wxWidgets are often bundled
          with wxPython</para>
        </listitem>
      </itemizedlist>

      <note>
        <para>The support for wxWidgets 3.0 as well as wxPython 3.0 based
        currently on the development release series 2.9 of wxPython.</para>
      </note>

      <para>wxWidgets is available at <ulink
      url="http://www.wxwidgets.org">http://www.wxwidgets.org</ulink> and
      wxPython at <ulink
      url="http://www.wxpython.org">http://www.wxpython.org</ulink>.</para>
    </section>

    <section>
      <title>Download</title>

      <para>Source and binary packages for stable versions are available at
      <ulink
      url="http://sourceforge.net/projects/wxglade">http://sourceforge.net/projects/wxglade</ulink>.</para>

      <para>You can get the development version from <ulink
      url="https://bitbucket.org">Bitbucket.org</ulink> at <ulink
      url="https://bitbucket.org/agriggio/wxglade/overview">https://bitbucket.org/agriggio/wxglade/overview</ulink>
      using anonymous <ulink
      url="http://mercurial.selenic.com">Mercurial</ulink>
      (<command>hg</command>) access.</para>
    </section>

    <section>
      <title>Installation</title>

      <para>wxGlade is available in 4 different package types:</para>

      <itemizedlist>
        <listitem>
          <para>the sources packages (<filename>.zip</filename> and
          <filename>.tar.gz</filename>)</para>
        </listitem>

        <listitem>
          <para>the full installer at Microsoft Windows
          (<filename>wxGlade-VERSION-setup.exe</filename>)</para>
        </listitem>

        <listitem>
          <para>the installer of the standalone edition at Microsoft Windows
          (<filename>wxGlade-SAE-VERSION-setup.exe</filename>)</para>
        </listitem>

        <listitem>
          <para>development version fetched with Mercurial or downloaded the
          current packaged development version from <ulink
          url="https://bitbucket.org">https://bitbucket.org</ulink></para>
        </listitem>
      </itemizedlist>

      <section>
        <title>Installing at Microsoft Windows</title>

        <para>The default installer requires a local installation Python and
        wxPython. The wxWidgets are bundled with wxPython on Microsoft
        Windows. Thereby you don't need to install wxWidgets
        separately.</para>

        <para>There is no need to install additional packages for the
        standalone edition, because the standalone edition includes the
        required parts of Python, wxPython and wxWidgets.</para>

        <para>The installation process is quite simple. Just download the
        installer file, execute it and follow the installer
        instructions.</para>
      </section>

      <section>
        <title>Installing at Unix/Linux</title>

        <para>The current Linux distributions provide wxGlade packages. Use
        the distribution specific install mechanism to install the wxGlade
        package and all dependencies.</para>

        <para>You may install wxGlade from the source package if your
        distribution doesn't contain a proper package.</para>
      </section>

      <section>
        <title>Installing from Source</title>

        <para>The installation from scratch requires Python, wxPython and
        wxWidgets. Those three components have to be installed first. Maybe
        you could use already packaged versions of those components for your
        operating system. Otherwise read the installation documentation of the
        missing components and follow the instructions.</para>

        <para>There are two ways for installing wxGlade from source - single
        or multi user installation.</para>

        <para>Download a source package or a development package in a first
        step.</para>

        <section id="single.user.install.section">
          <title>Single user installation</title>

          <para>Extract the downloaded package into a separate directory e.g.
          a subdirectory below user's home directory. Change in this directory
          and execute the <command>wxglade</command> file on Unix/Linux or
          <command>wxglade.pyw</command> on Microsoft Windows.</para>

          <para>That's all. Installations below users home directory don't
          require administrative permissions.</para>
        </section>

        <section>
          <title>Multi user installation - variant 1</title>

          <para>The first variant of a multi user installation is very similar
          to <xref linkend="single.user.install.section"/> except the
          installation directory. And probably you need administrative
          permissions. You could extract the wxGlade source package e.g. into
          <command>c:\program file\wxglade</command> on Microsoft Windows or
          into <command>/opt/wxglade</command> on Unix/Linux.</para>
        </section>

        <section>
          <title>Multi user installation - variant 2</title>

          <para>Extract the downloaded package into a temporary directory.
          Change in this directory and execute the Python setup script using
          <command>python setup.py</command> in a terminal window.</para>

          <example>
            <title>Installing wxGlade at /opt/wxglade</title>

            <programlisting># python setup.py install --prefix /opt/wxglade
running install
running build
running build_py
creating build
creating build/lib.linux-i686-2.7
creating build/lib.linux-i686-2.7/wxglade
creating build/lib.linux-i686-2.7/wxglade/widgets
creating build/lib.linux-i686-2.7/wxglade/widgets/combo_box
[...]
copying docs/html/ch04s23.html -&gt; /opt/wxglade/share/doc/wxglade/doc/html
copying docs/html/ch04s26.html -&gt; /opt/wxglade/share/doc/wxglade/doc/html
copying docs/html/ch05s02.html -&gt; /opt/wxglade/share/doc/wxglade/doc/html
copying docs/html/pr01.html -&gt; /opt/wxglade/share/doc/wxglade/doc/html
creating /opt/wxglade/share/doc/wxglade/doc/pdf
copying docs/pdf/manual.pdf -&gt; /opt/wxglade/share/doc/wxglade/doc/pdf
creating /opt/share/man
creating /opt/share/man/man1
copying docs/man/wxglade.1 -&gt; /opt/wxglade/share/man/man1
copying docs/man/manpage.xml -&gt; /opt/wxglade/share/doc/wxglade
copying docs/src/manual.xml -&gt; /opt/wxglade/share/doc/wxglade
running install_egg_info
Writing /opt/wxglade/lib/python2.7/site-packages/wxGlade-0.6.5_-py2.7.egg-info
</programlisting>
          </example>

          <para>After the installation has finished the wxGlade main script
          <command>wxglade </command>is located at <command>&lt;install
          directory&gt;/bin</command>.</para>

          <para>Execute the script to start wxGlade</para>

          <example>
            <title>Starting wxGlade at /opt/wxglade/bin/wxglade</title>

            <programlisting># /opt/wxglade/bin/wxglade 
Starting wxGlade version 0.6.5 on Python 2.7.2+
Base directory:             /opt/wxglade/lib/python2.7/site-packages/wxglade
Documentation directory:    /opt/wxglade/lib/python2.7/site-packages/wxglade/docs
Icons directory:            /opt/wxglade/lib/python2.7/site-packages/wxglade/icons
Build-in widgets directory: /opt/wxglade/lib/python2.7/site-packages/wxglade/widgets
Template directory:         /opt/wxglade/lib/python2.7/site-packages/wxglade/templates
Credits file:               /opt/wxglade/share/doc/wxglade/credits.txt
License file:               /opt/wxglade/share/doc/wxglade/license.txt
Tutorial file:              /opt/wxglade/lib/python2.7/site-packages/wxglade/docs/html/index.html
Using wxPython 2.8.12.1
loaded code generator for perl
loaded code generator for XRC
loaded code generator for python
loaded code generator for lisp
loaded code generator for C++
Found widgets listing -&gt; /opt/wxglade/lib/python2.7/site-packages/wxglade/widgets/widgets.txt
loading widget modules:
        frame
        dialog
[...]
</programlisting>
          </example>
        </section>
      </section>
    </section>
  </chapter>

  <chapter>
    <title>Exploring wxGlade</title>

    <section>
      <title>Quick start</title>

      <para>We will design a simple form.</para>

      <para>Start wxGlade by running the <command>wxglade</command> program on
      Unix platforms or the <command>wxglade.pyw</command> program on
      Microsoft Windows.</para>

      <para>You will see a Main Palette with several buttons, and a Tree
      Window with an icon marked <guiicon>Application</guiicon>. A Properties
      Window shows the properties of the Application.</para>

      <para>If you move the mouse over a button in the main window, a tooltip
      will display its function.</para>

      <para>To add a frame in the design window, from the Main Palette choose
      the first button: <quote><guibutton>Add a
      frame</guibutton></quote>.</para>

      <para>Then choose <classname>wxFrame</classname> as the base
      class.</para>

      <para>Look at the tree window and see that two icons are generated under
      the application icon, a frame icon and a sizer icon.</para>

      <para>If you double click with the mouse on the frame icon, the designer
      window appears. Notice that the sizer is displayed as a set of gray
      boxes: they are the <quote>slots</quote> of the grid sizer where you
      will place the widgets.</para>

      <para>You put a widget on a sizer by selecting it on the Main Window,
      then click on an empty slot on the frame on the designer window. Try
      adding a static text, a text control and a button.</para>

      <para>If you want to add something else, add empty slots on the sizer by
      right-clicking on the sizer on the tree window and selecting
      <quote><guilabel>Add slot</guilabel></quote>.</para>

      <para>Play around, adding four or five widgets on the frame.</para>

      <para>Now look at the properties form; there are three tabs. In the
      <quote><guilabel>Common</guilabel></quote> tab you can specify the name,
      size and color of the widget.</para>

      <para>In the <quote><guilabel>Layout</guilabel></quote> tab you can
      adjust borders and alignments.</para>

      <para>In the <quote><guilabel>Widget</guilabel></quote> tab you find the
      properties depending on the widget.</para>

      <para>You can select the properties of a widget by clicking on the
      designer window or the corresponding icon on the tree window.</para>

      <para>Try adjusting widgets with the properties form until you know you
      have played enough.</para>

      <para>Now let's generate the code.</para>

      <para>Select the Application icon on the tree window and go to the
      properties window.</para>

      <para>Check Name and Class, choose a <quote><guilabel>Top
      window</guilabel></quote>, check <quote><guilabel>Single
      file</guilabel></quote> and choose the language and set the
      <quote><guilabel>Output path</guilabel></quote> by pushing the button
      for selecting a path and a filename.</para>

      <para>Finally press the <quote><guibutton>Generate
      code</guibutton></quote> button, and the code is generated.</para>

      <para>Compile and enjoy.</para>
    </section>

    <section>
      <title>Basics of wxGlade</title>

      <para>The program wxGlade is a tool for designing Graphical User
      Interfaces (GUI). It is intended to be used with the wxWidgets framework
      in all its flavors: C++, Lisp, Perl, Python and XRC.</para>

      <para>You use a visual editor for creating forms, menus and toolbars
      with the mouse.</para>

      <para>Your design is saved in a <filename>.wxg</filename> file, which is
      the wxGlade file format. Then you generate source code or XRC by using
      visual tools or invoking wxGlade at the command line. You can also use
      wxGlade in your makefile by generating source code only when the
      <filename>.wxg</filename> file changes.</para>

      <para>A <filename>.wxg</filename> file can contain multiple forms,
      panels, menus and toolbars and generate either a single file containing
      all classes or multiple files containing one class each.</para>

      <para>wxGlade does not manage events, file inclusion, function names,
      stubs or anything else but graphic interface code.</para>
    </section>

    <section id="best.practice.section">
      <title>Best Practice</title>

      <para>The main goal of the recommendations is to improve the usability
      and maintainability of code generated by wxGlade. The recommendations
      combine the experience of many wxGlade users.<variablelist>
          <varlistentry id="overwrite.existing.sources.best.practice.section">
            <term>Always overwrite existing sources</term>

            <listitem>
              <para>wxGlade is able to adapt existing source files after the
              design has changed. This feature have some limitations e.g. in
              case of name changes and changed dependencies. Thereby it’s
              recommended to overwrite existing sources always and extend
              derived classes with your functionality.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Use new namespace for Python projects</term>

            <listitem>
              <para>It’s generally recommended to use the new namespace
              (<quote><command>import wx</command></quote>) for wxPython
              projects. The old one (<quote><command>from wxPython.wx import
              *</command></quote>) has some significant drawbacks like
              potential namespace conflicts.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Use the C++ naming convention</term>

            <listitem>
              <para>Use the C++ names for all wx identifies like classes,
              colours or events of the wx framework. Please don’t enter
              identifiers already formatted in a language specific form.
              wxGlade is able to transform the entered original identifiers in
              language-specific terms. You can use your own style for your
              object certainly.</para>

              <example>
                <title>Correct entered wx constant</title>

                <para>Enter <quote><command>wxID_CANCEL</command></quote> even
                for wxPython instead of
                <quote><command>wx.ID_CANCEL</command></quote></para>
              </example>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Always use UTF-8 encoding</term>

            <listitem>
              <para>It's generally recommended to use Unicode encoding for all
              non-ASCII character sets.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Always use gettext support</term>

            <listitem>
              <para>Enable internationalisation support. There are no
              disadvantages if internationalization is active but not
              used.</para>

              <para>It's hard to add i18n and Unicode afterwards from project
              point of view.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Suggestion on naming</term>

            <listitem>
              <para>The wxWidgets are written in C++ and follow the C++ naming
              convention. This naming convention may differ from the language
              specific and / or project specific naming convention.</para>

              <para>For consistency's sake, it's recommended to use the
              wxWidgets style.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Prevent language specific statements</term>

            <listitem>
              <para>Usage of language specific codes e.g. for
              <quote><guilabel>Extra code for this widget</guilabel></quote>
              or in generic input fields complicated changing the output
              langauge later e.g. to re-use GUI elements in another project
              too. </para>
            </listitem>
          </varlistentry>
        </variablelist></para>
    </section>

    <section>
      <title>Language specific peculiarities</title>

      <section>
        <title>Python</title>

        <para>It's not recommended to use nested classed and functions in
        combination with disabled feature <quote><guilabel>Overwrite existing
        sources</guilabel></quote>. Use derived classes to implement your
        functionality. See <xref linkend="best.practice.section"/>
        also.</para>
      </section>

      <section>
        <title>Lisp</title>

        <para>The Lisp code generated by wxGlade may or may not working with a
        current Lisp dialect.</para>

        <para>Help to improve the Lisp support is really welcome.</para>
      </section>
    </section>

    <section>
      <title>Command line invocation</title>

      <para>You can run wxGlade without parameters to start the GUI on an
      empty application as follows:</para>

      <para><command>wxglade</command></para>

      <para>Run wxGlade GUI on an existing application specifying the
      <filename>.wxg</filename> file as follow:</para>

      <para><command>wxglade &lt;WXG File&gt;</command></para>

      <para>If you only want to generate the code without starting the GUI,
      use the <option>-g</option> or <option>--generate-code</option> option
      with the language as argument as follows:</para>

      <para><command>wxglade -g &lt;LANGUAGE&gt; &lt;WXG
      File&gt;</command></para>

      <para><command>wxglade --generate-code=&lt;LANGUAGE&gt; &lt;WXG
      File&gt;</command></para>

      <para>Possible values for LANGUAGE are "XRC", "python", "perl", "lisp"
      or "C++".</para>

      <para>You can also specify the destination of the generated code with
      <option>-o</option> or <option>--output</option> option:</para>

      <para><command>wxglade -g &lt;LANGUAGE&gt; -o &lt;DESTINATION&gt;
      &lt;WXG File&gt;</command></para>

      <para>The DESTINATION argument can be a file or a directory. If
      DESTINATION is a file, wxGlade will generate single-file source code. In
      case DESTINATION is a directory wxGlade will generate multiple-file
      source code.</para>

      <para>This is the complete description of the command line:</para>

      <programlisting># wxglade --help
Usage: wxglade &lt;WXG File&gt;             start the wxGlade GUI
 or:   wxglade &lt;Options&gt; &lt;WXG File&gt;   generate code from command line
 or:   wxglade --version              show programs version number and exit
 or:   wxglade -h|--help              show this help message and exit
Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -g LANG, --generate-code=LANG
                        (required) output language, valid languages are: C++,
                        XRC, lisp, perl, python
  -o PATH, --output=PATH
                        (optional) output file in single-file mode or output
                        directory in multi-file mode
Example: Generate Python code out of myapp.wxg
   wxglade -o temp -g python myapp.wxg
Report bugs to:    &lt;wxglade-general@lists.sourceforge.net&gt; or at
                   &lt;http://sourceforge.net/projects/wxglade/&gt;
wxGlade home page: &lt;http://wxglade.sourceforge.net/&gt;
</programlisting>

      <note>
        <para>Use <command>wxglade.pyw</command> instead of
        <command>wxglade</command> on Microsoft Windows.</para>
      </note>
    </section>

    <section id="using.source.code.section">
      <title>Using the source code</title>

      <para>There are a lot of options to control the source code generation
      process. They are bundled in the
      <quote><guilabel>Application</guilabel></quote> page of the
      <quote><guilabel>Properties</guilabel></quote> window (see <xref
      linkend="properties_window_application.fig"/>). Let's talk about three
      of those options -<quote><guilabel>Single file</guilabel></quote>,
      <quote><guilabel>Separate file for each class</guilabel></quote> and
      <quote><guilabel>Overwrite existing sources</guilabel></quote>.</para>

      <para>The first two options triggers wxGlade to generate one file with
      all classes inside or multiple files - one per class/widget. The
      <quote><guilabel>Single file</guilabel></quote>option includes source
      and header file for C++ certainly.</para>

      <para>The third option <quote><guilabel>Overwrite existing
      sources</guilabel></quote> is just about control - <quote>Full control
      by wxGlade</quote> and <quote>Shared control</quote>. It separated the
      two ways to work with wxGlade.</para>

      <section id="full.control.section">
        <title id="full.control.wxglade.section">Full control by
        wxGlade</title>

        <para>If <quote><guilabel>Overwrite existing
        sources</guilabel></quote> is set, wxGlade will re-generated all
        source files and drop potential manual changes. You've to include the
        generated source files and use derived classes for implementing
        changes.</para>

        <para>The files written by wxGlade are consistent always. Also if e.g.
        classes or attributes are renamed. Rewriting the whole files is less
        error-prone in comparison with <xref
        linkend="shared.control.section"/>. That is the advantages of this
        method.</para>

        <para>This method is the recommended one.</para>
      </section>

      <section id="shared.control.section">
        <title>Shared control</title>

        <para>Manual changes in the source files won't be overwritten if
        <quote><guilabel>Overwrite existing sources</guilabel></quote> isn't
        set. You can safely edit the source code of the generated class. This
        is because wxGlade marks the untouchable code with the special
        comments <quote><command>begin wxGlade</command></quote> and
        <quote><command>end wxGlade</command></quote>. So you can edit all you
        need outside these two tags. When you make changes in your forms, a
        new code generation will not modify the user code. wxGlade is applying
        most of the changes but not all changes. Especially renamed classes
        and attributes need additional attention.</para>

        <note>
          <para>Overwriting multiple files is not recommended as well as
          overwriting of files with percent character (<quote>%</quote>)
          inside is not supported.</para>
        </note>
      </section>

      <section id="output.path.filenames.section">
        <title>Output path and filenames</title>

        <para><quote><guilabel>Output path</guilabel></quote> specifies the
        name of the output file for <quote><guilabel>Single
        file</guilabel></quote> projects or the output directory for
        multi-file projects (<quote><guilabel>Separate file for each
        class</guilabel></quote>). The filename has to include the appropriate
        suffix of the programming language always. An exception is the
        <quote><guilabel>Output path</guilabel></quote> for
        <quote><guilabel>Single file</guilabel></quote> C++ projects. Filename
        don't contains the filename extension now. The extension for C++
        source and header files will be appended later automatically.</para>
      </section>

      <section id="automatically.created.wxapp.instance.section">
        <title>Automatically created <classname>wxApp</classname>
        instance</title>

        <para>wxGlade is able to extent the created source for by a code
        sequence to create and start an instance of projects
        <quote><guilabel>Top window</guilabel></quote>.</para>

        <para>In case <quote><guilabel>Name</guilabel></quote> and
        <quote><guilabel>Class</guilabel></quote> are set, a detailed start
        code with a derived class of <classname>wxApp</classname> will be
        created. If just <quote><guilabel>Name</guilabel></quote> is given, a
        simplified start code will be generated.</para>

        <para>There is a short explanation of
        <quote><guilabel>Class</guilabel></quote> and
        <quote><guilabel>Name</guilabel></quote>in <xref
        linkend="common.properties.section"/>.</para>

        <para>The application start code of a multi-file project will be
        recreated every time the code generation is running.</para>

        <para>In opposition the application start code of single-file projects
        will not updated if the name of the <quote><guilabel>Top
        window</guilabel></quote> has changed and <quote><guilabel>Overwrite
        existing sources</guilabel></quote> is not set.</para>

        <para><example>
            <title>Detailed application start code in Perl</title>

            <para><programlisting>package MyApp;
use base qw(Wx::App);
use strict;
sub OnInit {
        my( $self ) = shift;
        Wx::InitAllImageHandlers();
        my $frame_1 = MyFrame-&gt;new();
        $self-&gt;SetTopWindow($frame_1);
        $frame_1-&gt;Show(1);
        return 1;
}
# end of class MyApp
package main;
unless(caller){
        my $local = Wx::Locale-&gt;new("English", "en", "en"); # replace with ??
        $local-&gt;AddCatalog("app"); # replace with the appropriate catalog name
        my $app = MyApp-&gt;new();
        $app-&gt;MainLoop();
}</programlisting></para>
          </example></para>

        <example>
          <title>Simplified application start code in Perl</title>

          <para><programlisting>package main;
unless(caller){
        my $local = Wx::Locale-&gt;new("English", "en", "en"); # replace with ??
        $local-&gt;AddCatalog("PlOgg1_app"); # replace with the appropriate catalog name
        local *Wx::App::OnInit = sub{1};
        my $PlOgg1_app = Wx::App-&gt;new();
        Wx::InitAllImageHandlers();
        my $Mp3_To_Ogg = PlOgg1_MyDialog-&gt;new();
        $PlOgg1_app-&gt;SetTopWindow($Mp3_To_Ogg);
        $Mp3_To_Ogg-&gt;Show(1);
        $PlOgg1_app-&gt;MainLoop();
}</programlisting></para>
        </example>
      </section>

      <section>
        <title>Compiling C++ code</title>

        <para>You can compile your wxGlade project after the generation of the
        C++ source and header files. The following examples demonstrate
        compiling on Linux command line using <command>g++</command>.</para>

        <example>
          <title>Compiling a single file C++ project on Linux</title>

          <programlisting># g++ FontColour.cpp $(wx-config --libs) $(wx-config --cxxflags) -o FontColour
# ll FontColour*
-rwxr-xr-x 1 carsten carsten 72493 Jun 15 09:22 FontColour
-rwxr-xr-x 1 carsten carsten  1785 Mai 11 19:24 FontColour.cpp
-rwxr-xr-x 1 carsten carsten  1089 Jun 11 07:09 FontColour.h</programlisting>
        </example>

        <example>
          <title>Compiling a multi file C++ project on Linux</title>

          <programlisting># g++  CPPOgg2_main.cpp $(wx-config --libs) $(wx-config --cxxflags) \
       -o CPPOgg2_main CPPOgg2_MyDialog.cpp CPPOgg2_MyFrame.cpp
# ll CPPOgg2*
-rwxr-xr-x 1 carsten carsten 108354 Jun 15 09:33 CPPOgg2_main
-rwxr-xr-x 1 carsten carsten    844 Mai 11 19:25 CPPOgg2_main.cpp
-rw-r--r-- 1 carsten carsten   5287 Mai 18 19:06 CPPOgg2_MyDialog.cpp
-rw-r--r-- 1 carsten carsten   1829 Jun 11 07:11 CPPOgg2_MyDialog.h
-rw-r--r-- 1 carsten carsten   1785 Mai 11 19:25 CPPOgg2_MyFrame.cpp
-rw-r--r-- 1 carsten carsten   1290 Jun 11 07:10 CPPOgg2_MyFrame.h</programlisting>
        </example>
      </section>
    </section>

    <section>
      <title>Handling XRC files</title>

      <para>wxGlade is able to save projects as XRC files and to convert XRC
      files into wxGlade projects.</para>

      <para>One way for converting XRC files is the usage of the Python script
      <command>xrc2wxg.py</command> at command line. The script is part of
      wxGlade.</para>

      <example>
        <title>Converting a XRC file into a wxGlade project</title>

        <programlisting># ./xrc2wxg.py FontColour.xrc

# ls -l FontColour.*
-rw-r--r-- 1 carsten carsten 5554 Dez  4 20:36 FontColour.wxg
-rw-r--r-- 1 carsten carsten 4992 Dez  4 20:13 FontColour.xrc</programlisting>
      </example>

      <para>The <quote><guimenu>File</guimenu></quote> menu provides a menu
      item <quote><guimenuitem>Import from XRC...</guimenuitem></quote> to
      import and open a XRC file directly.</para>

      <para>The following example shows how to load and show the frame
      <quote>Main</quote> from XRC file <filename>test.xrc</filename>.</para>

      <example>
        <title>wxPython code to load and show a XRC resource</title>

        <programlisting>#!/usr/bin/env python

import wx
from wx import xrc

GUI_FILENAME = "test.xrc"
GUI_MAINFRAME_NAME = "Main"

class MyApp(wx.App):
    def OnInit(self):
        self.res = xrc.XmlResource(GUI_FILENAME)
        self.frame = self.res.LoadFrame(None, GUI_MAINFRAME_NAME)
        self.frame.Show()
        return True

if __name__ == '__main__':
    app = MyApp()
    app.MainLoop()</programlisting>
      </example>
    </section>

    <section id="basic.bitmaps.section">
      <title>Specifying the path of bitmaps</title>

      <para>In wxGlade some widgets need to specify a bitmap path. You can use
      any graphic format supported by wxWidgets.</para>

      <para>The bitmap can be specified in several ways:</para>

      <para>Usually you can type an absolute path in a text box or browse for
      a bitmap with a file dialog. This will produce a
      <classname>wxBitmap</classname> object with the typed string as bitmap
      path (e.g. <emphasis>wxBitmap("/usr/share/icons/application.png",
      wxBITMAP_TYPE_ANY)</emphasis>)</para>

      <para>You can enter a variable name using the <emphasis>var:</emphasis>
      tag in the text box. This will produce a <classname>wxBitmap</classname>
      object with the variable name as bitmap path (e.g.
      <emphasis>var:my_bitmap_path</emphasis> produces
      <emphasis>wxBitmap(my_bitmap_path, wxBITMAP_TYPE_ANY)</emphasis>). In
      Perl code generation a <quote>$</quote> sign is added if you omit
      it.</para>

      <para>You can enter a code chunk returning a
      <classname>wxBitmap</classname>, by using the <emphasis>code:</emphasis>
      tag. This inserts verbatim the code you enter in brackets and nothing
      more (e.g.: if <classname>wxSomeWidget</classname> needs a
      <classname>wxBitmap</classname> as an argument, the string
      <emphasis>code:if (x == 0) get_bitmap1() else get_bitmap2();</emphasis>
      produces <emphasis>wxSomeWidget((if (x == 0) get_bitmap1() else
      get_bitmap2();), option1, option2)</emphasis>).</para>

      <para>wxGlade never declares or assigns variable or function names, so
      after code generation, you have to provide extra code to declare your
      variables or functions.</para>

      <para>If you use <emphasis>var</emphasis>: or <emphasis>code:</emphasis>
      tags the preview window shows an empty bitmap of fixed size.</para>
    </section>
  </chapter>

  <chapter>
    <title>wxGlade User Interface</title>

    <section>
      <title>Main Palette</title>

      <para>The main window is a palette that hosts the menu and the widget
      choice buttons.</para>

      <para><figure>
          <title>The Main Palette</title>

          <graphic fileref="main_window.png"/>
        </figure></para>

      <para>If you pass the mouse pointer over a button a tooltip shows the
      button's description.</para>

      <para>The <quote><guibutton>Add a Frame</guibutton></quote> button and
      the <quote><guibutton>Add a Dialog/Panel</guibutton></quote> button
      bring up a dialog to add a frame, a dialog or a panel to your
      project.</para>

      <para>The <quote><guibutton>Add a MenuBar</guibutton></quote> button
      asks you for the name of the class then adds a menu bar to your
      project.</para>

      <para>The <quote><guibutton>Add a ToolBar</guibutton></quote> button
      asks you for the name of the class then adds a toolbar to your
      project.</para>

      <para>The other buttons in the main window add widgets to a form. When
      you click on one, the mouse pointer changes to an arrow. Then you can
      click on a sizer's empty cell to add the widget to it.</para>
    </section>

    <section>
      <title>Tree Window</title>

      <para>The tree window shows the logical hierarchy of widgets and its
      child-widgets. For example you can see a panel as a tree's node and the
      widgets on it as child nodes. <figure>
          <title>The Tree Window</title>

          <graphic fileref="tree_window.png"/>
        </figure></para>

      <para>You can show or hide the tree window by the menu item View/Show
      Tree.</para>

      <para>Usually a frame or a panel contains a sizer, so you often see a
      sort of panel-sizer-widgets structure. The tree gets more complex when
      you nest sizers within sizers.</para>

      <para>You can navigate the visual presentation of your widget tree by
      mouse, expand and collapse sizers, and copy, cut or remove
      widgets.</para>

      <para>A click on an icon in the tree window displays the properties of
      the corresponding element in the properties window. A double click in a
      frame, dialog or panel icon makes the designer window show it as it
      appears. Clicking with the right button of the mouse gives you a pop-up
      menu. <figure id="label_menu.fig">
          <title id="label_menu.title">The menu for a widget</title>

          <graphic fileref="label_menu.png"/>
        </figure> <figure id="sizer_menu.fig">
          <title id="sizer_menu.title">The menu for a sizer</title>

          <graphic fileref="sizer_menu.png"/>
        </figure> The pop-up menu for a widget allows you to copy, cut or
      remove the element. The pop-up menu for a sizer allows you to copy, cut
      or remove the element, or add or insert an empty slot.</para>

      <note>
        <para>Often when you add an empty slot, you have to make the designer
        window larger, to show the new slot.</para>
      </note>
    </section>

    <section>
      <title>Design Window</title>

      <para>The design window shows the frame or panel you are creating in
      WYSIWYG mode and allows you to select a widget from the main palette and
      to put it on an empty slot of a sizer. You can show the design window by
      double-clicking on the icon of a frame or dialog in the tree window.
      <figure>
          <title>The Design Window</title>

          <graphic fileref="design_window_empty_slot.png"/>
        </figure></para>

      <para>By clicking with the right mouse button on a widget you can access
      the context menu. Notice that the sizers, which are invisible elements,
      have a little gray <quote>handle,</quote> that you can click to select
      the sizer or let the pop-up menu appear.</para>

      <para>The pop-up menu is the same as the one you get in the Tree Window,
      as shown in <xref linkend="label_menu.fig"/> or in <xref
      linkend="sizer_menu.fig"/>.</para>
    </section>

    <section>
      <title>Properties Window</title>

      <para>The properties window lets you see and edit the properties that
      apply to the selected element. This window consists up to six different
      tabs. All six tabs are not always present. The visibility of the single
      tabs depends on the widget type. Most widgets have a
      <quote><guilabel>Common</guilabel></quote> tab and a
      <quote><guilabel>Code</guilabel></quote> tab. The combination of
      presented tabs depends on the widget type.</para>

      <para>For example:</para>

      <itemizedlist>
        <listitem>
          <para><classname>wxFrame</classname> widgets have
          <quote><guilabel>Common</guilabel></quote>,
          <quote><guilabel>Widget</guilabel></quote> and
          <quote><guilabel>Code</guilabel></quote> tabs</para>
        </listitem>

        <listitem>
          <para>Spacers have the tabs
          <quote><guilabel>Layout</guilabel></quote> and
          <quote><guilabel>Code</guilabel></quote></para>
        </listitem>

        <listitem>
          <para><classname>wxGridSizer</classname> widgets have
          <quote><guilabel>Common</guilabel></quote> and
          <quote><guilabel>Grid</guilabel></quote></para>
        </listitem>

        <listitem>
          <para><classname>wxBoxSizer</classname> widgets only have the
          <quote><guilabel>Common</guilabel></quote> tab</para>
        </listitem>
      </itemizedlist>

      <para>Editing properties is quite simple; Properties are represented by
      buttons, text boxes, checks and other controls. Usually they are
      referenced by the same name or symbol that you find writing C++
      code.</para>

      <para>Usually you get the changes in the design window in real time. In
      some cases you have to push the
      <quote><guibutton>Apply</guibutton></quote> button. For example, the
      <classname>wxNotebook</classname> widget shows in its properties window
      a list of child <classname>wxPanel</classname>s. You have to press the
      <quote><guibutton>Apply</guibutton></quote> button to show changes you
      make when you add or remove panels.</para>

      <para>You can show or hide the properties window by the menu item
      <menuchoice>
          <guimenu>View</guimenu>

          <guimenuitem>Show Properties</guimenuitem>
        </menuchoice>.</para>

      <section>
        <title>Application Properties</title>

        <para>The page <quote><guilabel>Application</guilabel></quote>
        contains the general settings of the active wxGlade project.</para>

        <para><figure id="properties_window_application.fig">
            <title>Project Properties - Application settings</title>

            <mediaobject>
              <imageobject>
                <imagedata fileref="properties_window_application.png"/>
              </imageobject>
            </mediaobject>
          </figure><glosslist>
            <glossentry>
              <glossterm><quote><guilabel>Name</guilabel></quote></glossterm>

              <glossdef>
                <para>Name of the instance created from
                <quote><guilabel>Class</guilabel></quote></para>

                <para><xref
                linkend="automatically.created.wxapp.instance.section"/>
                provides more information</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>Class</guilabel></quote></glossterm>

              <glossdef>
                <para>Name of the automatically generated class derived from
                <classname>wxApp</classname></para>

                <para><xref
                linkend="automatically.created.wxapp.instance.section"/>
                provides more information</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>Encoding</guilabel></quote></glossterm>

              <glossdef>
                <para>Encoding of the generated source files.</para>

                <para>The encoding to use with new projects will be
                determinated automatically based on the machine settings.
                <quote>UTF-8</quote> will be used if the automatic detection
                fails.</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>Enable gettext
              support</guilabel></quote></glossterm>

              <glossdef>
                <para>Enable internationalisation and localisation for the
                generated source files</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>Top
              window</guilabel></quote></glossterm>

              <glossdef>
                <para>This widget is used as top window in the
                <classname>wxApp</classname> start code</para>

                <para><xref
                linkend="automatically.created.wxapp.instance.section"/>
                provides more information</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>Code
              Generation</guilabel></quote></glossterm>

              <glossdef>
                <para>Write all source code in one file or split the source
                into one file per class / widget</para>

                <para><xref linkend="using.source.code.section"/> provides
                more information</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>Language</guilabel></quote></glossterm>

              <glossdef>
                <para>Programming language to generate the source files
                in</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>wxWidgets
              compatibility</guilabel></quote></glossterm>

              <glossdef>
                <para>Generate source files for the selected wxWidgets
                version</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>Overwrite existing
              sources</guilabel></quote></glossterm>

              <glossdef>
                <para>Overwrite existing source files or modify the code
                sequences generated by wxGlade in place</para>

                <para><xref linkend="using.source.code.section"/> provides
                more information</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>Output
              path</guilabel></quote></glossterm>

              <glossdef>
                <para>Output file or directory</para>

                <para><xref linkend="output.path.filenames.section"/> provides
                more information</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>Generate
              code</guilabel></quote></glossterm>

              <glossdef>
                <para>Start generating source files</para>
              </glossdef>
            </glossentry>
          </glosslist>The page <quote><guilabel>Settings</guilabel></quote>
        contains the language specific settings of the active wxGlade
        project.</para>

        <para><figure>
            <title>Project Properties - Language settings</title>

            <mediaobject>
              <imageobject>
                <imagedata fileref="properties_window_settings.png"/>
              </imageobject>
            </mediaobject>
          </figure><glosslist>
            <glossentry>
              <glossterm><quote><guilabel>Indentation
              mode</guilabel></quote></glossterm>

              <glossdef>
                <para>Use spaces or tabs for indentation within the generated
                source files.</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>Indentation
              amount</guilabel></quote></glossterm>

              <glossdef>
                <para>Number of spaces or tabs used for one indentation
                level.</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>Use old import "from wxPython.wx
              import *"</guilabel></quote></glossterm>

              <glossdef>
                <para>It is generally recommended to use the new
                namespace.</para>

                <para>The old one (<emphasis><quote>from wxPython.wx import
                *</quote></emphasis>) has some significant drawbacks like
                potential namespace conflicts.</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>Source
              ext</guilabel></quote></glossterm>

              <glossdef>
                <para>Extension of the source file.</para>

                <para>The extension doesn't has a leading dot.</para>
              </glossdef>
            </glossentry>

            <glossentry>
              <glossterm><quote><guilabel>Header
              ext</guilabel></quote></glossterm>

              <glossdef>
                <para>Extension of the header file.</para>

                <para>The extension doesn't has a leading dot.</para>
              </glossdef>
            </glossentry>
          </glosslist></para>
      </section>

      <section id="common.properties.section">
        <title>Common Properties</title>

        <para>The first tab contains the common properties that apply to all
        widgets. As shown in <xref linkend="properties_window_tab_1.fig"/> the
        common properties are related to name, class, size, colors, fonts and
        tooltip.</para>

        <figure id="properties_window_tab_1.fig">
          <title>Common Properties</title>

          <graphic fileref="properties_window_tab_1.png"/>
        </figure>

        <para>The property name is a mangled version of the wxWidgets property
        name. The property input field is disabled by default. wxGlade won't
        use disabled properties for code generation. wxWidgets defaults are
        used instead.</para>

        <para>Enable the property in the wxGlade GUI to set non-default values
        (see <xref linkend="properties_window_tab_1_change.fig"/>).</para>

        <figure id="properties_window_tab_1_change.fig">
          <title>Changing Common Properties</title>

          <graphic fileref="properties_window_tab_1_change.png"/>
        </figure>

        <glosslist>
          <glossentry>
            <glossterm><quote><guilabel>Name</guilabel></quote></glossterm>

            <glossdef>
              <para>Name of the instance created from
              <quote><guilabel>Class</guilabel></quote></para>
            </glossdef>
          </glossentry>

          <glossentry>
            <glossterm><quote><guilabel>Class</guilabel></quote></glossterm>

            <glossdef>
              <para>Name of the subclass of the widget. How this name affects
              code generation depends on the output language.</para>

              <figure>
                <title>Common Properties of a subclassed widget (default
                behaviour)</title>

                <mediaobject>
                  <imageobject>
                    <imagedata fileref="example_subclassed.png"/>
                  </imageobject>
                </mediaobject>
              </figure>

              <example>
                <title>Generated Python code of a subclassed widget</title>

                <para><programlisting linenumbering="numbered">class MyDialog(wxDialog):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyDialog.__init__
        kwds["style"] = wxDEFAULT_DIALOG_STYLE
        wxDialog.__init__(self, *args, **kwds)
</programlisting></para>
              </example>
            </glossdef>
          </glossentry>

          <glossentry>
            <glossterm><quote><guilabel>Base
            class(es)</guilabel></quote></glossterm>

            <glossdef>
              <para>A comma-separated list of custom base classes. The first
              will be invoked with the same parameters as this class, while
              for the others the default constructor will be used. This
              property will be shown only for non-managed widgets for instance
              <classname>wxFrame</classname>, <classname>wxDialog</classname>,
              <classname>wxNotebook</classname>,
              <classname>wxPanel</classname> and
              <classname>wxSplitterWindow</classname>. You should probably not
              use this if <quote>overwrite existing sources</quote> is not
              set.</para>

              <figure id="example_baseclasses.fig">
                <title>Common Properties with Base class(es) entry</title>

                <graphic fileref="example_baseclasses.png"/>
              </figure>

              <example>
                <title>Generated Python code of a widget with two base
                classes</title>

                <programlisting linenumbering="numbered">class MyFrame(myFrameMixin, wxFrame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        myFrameMixin.__init__(self, *args, **kwds)
        wxFrame.__init__(self)
</programlisting>
              </example>
            </glossdef>
          </glossentry>

          <glossentry>
            <glossterm><quote><guilabel>Id</guilabel></quote></glossterm>

            <glossdef>
              <para>This property could be</para>

              <itemizedlist>
                <listitem>
                  <para>a constant numeric value</para>
                </listitem>

                <listitem>
                  <para>a predefined identifier e.g.
                  <constant>wxID_ANY</constant></para>
                </listitem>

                <listitem>
                  <para>a predefined variable like a class member e.g.
                  <command>self.myButtonID</command></para>
                </listitem>

                <listitem>
                  <para>a variable assignment e.g.
                  <quote><command>self.myButtonID=?</command></quote> The
                  pattern of a variable assignment is always
                  <quote><command>variable=value</command></quote>. The value
                  could be again a numeric value, a predefined identifier,
                  another predefined variable or
                  <quote><command>?</command></quote> a shortcut for
                  <quote><command>wxNewId()</command></quote></para>
                </listitem>
              </itemizedlist>

              <figure>
                <title>Common Properties with a variable assignment</title>

                <mediaobject>
                  <imageobject>
                    <imagedata fileref="example_variableassigment.png"/>
                  </imageobject>
                </mediaobject>
              </figure>

              <example>
                <title>Generated Python code for a variable assignment</title>

                <para><programlisting>class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.myButtonID = wx.NewId()
        self.button_1 = wx.Button(self, self.myButtonID, "button_1")
        self.__set_properties()
        self.__do_layout()
        # end wxGlade
</programlisting></para>
              </example>
            </glossdef>
          </glossentry>

          <glossentry>
            <glossterm><quote><guilabel>Size</guilabel></quote></glossterm>

            <glossdef>
              <para>Set the widget size in pixels.</para>
            </glossdef>
          </glossentry>

          <glossentry>
            <glossterm><quote><guilabel>Background</guilabel></quote></glossterm>

            <glossdef>
              <para>Set the background colour of the widget.</para>
            </glossdef>
          </glossentry>

          <glossentry>
            <glossterm><quote><guilabel>Foreground</guilabel></quote></glossterm>

            <glossdef>
              <para>Set the foreground colour of the widget.</para>
            </glossdef>
          </glossentry>

          <glossentry>
            <glossterm><quote><guilabel>Font</guilabel></quote></glossterm>

            <glossdef>
              <para>Set the font for widgets text elements.</para>
            </glossdef>
          </glossentry>

          <glossentry>
            <glossterm><quote><guilabel>Tooltip</guilabel></quote></glossterm>

            <glossdef>
              <para>Set a tooltip for this widget.</para>
            </glossdef>
          </glossentry>

          <glossentry>
            <glossterm><quote><guilabel>Disabled</guilabel></quote></glossterm>

            <glossdef>
              <para>Disable the widget.</para>
            </glossdef>
          </glossentry>

          <glossentry>
            <glossterm><quote><guilabel>Focused</guilabel></quote></glossterm>

            <glossdef>
              <para>Sets the widget to receive keyboard input.</para>
            </glossdef>
          </glossentry>

          <glossentry>
            <glossterm><quote><guilabel>Hidden</guilabel></quote></glossterm>

            <glossdef>
              <para>Hide the widget.</para>
            </glossdef>
          </glossentry>
        </glosslist>
      </section>

      <section>
        <title>Layout Properties</title>

        <para>The second tab is related to layout properties that control
        position and resizing within the sizer. <figure
            id="properties_window_tab_2.fig">
            <title>Layout Properties</title>

            <graphic fileref="properties_window_tab_2.png"/>
          </figure> These properties apply to any widget. You can check or
        uncheck any option related to the placement in the sizer. Many widgets
        may have a default value of 3 in the
        <quote><guilabel>Border</guilabel></quote> property in the Preferences
        Dialog (see <xref linkend="preferences.section"/>). If you let a
        widget have a default border, the <constant>wxAll</constant> option is
        also checked.</para>
      </section>

      <section>
        <title>Widget Properties</title>

        <para>The third tab, named <quote><guilabel>Widget</guilabel></quote>
        is different for each widget, and lets you edit properties for the
        specific element you have selected. <figure
            id="properties_window_tab_3.fig">
            <title>Widget Properties</title>

            <graphic fileref="properties_window_tab_3.png"/>
          </figure> The set of options may also be quite complex in the case
        of widgets that have a great deal of methods and properties (such as
        grids and tree views). In this case, wxGlade greatly simplifies the
        process of designing forms.</para>
      </section>

      <section>
        <title>Events Properties</title>

        <para>The fourth tab, named <quote><guilabel>Events</guilabel></quote>
        lists the widgets events. wxGlade generates an event handler stub and
        binds the event for each added handler name.</para>

        <figure>
          <title>Events Properties</title>

          <mediaobject>
            <imageobject>
              <imagedata fileref="properties_window_tab_4.png"/>
            </imageobject>
          </mediaobject>
        </figure>

        <figure>
          <title>Events Properties with entered event handler name</title>

          <mediaobject>
            <imageobject>
              <imagedata fileref="example_eventhandler.png"/>
            </imageobject>
          </mediaobject>
        </figure>

        <example>
          <title>Generated Python code of an <command>EVT_TEXT</command> event
          handler stub at line 12</title>

          <programlisting linenumbering="numbered">class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.text_ctrl_1 = wx.TextCtrl(self, -1, "")
        self.__set_properties()
        self.__do_layout()
        self.Bind(wx.EVT_TEXT, self.myEVTTEXT, self.text_ctrl_1)
        # end wxGlade
    def myEVTTEXT(self, event):  # wxGlade: MyFrame.&lt;event_handler&gt;
        print "Event handler `myEVTTEXT' not implemented!"
        event.Skip()
</programlisting>
        </example>
      </section>

      <section>
        <title>Code Properties</title>

        <para>The fifth and last tab is named
        <quote><guilabel>Code</guilabel></quote> and has two parts.</para>

        <figure>
          <title>Properties for extra code and extra properties</title>

          <mediaobject>
            <imageobject>
              <imagedata fileref="properties_window_tab_5.png"/>
            </imageobject>
          </mediaobject>
        </figure>

        <para>The upper part provides the ability to add additional code for
        that widget e.g. for importing a custom class. This
        <quote><guilabel>Extra code</guilabel></quote> will be added to the
        context of the source file and not to the context of the class.</para>

        <para>The under part simplifies setting of additional widget
        properties. Add the property name to the
        <quote><guilabel>Property</guilabel></quote> field and not the name of
        the setter function. For instance add
        <quote><command>MaxLength</command></quote> and not
        <quote><command>SetMaxLength</command></quote>. The
        <quote><guilabel>Value</guilabel></quote> field is just a text field.
        You can enter e.g. a simple number only as well as a complex statement
        e.g. <command>0, 0, "1"</command> or a function call. But be
        carefully! Your entered sequence will be inserted in the source
        without any changes - one to one.</para>

        <note>
          <para><quote><guilabel>Extra code</guilabel></quote> and
          <quote><guilabel>Extra properties</guilabel></quote> won't be
          processed for the widget preview.</para>
        </note>

        <figure>
          <title>Set extra property</title>

          <mediaobject>
            <imageobject>
              <imagedata fileref="example_setproperty.png"/>
            </imageobject>
          </mediaobject>
        </figure>

        <example>
          <title>Generated Python code for setting property
          <command>MaxLength</command> to <command>10</command> at line
          14</title>

          <programlisting linenumbering="numbered">class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.text_ctrl_1 = wx.TextCtrl(self, -1, "")
        self.__set_properties()
        self.__do_layout()
        # end wxGlade
    def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle("frame_1")
        self.text_ctrl_1.SetMaxLength(10)
        # end wxGlade
</programlisting>
        </example>
      </section>
    </section>

    <section id="preferences.section">
      <title>Preferences Dialog</title>

      <para>You can access the Preferences Dialog with the menu item
      <menuchoice>
          <guimenu>View</guimenu>

          <guimenuitem>Preferences</guimenuitem>
        </menuchoice>. You can choose some decoration options, like whether to
      show icons in menus or not, but also something more effective. For
      example, you can modify the number of buttons in the Main Palette. If
      you type a value of 15 or 30, you get a long toolbar-like Main Palette.
      You can also choose the default path where you save wxGlade files or
      generate source code.</para>

      <para>Another useful option is to enable a default border of 3 around
      some widgets. In many cases this can be useful to have set.</para>

      <para>You need to restart wxGlade for changes to take effect.</para>
    </section>

    <section id="menu.section">
      <title>The wxGlade Menu</title>

      <para>wxGlade has only a few very small menus.</para>

      <section id="menu.file.section">
        <title>The FILE menu</title>

        <para>In the <guimenu>FILE</guimenu> menu there are the classic
        <menuchoice>
            <guimenu>File</guimenu>

            <guimenuitem>New</guimenuitem>
          </menuchoice>, <menuchoice>
            <guimenu>File</guimenu>

            <guimenuitem>Open...</guimenuitem>
          </menuchoice> and <menuchoice>
            <guimenu>File</guimenu>

            <guimenuitem>Save</guimenuitem>
          </menuchoice> items. When opening or saving a new file, the file
        dialog defaults to the directory that you put in the
        <quote><guilabel>Initial path</guilabel></quote> textbox in the
        Preferences dialog, usually the user home directory.</para>

        <para>The <menuchoice>
            <guimenu>File</guimenu>

            <guimenuitem>Generate code</guimenuitem>
          </menuchoice> item produces the code from the current design.</para>
      </section>

      <section id="menu.view.section">
        <title>The VIEW menu</title>

        <para>In the <guimenu>VIEW</guimenu> menu, you can show or hide the
        tree window and the properties window.</para>

        <para>In this menu you access the Preferences Dialog as well.</para>
      </section>

      <section>
        <title>The HELP menu</title>

        <para>The <guimenu>HELP</guimenu> menu provides access to the wxGlade
        user manual (this documentation) as well as to the
        <quote><guilabel>About...</guilabel></quote> dialog.</para>
      </section>
    </section>

    <section>
      <title>Shortcuts</title>

      <glosslist>
        <glossentry>
          <glossterm><keysym>Ctrl-G</keysym></glossterm>

          <glossdef>
            <para>Generate code from the current GUI design</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>Ctrl-I</keysym></glossterm>

          <glossdef>
            <para>Import GUI design out of a XRC file</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>Ctrl-N</keysym></glossterm>

          <glossdef>
            <para>Start a new GUI design</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>Ctrl-O</keysym></glossterm>

          <glossdef>
            <para>Read a GUI design from a <filename>.wxg</filename>
            file</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>Ctrl-S</keysym></glossterm>

          <glossdef>
            <para>Save the current GUI design to a <filename>.wxg</filename>
            file</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>Shift-Ctrl-S</keysym></glossterm>

          <glossdef>
            <para>Save the current GUI design to another
            <filename>.wxg</filename> file</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>Ctrl-P</keysym></glossterm>

          <glossdef>
            <para>Open a preview window for the current top-level
            widget</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>Ctrl-Q</keysym></glossterm>

          <glossdef>
            <para>Exit wxGlade</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>Ctrl-C</keysym></glossterm>

          <glossdef>
            <para>Copy the selected item, element, text, ...</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>Ctrl-V</keysym></glossterm>

          <glossdef>
            <para>Insert clipboard content</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>Ctrl-X</keysym></glossterm>

          <glossdef>
            <para>Cut the selected item, element, text, ...</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>F1</keysym></glossterm>

          <glossdef>
            <para>Show the wxGlade user manual (this documentation)</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>F2</keysym></glossterm>

          <glossdef>
            <para>Show the <guilabel>Tree</guilabel> window</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>F3</keysym></glossterm>

          <glossdef>
            <para>Show the <guilabel>Properties</guilabel> window</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>F4</keysym></glossterm>

          <glossdef>
            <para>Show all application windows</para>
          </glossdef>
        </glossentry>

        <glossentry>
          <glossterm><keysym>F5</keysym></glossterm>

          <glossdef>
            <para>Refresh the screen</para>
          </glossdef>
        </glossentry>
      </glosslist>
    </section>
  </chapter>

  <chapter>
    <title>Supported widgets</title>

    <section id="widgets.intro.section">
      <title>Introduction</title>

      <para>wxGlade supports a number of widgets and helps you to edit the
      properties and visual look of each one.</para>
    </section>

    <section id="widgets.wlist.section">
      <title>Widget list</title>

      <para>Follow the widget list as it appears in the wxGlade main
      window.</para>

      <section id="widgets.frame.section">
        <title>Frame</title>

        <para>This prompts for a <classname>wxFrame</classname> or a
        <classname>wxMDIChildFrame</classname>. A vertical
        <classname>wxBoxSizer</classname> is appended. In the properties
        window you can choose the styles and you can add an icon.</para>
      </section>

      <section id="widgets.dialog.section">
        <title>Dialog or Panel</title>

        <para>This prompts for a <classname>wxDialog</classname> or a
        <classname>wxPanel</classname> in top level. In the properties window
        you can choose the styles and, for the dialog, you can add an
        icon.</para>
      </section>

      <section id="widgets.panel.section">
        <title>Panel</title>

        <para>This allows you to add a panel to a sizer.</para>

        <para>In the properties window you can choose the styles.</para>
      </section>

      <section id="widgets.splitter.section">
        <title>Splitter window</title>

        <para>This produces a <classname>wxSplitterWindow</classname> and two
        associated panels as well. You can choose vertical or horizontal
        splitting.</para>

        <para>In the properties window you can choose the styles and the sash
        position.</para>

        <para>Be careful not to put too large a widget in a splitter panel,
        because while it might appear normal in the design window, when you
        run your program one of two panels will take all the available space
        and the other will shrink to the minimum size possible.</para>
      </section>

      <section id="widgets.notebook.section">
        <title>Notebook</title>

        <para>This produces a <classname>wxNotebook</classname> and one panel
        for each tab.</para>

        <para>In the properties window you can add and remove tabs, which
        appear in a list.</para>

        <para>Don't forget to click on the
        <quote><guibutton>Apply</guibutton></quote> button to transfer changes
        that you have made in the list to the design window.</para>
      </section>

      <section id="widgets.button.section">
        <title>Button</title>

        <para>This produces a <classname>wxButton</classname>. You can enter a
        caption and the <quote>default</quote> flag. If you want to add an
        image you need a bitmap button (see <xref
        linkend="widgets.bitmap_button.section"/>).</para>
      </section>

      <section id="widgets.toggle_button.section">
        <title>Toggle button</title>

        <para>This produces a <classname>wxToggleButton</classname>. You can
        enter a caption and the status (clicked or not) of the button.</para>
      </section>

      <section id="widgets.bitmap_button.section">
        <title>Bitmap button</title>

        <para>This produces a <classname>wxBitmapButton</classname>. You can
        set the <quote>default</quote> flag on or off. You also can choose the
        bitmap for the button and, optionally, the bitmap for the disabled
        status. Refer to <xref linkend="basic.bitmaps.section"/> for bitmap
        path specifications.</para>
      </section>

      <section id="widgets.textctrl.section">
        <title>Text control</title>

        <para>This produces a <classname>wxTextCtrl</classname>. In the
        properties window you can enter the text and also set the
        style.</para>
      </section>

      <section id="widgets.spinctrl.section">
        <title>Spin control</title>

        <para>This produces a <classname>wxSpinCtrl</classname>. In the
        properties window you can enter the value, the range and also set the
        style.</para>
      </section>

      <section id="widgets.slider.section">
        <title>Slider</title>

        <para>This produces a <classname>wxSlider</classname>. In the
        properties window you can enter the value, the range and also set the
        style.</para>
      </section>

      <section id="widgets.gauge.section">
        <title>Gauge</title>

        <para>This produces a <classname>wxGauge</classname>. In the
        properties window you can enter the range and set the style.</para>
      </section>

      <section id="widgets.static_text.section">
        <title>Static text</title>

        <para>This produces a <classname>wxStaticText</classname>. In the
        properties window you can enter the text, set the style and tell
        wxGlade whether to store the control as an attribute.</para>
      </section>

      <section id="widgets.checkbox.section">
        <title>Check box</title>

        <para>This produces a <classname>wxCheckBox</classname>. In the
        properties window you can enter the text, and the status, checked or
        not, of the button.</para>
      </section>

      <section id="widgets.radio.section">
        <title>Radio button</title>

        <para>This produces a <classname>wxRadioButton</classname>. In the
        properties window you can enter the text, and the status, clicked or
        not, and the style.</para>
      </section>

      <section id="widgets.radiobox.section">
        <title>Radio box</title>

        <para>This produces a <classname>wxRadioBox</classname>. In the
        properties window you can enter the dimension. The style determines
        whether the dimension is the number of rows or columns.</para>

        <para>You also can set which button is selected with the
        <quote>Selection</quote> spin starting from 0. You can edit the list
        of choices, but remember to click on the
        <quote><guibutton>Apply</guibutton></quote> button to consolidate
        changes.</para>
      </section>

      <section id="widgets.choice.section">
        <title>Choice</title>

        <para>This produces a <classname>wxChoice</classname>. In the
        properties window you can enter the position of the selected item
        starting from 0. You can edit the list of choices, but remember to
        click on the <quote><guibutton>Apply</guibutton></quote> button to
        consolidate changes.</para>
      </section>

      <section id="widgets.combo.section">
        <title>Combo Box</title>

        <para>This produces a <classname>wxComboBox</classname>. In the
        properties window you can enter the position of the selected item
        starting from 0. You can edit the list of choices, but remember to
        click on the <quote><guibutton>Apply</guibutton></quote> button to
        consolidate changes.</para>
      </section>

      <section id="widgets.listbox.section">
        <title>List Box</title>

        <para>This produces a <classname>wxListBox</classname>. In the
        properties window you can enter the position of the selected item
        starting from 0. You can edit the list of choices, but remember to
        click on the <quote><guibutton>Apply</guibutton></quote> button to
        consolidate changes.</para>
      </section>

      <section id="widgets.staticline.section">
        <title>StaticLine</title>

        <para>This produces a vertical or horizontal
        <classname>wxStaticLine</classname>. In the properties window you can
        tell wxGlade whether to store the object as an attribute of the frame
        class.</para>
      </section>

      <section id="widgets.static_bitmap.section">
        <title>Static bitmap</title>

        <para>This produces a <classname>wxStaticBitmap</classname>. You will
        be prompted for the bitmap path. Refer to <xref
        linkend="basic.bitmaps.section"/> for bitmap path specifications. In
        the properties window you can set the style and you can tell wxGlade
        whether to store the object as an attribute of the frame class.</para>
      </section>

      <section id="widgets.listctrl.section">
        <title>List Control</title>

        <para>This produces a <classname>wxListCtrl</classname>. In the
        properties window you can set the style.</para>
      </section>

      <section id="widgets.treectrl.section">
        <title>Tree Control</title>

        <para>This produces a <classname>wxTreeCtrl</classname>. In the
        properties window you can set the style.</para>
      </section>

      <section id="widgets.grid.section">
        <title>Grid</title>

        <para>This produces a <classname>wxGrid</classname>. In the properties
        window you can set the style, the row number, the label size, the line
        and background color and the selection mode. You can edit the list of
        columns, but remember to click on the
        <quote><guibutton>Apply</guibutton></quote> button to consolidate
        changes. Also you can choose to let wxGlade to create the grid or
        leave it to the user code.</para>
      </section>

      <section id="widgets.custom.section">
        <title>Custom Widget</title>

        <para>When you put a custom widget in the design window you will be
        prompted for a class name. In the properties window you can set a
        number of custom attributes that will appear in the constructor call.
        These attributes have different effects in C++, Lisp, Perl, Python or
        XRC code generation. Four special attributes <varname>$id</varname>,
        <varname>$parent</varname>, <varname>$width</varname> and
        <varname>$height</varname> return the value you specify in the
        <quote><guilabel>Common</guilabel></quote> tab of the custom
        widget.</para>
      </section>

      <section id="widgets.spacer.section">
        <title>Spacer</title>

        <para>When you put a spacer into a sizer slot in the design window you
        will be prompted for the size; wxGlade will generate the code to set
        an empty space in that slot of the sizer.</para>
      </section>
    </section>
  </chapter>

  <chapter>
    <title>Menu, Toolbar and Statusbar</title>

    <section id="menu.intro.section">
      <title>Introduction</title>

      <para>wxGlade helps you to design the menu and the toolbar for your
      application.</para>

      <para>You can create the menu and toolbar as stand alone classes by
      clicking the corresponding button in the main window.</para>

      <para>Alternatively you can make the menu, toolbar and statusbar
      associated with a <classname>wxFrame</classname>, by selecting the
      related checkboxes in the <classname>wxFrame</classname> properties
      window.</para>
    </section>

    <section id="menu.menu.section">
      <title>Menu</title>

      <para>In the menu properties window click on the <quote><guibutton>Edit
      menus...</guibutton></quote> button. A dialog will let you edit your
      menu. Use the <quote><guibutton>Add</guibutton></quote> button to add
      items to the menu; enter the label, an optional name and help string.
      You can use numbers or variable names as the item id. If you use a
      variable name, you have to provide extra code in the generated source
      code.</para>

      <para>Choose the type of the item: Normal, Checkable or Radio.</para>

      <para>You can move menu items with
      <quote><guibutton>Up</guibutton></quote> and
      <quote><guibutton>Down</guibutton></quote> buttons, and you can modify
      the hierarchy of the menu with
      <quote><guibutton>&lt;</guibutton></quote> and
      <quote><guibutton>&gt;</guibutton></quote> buttons.</para>
    </section>

    <section id="menu.toolbar.section">
      <title>Toolbar</title>

      <para>You can edit the toolbar's style and bitmap size in the properties
      window.</para>

      <para>Click on the <quote>Edit tools...</quote> button to edit the
      toolbar buttons. Use the <quote>Add</quote> button to add buttons to the
      toolbar; enter the label, an optional name and help string. You can use
      numbers or variable names as the button id. If you use a variable name,
      you have to provide extra code in the generated source code.</para>

      <para>Choose the type of the button: Normal, Checkable or Radio.</para>

      <para>You can move toolbar buttons with
      <quote><guibutton>Up</guibutton></quote> and
      <quote><guibutton>Down</guibutton></quote> buttons.</para>

      <para>You have to enter two bitmaps, one for normal status and the other
      for the pushed status.</para>

      <para>Refer to <xref linkend="basic.bitmaps.section"/> for bitmap path
      specifications.</para>
    </section>

    <section id="menu.statusbar.section">
      <title>Statusbar</title>

      <para>In the properties window you can edit the list of fields and their
      size, but remember to click on the
      <quote><guibutton>Apply</guibutton></quote> button to consolidate
      changes.</para>
    </section>
  </chapter>

  <appendix>
    <title>wxGlade License Agreement</title>

    <para>Copyright (c) 2002-2007 Alberto Griggio
    <email>agriggio@users.sourceforge.net</email></para>

    <para>Permission is hereby granted, free of charge, to any person
    obtaining a copy of this software and associated documentation files (the
    "Software"), to deal in the Software without restriction, including
    without limitation the rights to use, copy, modify, merge, publish,
    distribute, sublicense and/or sell copies of the Software, and to permit
    persons to whom the Software is furnished to do so, subject to the
    following conditions:</para>

    <para>The above copyright notice and this permission notice shall be
    included in all copies or substantial portions of the Software.</para>

    <para>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
    NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
    DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
    OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
    USE OR OTHER DEALINGS IN THE SOFTWARE.</para>
  </appendix>

  <appendix>
    <title>Licenses and Acknowledgements for Incorporated Software</title>

    <para>This section lists licenses and acknowledgements for third-party
    software incorporated in wxGlade.</para>

    <section>
      <title>OrderedDict</title>

      <para>The O<classname>rderedDict</classname> class version 1.1 has been
      integrated. The class is downloaded from <ulink
      url="http://pypi.python.org/pypi/ordereddict">http://pypi.python.org/pypi/ordereddict</ulink>
      and contains following notice:</para>

      <literallayout>Copyright (c) 2009 Raymond Hettinger

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

    The above copyright notice and this permission notice shall be
    included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    OTHER DEALINGS IN THE SOFTWARE.</literallayout>
    </section>
  </appendix>
</book>
