--- /dev/null
+
+all:
+ cd src; $(MAKE)
+
+clean:
+ cd src; $(MAKE) clean
+
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<settings xmlns="http://www.wxwindows.org/wxs" version="2.5.0.1">
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Configuration</name>
+ <description><B>This is the top-level configuration item.</B></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Platform</name>
+ <description><B>Choose a platform</B></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-radio">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Windows</name>
+ <description><B>The WIN32 port.</B><P>
+
+This port is for Windows 9x, ME, NT, 2K, XP.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity>MGL,X11,Mac Carbon,GTK+ 1.x,Motif,OS/2,Mac Cocoa,GTK+ 2.x,Wine</exclusivity>
+ <context></context>
+ <configure-command>--with-msw</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-radio">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>X11</name>
+ <description><B>The Xlib/Unix port.</B><P>
+
+This port is based on the wxUniversal widgets.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity>MGL,Mac Carbon,Windows,GTK+ 1.x,Motif,OS/2,Mac Cocoa,GTK+ 2.x,Wine</exclusivity>
+ <context></context>
+ <configure-command>--with-x11</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-radio">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Mac Carbon</name>
+ <description><B>The Mac Carbon and Classic port.</B><P>
+
+A port for Mac OS 9 and Mac OS 10.x.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity>MGL,X11,Windows,GTK+ 1.x,Motif,OS/2,Mac Cocoa,GTK+ 2.x,Wine</exclusivity>
+ <context></context>
+ <configure-command>--with-mac</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-radio">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Mac Cocoa</name>
+ <description><B>Cocoa port</B><P>
+
+This port uses the Cocoa API on Mac OS X.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity>GTK+ 2.x,GTK+ 1.x,Mac Carbon,MGL,Motif,Windows,OS/2,Wine,X11</exclusivity>
+ <context></context>
+ <configure-command>--with-cocoa</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-radio">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>GTK+ 1.x</name>
+ <description><B>The GTK+ port.</B><P>
+
+This port is based on the GTK+ 1.x and 2.x widget set.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity>MGL,X11,Mac Carbon,Windows,Motif,OS/2,Mac Cocoa,GTK+ 2.x,Wine</exclusivity>
+ <context></context>
+ <configure-command>--with-gtk</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-radio">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>GTK+ 2.x</name>
+ <description><B>wxGTK with GTK+ 2</B><P>
+
+This port uses GTK+ 2.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity>Mac Cocoa,GTK+ 1.x,Mac Carbon,MGL,Motif,Windows,OS/2,Wine,X11</exclusivity>
+ <context></context>
+ <configure-command>--with-gtk2</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-radio">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Motif</name>
+ <description><B>The Motif/Lesstif port.</B><P>
+
+This port uses Motif 1.x/2.x or Lesstif.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity>MGL,X11,Mac Carbon,Windows,GTK+ 1.x,OS/2,Mac Cocoa,GTK+ 2.x,Wine</exclusivity>
+ <context></context>
+ <configure-command>--with-motif</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-radio">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>OS/2</name>
+ <description><B>OS/2 Presentation Manager</B><P>
+
+This port uses OS/2 Presentation Manager.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity>GTK+ 1.x,Mac Carbon,MGL,Motif,Windows,X11,Mac Cocoa,GTK+ 2.x,Wine</exclusivity>
+ <context></context>
+ <configure-command>--with-pm</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-radio">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Wine</name>
+ <description><B>Wine port</B><P>
+
+The wxMSW port built for Wine (Windows emulation library).</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity>Mac Cocoa,GTK+ 1.x,GTK+ 2.x,Mac Carbon,MGL,Motif,Windows,OS/2,X11</exclusivity>
+ <context></context>
+ <configure-command>--with-wine</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-radio">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>MGL</name>
+ <description><B>The MGL Linux and DOS port.</B><P>
+
+This port is based on the wxUniversal widgets.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity>X11,Mac Carbon,Windows,GTK+ 1.x,Motif,OS/2,Mac Cocoa,Wine,GTK+ 2.x</exclusivity>
+ <context></context>
+ <configure-command>--with-mgl</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Build options</name>
+ <description><B>Build options</B><P>
+
+Major build options.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_GUI</name>
+ <description><B>Use GUI</B><P>
+
+If on, builds a GUI version of the library as opposed to wxBase. Currently, this needs to be enabled.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-gui</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>0</enabled>
+ <name>__WXMSW__</name>
+ <description>This is enabled if the relevant platform settings are enabled.</description>
+ <default-state>1</default-state>
+ <requires>Windows,Wine</requires>
+ <precludes></precludes>
+ <enabled-if>Windows,Wine</enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>__WXGTK__</name>
+ <description>This is enabled if the relevant platform settings are enabled.
+</description>
+ <default-state>1</default-state>
+ <requires>GTK+ 1.x,GTK+ 2.x</requires>
+ <precludes></precludes>
+ <enabled-if>GTK+ 1.x,GTK+ 2.x</enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>__WXGTK20__</name>
+ <description>This is enabled if the relevant platform settings are enabled.
+</description>
+ <default-state>1</default-state>
+ <requires>GTK+ 2.x</requires>
+ <precludes></precludes>
+ <enabled-if>GTK+ 2.x</enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>0</enabled>
+ <name>__WXX11__</name>
+ <description>This is enabled if the relevant platform settings are enabled.
+</description>
+ <default-state>1</default-state>
+ <requires>X11</requires>
+ <precludes></precludes>
+ <enabled-if>X11</enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>0</enabled>
+ <name>__WXMOTIF__</name>
+ <description>This is enabled if the relevant platform settings are enabled.
+</description>
+ <default-state>1</default-state>
+ <requires>Motif</requires>
+ <precludes></precludes>
+ <enabled-if>Motif</enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>0</enabled>
+ <name>__WXMAC__</name>
+ <description>This is enabled if the relevant platform settings are enabled.
+</description>
+ <default-state>1</default-state>
+ <requires>Mac Carbon</requires>
+ <precludes></precludes>
+ <enabled-if>Mac Carbon</enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>0</enabled>
+ <name>__WXCOCOA__</name>
+ <description>This is enabled if the relevant platform settings are enabled.
+</description>
+ <default-state>1</default-state>
+ <requires>Mac Cocoa</requires>
+ <precludes></precludes>
+ <enabled-if>Mac Cocoa</enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>0</enabled>
+ <name>__WXPM__</name>
+ <description>This is enabled if the relevant platform settings are enabled.
+</description>
+ <default-state>1</default-state>
+ <requires>OS/2</requires>
+ <precludes></precludes>
+ <enabled-if>OS/2</enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>0</enabled>
+ <name>__WXMGL__</name>
+ <description>This is enabled if the relevant platform settings are enabled.
+</description>
+ <default-state>1</default-state>
+ <requires>MGL</requires>
+ <precludes></precludes>
+ <enabled-if>MGL</enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>0</enabled>
+ <name>__WXUNIVERSAL__</name>
+ <description>This is enabled if the relevant platform settings are enabled.
+</description>
+ <default-state>1</default-state>
+ <requires>X11,MGL</requires>
+ <precludes></precludes>
+ <enabled-if>X11,MGL</enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_UNIVERSAL</name>
+ <description><B>Universal</B><P>
+
+Specifies if wxUniversal should be used instead of native widgets.<P>
+
+If the selected port in <B>Platform</B> is a wxUniversal port, this setting is enabled and is not user-editable. Otherwise, it can be enabled or disabled. However this doesn't necessarily mean that the configuration is supported for any given platform.</description>
+ <default-state>0</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if>__WXUNIVERSAL__</enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>C++ options</name>
+ <description><B>C++ options</B><P>
+
+A variety of options, mostly specific to Unix compilers.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_DMALLOC</name>
+ <description><B>Dmalloc</B><P>
+
+Use the dmalloc library.<P>
+
+See: http://dmalloc.com.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-dmalloc</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_SHARED</name>
+ <description><B>Shared library</B><P>
+
+Use a shared library.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-shared</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_SONAME</name>
+ <description><B>Soname</B><P>
+
+Set the DT_SONAME field in ELF shared libraries</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-soname</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_OPTIMISE</name>
+ <description><B>Optimise</B><P>
+
+Create optimised code.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-optimise</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_DEBUG</name>
+ <description><B>Use debugging information</B><P>
+
+Same as wxUSE_DEBUG_FLAG (set __WXDEBUG__ flag) and wxUSE_DEBUG_INFO (create code with debugging information).</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-debug</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_DEBUG_GDB</name>
+ <description><B>GDB debugging information</B><P>
+
+Create code with extra GDB debugging information.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-debug_gdb</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_PROFILE</name>
+ <description><B>Profiling information</B><P>
+
+Create code with profiling information.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-profile</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_NO_RTTI</name>
+ <description><B>No RTTI</B><P>
+
+Create code without RTTI (Run-time type) information.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-no_rtti</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_NO_EXCEPTIONS</name>
+ <description><B>No exception handling</B><P>
+
+Create code without C++ exceptions handling.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-no_exceptions</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_PERMISSIVE</name>
+ <description></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-permissive</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_NO_DEPS</name>
+ <description><B>No dependency information</B><P>
+
+Create code without dependency information.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-no_deps</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_RPATH</name>
+ <description><B>Rpath</B><P>
+
+Output the rpath flag from wx-config.<P>
+
+If you enable this setting, please enter the path into the <b>value</b> property.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-rpath</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <value custom="true" type="string" editor-type="string" description="<B>Value</B><P>
+
+Enter the RPATH directory here."></value>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_WXPRINTFV</name>
+ <description><B>Use wxWindows implementation of wxPrintfv</B><P>
+
+Check to use the wxWindows implementation.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-wxprintfv</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Compatibility</name>
+ <description><B>Various options for backward compatibility</B></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>WXWIN_COMPATIBILITY</name>
+ <description><B>This setting determines the compatibility with 1.68 API</B><P>
+
+Level 0: no backward compatibility, all new features<BR>
+Level 1: some extra methods are defined for compatibility.<P>
+
+Default is 0. Recommended setting: 0 (in fact the compatibility code is now very minimal so there is little advantage to setting it to 1.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>WXWIN_COMPATIBILITY_2</name>
+ <description><B>This setting determines the compatibility with 2.0 API</B><P>
+
+Set it to 1 to enable it. Default is 0.<P>
+
+Recommended setting: 0 (please update your code instead!)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-compat20</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>WXWIN_COMPATIBILITY_2_2</name>
+ <description><B>This setting determines the compatibility with 2.2 API</B><P>
+
+Set it to 1 to enable it but please consider updating your code instead.<P>
+
+The default is 0. Recommended setting: 0 (please update your code)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-compat22</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>WXWIN_COMPATIBILITY_2_4</name>
+ <description><B>This setting determines the compatibility with 2.4 API</B><P>
+
+Set it to 0 to flag all cases of using deprecated functions.<P>
+
+Default is 1 but please try building your code with 0 as the default will
+change to 0 in the next version and the deprecated functions will disappear in the version after it completely.<P>
+
+Recommended setting: 0 (please update your code)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-compat24</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxFONT_SIZE_COMPATIBILITY</name>
+ <description><B>Define as 1 for font size to be backward compatible to 1.63 and earlier.</B><P>
+
+1.64 and later define point sizes to be compatible with Windows.<P>
+
+Default is 0.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command></configure-command>
+ <help-topic>wxFont</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxDIALOG_UNIT_COMPATIBILITY</name>
+ <description><B>Set to 0 for accurate dialog units, else 1 to be as per 2.1.16 and before.</B><P>
+
+If migrating between versions, your dialogs may seem to shrink.<P>
+
+Default is 1. Recommended setting: 0 (the new calculations are more correct!)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command></configure-command>
+ <help-topic>wxDialog</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Debugging</name>
+ <description><B>Debugging settings</B><P>
+
+See also <B>C++ options</B>.<P>
+
+Generic comment about debugging settings: they are very useful if you don't use any other memory leak detection tools such as Purify/BoundsChecker, but are probably redundant otherwise.<P>
+
+Also, Visual C++ CRT has the same features as wxWindows memory debugging subsystem built in since version 5.0 and you
+may prefer to use it instead of built in memory debugging code because it is faster and more fool-proof.<P>
+
+Using VC++ CRT memory debugging is enabled by default in debug mode (__WXDEBUG__) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0)
+and if __NO_VC_CRTDBG__ is not defined.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DEBUG_CONTEXT</name>
+ <description><B>If 1, enables wxDebugContext, for writing error messages to file, etc.</B><P>
+
+If __WXDEBUG__ is not defined, will still use the normal memory operators.<P>
+
+Default is 0. Recommended setting: 0<P>
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-debug_cntxt</configure-command>
+ <help-topic>wxDebugContext</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_MEMORY_TRACING</name>
+ <description><B>If 1, enables debugging versions of wxObject::new and wxObject::delete *IF* __WXDEBUG__ is also defined.</B><P>
+
+WARNING: this code may not work with all architectures, especially if alignment is an issue. This switch is currently ignored for mingw / cygwin.<P>
+
+Default is 0. Recommended setting: 1 if you are not using a memory debugging tool, else 0<P>
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-mem_tracing</configure-command>
+ <help-topic>Debugging overview</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_GLOBAL_MEMORY_OPERATORS</name>
+ <description><B>In debug mode, cause new and delete to be redefined globally.</B><P>
+
+If this causes problems (e.g. link errors which is a common problem
+especially if you use another library which also redefines the global new and delete), set this to 0.<P>
+
+This switch is currently ignored for MinGW/Cygwin. The configure script sets this to 1 if wxUSE_MEMORY_TRACING is 1.<P>
+
+Default: 0. Recommended setting: 0
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>Debugging Overview</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DEBUG_NEW_ALWAYS</name>
+ <description><B>In debug mode, causes new to be defined to be WXDEBUG_NEW</B> (see object.h).<P>
+
+If this causes problems (e.g. link errors), set this to 0. You may need to set this to 0 if using templates (at least for VC++). This switch is currently ignored for MinGW/Cygwin/CodeWarrior.<P>
+
+Default: 0. Recommended setting: 0
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>Debugging overview</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_ON_FATAL_EXCEPTION</name>
+ <description><B>Fatal exceptions handling</B><P>
+
+wxHandleFatalExceptions() may be used to catch the program faults at run time and, instead of terminating the program with a usual GPF message box, call the user-defined wxApp::OnFatalException() function. If you set wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work.<P>
+
+This setting is for Win32 only and can only be enabled if your compiler supports Win32 structured exception handling (currently only VC++ does).<P>
+
+Default: 1. Recommended setting: 1 if your compiler supports it.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command>--enable-catch_segvs</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Unicode</name>
+ <description><B>Unicode settings</B></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_UNICODE</name>
+ <description><B>Unicode mode</B><P>
+
+Set wxUSE_UNICODE to 1 to compile wxWindows in Unicode mode: wxChar will be defined as wchar_t, wxString will use Unicode internally. If you set this to 1, you must use the wxT() macro for all literal strings in the program.<P>
+
+Unicode is currently only fully supported under Windows NT/2000/XP (Windows 9x doesn't support it and the programs compiled in Unicode mode will not run under 9x -- but see wxUSE_UNICODE_MSLU below).<P>
+
+Default: 0. Recommended setting: 0 (unless you only plan to use Windows NT/2000/XP)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-unicode</configure-command>
+ <help-topic>Unicode support in wxWindows</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>0</enabled>
+ <name>wxUSE_UNICODE_MSLU</name>
+ <description><B>Unicode MSLU support</B><P>
+
+Set wxUSE_UNICODE_MSLU to 1 if you want to compile wxWindows in Unicode mode and be able to run compiled apps under Windows 9x as well as NT/2000/XP.
+This setting enables use of unicows.dll from MSLU, the MS Layer for Unicode, see:<P>
+
+http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx<P>
+
+Note that you will have to modify the makefiles to include unicows.lib import library as the first library (if you use MSVC, you can run the makefile with:<P>
+
+nmake MSLU=1 UNICODE=1<P>
+
+If your compiler doesn't have unicows.lib, you can get a version of it at:<P>
+
+http://libunicows.sourceforge.net<P>
+
+Default: 0. Recommended setting: 0 (1 if you want to deploy Unicode apps on 9x systems)</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_UNICODE</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command>--enable-mslu</configure-command>
+ <help-topic>Unicode support in wxWindows</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_WCHAR_T</name>
+ <description><B>Wide character support</B><P>
+
+Setting wxUSE_WCHAR_T to 1 gives you some degree of Unicode support without compiling the program in Unicode mode. More precisely, it will be possible to construct wxString from a wide (Unicode) string and convert any wxString to Unicode.<P>
+
+If using configure, this setting is automatically detected and set.<P>
+
+Default: 1. Recommended setting: 1
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes>Internationalization</notes>
+ </setting>
+ </setting>
+ <setting type="check-group">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>Logging</name>
+ <description><B>wxLog facilities</B><P>
+
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_LOG</name>
+ <description><B>wxLog</B><P>
+
+Support for message/error logging. This includes wxLogXXX() functions and wxLog and derived classes. Don't set this to 0 unless you really know what you are doing.<P>
+
+Default: 1. Recommended setting: 1 (always)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-log</configure-command>
+ <help-topic>wxLog</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_LOGWINDOW</name>
+ <description><B>wxLogWindow</B><P>
+</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_TEXTCTRL</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-logwin</configure-command>
+ <help-topic>wxLog</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_LOGGUI</name>
+ <description><B>wxLogGui</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-loggui</configure-command>
+ <help-topic>wxLog</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_LOG_DIALOG</name>
+ <description><B>wxLogDialog</B><P></description>
+ <default-state>1</default-state>
+ <requires>wxUSE_LISTCTRL</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-logdialog</configure-command>
+ <help-topic>wxLog</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Files and streams</name>
+ <description></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="check-group">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_STREAMS</name>
+ <description><B>Stream support</B><P>
+
+If enabled (1), compiles wxWindows streams classes.
+
+Default: 1. Recommended setting: 1
+
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-streams</configure-command>
+ <help-topic>wxStreams overview</help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_ZIPSTREAM</name>
+ <description><B>wxZipInputStream, wxZipOutputStream</B><P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-zipstream</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_STD_IOSTREAM</name>
+ <description><B>Standard C++ streams</B><P>
+
+Use standard C++ streams if 1. If 0, use wxWin streams implementation.<P>
+
+Default: 0
+</description>
+ <default-state>0</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-std_iostreams</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_FILE</name>
+ <description><B>wxFile support</B><P>
+
+Set wxUSE_FILE to 1 to compile wxFile classes. wxFile uses low level POSIX functions for file access, wxFFile uses ANSI C stdio.h functions.<P>
+
+Default: 1. Recommended setting: 1. wxFile is highly recommended as it is required by i18n code, wxFileConfig and others.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-file</configure-command>
+ <help-topic>wxFile</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_FFILE</name>
+ <description><B>wxFFile support</B><P>
+
+Set wxUSE_FFILE to 1 to compile wxFFile classes. wxFFile uses ANSI C stdio.h functions.<P>
+
+Default: 1. Recommended setting: 1.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-ffile</configure-command>
+ <help-topic>wxFFile</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_FSVOLUME</name>
+ <description><B>wxFSVolume</B><P>
+
+Use wxFSVolume class to provide access to the configured/active mount points.<P>
+
+Default: 1. Recommended setting: 1 (but may be safely disabled if you don't use it)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>wxFSVolume</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_TEXTBUFFER</name>
+ <description><B>wxTextBuffer</B><P>
+
+This class is required by wxTextFile.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-textbuf</configure-command>
+ <help-topic>wxTextFile</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_TEXTFILE</name>
+ <description><B>wxTextFile</B><P>
+
+Requires wxFile and wxTextBuffer, required by wxFileConfig.</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_TEXTBUFFER,wxUSE_FILE</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-textfile</configure-command>
+ <help-topic>wxTextFile</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_CONFIG</name>
+ <description><B>wxConfig</B><P>
+
+Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes which allow the application to store its settings in the persistent storage. Setting this to 1 will also enable on-demand creation of the global config object in wxApp.<P>
+
+Default: 1.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-config</configure-command>
+ <help-topic>wxConfig classes overview</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_CONFIG_NATIVE</name>
+ <description><B>Native Config</B><P>
+
+ If wxUSE_CONFIG is 1, you may choose to use either the native config classes under Windows (using .INI files under Win16 and the registry under Win32) or the portable text file format used by the config classes under Unix.<P>
+
+Default: 1 to use native classes. Note that you may still use
+wxFileConfig even if you set this to 1 - just the config object created by default for the applications needs will be a wxRegConfig or wxIniConfig and not wxFileConfig.<P>
+
+Default: 1. Recommended setting: 1
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>wxConfig classes overview</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_MIMETYPE</name>
+ <description><B>wxMimeTypesManager</B><P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_TEXTFILE</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-mimetype</configure-command>
+ <help-topic>wxMimeTypesManager</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="check-group">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_FILESYSTEM</name>
+ <description><B>Virtual file systems</B><P>
+
+Enable virtual file systems (required by wxHTML)</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-filesystem</configure-command>
+ <help-topic>wxFileSystem</help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_FS_ZIP</name>
+ <description><B>Virtual Zip filesystem</B><P>
+
+Allows the application to extract files from zip files.<P>
+
+Default: 1
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-fs_zip</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_FS_INET</name>
+ <description><B>Virtual Internet file system</B><P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_STREAMS</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-fs_inet</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_RESOURCES</name>
+ <description><B>wxGetResource/wxWriteResource</B><P>
+
+Deprecated resource functions.<P>
+
+On wxMSW, these functions use .ini files. On wxGTK+, they are implemented using wxFileConfig. On wxMotif, they use XrmDatabase. On all other platforms, they are not implemented.<P>
+
+You might want to use them on wxMotif to access X11 resource files easily, but otherwise it is best to use wxConfig instead.<P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-xresources</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_IOSTREAMH</name>
+ <description><B>iostream setting</B><P>
+
+VC++ 4.2 and above allows &#60;iostream&#62; and &#60;iostream.h&#62; but you can't mix them. Set to 1 for &#60;iostream.h&#62;, 0 for &#60;iostream&#62;. Note that VC++ 7.1 and later doesn't support wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.<P>
+
+Default is 1.<P>
+
+Recommended setting: whatever your compiler likes more
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_LARGEFILE</name>
+ <description><B>Large file support</B><P>
+
+Clear to disable large file support (-D_LARGE_FILES).</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-largefile</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Data</name>
+ <description><B>Data classes</B></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_LONGLONG</name>
+ <description><B>wxLongLong support</B><P>
+
+Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit integer which is implemented in terms of native 64 bit integers if any or uses emulation otherwise.<P>
+
+This class is required by wxDateTime and so you should enable it if you want to use wxDateTime. For most modern platforms, it will use the native 64 bit integers in which case (almost) all of its functions are inline and it almost does not take any space, so there should be no reason to switch it off.<P>
+
+Default: 1. Recommended setting: 1
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-longlong</configure-command>
+ <help-topic>wxLongLong</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_APPLE_IEEE</name>
+ <description><B>IEEE floating point code</B><P>
+
+If enabled, the code written by Apple will be used to write, in a portable way, floating point data on disk. See extended.c for the licence which is different from the wxWindows one.<P>
+
+Default: 1. Recommended setting: 1 unless you don't like the licence terms (unlikely)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-apple_ieee</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_REGEX</name>
+ <description><B>wxRegEx</B><P>
+
+Support for regular expression matching via wxRegEx class: enable this to use POSIX regular expressions in your code. You need to compile theh regex library from src/regex to use it under Windows.<P>
+
+Default: 1 Recommended setting: 1 if your compiler supports it.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-regex</configure-command>
+ <help-topic>wxRegEx</help-topic>
+ <notes></notes>
+ <builtin custom="true" type="string" editor-type="string" description="<B>Builtin</B><P>
+
+Check to use the built-in version of the library, clear to use the wxWindows version.
+">0</builtin>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_GEOMETRY</name>
+ <description>Miscellaneous geometry code</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-geometry</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Time</name>
+ <description></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DATETIME</name>
+ <description><B>wxDateTime</B><P>
+
+Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which manipulate dates, times and time intervals. wxDateTime replaces the old wxTime and wxDate classes which are still provided for backwards compatibility (and implemented in terms of wxDateTime).<P>
+
+Note that this class is relatively new and is still officially in alpha
+stage because some features are not yet (fully) implemented. It is already quite useful though and should only be disabled if you are aiming at absolutely minimal version of the library.<P>
+
+Requires: wxUSE_LONGLONG. Default: 1
+</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_LONGLONG</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-datetime</configure-command>
+ <help-topic>wxDateTime</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_TIMER</name>
+ <description><B>wxTimer</B><P>
+
+Default: 1.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-timer</configure-command>
+ <help-topic>wxTimer</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_STOPWATCH</name>
+ <description><B>wxStopWatch</B><P>
+
+Default: 1. Needed by wxSocket.</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_LONGLONG</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-stopwatch</configure-command>
+ <help-topic>wxStopWatch</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Network</name>
+ <description></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DIALUP_MANAGER</name>
+ <description><B>wxDialUpManager</B><P>
+
+ If wxUSE_DIALUP_MANAGER is 1, compiles in wxDialUpManager class which allows connection to/disconnection from the network and notificaton whenever the dial-up network connection is established or terminated. Requires wxUSE_DYNAMIC_LOADER.
+
+Default: 1. Recommended setting: 1
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-dialupman</configure-command>
+ <help-topic>wxDialupManager</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_SOCKETS</name>
+ <description><B>wxSocket</B><P>
+
+wxSocket and friends.<P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_STOPWATCH</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-sockets</configure-command>
+ <help-topic>wxSocketBase</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="check-group">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_PROTOCOL</name>
+ <description><B>wxProtocol</B><P>
+
+wxProtocol and related classes: if you want to use any of wxFTP, wxHTTP or wxURL you need to set this to 1.<P>
+
+Default: 1
+
+</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_STREAMS</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-protocol</configure-command>
+ <help-topic>wxProtocol</help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_PROTOCOL_FILE</name>
+ <description><B>wxFileProto</B><P>
+
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-protocol-file</configure-command>
+ <help-topic>wxProtocol</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_PROTOCOL_FTP</name>
+ <description><B>wxFTP</B></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-protocol-ftp</configure-command>
+ <help-topic>wxFTP</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_PROTOCOL_HTTP</name>
+ <description><B>wxHTTP</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-protocol-http</configure-command>
+ <help-topic>wxHTTP</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_URL</name>
+ <description><B>wxURL</B></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-url</configure-command>
+ <help-topic>wxURL</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_IPC</name>
+ <description><B>wxIPC</B><P>
+
+The wxServer, wxClient and wxConnection classes are a high-level IPC implementation, using DDE on MS Windows and sockets on other platforms.<P>
+
+Default: 1. Recommended value: 1.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-ipc</configure-command>
+ <help-topic>Interprocess communication overview</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Windows</name>
+ <description></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="check-group">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_STATUSBAR</name>
+ <description><B>wxStatusBar</B><P>
+
+On MS Windows, depending on the value of wxUSE_NATIVE_STATUSBAR, either wxStatusBar95 or a generic wxStatusBar will be used.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-statusbar</configure-command>
+ <help-topic>wxStatusBar</help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_NATIVE_STATUSBAR</name>
+ <description>Two status bar implementations are available under Win32: the generic one or the wrapper around native control. For native look and feel, the native version should be used.<P>
+
+Default: 1. Recommended setting: 1 (there is no advantage in using the generic one)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>wxStatusBar</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="check-group">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_TOOLBAR</name>
+ <description><B>wxToolBar</B><P>
+
+If wxUSE_TOOLBAR is 0, don't compile any toolbar
+classes at all. Otherwise, use the native toolbar class unless
+wxUSE_TOOLBAR_NATIVE is 0. Additionally, the generic toolbar class which supports some features which might not be supported by the native wxToolBar class may be compiled in if wxUSE_TOOLBAR_SIMPLE is 1.<P>
+
+Default: 1. Recommended setting: 1</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-toolbar</configure-command>
+ <help-topic>wxToolBar</help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_TOOLBAR_NATIVE</name>
+ <description>Use the native toolbar implementation wherever possible.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-tbarnative</configure-command>
+ <help-topic>wxToolBar</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_TOOLBAR_SIMPLE</name>
+ <description>Compile wxToolBarSimple, a simple generic toolbar implementation, in addition to any others that are enabled.<P>
+
+This must be enabled if wxUSE_TOOLBAR_NATIVE is disabled.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not>wxUSE_TOOLBAR_NATIVE</enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-tbarsmpl</configure-command>
+ <help-topic>wxToolBar</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_GRID</name>
+ <description><B>wxGrid</B><P>
+
+wxGrid class.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-grid</configure-command>
+ <help-topic>wxGrid</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_SASH</name>
+ <description><B>wxSashWindow</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-sash</configure-command>
+ <help-topic>wxSashWindow</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_SPLITTER</name>
+ <description><B>wxSplitterWindow</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-splitter</configure-command>
+ <help-topic>wxSplitterWindow</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_GLCANVAS</name>
+ <description><B>wxGLCanvas</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-opengl</configure-command>
+ <help-topic>wxGLCanvas</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_POPUPWINDOW</name>
+ <description><B>wxPopupWindow</B><P>
+
+Enables the popup window class.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-popupwin</configure-command>
+ <help-topic>wxPopupWindow</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_TIPWINDOW</name>
+ <description><B>wxTipWindow</B><P>
+
+Enables the generic tip window class.<P>
+
+This is used to implement tooltips on some ports.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-tipwindow</configure-command>
+ <help-topic>wxTipWindow</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_MINIFRAME</name>
+ <description><B>Miniframe</B><P>
+
+Use the wxMiniFrame class. Not implemented on all platforms.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-miniframe</configure-command>
+ <help-topic>wxMiniFrame</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="check-group">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_CONTROLS</name>
+ <description><B>Controls</B><P>
+
+ You must set wxUSE_CONTROLS to 1 if you are using any controls at all (without it, the wxControl class is not compiled).
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-controls</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_BUTTON</name>
+ <description><B>wxButton</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-button</configure-command>
+ <help-topic>wxButton</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_BMPBUTTON</name>
+ <description><B>wxBitmapButton</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-bmpbutton</configure-command>
+ <help-topic>wxBitmapButton</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_CALENDARCTRL</name>
+ <description><B>wxCalCtrl</B><P>
+
+A calendar control.</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_SPINBTN,wxUSE_COMBOBOX</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-calendar</configure-command>
+ <help-topic>wxCalCtrl</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_CHECKBOX</name>
+ <description><B>wxCheckBox</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-checkbox</configure-command>
+ <help-topic>wxCheckBox</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_CHECKLISTBOX</name>
+ <description><B>wxCheckListBox</B><P></description>
+ <default-state>1</default-state>
+ <requires>wxUSE_LISTBOX</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-checklst</configure-command>
+ <help-topic>wxCheckListBox</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_CHOICE</name>
+ <description><B>wxChoice</B><P>
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-choice</configure-command>
+ <help-topic>wxChoice</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_COMBOBOX</name>
+ <description><B>wxComboBox</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-combobox</configure-command>
+ <help-topic>wxComboBox</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_GAUGE</name>
+ <description><B>wxGauge</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-gauge</configure-command>
+ <help-topic>wxGauge</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_LISTBOX</name>
+ <description><B>wxListBox</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-listbox</configure-command>
+ <help-topic>wxListBox</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_LISTCTRL</name>
+ <description><B>wxListCtrl</B><P></description>
+ <default-state>1</default-state>
+ <requires>wxUSE_IMAGLIST</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-listctrl</configure-command>
+ <help-topic>wxListCtrl</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_NOTEBOOK</name>
+ <description><B>wxNotebook</B><P>
+
+wxNotebook is a control with several "tabs" located on one of its sides. It may be used ot logically organise the data presented to the user instead of putting everything in one huge dialog.<P>
+
+Default: 1.
+</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_IMAGLIST</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-notebook</configure-command>
+ <help-topic>wxNotebook</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_RADIOBOX</name>
+ <description><B>wxRadioBox</B><P></description>
+ <default-state>1</default-state>
+ <requires>wxUSE_RADIOBTN,wxUSE_STATBOX</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-radiobox</configure-command>
+ <help-topic>wxRadioBox</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_RADIOBTN</name>
+ <description><B>wxRadioButton</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-radiobtn</configure-command>
+ <help-topic>wxRadioButton</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_SCROLLBAR</name>
+ <description><B>wxScrollBar</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-scrollbar</configure-command>
+ <help-topic>wxScrollBar</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_SLIDER</name>
+ <description><B>wxSlider</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-slider</configure-command>
+ <help-topic>wxSlider</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_SPINBTN</name>
+ <description><B>wxSpinButton</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-spinbtn</configure-command>
+ <help-topic>wxSpinButton</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_SPINCTRL</name>
+ <description><B>wxSpinCtrl</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-spinctrl</configure-command>
+ <help-topic>wxSpinCtrl</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_STATBOX</name>
+ <description><B>wxStaticBox</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-statbox</configure-command>
+ <help-topic>wxStaticBox</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_STATLINE</name>
+ <description><B>wxStaticLine</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-statline</configure-command>
+ <help-topic>wxStaticBitmap</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_STATTEXT</name>
+ <description><B>wxStaticText</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-stattext</configure-command>
+ <help-topic>wxStaticText</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_STATBMP</name>
+ <description><B>wxStaticBitmap</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-staticbmp</configure-command>
+ <help-topic>wxStaticBitmap</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_TEXTCTRL</name>
+ <description><B>wxTextCtrl</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-textctrl</configure-command>
+ <help-topic>wxTextCtrl</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_TOGGLEBTN</name>
+ <description><B>wxToggleButton</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-togglebtn</configure-command>
+ <help-topic>wxToggleButton</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_TREECTRL</name>
+ <description><B>wxTreeCtrl</B><P></description>
+ <default-state>1</default-state>
+ <requires>wxUSE_IMAGLIST</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-treectrl</configure-command>
+ <help-topic>wxTreeCtrl</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Imaging</name>
+ <description><B>Imaging</B><P>
+
+Features relating to images</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_IMAGLIST</name>
+ <description><B>wxImageList</B><P>
+
+This class is needed by wxNotebook, wxTreeCtrl and wxListCtrl.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-imaglist</configure-command>
+ <help-topic>wxImageList</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="check-group">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_METAFILE</name>
+ <description><B>wxMetaFile</B><P>
+
+This option is relevant on MS Windows only.<P>
+
+Windows supports the graphics format known as metafile which is, though not portable, is widely used under Windows and so is supported by wxWin (under Windows only, of course). Win16 (Win3.1) used the so-called "Window MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in
+ Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by default, WMFs will be used under Win16 and EMFs under Win32. This may be changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting
+wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile in any metafile related classes at all.<P>
+
+Default: 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS.<P>
+
+Recommended setting: default or 0 for everything for portable programs.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command>--enable-metafile</configure-command>
+ <help-topic>wxMetaFile</help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_ENH_METAFILE</name>
+ <description><B>wxEnhMetaFile</B><P>
+
+Enhanced metafile (recommended).</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command></configure-command>
+ <help-topic>wxMetaFile</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_WIN_METAFILES_ALWAYS</name>
+ <description>This option is obsolete. Set to 0.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command></configure-command>
+ <help-topic>wxMetaFile</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DRAGIMAGE</name>
+ <description><B>wxDragImage</B><P>
+
+This class is useful for implementing drag operations.<P>
+
+Default: 1. Recommended value: 1.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-dragimage</configure-command>
+ <help-topic>wxDragImage</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="check-group">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_IMAGE</name>
+ <description><B>wxImage</B><P>
+
+wxImage supports many different image formats which can be configured at compile-time. BMP and XPM are always supported, others are optional and can be safely disabled if you don't plan to use images in such format sometimes saving substantial amount of code in the final library.<P>
+
+Some formats require an extra library which is included in wxWin sources which is mentioned if it is the case.<P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-image</configure-command>
+ <help-topic>wxImage</help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_LIBPNG</name>
+ <description><B>PNG support</B><P>
+
+Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-libpng</configure-command>
+ <help-topic>wxImage</help-topic>
+ <notes></notes>
+ <builtin custom="true" type="string" editor-type="string" description="<B>Builtin</B><P>
+
+Check to use the built-in version of the library, clear to use the wxWindows version.">0</builtin>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_LIBJPEG</name>
+ <description><B>JPEG support</B><P>
+
+Set to 1 for JPEG format support (requires libjpeg).
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-libjpeg</configure-command>
+ <help-topic>wxImage</help-topic>
+ <notes></notes>
+ <builtin custom="true" type="string" editor-type="string" description="<B>Builtin</B><P>
+
+Check to use the built-in version of the library, clear to use the wxWindows version.
+">0</builtin>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_LIBTIFF</name>
+ <description><B>TIFF support</B><P>
+
+Set to 1 for TIFF format support (requires libtiff).
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-libtiff</configure-command>
+ <help-topic>wxImage</help-topic>
+ <notes></notes>
+ <builtin custom="true" type="string" editor-type="string" description="<B>Builtin</B><P>
+
+Check to use the built-in version of the library, clear to use the wxWindows version.
+">0</builtin>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_GIF</name>
+ <description><B>GIF support</B><P>
+
+Set to 1 for read-only GIF format support.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-gif</configure-command>
+ <help-topic>wxImage</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_PNM</name>
+ <description><B>PNM support</B><P>
+
+Set to 1 for PNM format support.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-pnm</configure-command>
+ <help-topic>wxImage</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_PCX</name>
+ <description><B>PCX support</B><P>
+
+Set to 1 for PCX format support.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-pcx</configure-command>
+ <help-topic>wxImage</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_IFF</name>
+ <description><B>IFF support</B><P>
+
+ Set to 1 for IFF (Amiga) format support.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-iff</configure-command>
+ <help-topic>wxImage</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_XPM</name>
+ <description><B>XPM support</B><P>
+
+Set to 1 for XPM format support.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-xpm</configure-command>
+ <help-topic>wxImage</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_ICO_CUR</name>
+ <description><B>MS Windows icons and cursors support</B><P>
+
+Set to 1 for MS Icons and Cursors format support.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command>--enable-icocur</configure-command>
+ <help-topic>wxImage</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_PALETTE</name>
+ <description><B>wxPalette</B><P>
+
+Set to 1 to enable the wxPalette class.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-palette</configure-command>
+ <help-topic>wxPalette</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Common dialogs</name>
+ <description><B>Common dialogs</B><P>
+
+Controls options relating to common dialogs, such
+wxColourDialog and wxDirDialog.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>Common dialogs overview</help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_GENERIC_DIALOGS_IN_MSW</name>
+ <description><B>Generic dialog support in Windows</B><P>
+
+Define 1 to use generic dialogs in Windows, even though they duplicate native common dialog (e.g. wxColourDialog). This is mainly useful for testing.<P>
+
+Default: 0. Recommended setting: 0
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>Common dialogs overview</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_COMMON_DIALOGS</name>
+ <description><B>Common dialogs</B><P>
+
+On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g. file selector, printer dialog). Switching this off also switches off the printing architecture and interactive wxPrinterDC.
+This relates to the native common dialogs and not to generic dialogs such as wxBusyInfo.
+<P>
+
+Default: 1. Recommended setting: 1 (unless it really doesn't work)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-commondlg</configure-command>
+ <help-topic>Common dialogs overview</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_BUSYINFO</name>
+ <description><B>wxBusyInfo</B><P>
+
+wxBusyInfo displays window with a message when the app is busy. Works in the same way as wxBusyCursor.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-busyinfo</configure-command>
+ <help-topic>wxBusyInfo</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_CHOICEDLG</name>
+ <description><B>Single and multiple choice dialogs</B><P>
+
+ Default: 1. Recommended setting: 1 (used in the library itself)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-choicedlg</configure-command>
+ <help-topic>Dialog functions</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_COLOURDLG</name>
+ <description><B>wxColourDialog</B><P>
+
+Use the colour picker dialog.<P>
+
+Default: 1. Recommended setting: 1
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-coldlg</configure-command>
+ <help-topic>wxColourDialog</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DIRDLG</name>
+ <description><B>wxDirDlg</B><P>
+
+A class for getting a directory name from the user.<P>
+
+Default: 1. Recommended setting: 1.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-dirdlg</configure-command>
+ <help-topic>wxDirDialog</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_FILEDLG</name>
+ <description><B>wxFileDialog</B><P>
+
+Open and save file dialogs.<P>
+
+Default: 1. Recommended setting: 1 (used in many places in the library itself)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-filedlg</configure-command>
+ <help-topic>wxFileDialog</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_FINDREPLDLG</name>
+ <description><B>wxFindReplaceDialog</B><P>
+
+ Default: 1. Recommended setting: 1 (but may be safely set to 0)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-finddlg</configure-command>
+ <help-topic>wxFindReplaceDialog</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_FONTDLG</name>
+ <description><B>wxFontDialog</B><P>
+
+Font picker dialog.<P>
+
+Default: 1. Recommended setting: 1 (used in the library itself)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-fontdlg</configure-command>
+ <help-topic>wxFontDialog</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_MSGDLG</name>
+ <description><B>wxMessageDialog and wxMessageBox</B><P>
+
+Default: 1. Recommended setting: 1 (used in the library itself)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>wxMessageDialog</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_PROGRESSDLG</name>
+ <description><B>wxProgressDialog</B><P>
+
+Progress dialog class for lengthy operations
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-msgdlg</configure-command>
+ <help-topic>wxProgressDialog</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_STARTUP_TIPS</name>
+ <description><B>wxShowTip</B><P>
+
+Support for startup tips.
+
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-tipdlg</configure-command>
+ <help-topic>Dialog functions</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_TEXTDLG</name>
+ <description><B>wxTextEntryDialog</B><P>
+
+Text entry dialog and wxGetTextFromUser function.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-textdlg</configure-command>
+ <help-topic>wxTextEntryDialog</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_NUMBERDLG</name>
+ <description><B>wxGetNumberFromUser</B><P>
+
+Number entry dialog. This option is not currently used.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-numberdlg</configure-command>
+ <help-topic>Dialog functions</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_SPLASH</name>
+ <description><B>wxSplashScreen</B><P>
+
+A splash window.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-splash</configure-command>
+ <help-topic>wxSplashScreen</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_WIZARDDLG</name>
+ <description><B>wxWizard</B><P>
+
+The wizard dialog.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-wizarddlg</configure-command>
+ <help-topic>wxWizard</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Large components</name>
+ <description><B>Frameworks</B><P>
+
+This category consists of large components, such as the printing and document/view frameworks.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DOC_VIEW_ARCHITECTURE</name>
+ <description><B>Document/view architecture</B><P></description>
+ <default-state>1</default-state>
+ <requires>wxUSE_MENUS,wxUSE_FILEDLG</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-docview</configure-command>
+ <help-topic>Document/view overview</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_MDI_ARCHITECTURE</name>
+ <description><B>Multiple Document Interface</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-mdi</configure-command>
+ <help-topic>wxMDIParentFrame</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_PRINTING_ARCHITECTURE</name>
+ <description><B>Print/preview architecture code</B><P>
+
+Your application can still print without this, but it is highly recommended that you use the framework provided.
+</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_COMBOBOX</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-printarch</configure-command>
+ <help-topic>Printing overview</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_HTML</name>
+ <description><B>wxHTML</B><P>
+
+The wxHTML subsystem consists of wxHtmlWindow, wxHtmlHelpController, wxHtmlEasyPrinting and other components.</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_FILESYSTEM</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-html</configure-command>
+ <help-topic>wxHTML Overview</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Miscellaneous</name>
+ <description><B>Miscellaneous features</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_CMDLINE_PARSER</name>
+ <description><B>Support for command line parsing using wxCmdLineParser class</B><P>
+
+Default: 1 Recommended setting: 1 (can be set to 0 if you don't use the command line)
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-cmdline</configure-command>
+ <help-topic>wxCmdLineParser</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_THREADS</name>
+ <description><B>Support for multithreaded applications</B><P>
+
+If 1, compile in thread classes (thread.h) and
+make the library a bit more thread safe. Although thread
+support is quite stable by now, you may still consider recompiling the library without it if you have no use for it - this will result in a
+somewhat smaller and faster operation.<P>
+
+Default: 1. Recommended setting: 0 unless you do plan to develop MT applications
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-threads</configure-command>
+ <help-topic>wxThread</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_INTL</name>
+ <description><B>Internationlisation support</B><P>
+
+_() macro, wxLocale class. Requires wxTextFile.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-intl</configure-command>
+ <help-topic>Internationalization</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DYNLIB_CLASS</name>
+ <description><B>wxDynamicLibrary</B><P>
+
+Compiles in classes for run-time DLL loading and function calling.<P>
+
+Default: 1. Required by wxUSE_DIALUP_MANAGER.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-dynlib</configure-command>
+ <help-topic>wxDynamicLibrary</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DYNAMIC_LOADER</name>
+ <description><B>Dynamic loader</B><P>
+
+Experimental, don't use for now</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-dynamicloader</configure-command>
+ <help-topic>wxDynamicLibrary</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_FONTMAP</name>
+ <description><B>wxFontMapper</B><P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-fontmap</configure-command>
+ <help-topic>wxFontMapper</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_SYSTEM_OPTIONS</name>
+ <description><B>wxSystemOptions</B><P>
+
+A class for setting miscellaneous options that do not fit in with the wxWindows API. For example, drawing optimizations can be tweaked using this class.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-sysoptions</configure-command>
+ <help-topic>wxSystemOptions</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_WAVE</name>
+ <description><B>wxWave</B><P>
+
+Simple .wav class for short sounds.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-wave</configure-command>
+ <help-topic>wxWave</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_ACCEL</name>
+ <description>wxAcceleratorTable/wxAcceleratorTableEntry classes and support for them in wxMenu(Bar)</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-accel</configure-command>
+ <help-topic>wxAcceleratorTable</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_CARET</name>
+ <description>A class implementing a "cursor" in a text control (called caret
+under Windows).</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-caret</configure-command>
+ <help-topic>wxCaret</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DISPLAY</name>
+ <description><B>wxDisplay</B><P>
+
+The wxDisplay class allows enumeration of all displays on a system and working with them.<P>
+
+Default: 0 because it isn't yet implemented on all platforms.<P>
+
+Recommended setting: 1 if you need it, can be safely set to 0 otherwise
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-display</configure-command>
+ <help-topic>wxDisplay</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_MENUS</name>
+ <description><B>wxMenu</B><P>
+
+wxMenu, wxMenuBar. Should not be disabled.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-menus</configure-command>
+ <help-topic>wxMenu</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_VALIDATORS</name>
+ <description><B>wxValidator and derived classes</B><P></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-validators</configure-command>
+ <help-topic>wxValidator</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_ACCESSIBILITY</name>
+ <description><B>Accessibility</B><P>
+
+Use the wxAccessible class for enhanced and customisable accessibility. Currently available on MS Windows only.<P>
+
+Requires wxUSE_OLE.<P>
+
+Default: 0. Recommended setting: 0
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-accessibility</configure-command>
+ <help-topic>wxAccessible</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_SNGLINST_CHECKER</name>
+ <description><B>wxSingleInstanceChecker</B><P>
+
+wxSingleInstanceChecker class allows the application to verify at startup if another program instance is running. Currently only available under MS Windows.<P>
+
+Default: 1. Recommended value: 1
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-snglinst</configure-command>
+ <help-topic>wxSingleInstanceChecker</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_CONSTRAINTS</name>
+ <description><B>Layout constraints</B><P>
+
+The old constraint-based layout system is deprecated in favour of sizers, and may be safely disabled since they are not used within wxWindows any more.<P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-constraints</configure-command>
+ <help-topic>Constraints overview</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_SPLINES</name>
+ <description><B>Splines</B><P>
+
+Enables spline drawing code in wxDC.<P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-splines</configure-command>
+ <help-topic>wxDC</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DYNAMIC_CLASSES</name>
+ <description><B>Dynamic classes</B><P>
+
+If 1, enables provision of run-time type information.
+NOW MANDATORY: don't change.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>Run time class information overview</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_ZLIB</name>
+ <description><B>Zlib, wxZlibInputStream, wxZlibOutputStream</B><P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-zlib</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <builtin custom="true" type="string" editor-type="string" description="<B>Builtin</B><P>
+
+Check to use the built-in version of the library, clear to use the wxWindows version.
+">0</builtin>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Data transfer</name>
+ <description><B>Data transfer</B><P>
+
+Data transfer encompasses clipboard and drag-and-drop operations.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>wxDataObject overview</help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_CLIPBOARD</name>
+ <description><B>wxClipboard</B><P>
+
+Clipboard copy/paste.<P>
+
+Default: 1. Recommended value: 1</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_DATAOBJ</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-clipboard</configure-command>
+ <help-topic>wxClipboard</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DATAOBJ</name>
+ <description><B>wxDataObject</B><P>
+
+Use wxDataObject and related classes. Needed for clipboard and OLE drag and drop.<P>
+
+Default: 1. Recommended value: 1
+</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_OLE</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-dataobj</configure-command>
+ <help-topic>wxDataObject</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DRAG_AND_DROP</name>
+ <description><B>Drag and drop</B><P>
+
+ Use wxDropTarget and wxDropSource classes for drag and drop (this is different from "built in" drag and drop in wxTreeCtrl which is always available). Requires wxUSE_DATAOBJ.<P>
+
+ Default: 1. Recommended setting: 1
+</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_OLE,wxUSE_DATAOBJ</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-dnd</configure-command>
+ <help-topic>Drag and drop overview</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Help</name>
+ <description></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="check-group">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_HELP</name>
+ <description><B>Online help</B><P>
+
+Enables all online help (but not context-sensitive help).<P>
+
+Default: 1.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-help</configure-command>
+ <help-topic>wxHelpController</help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_MS_HTML_HELP</name>
+ <description><B>MS HTML Help</B><P>
+
+Enables the wxCHMHelpController class.<P>
+
+Default: 1.</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_DYNAMIC_LOADER</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command>--enable-mshtmlhelp</configure-command>
+ <help-topic>wxHelpController</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_WXHTML_HELP</name>
+ <description><B>wxHTML Help</B><P>
+
+Enables the built-in HTML help controller.<P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_HTML,wxUSE_COMBOBOX,wxUSE_NOTEBOOK,wxUSE_FILEDLG</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-htmlhelp</configure-command>
+ <help-topic>wxHtmlHelpController</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_TOOLTIPS</name>
+ <description><B>wxToolTip</B></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-tooltips</configure-command>
+ <help-topic>wxToolTip</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Input devices</name>
+ <description><B>Input devices</B><P>
+
+Settings for various input devices.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_MOUSEWHEEL</name>
+ <description><B>Mousewheel support</B><P>
+
+Enables mousewheel support. So far this is only supported in MS Windows.<P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command></configure-command>
+ <help-topic>wxMouseEvent</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_JOYSTICK</name>
+ <description><B>wxJoystick</B><P>
+
+Under wxGTK, this requires wxUSE_THREADS to be enabled.<P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_THREADS</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-joystick</configure-command>
+ <help-topic>wxJoystick</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Printing</name>
+ <description><B>Printing settings</B><P>
+
+See also: <font color="#0000FF">Large components</font> for wxUSE_PRINTING_ARCHITECTURE.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="check-group">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_POSTSCRIPT</name>
+ <description><B>PostScript</B><P>
+
+Enables PostScript printing support.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--enable-postscript</configure-command>
+ <help-topic>wxPostScriptDC</help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_AFM_FOR_POSTSCRIPT</name>
+ <description><B>AFM support</B><P>
+
+Set to 1 to use font metric files in GetTextExtent.
+</description>
+ <default-state>0</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>wxPostScriptDC</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW</name>
+ <description><B>PostScript under MS Windows</B><P>
+
+Enables PostScript on MS Windows.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>wxPostScriptDC</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Database</name>
+ <description></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="check-group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_ODBC</name>
+ <description><B>ODBC support</B><P>
+
+Enables wxDb and related classes for
+accessing ODBC on all supported platforms.<P>
+
+Default: 0</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes>wxUSE_UNICODE</precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-odbc</configure-command>
+ <help-topic>Database classes overview</help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>0</enabled>
+ <name>wxODBC_FWD_ONLY_CURSORS</name>
+ <description><B>wxDb cursor scrolling</B><P>
+
+For backward compatibility reasons, this parameter now only controls the default scrolling method used by cursors. This default behavior can be overriden by setting the second param of wxDb::wxDbGetConnection() or wxDb() constructor to indicate whether the connection (and any wxDbTables that use the connection) should support forward only scrolling of cursors,
+or both forward and backward support for backward scrolling cursors is dependent on the data source as well as the ODBC driver being used.<P>
+
+Default: 1
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>Database classes overview</help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>0</enabled>
+ <name>wxODBC_BACKWARD_COMPATABILITY</name>
+ <description><B>ODBC classes backward compatibility</B><P>
+
+Set to 1 to use the deprecated classes, enum types, function,
+member variables. With a setting of 1, full backward compatability with the 2.0.x release is possible. It is STRONGLY recommended that this be set to 0, as future development will be done only on the non-deprecated functions/classes/member variables/etc.<P>
+
+Default: 0
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic>Database classes overview</help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>Platform-specific</name>
+ <description></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxMSW</name>
+ <description></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_OWNER_DRAWN</name>
+ <description><B>Owner-drawn controls</B><P>
+
+Set this to 1 to enable support for the owner-drawn menu and listboxes. This is required by wxUSE_CHECKLISTBOX.<P>
+
+Default: 1. Recommended setting: 1, set to 0 for a small library size reduction.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_RICHEDIT</name>
+ <description><B>Rich edit control support</B><P>
+
+Set this to 1 to use RICHEDIT controls for wxTextCtrl with style wxTE_RICH which allows to put more than ~32Kb of text in it even under Win9x (NT doesn't have such limitation).<P>
+
+Default: 1 for compilers which support it Recommended setting: 1, only set it to 0 if your compiler doesn't have or can't compile richedit.h.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_RICHEDIT2</name>
+ <description><B>Rich edit control version 2</B><P>
+
+Enable rich edit version 2.0.<P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>0</enabled>
+ <name>wxUSE_MFC</name>
+ <description><B>MFC interoperation</B><P>
+
+Set this to 1 if you want to use wxWindows and MFC in the same program. This will override some other settings.
+
+Default: 0. Recommended setting: 0 unless you really have to use MFC
+</description>
+ <default-state>0</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_OLE</name>
+ <description><B>OLE support</B><P>
+
+Set this to 1 for generic OLE support: this is required for drag-and-drop, clipboard, OLE Automation. Only set it to 0 if your compiler is very old and can't compile/doesn't have the OLE headers.<P>
+
+Default: 1. Recommended setting: 1
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command>--enable-ole</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_UXTHEME</name>
+ <description><B>MS Windows XP UX Theme Engine support</B><P>
+
+Set to 1 to compile MS Windows XP theme engine support.
+</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_UXTHEME_AUTO</name>
+ <description><B>MS Windows XP UX Theme Engine auto-adaptation</B><P>
+
+Set to 1 to auto-adapt to MS Windows XP themes where possible
+(notably, wxNotebook pages).
+</description>
+ <default-state>1</default-state>
+ <requires>wxUSE_UXTHEME</requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>1</enabled>
+ <name>wxUSE_DC_CACHEING</name>
+ <description>Caches device contexts to improve performance.<P>
+
+This is a Windows-only option.<P>
+
+Default: 1</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>0</active>
+ <enabled>0</enabled>
+ <name>wxUSE_DIB_FOR_BITMAP</name>
+ <description>Set this to 1 to enable the use of DIB's for wxBitmap to support
+bitmaps > 16MB on Win95/98/Me. Set to 0 to use DDB's only.<P>
+
+Default: 0
+</description>
+ <default-state>0</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXMSW__</context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ <setting type="group">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxGTK</name>
+ <description></description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command></configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_GTKTEST</name>
+ <description><B>GTK+ test</B><P>
+
+Try to compile and run a test GTK program.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXGTK__</context>
+ <configure-command>--enable-gtktest</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_GTKPREFIX</name>
+ <description><B>GTK+ prefix</B><P>
+
+Prefix where GTK+ is installed (optional). Type the prefix into the <b>value</b> field.</description>
+ <default-state>0</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXGTK__</context>
+ <configure-command>--with-gtk-prefix</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <value custom="true" type="string" editor-type="string" description="<B>Value</B><P>
+
+Type the prefix into the <B>value</B> property."></value>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_GTKEXECPREFIX</name>
+ <description><B>GTK+ exec prefix</B><P>
+
+Exec prefix where GTK+ is installed (optional). Type the prefix into the <b>value</b> field.</description>
+ <default-state>0</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXGTK__</context>
+ <configure-command>--with-gtk-exec-prefix</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <value custom="true" type="string" editor-type="string" description="<B>Value</B><P>
+
+Type the prefix into the <B>value</B> property."></value>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>0</enabled>
+ <name>wxUSE_LIBICONV_PREFIX</name>
+ <description><B>libiconv prefix</B><P>
+
+Search for libiconv in DIR/include and DIR/lib. Type the prefix into the <b>value</b> field.</description>
+ <default-state>0</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context></context>
+ <configure-command>--with-libiconv-prefix</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ <value custom="true" type="string" editor-type="string" description="<B>Value</B><P>
+
+Type the prefix into the <B>value</B> property."></value>
+ </setting>
+ <setting type="bool-check">
+ <active>1</active>
+ <enabled>1</enabled>
+ <name>wxUSE_X</name>
+ <description><B>Use X</B><P>
+
+Use the X window system.</description>
+ <default-state>1</default-state>
+ <requires></requires>
+ <precludes></precludes>
+ <enabled-if></enabled-if>
+ <enabled-if-not></enabled-if-not>
+ <exclusivity></exclusivity>
+ <context>__WXGTK__</context>
+ <configure-command>--with-x</configure-command>
+ <help-topic></help-topic>
+ <notes></notes>
+ </setting>
+ </setting>
+ </setting>
+ </setting>
+</settings>
--- /dev/null
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
--- /dev/null
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ ==================================
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General
+Public Licenses are intended to guarantee your freedom to share
+and change free software--to make sure the software is free for
+all its users.
+
+This license, the Library General Public License, applies to
+some specially designated Free Software Foundation software, and
+to any other libraries whose authors decide to use it. You can
+use it for your libraries, too.
+
+When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure
+that you have the freedom to distribute copies of free software
+(and charge for this service if you wish), that you receive
+source code or can get it if you want it, that you can change
+the software or use pieces of it in new free programs; and that
+you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the
+rights. These restrictions translate to certain responsibilities
+for you if you distribute copies of the library, or if you
+modify it.
+
+For example, if you distribute copies of the library, whether
+gratis or for a fee, you must give the recipients all the rights
+that we gave you. You must make sure that they, too, receive or
+can get the source code. If you link a program with the
+library, you must provide complete object files to the
+recipients so that they can relink them with the library, after
+making changes to the library and recompiling it. And you must
+show them these terms so they know their rights.
+
+Our method of protecting your rights has two steps: (1)
+copyright the library, and (2) offer you this license which
+gives you legal permission to copy, distribute and/or modify the
+library.
+
+Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this
+free library. If the library is modified by someone else and
+passed on, we want its recipients to know that what they have is
+not the original version, so that any problems introduced by
+others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies
+distributing free software will individually obtain patent
+licenses, thus in effect transforming the program into
+proprietary software. To prevent this, we have made it clear
+that any patent must be licensed for everyone's free use or not
+licensed at all.
+
+Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License, which was designed for
+utility programs. This license, the GNU Library General Public
+License, applies to certain designated libraries. This license
+is quite different from the ordinary one; be sure to read it in
+full, and don't assume that anything in it is the same as in the
+ordinary license.
+
+The reason we have a separate public license for some libraries
+is that they blur the distinction we usually make between
+modifying or adding to a program and simply using it. Linking a
+program with a library, without changing the library, is in some
+sense simply using the library, and is analogous to running a
+utility program or application program. However, in a textual
+and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General
+Public License treats it as such.
+
+Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote
+software sharing, because most developers did not use the
+libraries. We concluded that weaker conditions might promote
+sharing better.
+
+However, unrestricted linking of non-free programs would deprive
+the users of those programs of all benefit from the free status
+of the libraries themselves. This Library General Public
+License is intended to permit developers of non-free programs to
+use free libraries, while preserving your freedom as a user of
+such programs to change the free libraries that are incorporated
+in them. (We have not seen how to achieve this as regards
+changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is
+that this will lead to faster development of free libraries.
+
+The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference
+between a "work based on the library" and a "work that uses the
+library". The former contains code derived from the library,
+while the latter only works together with the library.
+
+Note that it is possible for a library to be covered by the
+ordinary General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other
+authorized party saying it may be distributed under the terms of
+this Library General Public License (also called "this
+License"). Each licensee is addressed as "you".
+
+A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application
+programs (which use some of those functions and data) to form
+executables.
+
+The "Library", below, refers to any such software library or
+work which has been distributed under these terms. A "work
+based on the Library" means either the Library or any derivative
+work under copyright law: that is to say, a work containing the
+Library or a portion of it, either verbatim or with
+modifications and/or translated straightforwardly into another
+language. (Hereinafter, translation is included without
+limitation in the term "modification".)
+
+"Source code" for a work means the preferred form of the work
+for making modifications to it. For a library, complete source
+code means all the source code for all modules it contains, plus
+any associated interface definition files, plus the scripts used
+to control compilation and installation of the library.
+
+Activities other than copying, distribution and modification are
+not covered by this License; they are outside its scope. The
+act of running a program using the Library is not restricted,
+and output from such a program is covered only if its contents
+constitute a work based on the Library (independent of the use
+of the Library in a tool for writing it). Whether that is true
+depends on what the Library does and what the program that uses
+the Library does.
+
+1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided
+that you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep
+intact all the notices that refer to this License and to the
+absence of any warranty; and distribute a copy of this License
+along with the Library.
+
+You may charge a fee for the physical act of transferring a
+copy, and you may at your option offer warranty protection in
+exchange for a fee.
+
+2. You may modify your copy or copies of the Library or any
+portion of it, thus forming a work based on the Library, and
+copy and distribute such modifications or work under the terms
+of Section 1 above, provided that you also meet all of these
+conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the
+Library, and can be reasonably considered independent and
+separate works in themselves, then this License, and its terms,
+do not apply to those sections when you distribute them as
+separate works. But when you distribute the same sections as
+part of a whole which is a work based on the Library, the
+distribution of the whole must be on the terms of this License,
+whose permissions for other licensees extend to the entire
+whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or
+contest your rights to work written entirely by you; rather, the
+intent is to exercise the right to control the distribution of
+derivative or collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the
+Library with the Library (or with a work based on the Library)
+on a volume of a storage or distribution medium does not bring
+the other work under the scope of this License.
+
+3. You may opt to apply the terms of the ordinary GNU General
+Public License instead of this License to a given copy of the
+Library. To do this, you must alter all the notices that refer
+to this License, so that they refer to the ordinary GNU General
+Public License, version 2, instead of to this License. (If a
+newer version than version 2 of the ordinary GNU General Public
+License has appeared, then you can specify that version instead
+if you wish.) Do not make any other change in these notices.
+
+Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to
+all subsequent copies and derivative works made from that copy.
+
+This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable
+form under the terms of Sections 1 and 2 above provided that you
+accompany it with the complete corresponding machine-readable
+source code, which must be distributed under the terms of
+Sections 1 and 2 above on a medium customarily used for software
+interchange.
+
+If distribution of object code is made by offering access to
+copy from a designated place, then offering equivalent access to
+copy the source code from the same place satisfies the
+requirement to distribute the source code, even though third
+parties are not compelled to copy the source along with the
+object code.
+
+5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being
+compiled or linked with it, is called a "work that uses the
+Library". Such a work, in isolation, is not a derivative work
+of the Library, and therefore falls outside the scope of this
+License.
+
+However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library
+(because it contains portions of the Library), rather than a
+"work that uses the library". The executable is therefore
+covered by this License. Section 6 states terms for distribution
+of such executables.
+
+When a "work that uses the Library" uses material from a header
+file that is part of the Library, the object code for the work
+may be a derivative work of the Library even though the source
+code is not. Whether this is true is especially significant if
+the work can be linked without the Library, or if the work is
+itself a library. The threshold for this to be true is not
+precisely defined by law.
+
+If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small
+inline functions (ten lines or less in length), then the use of
+the object file is unrestricted, regardless of whether it is
+legally a derivative work. (Executables containing this object
+code plus portions of the Library will still fall under Section
+6.)
+
+Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of
+Section 6. Any executables containing that work also fall under
+Section 6, whether or not they are linked directly with the
+Library itself.
+
+6. As an exception to the Sections above, you may also compile
+or link a "work that uses the Library" with the Library to
+produce a work containing portions of the Library, and
+distribute that work under terms of your choice, provided that
+the terms permit modification of the work for the customer's own
+use and reverse engineering for debugging such modifications.
+
+You must give prominent notice with each copy of the work that
+the Library is used in it and that the Library and its use are
+covered by this License. You must supply a copy of this
+License. If the work during execution displays copyright
+notices, you must include the copyright notice for the Library
+among them, as well as a reference directing the user to the
+copy of this License. Also, you must do one of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special
+exception, the source code distributed need not include anything
+that is normally distributed (in either source or binary form)
+with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that
+component itself accompanies the executable.
+
+It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you
+cannot use both them and the Library together in an executable
+that you distribute.
+
+7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other
+library facilities not covered by this License, and distribute
+such a combined library, provided that the separate distribution
+of the work based on the Library and of the other library
+facilities is otherwise permitted, and provided that you do
+these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+8. You may not copy, modify, sublicense, link with, or
+distribute the Library except as expressly provided under this
+License. Any attempt otherwise to copy, modify, sublicense,
+link with, or distribute the Library is void, and will
+automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you
+under this License will not have their licenses terminated so
+long as such parties remain in full compliance.
+
+9. You are not required to accept this License, since you have
+not signed it. However, nothing else grants you permission to
+modify or distribute the Library or its derivative works. These
+actions are prohibited by law if you do not accept this
+License. Therefore, by modifying or distributing the Library
+(or any work based on the Library), you indicate your acceptance
+of this License to do so, and all its terms and conditions for
+copying, distributing or modifying the Library or works based on
+it.
+
+10. Each time you redistribute the Library (or any work based on
+the Library), the recipient automatically receives a license
+from the original licensor to copy, distribute, link with or
+modify the Library subject to these terms and conditions. You
+may not impose any further restrictions on the recipients'
+exercise of the rights granted herein. You are not responsible
+for enforcing compliance by third parties to this License.
+
+11. If, as a consequence of a court judgment or allegation of
+patent infringement or for any other reason (not limited to
+patent issues), conditions are imposed on you (whether by court
+order, agreement or otherwise) that contradict the conditions of
+this License, they do not excuse you from the conditions of this
+License. If you cannot distribute so as to satisfy
+simultaneously your obligations under this License and any other
+pertinent obligations, then as a consequence you may not
+distribute the Library at all. For example, if a patent license
+would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you,
+then the only way you could satisfy both it and this License
+would be to refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable
+under any particular circumstance, the balance of the section is
+intended to apply, and the section as a whole is intended to
+apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe
+any patents or other property right claims or to contest
+validity of any such claims; this section has the sole purpose
+of protecting the integrity of the free software distribution
+system which is implemented by public license practices. Many
+people have made generous contributions to the wide range of
+software distributed through that system in reliance on
+consistent application of that system; it is up to the
+author/donor to decide if he or she is willing to distribute
+software through any other system and a licensee cannot impose
+that choice.
+
+This section is intended to make thoroughly clear what is
+believed to be a consequence of the rest of this License.
+
+12. If the distribution and/or use of the Library is restricted
+in certain countries either by patents or by copyrighted
+interfaces, the original copyright holder who places the Library
+under this License may add an explicit geographical distribution
+limitation excluding those countries, so that distribution is
+permitted only in or among countries not thus excluded. In such
+case, this License incorporates the limitation as if written in
+the body of this License.
+
+13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to
+time. Such new versions will be similar in spirit to the present
+version, but may differ in detail to address new problems or
+concerns.
+
+Each version is given a distinguishing version number. If the
+Library specifies a version number of this License which applies
+to it and "any later version", you have the option of following
+the terms and conditions either of that version or of any later
+version published by the Free Software Foundation. If the
+Library does not specify a license version number, you may
+choose any version ever published by the Free Software
+Foundation.
+
+14. If you wish to incorporate parts of the Library into other
+free programs whose distribution conditions are incompatible
+with these, write to the author to ask for permission. For
+software which is copyrighted by the Free Software Foundation,
+write to the Free Software Foundation; we sometimes make
+exceptions for this. Our decision will be guided by the two
+goals of preserving the free status of all derivatives of our
+free software and of promoting the sharing and reuse of software
+generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
+DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Libraries
+
+If you develop a new library, and you want it to be of the
+greatest possible use to the public, we recommend making it free
+software that everyone can redistribute and change. You can do
+so by permitting redistribution under these terms (or,
+alternatively, under the terms of the ordinary General Public
+License).
+
+To apply these terms, attach the following notices to the
+library. It is safest to attach them to the start of each
+source file to most effectively convey the exclusion of
+warranty; and each file should have at least the "copyright"
+line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
--- /dev/null
+ wxWindows Library Licence, Version 3
+ ====================================
+
+ Copyright (c) 1998 Julian Smart, Robert Roebling et al
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this licence document, but changing it is not allowed.
+
+ WXWINDOWS LIBRARY LICENCE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public Licence as published by
+ the Free Software Foundation; either version 2 of the Licence, or (at
+ your option) any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
+ General Public Licence for more details.
+
+ You should have received a copy of the GNU Library General Public Licence
+ along with this software, usually in a file named COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ Boston, MA 02111-1307 USA.
+
+ EXCEPTION NOTICE
+
+ 1. As a special exception, the copyright holders of this library give
+ permission for additional uses of the text contained in this release of
+ the library as licenced under the wxWindows Library Licence, applying
+ either version 3 of the Licence, or (at your option) any later version of
+ the Licence as published by the copyright holders of version 3 of the
+ Licence document.
+
+ 2. The exception is that you may use, copy, link, modify and distribute
+ under the user's own terms, binary object code versions of works based
+ on the Library.
+
+ 3. If you copy code from files distributed under the terms of the GNU
+ General Public Licence or the GNU Library General Public Licence into a
+ copy of this library, as this licence permits, the exception does not
+ apply to the code that you add in this way. To avoid misleading anyone as
+ to the status of such modified files, you must delete this exception
+ notice from such code and/or adjust the licensing conditions notice
+ accordingly.
+
+ 4. If you write modifications of your own for this library, it is your
+ choice whether to permit this exception to apply to your modifications.
+ If you do not wish that, you must delete the exception notice from such
+ code and/or adjust the licensing conditions notice accordingly.
+
+
--- /dev/null
+ wxWindows Free Documentation Licence, Version 3
+ ===============================================
+
+ Copyright (c) 1998 Julian Smart, Robert Roebling et al
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this licence document, but changing it is not allowed.
+
+ WXWINDOWS FREE DOCUMENTATION LICENCE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 1. Permission is granted to make and distribute verbatim copies of this
+ manual or piece of documentation provided any copyright notice and this
+ permission notice are preserved on all copies.
+
+ 2. Permission is granted to process this file or document through a
+ document processing system and, at your option and the option of any third
+ party, print the results, provided a printed document carries a copying
+ permission notice identical to this one.
+
+ 3. Permission is granted to copy and distribute modified versions of this
+ manual or piece of documentation under the conditions for verbatim
+ copying, provided also that any sections describing licensing conditions
+ for this manual, such as, in particular, the GNU General Public Licence,
+ the GNU Library General Public Licence, and any wxWindows Licence are
+ included exactly as in the original, and provided that the entire
+ resulting derived work is distributed under the terms of a permission
+ notice identical to this one.
+
+ 4. Permission is granted to copy and distribute translations of this
+ manual or piece of documentation into another language, under the above
+ conditions for modified versions, except that sections related to
+ licensing, including this paragraph, may also be included in translations
+ approved by the copyright holders of the respective licence documents in
+ addition to the original English.
+
+ WARRANTY DISCLAIMER
+
+ 5. BECAUSE THIS MANUAL OR PIECE OF DOCUMENTATION IS LICENSED FREE OF CHARGE,
+ THERE IS NO WARRANTY FOR IT, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
+ PARTIES PROVIDE THIS MANUAL OR PIECE OF DOCUMENTATION "AS IS" WITHOUT
+ WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
+ THE MANUAL OR PIECE OF DOCUMENTATION IS WITH YOU. SHOULD THE MANUAL OR
+ PIECE OF DOCUMENTATION PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+ NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 6. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+ REDISTRIBUTE THE MANUAL OR PIECE OF DOCUMENTATION AS PERMITTED ABOVE, BE
+ LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+ CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+ MANUAL OR PIECE OF DOCUMENTATION (INCLUDING BUT NOT LIMITED TO LOSS OF
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+ PARTIES OR A FAILURE OF A PROGRAM BASED ON THE MANUAL OR PIECE OF
+ DOCUMENTATION TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
+ OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
--- /dev/null
+#
+# File: Makefile
+# Author: Julian Smart
+# Created: 1999
+#
+# Makefile : Builds wxWindows configuration tool manual
+#
+
+DOCDIR=..
+LOCALDOCDIR=.
+
+DOCSOURCES=configtool.tex
+
+all: configtool.chm configtool.htb
+
+hlp: configtool.hlp
+htb: configtool.htb
+html: configtool.html
+htmlhelp: configtool.chm
+pdfrtf: configtool_rtf.rtf
+
+configtool.hlp: configtool.rtf configtool.hpj
+ rm -f configtool.ph
+ -hcw /E /C configtool.hpj
+
+configtool.chm : configtool.html configtool.hhp
+ -hhc configtool.hhp
+# -mkdir ..\htmlhelp
+
+configtool_rtf.rtf: $(DOCSOURCES) tex2rtf.ini
+ -tex2rtf configtool.tex configtool_rtf.rtf -twice -rtf
+
+configtool.rtf: $(DOCSOURCES) tex2rtf.ini
+ -tex2rtf configtool.tex configtool.rtf -twice -winhelp
+
+configtool.html: $(DOCSOURCES) tex2rtf.ini
+ -tex2rtf configtool.tex configtool.html -twice -html
+ -rm -f *.con
+ -rm -f *.ref
+ -rm -f *.con
+ -rm -f *.ref
+# -tweakmanual
+
+configtool.htb: configtool_contents.html
+ -zip32 configtool.htb configtool*.html *.hhp *.hhk *.hhc *.gif
+
--- /dev/null
+\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}%
+\twocolwidtha{4cm}%
+\definecolour{black}{0}{0}{0}%
+\definecolour{cyan}{0}{255}{255}%
+\definecolour{green}{0}{255}{0}%
+\definecolour{magenta}{255}{0}{255}%
+\definecolour{red}{255}{0}{0}%
+\definecolour{blue}{0}{0}{200}%
+\definecolour{yellow}{255}{255}{0}%
+\definecolour{white}{255}{255}{255}%
+%\input{psbox.tex}
+\newcommand{\commandref}[2]{\helpref{{\tt $\backslash$#1}}{#2}}%
+\newcommand{\commandrefn}[2]{\helprefn{{\tt $\backslash$#1}}{#2}\index{#1}}%
+\newcommand{\commandpageref}[2]{\latexignore{\helprefn{{\tt $\backslash$#1}}{#2}}\latexonly{{\tt $\backslash$#1} {\it page \pageref{#2}}}\index{#1}}%
+\newcommand{\indexit}[1]{#1\index{#1}}%
+\newcommand{\inioption}[1]{{\tt #1}\index{#1}}%
+\parskip=10pt%
+\parindent=0pt%
+\title{\cttitle}%
+\author{(c) Julian Smart, 2003}%
+\makeindex%
+\begin{document}%
+%\maketitle%
+\begin{center}
+\image{}{logo.gif}
+
+{\large {\bf Version \ctversion}}
+
+(c) Julian Smart
+\end{center}
+
+\pagestyle{fancyplain}%
+\bibliographystyle{plain}%
+\pagenumbering{arabic}%
+\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+\tableofcontents%
+
+
+\chapter{Welcome to \ctshortname}%
+\setheader{{\it Welcome}}{}{}{}{}{{\it Welcome}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+
+Welcome to \ctname, the easy way to configure wxWindows.
+Instead of tweaking a setup.h file, or typing a long configure
+command, you can now check and uncheck options in a convenient
+GUI tool, read the relevant reference document for each
+option, and save the setup.h file or configure command file.
+
+\begin{itemize}\itemsep=0pt
+\item For release information, please see \helpref{Release Notes}{releasenotes}.
+\item For a tour of the main windows in \ctshortname, please see the \helpref{User Interface}{documentui} section.
+%\item For a quick tutorial, go straight to \helpref{Getting Started}{gettingstarted}.
+\item For tips and troubleshooting, see the \helpref{How To}{howto} section.
+\end{itemize}
+
+\chapter{Contacts}%
+\setheader{{\it Contacts}}{}{}{}{}{{\it Contacts}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+
+The \ctname home page is at:
+
+{\tt \cturl}
+
+For help with \ctshortname or to report bugs,
+please go to the wxWindows web site.
+
+\section{Credits}
+
+\begin{center}
+{\bf (c) 2003 Julian Smart, Anthemion Software}\hrule
+
+{\it Designed by}
+
+{\bf Julian Smart}
+
+{\it Programmed by}
+
+{\bf Julian Smart}
+
+{\it Additional programming by}
+
+{\bf The wxWindows development team}
+
+\end{center}
+
+\chapter{Installation}%
+\setheader{{\it Installation}}{}{}{}{}{{\it Installation}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+
+{\bf On Windows:}
+
+Please run the installation program. This will create a program
+folder called \ctname (or other name if you have chosen a different name). This
+folder can be accessed via the Start menu under Programs. The
+folder contains shortcuts to the program, help file, and Uninstall program.
+
+You can uninstall \ctshortname either by double-clicking the Uninstall \ctshortname icon
+in the \ctname group, or by invoking the Windows Control Panel,
+double-clicking on Add/Remove Programs, and then choosing the \ctshortname item.
+
+{\bf On Linux:}
+
+Unarchive wxconfigtool-x.xx.tar.gz to a suitable location
+in your filesystem. A directory of the form wxconfigtool-x.xx
+(where x.xx is the version number) will be created.
+
+Add the location to your PATH and run the application with
+'wxconfigtool'. You may wish to set the environment variable
+WXCONFIGTOOLDIR so that wxWindows Configuration Tool can find its data files.
+
+For example:
+
+\begin{verbatim}
+ % cd ~
+ % tar xvfz wxconfigtool-1.01.tar.gz
+ % export WXCONFIGTOOLDIR=`pwd`/wxconfigtool-1.01
+ % export PATH=$PATH:$WXCONFIGTOOLDIR
+ % wxconfigtool
+\end{verbatim}
+
+If you don't want to change your PATH, you could place a
+script in a location already on your PATH, such as
+/usr/local/bin. For example:
+
+\begin{verbatim}
+ #!/bin/sh
+ # Invokes wxWindows Configuration Tool
+ export WXCONFIGTOOLDIR=/home/mydir/wxconfigtool-1.01
+ $WXCONFIGTOOLDIR/wxconfigtool $*
+\end{verbatim}
+
+{\bf On Mac:}
+
+Download and unarchive the HQX file, and drag the wxWindows Configuration Tool folder to an appropriate location
+on your hard disk. Then double-click on the 'wxconfigtool' executable.
+
+\chapter{Release notes}\label{releasenotes}%
+\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+
+For licencing information, please see
+the licence files in the installation directory:
+
+\begin{itemize}\itemsep=0pt
+\item licendoc.txt
+\item gpl.txt
+\item lgpl.txt
+\item preamble.txt
+\end{itemize}
+
+\section{What's New?}\label{whatsnew}
+
+{\bf Version 1.0, June 11th 2003}
+
+\begin{itemize}\itemsep=10pt
+\item Initial version.
+\end{itemize}
+
+\section{Known issues}\label{knownissues}
+
+The following problems are known to exist:
+
+\begin{itemize}\itemsep=10pt
+\item No issues as yet.
+\end{itemize}
+
+\section{To Do}\label{todo}
+
+There are many things that could be done to make
+this tool more useful, including the following.
+
+\begin{itemize}\itemsep=10pt
+\item Allow full platform-specific dependency specification
+as mentioned in \helpref{How to specify platform-specific dependencies}{platformdependencies}.
+\item Allow \ctshortname to invoke configure and make, with an output
+window showing build status.
+\item Distinguish between template files and settings file; allow
+application of template files to settings files, and vice versa.
+\item Implement support for string, integer, float settings.
+\item Write a configuration browser.
+\item Add description, date and author information to the settings file.
+\item Command-line mode with ability to change settings from
+the command-line. Just like configure :-)
+\item Decide on standard location for settings files.
+\item Integrate with new (and old?) build systems.
+\item Allow customization of font and colour.
+\item Show all calculated dependencies for each config item.
+\item Add a search facility.
+\end{itemize}
+
+\section{Differences between Windows, Linux and Mac versions}\label{platformdifferences}
+
+Although every effort has been made to make wxWindows Configuration Tool work
+the same way on different environments, some small differences
+are inevitable.
+
+\begin{itemize}\itemsep=10pt
+\item Screenshots illustrate the Windows version; the Linux
+and Mac windows and dialogs will be slightly different, but with equivalent
+functionality.
+\item Dialogs under Windows often have a '?' button on the title
+bar, for context-sensitive help. Under Linux, this button is
+on the dialog itself, usually near the OK or Close button.
+On the Mac, context-sensitive help is not yet supported.
+\item Under Linux, online help invoked from the {\bf Help} button
+in modal dialogs is itself modal. That is, you have to quit
+the help window to return to the dialog. On Windows, you can
+switch back to the dialog without quitting the help viewer.
+\item On Windows and Linux, context menus are invoked with
+right-click. On Mac, use control-click.
+\end{itemize}
+
+\chapter{\ctshortname user interface}\label{documentui}%
+\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+
+This section describes the main elements of the \ctname user interface.
+
+The \ctshortname main window looks like this:
+
+\begin{center}
+\image{}{screen01.png}
+\end{center}
+
+\section{Menubar}
+
+%\image{}{menubar.gif}
+
+The \helpref{menubar}{menubarcommands} allows you to perform many functions
+such as loading and saving files, creating new configuration items,
+undo/redo, invoking help, and so on. Try to remember the keyboard shortcuts that are
+displayed next to the menu item labels - they can save you a lot of time
+and make your \ctshortname experience more natural and enjoyable.
+
+\section{Main toolbar}
+
+%\image{}{toolbar.gif}
+
+The main toolbar gives quick access to commonly-used commands.
+If you hold your mouse pointer over the toolbar buttons, a tooltip pops up with a short description
+of the button's function.
+
+You can choose to hide the toolbar altogether
+using the {\bf View | Show Toolbar} menu command.
+
+You can find out more about in the \helpref{toolbar commands}{toolbarcommands} topic.
+
+\section{Configuration window}
+
+%\image{}{configwindow.gif}
+
+The biggest area of \ctshortname is taken up by the configuration window.
+
+On the left is a hierarchy of settings that can be customized.
+You can check and uncheck most settings, but you will find that
+many settings are disabled because they depend on other settings
+being enabled (or disabled).
+
+As an end user, you will probably only want to enable or disable
+options, but it's possible you may wish to update the structure
+of the settings file itself. In which case you can use the
+{\bf Edit} menu to add, remove, or rename items; and you can
+add custom properties to an item, but this is usually only
+useful for a developer of the tool to do.
+
+Undo/Redo can be applied to most editing commands, but (currently) not
+enabling and disabling operations.
+
+There are three tabs in the main window: {\bf Properties}, {\bf Setup.h},
+and {\bf Configure}. The Properties tab contains the properties
+for the selected option. Setup.h shows the setup file,
+and there are buttons to allow you to copy the file to the clipboard
+and regenerate the file. Similarly, the Configure tab shows
+the script that will invoke configure.
+
+The property editor allows you to show detailed information
+about the option. A description for each property is shown
+when you click on the property. You can also edit property values,
+either by clicking and typing, or by double-clicking or clicking
+on the {\bf Edit...} button. If a special editor is defined for
+the property type, it will be shown.
+
+You can invoke help for the selected option, by clicking
+on the question mark toolbar button or the {\bf Help | Configuration Item Help} menu
+item. If there is a help topic defined for the option, the
+wxWindows reference manual will be opened at that topic.
+
+\begin{comment}
+\chapter{Getting started: a step-by-step guide}\label{gettingstarted}%
+\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+
+This section will quickly get you up and running with \ctshortname. Click
+on \helpref{Step 1}{step1} to start. If you are
+using a Mac, please interpret 'left-click' to mean 'click', and
+'right-click' to mean 'control-click'.
+
+\section{Step 1: creating a new configuration}\label{step1}
+
+When you run \ctshortname for the first time, you are presented with an
+empty configuration window.
+
+Go to \helpref{Step 2}{step2} to learn how to do the next thing.
+
+\section{Step 2: doing something else}\label{step2}
+
+Go to \helpref{Step 3}{step3} to learn how to do a third thing.
+
+\section{Step 3: a third thing}\label{step3}
+
+Go to \helpref{Step 4}{step4} to learn about saving your document and reloading it.
+
+\section{Step 4: saving and loading documents}\label{step4}
+
+You may wish to save a document, so you can come back to it later. Click on {\bf File | Save} or
+the \image{}{save.png} toolbar button. The first time you save the file, you will be prompted
+for a filename: you can accept the default one provided, or choose another.
+
+To reload the document, click on {\bf File | Open...} or the \image{}{open.gif} toolbar button.
+If you are working on another document, you will be prompted to save it first.
+
+Go to \helpref{Step 5: generating configurations}{step5}
+
+\section{Step 5: generating configurations}\label{step5}
+
+Todo.
+
+Go to \helpref{Step 6: where next?}{step6}
+
+\section{Step 6: where next?}\label{step6}
+
+Congratulations! You have learnt how to create, edit, save, and load configuration
+files.
+
+To get to know \ctshortname more thoroughly, here are some further things you
+can do.
+
+\begin{itemize}
+\item Read the \helpref{How To}{howto} section.
+\item Use the help facilities: most dialogs have a {\bf Help} button for a general description, and they
+also have a {\bf "?"} button for getting information on individual controls on a dialog.
+\item Explore the menubar and the menus that appear when you right-click over
+the window background and individual cards.
+\end{itemize}
+
+\end{comment}
+
+\chapter{Using menubar commands}\label{menubarcommands}%
+\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+
+%\image{}{menubar.gif}
+
+This section describes the menubar commands. Commands
+that are not available in the current context are disabled (shown in grey).
+
+\section{File menu}
+
+The File menu shows commands that are mostly related to working
+with files.
+
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf New...} (Ctrl+N)}{Creates a new \ctshortname document.}
+\twocolitem{{\bf Open...} (Ctrl+O)}{Opens an existing document.}
+\twocolitem{{\bf Close} (Ctrl+W)}{Closes the current document.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{{\bf Save} (Ctrl+S)}{Saves the current document.}
+\twocolitem{{\bf Save As...}}{Saves the current document under a new name.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{{\bf Save Setup.h...} (Ctrl+H)}{Saves the generated setup.h file in the specified location.}
+\twocolitem{{\bf Save Configure Script...} (Ctrl+G)}{Saves the generated script containing a configure command in the specified location.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{{\bf Exit} (Alt+F4)}{Exits the program.}
+\end{twocollist}
+
+\section{Edit menu}
+
+The Edit menu shows commands that are related to editing
+document elements.
+
+\twocolwidtha{5cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf Undo} (Ctrl+Z)}{Undoes the last undoable action.}
+\twocolitem{{\bf Redo} (Ctrl+Y)}{Redoes the last redoable action.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{{\bf Cut} (Ctrl+T)}{Cuts the selected option and places it on the clipboard.}
+\twocolitem{{\bf Copy} (Ctrl+C)}{Copies the selected option.}
+\twocolitem{{\bf Paste} (Ctrl+V)}{Pastes an option from the clipboard to the position. Whether the
+option is pasted as a child or sibling of the selection is determined by whether
+the selection is a folder or not. If you want finer control, right-click on the
+item in the tree control and select one of the paste commands.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{{\bf Add Option}}{Shows a menu for adding one of several option types.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{{\bf Custom Property}}{Shows a menu for adding, editing or deleting a custom option property.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{{\bf Delete Option}}{Deletes the selected option.}
+\twocolitem{{\bf Rename Option}}{Shows a dialog for renaming the selected option.}
+\end{twocollist}
+
+\section{View menu}
+
+The View menu gives you commands related to showing or hiding windows
+and various other preferences.
+
+\twocolwidtha{5cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf Show Toolbar}}{Shows or hides the toolbar, beneath the menubar.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{{\bf Settings...} (Ctrl+T)}{Shows the \helpref{Settings Dialog}{settingsdialog}, which
+relate to application-wide settings.}
+\end{twocollist}
+
+\section{Help menu}
+
+The Help menu gives you commands related to getting help.
+
+\twocolwidtha{5cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf Contents}}{Invokes the on-line help, showing the contents page.}
+\twocolitem{{\bf wxWindows Help Contents}}{Invokes the on-line wxWindows reference manual, showing the contents page.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{{\bf Configuration Option Help} (F1)}{Invokes the on-line wxWindows reference manual at the topic for the selected option (if a topic
+is defined).}
+\twocolitem{{\bf What's This?}}{Click to get help on a window or configuration option.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{{\bf About...}}{Displays a dialog giving a brief description of the program.}
+\end{twocollist}
+
+\chapter{Using context menu commands}\label{contextmenucommands}%
+\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+
+This section describes the context menu commands available when you right-click.
+On the Mac, this is achieved with control-click.
+
+\section{Configuration tree context menu}
+
+This menu is shown when you right-click over the configuration tree window background.
+On the Mac, this is achieved with control-click.
+
+\twocolwidtha{5cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf Paste before this option}}{Pastes the clipboard option before the clicked-on option.}
+\twocolitem{{\bf Paste after this option}}{Pastes the clipboard option after the clicked-on option.}
+\twocolitem{{\bf Paste as child of this option}}{Pastes the clipboard option as a child of the clicked-on option,
+if it is a group option.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{{\bf C&opy}}{Copies the clicked-on option to the internal clipboard.}
+\twocolitem{{\bf Cu&t}}{Copies the clicked-on option to the internal clipboard, and
+deletes the option from the tree.}
+\end{twocollist}
+
+\chapter{Using toolbar commands}\label{toolbarcommands}%
+\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+
+This section describes the toolbar commands.
+
+%\image{}{toolbar.gif}
+
+The toolbar provides quick access to commonly-used
+commands.
+
+\twocolwidtha{5cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{\image{}{new.png}{\bf New Document}}{Creates a new document.}
+\twocolitem{\image{}{open.png}{\bf Open Document}}{Opens an existing document, closing the currently open document.}
+\twocolitem{\image{}{save.png}{\bf Save Document}}{Saves the current document.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{\image{}{undo.png}{\bf Undo}}{Undoes the last command.}
+\twocolitem{\image{}{redo.png}{\bf Redo}}{Redoes the last command.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{\image{}{copy.png}{\bf Copy}}{Copies the selected option to an internal clipboard.}
+\twocolitem{\image{}{cut.png}{\bf Cut}}{Cuts the selected option and copies it to the internal clipboard..}
+\twocolitem{\image{}{paste.png}{\bf Paste}}{Pastes the option from the clipboard to the configuration tree.}
+\twocolitem{\hrule}{\htmlonly{\hrule}}
+\twocolitem{\image{}{help.png}{\bf Help}}{Shows the wxWindows manual topic for the
+\twocolitem{\image{}{helpcs.png}{\bf Context Help}}{Shows a context-sensitive help
+cursor; click on a window to show brief help about that window.}
+selected configuration item.}
+\end{twocollist}
+
+\chapter{Using dialogs}\label{dialogs}%
+\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+
+Most dialogs have a {\bf "?"} button on their caption to provide context-sensitive help.
+Click on this and then on a control
+in a dialog to get quick help on that control. You can also click on the {\bf Help} button
+for more detailed help on the dialog.
+
+\section{Settings dialog}\label{settingsdialog}
+
+This dialog has a number of tabs to allow you to
+edit different categories of settings that are applicable
+to the application as a whole.
+
+\subsection{General settings dialog}\label{generalapplicationsettingsdialog}
+
+The General Settings Dialog allows you to set a variety of \ctshortname options.
+
+\twocolwidtha{5cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf Load last document on startup}}{If checked, the last viewed document will
+be reloaded when \ctshortname starts up.}
+% If the application terminated abnormally, this
+%option will be switched off the next time \ctshortname runs in case there was a problem with
+%the document file.}
+%\twocolitem{{\bf Auto-save document}}{If checked, \ctshortname will regularly
+%save the document to a temporary file. If \ctshortname or the operating system
+%should terminate abnormally, the next time \ctshortname is run it will
+%check for an auto-save file and ask if you wish to open that file.}
+%\twocolitem{{\bf Show welcome dialog on startup}}{If checked, the \helpref{Welcome Dialog}{welcomedialog} will
+%be shown on startup.}
+\twocolitem{{\bf Show tooltips}}{If checked, tooltips will be shown in most dialogs, when you hover
+the mouse pointer over a control.}
+\end{twocollist}
+
+\subsection{Location settings dialog}\label{locationsettingsdialog}
+
+The Location Settings Dialog allows you to choose various locations.
+
+\twocolwidtha{5cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf wxWindows hierarchy}}{This determines where \ctshortname will look
+when prompting for filenames.}
+\twocolitem{{\bf Use WXWIN environment variable}}{Check this to use
+the value of the WXWIN variable instead of the path entered in the text field.}
+\end{twocollist}
+
+\chapter{Using keyboard shortcuts}\label{keyboardshortcuts}%
+\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+
+You can make your \ctshortname experience even smoother by
+using handy keyboard shortcuts. Note that some shortcuts are
+dependent on context: that is, which control has the focus.
+
+\twocolwidtha{3cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf Ctrl + C}}{Copies the selected option to the clipboard.}
+\twocolitem{{\bf Ctrl + H}}{Saves the setup.h file.}
+\twocolitem{{\bf Ctrl + G}}{Saves the configure script file.}
+\twocolitem{{\bf Ctrl + N}}{Creates a new \ctshortname file.}
+\twocolitem{{\bf Ctrl + O}}{Opens a \ctshortname file.}
+\twocolitem{{\bf Ctrl + S}}{Saves the current \ctshortname document.}
+\twocolitem{{\bf Ctrl + T}}{Shows the \helpref{Settings Dialog}{settingsdialog}.}
+\twocolitem{{\bf Ctrl + V}}{Pastes the option on the clipboard (if any) to the configuration tree.}
+\twocolitem{{\bf Ctrl + W}}{Closes the current \ctshortname document.}
+\twocolitem{{\bf Ctrl + X}}{Cuts the selected option and copies it to the clipboard.}
+\twocolitem{{\bf Ctrl + Y}}{Redoes the previously undone edit.}
+\twocolitem{{\bf Ctrl + Z}}{Undoes the previous edit.}
+\twocolitem{{\bf F1}}{Shows the online help for the selected item.}
+\twocolitem{{\bf Alt + F4}}{Closes \ctshortname.}
+\end{twocollist}
+
+\chapter{Reference}\label{reference}%
+\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+
+\section{The dependency evaluation algorithm}
+
+\ctshortname pre-calculates a list of all dependencies
+for each option -- this is a kind of reverse-pointer version
+of all the dependencies associated with each item. So
+if option {\bf a} has a {\bf requires} option specifying
+{\bf b}, then {\bf b} will end up with a dependency list
+containing {\bf a} and any other options that refer to it.
+
+When the user enables or disables an option ({\bf b}),
+the list of dependencies for that option is visited,
+and for each mentioned option ({\bf a}), all its dependency information
+is evaluated. This may result in the option {\bf a} being
+(de)selected and perhaps deactivated (made insensitive).
+
+The results of this change are propagated to dependents of
+{\bf a}, recursively, so several options may flip state
+as the result of checking the original option.
+
+The parent-child relationship of a check or radio
+group and its children is considered to be a virtual
+'requires' dependency. Mutual exclusivity is also
+taken into account if the option is a radio option
+or group. For each radio option, all other mutually
+exclusive options need to be listed. See the
+{\bf Platform} group for an example of this.
+
+\section{How \ctshortname generates the configure commands}
+
+If the {\bf configure} property isn't empty,
+\ctshortname will output the string as a parameter
+to configure.
+
+The configure command is taken to be the command to
+use if the option is checked. If the option is
+unchecked, the 'enable' or 'with' is replaced with
+'disable' or 'without'.
+
+TODO: should we distinguish between the case
+where a setting is not passed to configure (using
+the default), versus the case where it's specified but disabled?
+It's probably a good idea to make all the options
+explicit, but on the other hand it makes for a very long
+command line.
+
+\ctshortname checks for the presence of a
+{\bf builtin} custom boolean property and appends 'builtin' or
+'sys' to the configure command depending on where
+the {\bf builtin} setting is checked or unchecked.
+We also allow for passing strings, e.g. for --with-rpath=DIR,
+by using the {\bf value} custom string property.
+
+\section{How \ctshortname generates the setup.h file}
+
+The {\bf Platforms} group is ignored. In all other
+cases, if the setting is prefixed by wxUSE_...
+and it's a boolean setting, \ctshortname will
+output 1 or 0 depending on the setting state.
+
+A few settings that don't have the wxUSE_...
+convention are also checked for and processed.
+
+
+\chapter{How To...}\label{howto}%
+\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+
+A variety of topics to help you get the best from \ctshortname.
+
+\section{How to specify dependencies}\label{dependencies}
+
+To ensure consistency throughout the configuration,
+\ctshortname allows specification of dependencies, essentially
+a list of option names that should be considered in evaluating
+whether an option should be enabled or disabled. In addition,
+if the option is constrained to always be disabled
+or enabled in the current context, then it is greyed out
+(deactivated) to prevent the user from changing the state.
+
+There are four kinds of dependencies: requires, precludes,
+enabled-if, and enabled-if-not. Each one represents a
+relationship between the current option (a) and one
+or more named options (b). For the sake of argument
+we will consider only one other option, but multiple
+options are taken to mean (b1 or b2 or b3 or ...)
+Below the allowed combined states of a and b are
+listed for each kind of dependency.
+
+1. a {\bf requires} b
+
+For example, wxUSE_DRAG_AND_DROP requires wxUSE_OLE.
+
+\begin{verbatim}
+ a b
+
+ 1 1
+ 0 1
+ 0 0
+\end{verbatim}
+
+2. a {\bf precludes} b
+
+For example, wxUSE_ODBC precludes wxUSE_UNICODE.
+
+\begin{verbatim}
+ a b
+
+ 1 0
+ 0 0
+ 0 1
+\end{verbatim}
+
+
+3. a {\bf enabled-if} b
+
+For example, __WXUNIVERSAL__ enabled-if X11 or MGL
+
+\begin{verbatim}
+ a b
+
+ 1 1
+ 1 0
+ 0 0
+\end{verbatim}
+
+4. a {\bf enabled-if-not} b
+
+For example, wxUSE_TOOLBAR_SIMPLE enabled-if-not wxUSE_TOOLBAR_NATIVE.
+
+\begin{verbatim}
+ a b
+
+ 1 0
+ 0 1
+ 1 1
+\end{verbatim}
+
+\section{How to specify platform-specific dependencies}\label{platformdependencies}
+
+You can associate one or more options as part of the
+option's {\bf context}. In the case of wxUSE_OLE,
+the context contains __WXMSW__, because it's a Windows-specific
+option. This is used when calculating dependencies, as
+follows. If either option involved in a dependency
+relationship is not part of the current context, that
+is, none of the options in its {\bf context} property is currently
+enabled, then it is ignored in the dependency calculation.
+
+This allows the dependency 'wxUSE_DRAG_AND_DROP requires wxUSE_OLE'
+to only be evaluated when __WXMSW__ is enabled.
+
+It doesn't quite cover all bases, however, because
+it cannot express that the {\it dependency} itself
+is platform specific. You might have a platform-specific
+dependency that exists between two options that are
+perfectly valid for any platform. For example, we
+can't capture the notion that wxUSE_LISTBOX
+should be required if wxUSE_COMBOBOX is set,
+but only for __WXUNIVERSAL__. We could do it
+by complicating the dependency syntax, for example:
+
+wxUSE_COMBOBOX requires wxUSE_LISTBOX:__WXUNIVERSAL__
+
+This means that the dependency should only be
+evaluated if __WXUNIVERSAL__ is enabled.
+This has not been implemented yet.
+
+\section{How to specify custom properties}\label{customproperties}
+
+You can add custom properties to any option, but
+currently only {\bf option} and {\bf value} are
+recognised by \ctshortname.
+
+\ctshortname checks for the presence of a
+{\bf builtin} boolean custom property and appends 'builtin' or
+'sys' to the configure command depending on where
+the {\bf builtin} setting is checked or unchecked.
+We also allow for passing strings, e.g. for --with-rpath=DIR,
+by using the {\bf value} string custom property.
+
+\begin{comment}
+
+\begin{helpglossary}
+
+\gloss{thing}\label{thing}
+
+A glossary entry.
+
+\end{helpglossary}
+\end{comment}
+
+\rtfonly{%
+\addcontentsline{toc}{chapter}{Index}
+\printindex%
+\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}%
+}
+\winhelponly{
+\chapter{Popups}\label{popups}
+
+} % WinHelp only
+
+\end{document}
--- /dev/null
+runTwice = yes
+titleFontSize = 12
+authorFontSize = 10
+chapterFontSize = 12
+sectionFontSize = 12
+subsectionFontSize = 12
+headerRule = yes
+footerRule = yes
+useHeadingStyles = yes
+contentsDepth = 2
+listItemIndent=40
+winHelpContents = yes
+winHelpVersion = 4 ; 3 for Windows 3.x, 4 for Windows 95
+generateHPJ = yes
+htmlBrowseButtons = bitmap
+winHelpTitle = "wxWindows Configuration Tool"
+truncateFilenames = no
+htmlIndex = yes
+htmlFrameContents = no
+;;
+;; These two are for generating MS HTML Help project, contents and index files.
+;;
+htmlWorkshopFiles = true
+htmlIndex = true
+
+; Finally, a way to specify face names
+htmlFaceName = "Arial, Lucida, Helvetica"
+
+;; For customizing help: make macros empty to disable text for specific
+;; versions
+
+\ctfullversiononly [1] {#1}
+%\ctfullversiononly [1] {}
+\ctgiftversiononly [1] {}
+%\ctgiftversiononly [1] {#1}
+\ctcustomversiononly [1] {#1}
+\ctversion [0] {1.0}
+\ctname [0] {wxWindows Configuration Tool}
+\ctshortname [0] {Configuration Tool}
+\cttitle [0] {\ctname \ctversion}
+\cturl [0] {http://www.wxwindows.org}
\ No newline at end of file
--- /dev/null
+Preamble
+========
+
+The licensing of the wxWindows library is intended to protect the wxWindows
+library, its developers, and its users, so that the considerable investment
+it represents is not abused.
+
+Under the terms of the wxWindows Licence, you as a user are not
+obliged to distribute wxWindows source code with your products, if you
+distribute these products in binary form. However, you are prevented from
+restricting use of the library in source code form, or denying others the
+rights to use or distribute wxWindows library source code in the way
+intended.
+
+The wxWindows Licence establishes the copyright for the code and related
+material, and it gives you legal permission to copy, distribute and/or
+modify the library. It also asserts that no warranty is given by the authors
+for this or derived code.
+
+The core distribution of the wxWindows library contains files
+under two different licences:
+
+- Most files are distributed under the GNU Library General Public
+ Licence, version 2, with the special exception that you may create and
+ distribute object code versions built from the source code or modified
+ versions of it (even if these modified versions include code under a
+ different licence), and distribute such binaries under your own
+ terms.
+
+- Most core wxWindows manuals are made available under the "wxWindows
+ Free Documentation Licence", which allows you to distribute modified
+ versions of the manuals, such as versions documenting any modifications
+ made by you in your version of the library. However, you may not restrict
+ any third party from reincorporating your changes into the original
+ manuals.
+
+Other relevant files:
+
+- licence.txt: a statement that the wxWindows library is
+ covered by the GNU Library General Public Licence, with an
+ exception notice for binary distribution.
+
+- licendoc.txt: the wxWindows Documentation Licence.
+
+- lgpl.txt: the text of the GNU Library General Public Licence.
+
+- gpl.txt: the text of the GNU General Public Licence, which is
+ referenced by the LGPL.
+
--- /dev/null
+
+Congratulations! You have installed wxWindows Configuration Tool.
+Please see the wxWindows web site for support:
+
+http://www.wxwindows.org
+
+Thank you for using wxWindows Configuration Tool, and we hope
+you enjoy it!
+
+Julian Smart, wxWindows Team, June 2003
+
+
+
--- /dev/null
+Welcome to wxWindows Configuration Tool!
+=============================================
+
+wxWindows Configuration Tool is a tool for
+helping to configure wxWindows.
+
+For further information, please see the manual, and the
+following site:
+
+http://www.wxwindows.org
+
+------------------------------------------------------
+Installing wxWindows Configuration Tool on Windows
+------------------------------------------------------
+
+Run wxconfigtool-x.yz-setup.exe and follow the instructions
+to install wxWindows Configuration Tool.
+
+You should find a shortcut on your desktop, and you can
+also find it in a group similar to this:
+
+Start -> Program Files -> wxWindows Configuration Tool x.y
+
+------------------------------------------------------
+Installing wxWindows Configuration Tool on Unix
+------------------------------------------------------
+
+Unarchive wxconfigtool-x.yz.tar.gz to a suitable location
+in your filesystem. A directory of the form wxconfigtool-x.yz
+(where x.yz is the version number) will be created.
+
+Add the location to your PATH and run the application with
+'wxconfigtool'. You may wish to set the environment variable
+WXCONFIGTOOLDIR so that wxWindows Configuration Tool can find its data files.
+
+For example:
+
+ % cd ~
+ % tar xvfz wxconfigtool-1.01.tar.gz
+ % export WXCONFIGTOOLDIR=`pwd`/wxconfigtool-1.01
+ % export PATH=$PATH:$WXCONFIGTOOLDIR
+ % wxconfigtool
+
+If you don't want to change your PATH, you could place a
+script in a location already on your PATH, such as
+/usr/local/bin. For example:
+
+ #!/bin/sh
+ # Invokes wxWindows Configuration Tool
+ export WXCONFIGTOOLDIR=/home/mydir/wxconfigtool-1.01
+ $WXCONFIGTOOLDIR/wxconfigtool $*
+
+If you wish to associate the wxWindows Configuration Tool file extension
+(pjd) with wxWindows Configuration Tool, you will need to edit your
+~/.mailcap file (or create one if it doesn't exist)
+and add an entry similar to this:
+
+ application/wxconfigtool; wxconfigtool %s
+
+and add this ~/.mime.types:
+
+ type=application/wxconfigtool \
+ desc="wxWindows Configuration Tool Document" \
+ exts="pjd"
+
+
+------------------------------------------------------
+(c) Julian Smart, June 2003
+
--- /dev/null
+TODO
+====
+
+Note: some tasks can be done by others
+once in CVS.
+
+Essential
+=========
+
+- make decent example from setup.h
+
+- allow for string, integer settings
+
+- Settings dialog
+
+- generate setup.h, configure commands
+
+- distinguish between configurations settings
+ and configuration template files
+
+- configuration browser
+
+- ability to invoke make after configuration
+
+- how about running samples, giving size
+ information (possibly writing to file)
+
+- command-line mode: could write configure command
+ to standard output, with optional make invocation
+
+- decide on a standard location for .wxs files in
+ wxWin hierarchy, so tool can find files automatically.
+
+- makefiles for other systems
+
+- setup and tarball generation
+
+- documentation
+
+Nice-to-have
+============
+
+- incorporate makefile/project generator
+ for independent apps
+
+- possibly evolve it into a central command
+ centre for wxWindows: invoke other apps such
+ as poEdit, <favourite dialog editor>, help,
+ wizards, etc. Upgrade your wxWin version
+ via the web.
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+# Build application and make a tarball.
+
+cd ~/wxconfigtool-build
+
+echo Building wxWindows...
+makeapp release wx
+
+rm -f wxconfigtool-build-release/wxconfigtool
+
+if [ "$1" = "clean" ]; then
+ rm -f wxconfigtool-build-release/*
+fi
+
+echo Building Application...
+makeapp release all
+
+if [ ! -f wxconfigtool-build-release/wxconfigtool ]; then
+ echo *** Sorry, wxconfigtool was not built correctly.
+ exit
+fi
+
+echo Making tarball...
+makeapp release release
+
+# appver will have been written by the 'release' target.
+APPVER=`/tmp/appver`
+
+cd /tmp/wxconfigtool-deliver
+APPARCHIVE=wxconfigtool-$APPVER-i386.tar.gz
+
+# echo Copying tarball $APPARCHIVE to ftp site...
+# You can use a script to copy this to an ftp site,
+# using for example, the 'curl' utility.
+# curl ftp://www.mysite.com/$APPARCHIVE --user "myname:mypassword" --upload-file $APPARCHIVE
+
+echo Done building and archiving wxconfigtool.
--- /dev/null
+; For debug beta only
+; Source: c:\winnt\system32\msvcrtd.dll; DestDir: {sys}\; DestName: msvcrtd.dll; CopyMode: onlyifdoesntexist; Flags: uninsneveruninstall
+
+[Tasks]
+ Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"
+
+[Icons]
+ Name: {group}\%APPTITLE% %VERSION%; Filename: {app}\%APPNAME%.exe; WorkingDir: {app}; IconFilename: {app}\%APPNAME%.exe; IconIndex: 0
+ Name: {group}\%APPTITLE% Help; Filename: {app}\%HELPFILE%; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
+ Name: {group}\wxWindows Reference; Filename: {app}\wx.chm; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
+ Name: {group}\%APPTITLE% ReadMe; Filename: {app}\readme.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
+ Name: {group}\%APPTITLE% Licence; Filename: {app}\license.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
+ Name: {userdesktop}\%APPTITLE% %VERSION%; Filename: {app}\%APPNAME%.exe; WorkingDir: {app}; IconFilename: {app}\%APPNAME%.exe; IconIndex: 0; Tasks: desktopicon
+
+[Registry]
+
+; Uncomment the following lines if you'd like to register a data file extension.
+; You may need to replace some of the %APPTITLE% occurrences below with a hard-wired
+; name if your title contains spaces.
+
+ Root: HKCR; SubKey: .%APPEXTENSION%; ValueType: STRING; ValueData: wxConfigToolFile; Flags: uninsdeletevalue
+ Root: HKCR; SubKey: wxConfigToolFile; ValueType: STRING; ValueData: "%APPTITLE% Document File"; Flags: uninsdeletevalue
+ Root: HKCR; SubKey: wxConfigToolFile\Shell; ValueType: NONE; Flags: uninsdeletevalue
+ Root: HKCR; SubKey: wxConfigToolFile\Shell\Open; ValueType: NONE; Flags: uninsdeletevalue
+ Root: HKCR; SubKey: wxConfigToolFile\Shell\Open\Command; ValueType: STRING; ValueData: "{app}\%APPNAME%.exe ""%1"""; Flags: uninsdeletevalue
+ Root: HKCR; SubKey: wxConfigToolFile\DefaultIcon; ValueType: STRING; ValueData: {app}\%APPNAME%.exe,0; Flags: uninsdeletevalue
+
+[UninstallDelete]
+
+[InstallDelete]
+
+[Run]
+ Filename: "{app}\%APPNAME%.exe"; Description: "Launch %APPTITLE%"; Flags: postinstall nowait skipifsilent
+
+[UninstallRun]
+
+
--- /dev/null
+; Inno Setup Script
+; Created with ScriptMaker Version 1.3.22
+; 14 February 2001 at 10:38
+
+[Setup]
+ MinVersion=4.0,4.0
+ AppName=%APPTITLE% %VERSION%
+ AppId=%APPTITLE%
+ CreateUninstallRegKey=1
+ UsePreviousAppDir=1
+ UsePreviousGroup=1
+ AppVersion=%VERSION%
+ AppVerName=%APPTITLE% %VERSION%
+ AppCopyright=Copyright © %COPYRIGHTHOLDER%
+ BackColor=$800000
+ BackColor2=$C71F1F
+ BackColorDirection=toptobottom
+ WindowShowCaption=1
+ WindowStartMaximized=1
+ WindowVisible=1
+ WindowResizable=1
+ UninstallLogMode=Append
+ DirExistsWarning=auto
+ UninstallFilesDir={app}
+ DisableDirPage=0
+ DisableStartupPrompt=1
+ CreateAppDir=1
+ DisableProgramGroupPage=0
+ AlwaysCreateUninstallIcon=1
+ Uninstallable=1
+ UninstallIconName=Uninstall %APPTITLE% %VERSION%
+ UninstallDisplayName=%APPTITLE% %VERSION%
+ DefaultDirName={pf}\%APPTITLE%
+ DefaultGroupName=%APPTITLE% %VERSION%
+ MessagesFile=compiler:default.isl
+ DiskSpanning=0
+ DiskSize=1457664
+ DiskClusterSize=512
+ ReserveBytes=0
+ UseSetupLdr=1
+ LicenseFile=%LICENSEFILE%
+ InfoAfterFile=%READMEAFTERFILE%
+ SourceDir=%SOURCEDIR%
+ OutputDir=%OUTPUTDIR%
+
--- /dev/null
+#!/bin/sh
+# Build application
+
+# The first argument is debug or release
+LEVEL=$1
+
+# Then you can supply one or more makefile targets
+TARGET="$2 $3 $4 $5 $6 $6 $7 $8 $9"
+
+if [ "$1" = "" ] || [ "$2" = "" ]; then
+ echo Usage: makeapp debug/release full/wx/genericapp/cleanall
+ exit
+fi
+
+export APPDIR=$WXWIN/utils/configtool
+export WXDIR=$WXWIN
+export WXBUILDDIR=wxwin-build-$LEVEL
+
+# If there's no wxwin-build-... directory yet, the makefile
+# must include a dummy makeprog.env
+export USEDUMMYMAKEPROG="0"
+if [ ! -f $WXBUILDDIR/src/makeprog.env ]; then
+ USEDUMMYMAKEPROG="1"
+fi
+
+make -f ${APPDIR}/src/Makefile WXDIR=$WXDIR USEDUMMYMAKEPROG=$USEDUMMYMAKEPROG APPDIR=$APPDIR WXBUILDDIR=$WXBUILDDIR LEVEL=$LEVEL $TARGET
--- /dev/null
+#! /bin/sh
+# Make an Inno Setup distribution list, where files and dirs are represented by
+# sections like this:
+# [Dirs]
+# Name: {app}\backgrounds
+#
+# [Files]
+# Source: C:\program\setup\about.htm; DestDir: {app}\; DestName: about.htm
+#
+#
+# Usage: makeinno.sh sourcedir inno-topfile inno-bottomfile destfile
+# For example: makeinno.sh c:/project/allfiles c:/project/innotop.txt c:/project/innobott.txt c:/project/project.iss
+#
+
+PROGNAME=$0
+SOURCEDIR=$1
+TOPFILE=$2
+BOTTOMFILE=$3
+INNOFILE=$4
+TEMPDIR=/tmp
+
+dochecks()
+{
+ if [ "$SOURCEDIR" = "" ] || [ "$TOPFILE" = "" ] || [ "$BOTTOMFILE" = "" ] || [ "$INNOFILE" = "" ] ; then
+ usage
+ fi
+
+ if [ ! -d $SOURCEDIR ]; then
+ echo "Sorry, the source directory $SOURCEDIR does not exist."
+ usage
+ fi
+
+ if [ ! -f $TOPFILE ]; then
+ echo "Sorry, the Inno Setup header $TOPFILE does not exist."
+ usage
+ fi
+
+ if [ ! -f $BOTTOMFILE ]; then
+ echo "Sorry, the Inno Setup header $BOTTOMFILE does not exist."
+ usage
+ fi
+
+ if [ ! -d $TEMPDIR ]; then
+ mkdir $TEMPDIR
+ fi
+}
+
+doreplace()
+{
+ thefile=$1
+ theexpr=$2
+
+ if [ -f $thefile ]; then
+ sed -e "$theexpr" < $thefile > $thefile.tmp
+ mv $thefile.tmp $thefile
+ else
+ echo "*** $thefile not found."
+ fi
+}
+
+generateinno()
+{
+ # SRCDIR=`cygpath -u $SRCDIR`
+ # DESTDIR=`cygpath -u $DESTDIR`
+ # TEMPDIR=`cygpath -u $TEMP`
+
+
+ # Generate a list of all files in the distribution.
+ # We pass the output through sed in order to remove the preceding "./"
+ cd $SOURCEDIR
+ find . -print | sed -e "s/\.\\///g" > $TEMPDIR/files1.tmp
+
+ echo "[Dirs]" > $TEMPDIR/files2.tmp
+
+ for line in `cat $TEMPDIR/files1.tmp` ; do
+
+ # If a directory, add to file
+ if [ -d $line ] ; then
+ # The relative path
+ # TODO: make into DOS filename form
+ #line2=`cygpath -w $line`
+ line2=$line
+
+ echo " Name: {app}\\"$line2 >> $TEMPDIR/files2.tmp
+ fi
+ done
+
+ echo "" >> $TEMPDIR/files2.tmp
+ echo "[Files]" >> $TEMPDIR/files2.tmp
+
+ for line in `cat $TEMPDIR/files1.tmp` ; do
+
+ # If not a directory, add to file
+ if [ ! -d $line ] ; then
+ # The relative path
+ # TODO: make into DOS filename form
+ #line2=`cygpath -w $line`
+ line2=$line
+
+ # The absolute path
+ # TODO: make into DOS filename form
+ #line1=`cygpath -w $SOURCEDIR`"\\"$line2
+ line1=$SOURCEDIR"\\"$line2
+ #pathonly=`find $line -printf "%h"`
+ pathonly=`dirname $line`
+
+ echo " Source: "$line1"; DestDir: {app}\\"$pathonly >> $TEMPDIR/files2.tmp
+ fi
+ done
+
+ echo "" >> $TEMPDIR/files2.tmp
+
+ doreplace $TEMPDIR/files2.tmp "s/\//\\\/g"
+
+ # Concatenate the 3 sections
+ cat $TOPFILE $TEMPDIR/files2.tmp $BOTTOMFILE > $INNOFILE
+
+ rm -f $TEMPDIR/files1.tmp
+}
+
+usage()
+{
+ echo Usage: $PROGNAME sourcedir inno-topfile inno-bottomfile destfile
+ echo For example: $PROGNAME c:/project/allfiles c:/project/innotop.txt c:/project/innobott.txt c:/project/project.iss
+ echo Remember to use paths of the form c:/thing rather than /c/thing.
+ exit 1
+}
+
+dochecks
+generateinno
+
+
--- /dev/null
+#!/bin/sh
+
+# Make a distribution of an application.
+
+# If your zip accepts Cygwin-style paths, then
+# use cygpath, else substitute echo
+CYGPATHPROG=cygpath
+#CYGPATHPROG=echo
+
+PROGNAME=$0
+SCRIPTDIR=`pwd`
+
+. $SCRIPTDIR/setup.var
+
+# Set this to the required version
+VERSION=
+
+doreplace()
+{
+ thefile=$1
+ theexpr=$2
+
+ if [ -f $thefile ]; then
+ sed -e "$theexpr" < $thefile > $thefile.tmp
+ mv $thefile.tmp $thefile
+ else
+ echo "*** $thefile not found."
+ fi
+}
+
+unix2dosname()
+{
+ echo $1 | sed -e "s/\//\\\\\\\/g" > /tmp/filename.tmp
+ RETVALUE=`cat /tmp/filename.tmp`
+ rm -f /tmp/filename.tmp
+}
+
+unix2dosname2()
+{
+ echo $1 | sed -e "s/\//\\\\/g" > /tmp/filename.tmp
+ RETVALUE=`cat /tmp/filename.tmp`
+ rm -f /tmp/filename.tmp
+}
+
+findversion()
+{
+ echo "#include <stdio.h>" > /tmp/appver.c
+ echo "#include \"$VERSIONSYMBOLFILE\"" >> /tmp/appver.c
+ echo "int main() { printf(\"%.2f\", $VERSIONSYMBOL); }" >> /tmp/appver.c
+ gcc /tmp/appver.c -I$APPDIR -o /tmp/appver
+ VERSION=`/tmp/appver`
+ rm -f /tmp/appver /tmp/appver.c
+}
+
+makesetup()
+{
+ if [ -d $SETUPIMAGEDIR ]; then
+ echo Removing existing $SETUPIMAGEDIR
+ rm -f -r $SETUPIMAGEDIR
+ fi
+
+ echo Making the $SETUPIMAGEDIR for preparing the setup
+ mkdir -p $SETUPIMAGEDIR
+
+ if [ -f $READMEFILE ]; then
+ echo Copying readme.txt
+ cp $READMEFILE $SETUPIMAGEDIR
+ else
+ echo "*** Warning - $READMEFILE not found"
+ fi
+
+ if [ -f $LICENSEFILE ]; then
+ echo Copying licence.txt
+ cp $LICENSEFILE $SETUPIMAGEDIR
+ else
+ echo "*** Warning - $LICENSEFILE not found"
+ fi
+
+ cp $APPDIR/docs/gpl.txt $SETUPIMAGEDIR
+ cp $APPDIR/docs/lgpl.txt $SETUPIMAGEDIR
+ cp $APPDIR/docs/licendoc.txt $SETUPIMAGEDIR
+
+ echo Copying sample configuration settings file...
+ cp $APPDIR/configs/wxwin250.wxs $SETUPIMAGEDIR
+
+ if [ "$RESOURCESFILE" != "" ] && [ "$RESOURCESDIR" != "" ]; then
+ if [ -d $RESOURCESDIR ]; then
+ cd $RESOURCESDIR
+ echo Compiling resource file $RESOURCESFILE
+ zip $SETUPIMAGEDIR/$RESOURCESFILE *
+ else
+ echo "*** Warning - $RESOURCESDIR directory not found"
+ fi
+ fi
+
+ if [ "$MAKEMANUAL" != "0" ]; then
+ if [ -d $MANUALDIR ]; then
+ cd $MANUALDIR
+ make
+
+ for EACHFILE in $MANUALFILES ; do
+ if [ -f $EACHFILE ]; then
+ echo Copying $EACHFILE
+ cp $EACHFILE $SETUPIMAGEDIR
+ else
+ echo "*** Warning - $EACHFILE not found"
+ fi
+ done
+ else
+ echo "*** Warning - $MANUALDIR not found"
+ fi
+ fi
+
+ if [ -f $WXMANUALCHM ]; then
+ echo Copying wxWindows manual $WXMANUALCHM
+ cp $WXMANUALCHM $SETUPIMAGEDIR
+ else
+ echo "*** Warning - $WXMANUALCHM not found"
+ fi
+
+ if [ -f $APPBINARY ]; then
+ echo Copying binary $APPBINARY
+ cp $APPBINARY $SETUPIMAGEDIR
+ else
+ echo "*** Error - $APPBINARY not found"
+ exit 1
+ fi
+
+ if [ "$UPX" != "0" ]; then
+ echo Compressing binary
+ upx $SETUPIMAGEDIR/`basename $APPBINARY`
+ fi
+
+ # Time to regenerate the Inno Install script
+ if [ "$INNO" != "0" ]; then
+ echo Generating $SETUPSCRIPTNAME
+ rm -f $SETUPSCRIPTNAME
+
+ sh $SCRIPTDIR/makeinno.sh $SETUPIMAGEDIR $INNOTOP $INNOBOTTOM $SETUPSCRIPTNAME
+
+ if [ ! -f $SETUPSCRIPTNAME ]; then
+ echo "*** Error - something went wrong with the script file generation."
+ exit 1
+ fi
+
+ # Now replace %VERSION% with the real application version, and other
+ # variables
+ echo Replacing variables in the setup script
+ doreplace $SETUPSCRIPTNAME "s/%VERSION%/$VERSION/g"
+ doreplace $SETUPSCRIPTNAME "s/%COPYRIGHTHOLDER%/$AUTHOR/g"
+ doreplace $SETUPSCRIPTNAME "s/%VENDOR%/$VENDOR/g"
+
+ unix2dosname $READMEFILE
+ doreplace $SETUPSCRIPTNAME "s;%READMEFILE%;$RETVALUE;g"
+
+ unix2dosname $READMEAFTERFILE
+ doreplace $SETUPSCRIPTNAME "s;%READMEAFTERFILE%;$RETVALUE;g"
+
+ unix2dosname $LICENSEFILE
+ doreplace $SETUPSCRIPTNAME "s;%LICENSEFILE%;$RETVALUE;g"
+
+ doreplace $SETUPSCRIPTNAME "s/%APPNAME%/$APPNAME/g"
+ doreplace $SETUPSCRIPTNAME "s/%APPTITLE%/$APPTITLE/g"
+
+ unix2dosname $SETUPIMAGEDIR
+ doreplace $SETUPSCRIPTNAME "s;%SOURCEDIR%;$RETVALUE;g"
+
+ unix2dosname $DESTDIR
+ doreplace $SETUPSCRIPTNAME "s;%OUTPUTDIR%;$RETVALUE;g"
+
+ doreplace $SETUPSCRIPTNAME "s/%APPEXTENSION%/$APPEXTENSION/g"
+
+ # FIXME: how do we get the first name in the list?
+ if [ "$MANUALFILES" != "" ]; then
+ HELPFILE=`basename $MANUALFILES`
+ unix2dosname $HELPFILE
+ doreplace $SETUPSCRIPTNAME "s;%HELPFILE%;$RETVALUE;g"
+ fi
+ fi
+
+ rm -f $DESTDIR/setup*.*
+
+ # Inno Setup complains if this step is not done
+ unix2dos --unix2dos $SETUPSCRIPTNAME
+
+ # Now invoke INNO compiler on the new ISS file
+ # First, make a DOS filename or Inno Setup will get confused.
+
+ unix2dosname2 $SETUPSCRIPTNAME
+ DOSFILENAME=$RETVALUE
+
+ # Note: the double slash is Mingw32/MSYS convention for
+ # denoting a switch, that must not be converted into
+ # a path (otherwise /c = c:/)
+
+ cd `dirname $SETUPSCRIPTNAME`
+ BASESCRIPTNAME=`basename $SETUPSCRIPTNAME`
+ echo Invoking Inno Setup compiler on $BASESCRIPTNAME
+
+ "$SETUPCOMPILER" //cc $BASESCRIPTNAME
+
+ if [ ! -f $DESTDIR/setup.exe ]; then
+ echo "*** Error - the setup.exe was not generated."
+ exit
+ fi
+
+ cd $DESTDIR
+ mv setup.exe $APPNAME-$VERSION-setup.exe
+
+ echo If you saw no warnings or errors, $APPTITLE was successfully spun.
+ echo
+}
+
+# We can't use e.g. this:
+# ls `cat $SRC/distrib/msw/makefile.rsp` zip -@ -u $DEST/wxWindows-$VERSION-gen.zip
+# because there's not enough space on the command line, plus we need to ignore the
+# blank lines.
+# So if we need to (not in this script so far) we do something like this instead:
+# expandlines $SRC/setup/files.rsp temp.txt
+# zip -@ `$CYGPATHPROG -w $DEST/archive.zip` < temp.txt
+
+expandlines()
+{
+ toexpand=$1
+ outputfile=$2
+
+ rm -f $outputfile
+ touch $outputfile
+ for line in `cat $toexpand` ; do
+ if [ $line != "" ]; then
+ ls $line >> $outputfile
+ fi
+ done
+}
+
+usage()
+{
+ echo "Usage: $PROGNAME [ options ]" 1>&2
+ echo Options:
+ echo " --help Display this help message"
+ echo " --upx Compress executable with UPX"
+ echo " --no-upx Do not compress executable with UPX"
+ echo " --inno Build the setup.exe"
+ echo " --no-inno Do not build the setup.exe"
+ echo.
+ echo Note that options only override settings in $SCRIPTDIR/setup.var.
+ exit 1
+}
+
+# Process command line options.
+
+for i in "$@"; do
+ case "$i" in
+ --inno) INNO=1 ;;
+ --no-inno) INNO=0 ;;
+ --upx) UPX=1 ;;
+ --no-upx) UPX=0 ;;
+ *)
+ usage
+ exit
+ ;;
+ esac
+done
+
+findversion
+makesetup
+
--- /dev/null
+#!/bin/sh
+
+# Make a distribution of ConfigTool for Linux
+# Usage: maketarball.sh wxconfigtool-dir bin-dir deliver-dir version [ options ]
+# For example: maketarball.sh ~/wxconfigtool /tmp/build-wxconfigtool /tmp/wxconfigtool-deliver 1.40
+
+APPDIR=$1
+SRC=$APPDIR/src
+BINARYSRC=$2
+DEST=$3
+BUILD=0
+UPX=0
+PROGNAME=$0
+
+# Set this to the required version
+VERSION=$4
+
+dotar()
+{
+ rm -f -r $DEST/wxconfigtool*
+ rm -f $DEST/wxconfigtool-*.*
+
+ mkdir -p $DEST/wxconfigtool-$VERSION
+ mkdir -p $DEST/wxconfigtool-$VERSION/resources
+ mkdir -p $DEST/wxconfigtool-$VERSION/Sample
+ cd $DEST/wxconfigtool-$VERSION
+
+ # Copy readme files
+ cp $APPDIR/docs/readme.txt readme.txt
+ cp $APPDIR/docs/license.txt .
+
+ # Copy the application binary
+ cp $BINARYSRC/wxconfigtool .
+
+ # Copy the wxHTML Help manual file
+ cp $APPDIR/manual/configtool.htb .
+
+ # Copy the sample
+ cp -r $APPDIR/sample Sample
+ cp $APPDIR/resources/* resources
+
+ echo Removing junk from the samples folder...
+ rm -f -r Sample/CVS
+
+ # Copy the resources file
+ rm -f configtool.bin
+ zip configtool.bin -j resources/*
+
+ rm -f -r resources
+
+ # Remove any debug info from wxconfigtool
+ strip wxconfigtool
+
+ # Maybe compress the binary
+ if [ "$UPX" != "0" ]; then
+ upx wxconfigtool
+ fi
+
+ cd ..
+
+ # Make .tar.gz and .tar.bz2 archives
+ tar cvf $DEST/wxconfigtool-$VERSION-i386.tar wxconfigtool-$VERSION/*
+ gzip -c $DEST/wxconfigtool-$VERSION-i386.tar > $DEST/wxconfigtool-$VERSION-i386.tar.gz
+ bzip2 -c $DEST/wxconfigtool-$VERSION-i386.tar > $DEST/wxconfigtool-$VERSION-i386.tar.bz2
+}
+
+dobuild()
+{
+ makeapp release full
+}
+
+usage()
+{
+ echo Usage: $PROGNAME "cvs-dir bin-dir deliver-dir version-number [ options ]"
+ echo Options:
+ echo " --help Display this help message"
+ echo " --upx Compress executable with UPX"
+ echo " --build Invoke 'maketarball.sh release full' first"
+ echo For example: maketarball.sh ~/wxconfigtool /tmp/build-app /tmp/wxconfigtool-deliver 1.20
+ exit 1
+}
+
+# Process command line options.
+shift 4
+for i in "$@"; do
+ case "$i" in
+ --build) BUILD=1 ;;
+ --upx) UPX=1 ;;
+ *)
+ usage
+ exit
+ ;;
+ esac
+done
+
+if [ ! -d "$DEST" ]; then
+ mkdir -p $DEST
+fi
+
+if [ ! -d "$SRC" ]; then
+ echo Source directory $SRC not found.
+ usage
+ exit 1
+fi
+
+if [ ! -d "$BINARYSRC" ]; then
+ echo Location of wxconfigtool binary $BINARYSRC not found.
+ usage
+ exit 1
+fi
+
+if [ "$VERSION" = "" ]; then
+ echo Pass the version number as the fourth argument.
+ usage
+ exit 1
+fi
+
+echo Creating Version $VERSION distribution in $DEST, using source directory $SRC and wxconfigtool binary in $BINARYSRC.
+#echo Press return to continue.
+#read dummy
+
+# Remove all existing files
+if [ ! -d "$DEST/wxconfigtool" ]; then
+ rm -f -r $DEST/wxconfigtool
+fi
+
+# Skip INNO setup if INNO is 0.
+if [ "$BUILD" = "1" ]; then
+ dobuild
+fi
+
+dotar
+
+echo ConfigTool archived.
+
--- /dev/null
+### List of variables for the purposes of generating an application's
+### setup.exe
+
+#-------------------------------------------------------------------------
+# The application name
+#-------------------------------------------------------------------------
+
+APPNAME=wxconfigtool
+
+#-------------------------------------------------------------------------
+# The application title
+#-------------------------------------------------------------------------
+
+APPTITLE="wxWindows Configuration Tool"
+
+#-------------------------------------------------------------------------
+# The application author (copyright holder)
+#-------------------------------------------------------------------------
+
+AUTHOR="Julian Smart"
+
+#-------------------------------------------------------------------------
+# The application vendor (organisation)
+#-------------------------------------------------------------------------
+
+VENDOR="Anthemion Software"
+
+#-------------------------------------------------------------------------
+# The application data file extension
+#-------------------------------------------------------------------------
+
+APPEXTENSION=wxs
+
+#-------------------------------------------------------------------------
+# The symbol to use when querying for the version number
+#-------------------------------------------------------------------------
+
+VERSIONSYMBOL=ctVERSION_NUMBER
+
+#-------------------------------------------------------------------------
+# The top-level directory of the application source tree
+#-------------------------------------------------------------------------
+
+APPDIR=c:/wx2dev/wxWindows/utils/configtool
+
+#-------------------------------------------------------------------------
+# The destination directory of the setup
+#-------------------------------------------------------------------------
+
+DESTDIR=$APPDIR/deliver
+
+#-------------------------------------------------------------------------
+# The temporary image directory to use when preparing the setup
+#-------------------------------------------------------------------------
+
+SETUPIMAGEDIR=$APPDIR/deliver/image
+
+#-------------------------------------------------------------------------
+# The name of the file with $VERSIONSYMBOL in it
+#-------------------------------------------------------------------------
+
+VERSIONSYMBOLFILE=$APPDIR/src/symbols.h
+
+#-------------------------------------------------------------------------
+# The locations of the project's Inno Setup header and footer files
+#-------------------------------------------------------------------------
+
+INNOTOP=$APPDIR/scripts/innotop.txt
+INNOBOTTOM=$APPDIR/scripts/innobott.txt
+
+#-------------------------------------------------------------------------
+# The location of the generated setup script
+#-------------------------------------------------------------------------
+
+SETUPSCRIPTNAME=$DESTDIR/$APPNAME.iss
+
+#-------------------------------------------------------------------------
+# The locations of the readme and license files
+#-------------------------------------------------------------------------
+
+READMEFILE=$APPDIR/docs/readme.txt
+READMEAFTERFILE=$APPDIR/docs/readme-after.txt
+LICENSEFILE=$APPDIR/docs/licence.txt
+
+#-------------------------------------------------------------------------
+# The binary to include in the setup
+#-------------------------------------------------------------------------
+
+APPBINARY=$APPDIR/src/ReleaseStable/$APPNAME.exe
+
+#-------------------------------------------------------------------------
+# The location of the setup compiler
+#-------------------------------------------------------------------------
+
+SETUPCOMPILER="c:/Program Files/Inno Setup 2/compil32.exe"
+
+#-------------------------------------------------------------------------
+# Whether we will compress the binary (0 or 1).
+# Use --upx or --no-upx to override this default value.
+#-------------------------------------------------------------------------
+
+UPX=0
+
+#-------------------------------------------------------------------------
+# Whether we will make a manual (0 or 1)
+# Use --make-manual or --no-make-manual to override this default value.
+#-------------------------------------------------------------------------
+
+MAKEMANUAL=1
+
+#-------------------------------------------------------------------------
+# The manual filename(s)
+#-------------------------------------------------------------------------
+
+MANUALFILES="$APPDIR/docs/manual/configtool.chm $APPDIR/docs/manual/configtool.htb"
+WXMANUALCHM="$APPDIR/../../docs/htmlhelp/wx.chm"
+WXMANUALHTB="$APPDIR/../../docs/htb/wx.htb"
+
+#-------------------------------------------------------------------------
+# The directory containing the manual source. We assume
+# that there is a Makefile in this directory for making the
+# manual.
+#-------------------------------------------------------------------------
+
+MANUALDIR=$APPDIR/docs/manual
+
+#-------------------------------------------------------------------------
+# The resources file to compile, if any (e.g. myapp.bin).
+# This is just a zip containing files to be used by the
+# application, usually stored in src/resources.
+#
+# If this is left empty, no resources will be compiled.
+#-------------------------------------------------------------------------
+
+#RESOURCESFILE=${APPNAME}.bin
+
+#-------------------------------------------------------------------------
+# The directory containing the resources.
+#
+# If this is left empty, no resources will be compiled.
+#-------------------------------------------------------------------------
+
+RESOURCESDIR=$APPDIR/src/resources
+
--- /dev/null
+#
+# File: Makefile for wxconfigtool
+# Author: Julian Smart
+# Created: 2002.05.12
+# Updated:
+# Copyright: (c) Julian Smart
+#
+# To make absolutely everything:
+#
+# % mkdir /tmp/wxconfigtool-build
+# % cd /tmp/wxconfigtool-build
+# % make -f $(APPDIR)/src/Makefile WXDIR=$(WXDIR) WXBUILDDIR=$(WXBUILDDIR) APPDIR=$(APPDIR) LEVEL=debug full
+#
+# To make just ConfigTool:
+#
+# % make ... LEVEL=debug wxconfigtool
+#
+# To make wxWindows library:
+#
+# % make ... LEVEL=debug wx
+#
+# The result will be subdirectories under your /tmp/wxconfigtool-build (or other specified
+# directory) containing:
+#
+# wxconfigtool-build-debug/
+# wxwin-build-debug/
+#
+# To make a release version, specify LEVEL=release instead of LEVEL=debug.
+#
+
+# Current (build) directory
+CURRDIR = $(shell pwd)
+BUILDDIR=$(CURRDIR)
+
+top_srcdir = $(WXDIR)
+top_builddir = $(WXBUILDDIR)
+program_dir =
+
+# If we don't specify a location for wxWindows to be
+# built, use a default.
+ifeq "$(top_builddir)" ""
+topbuilddir = $(CURRDIR)/wxwin-build-$(LEVEL)
+WXBUILDDIR=$(top_builddir)
+endif
+
+# ConfigTool build directory
+APPBUILDDIR=$(BUILDDIR)/wxconfigtool-build-$(LEVEL)
+
+# StartingBlocks source hierarchy
+# You have to specify this when invoking make.
+APPDIR=You_should_override_the_APPDIR_variable
+
+# ConfigTool source directory
+APPSRCDIR=$(APPDIR)/src
+
+# ConfigTool include directory
+APPINCDIR=$(APPDIR)/src
+
+# Extra includes
+APPEXTRADEFS= \
+ -I$(WXDIR)/contrib/include \
+ -I$(APPSRCDIR) \
+
+# -I$(UTILSDIR) \
+
+WXVERSION=2.4
+
+# Use the small C++ support library
+APPEXTRALIBS=-lsupc++ ${top_builddir}/lib/libwx_$(WXTOOLKIT)$(WXDEBUGSUFFIX)_xrc-$(WXVERSION).a
+
+PLATFORM_OS=$(shell echo $(OS))
+
+ifeq "$(PLATFORM_OS)" "Windows_NT"
+ARCHITECTURE="i686"
+WXTOOLKIT=msw
+else
+ARCHITECTURE=$(shell arch)
+ifeq "$(ARCHITECTURE)" "i686"
+WXTOOLKIT=gtk
+else
+WXTOOLKIT=mac
+endif
+endif
+
+#printit:
+# @echo $(PLATFORM_OS)
+
+ifeq "$(LEVEL)" "debug"
+WXDEBUGSUFFIX=d
+else
+WXDEBUGSUFFIX=
+endif
+
+
+# Where to find the wx-config file
+WXCONFIG=$(WXBUILDDIR)/wx-config $(WXCONFIGFLAGS)
+
+ifeq "$(LEVEL)" "debug"
+WXDEBUGFLAGS=--enable-debug --enable-debug_gdb --enable-debug_cntxt
+endif
+
+PROGRAM=$(APPBUILDDIR)/wxconfigtool
+
+OBJECTS = \
+ $(APPBUILDDIR)/appsettings.o \
+ $(APPBUILDDIR)/configitem.o \
+ $(APPBUILDDIR)/configitemselector.o \
+ $(APPBUILDDIR)/configtooldoc.o \
+ $(APPBUILDDIR)/configtoolview.o \
+ $(APPBUILDDIR)/configtree.o \
+ $(APPBUILDDIR)/custompropertydialog.o \
+ $(APPBUILDDIR)/htmlparser.o \
+ $(APPBUILDDIR)/mainframe.o \
+ $(APPBUILDDIR)/propeditor.o \
+ $(APPBUILDDIR)/property.o \
+ $(APPBUILDDIR)/settingsdialog.o \
+ $(APPBUILDDIR)/utils.o \
+ $(APPBUILDDIR)/wxconfigtool.o
+
+DEPFILES=$(PROGRAM).d
+
+ifeq "$(USEDUMMYMAKEPROG)" "1"
+include $(APPSRCDIR)/makeprog.env
+else
+include $(top_builddir)/src/makeprog.env
+endif
+
+CC=gcc
+CXX=gcc
+
+mkbuilddir:
+ mkdir -p $(APPBUILDDIR)
+
+full: wx all
+
+# --with-libpng=builtin --with-zlib=builtin --with-libjpeg=builtin
+wx:
+ @mkdir -p $(WXBUILDDIR) ; \
+ cd $(WXBUILDDIR) ; \
+ if test ! -f Makefile ; then rm -f *.o *.d ; \
+ rm -f *.cache ; \
+ $(WXDIR)/configure --disable-shared --enable-gui --enable-log $(WXDEBUGFLAGS) --with-threads --disable-no_rtti --without-sockets --without-odbc --with-libjpeg --with-libpng=builtin --with-zlib=builtin --enable-wave ; \
+ fi; \
+ make; cd contrib/src/xrc; make
+
+cleanapp: clean
+
+cleanwx:
+ rm -f -r $(WXBUILDDIR)
+
+cleanall: cleanapp cleanwx
+
+wxconfigtool: mkbuilddir all
+
+# Making a binary, RH Linux tarball release using the setup script.
+# It will put the result in /tmp/wxconfigtool-deliver.
+release:
+ echo "#include <stdio.h>" > /tmp/appver.c
+ echo "#include \"symbols.h\"" >> /tmp/appver.c
+ echo "int main() { printf(\"%.2f\", ctVERSION_NUMBER); }" >> /tmp/appver.c
+ cc /tmp/appver.c -I$(APPSRCDIR) -o /tmp/appver
+ chmod a+x $(APPSRCDIR)/../scripts/maketarball.sh
+ $(APPSRCDIR)/../scripts/maketarball.sh $(APPDIR) $(APPBUILDDIR) /tmp/wxconfigtool-deliver `/tmp/appver` # --upx
+ echo The release is in /tmp/wxconfigtool-deliver.
+# rm -f /tmp/appver /tmp/appver.c
+
+# Gives a list of targets
+help:
+ @echo "Targets: full, wxconfigtool, wx, cleanall, clean, cleanwx, release"
+
+### File dependencies
+
+# Main app files
+
+$(APPBUILDDIR)/wxconfigtool.o: $(APPSRCDIR)/wxconfigtool.cpp $(APPINCDIR)/wxconfigtool.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/appsettings.o: $(APPSRCDIR)/appsettings.cpp $(APPSRCDIR)/appsettings.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/configitem.o: $(APPSRCDIR)/configitem.cpp $(APPSRCDIR)/configitem.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/configitemselector.o: $(APPSRCDIR)/configitemselector.cpp $(APPSRCDIR)/configitemselector.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/configtooldoc.o: $(APPSRCDIR)/configtooldoc.cpp $(APPSRCDIR)/configtooldoc.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/configtoolview.o: $(APPSRCDIR)/configtoolview.cpp $(APPSRCDIR)/configtoolview.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/configtree.o: $(APPSRCDIR)/configtree.cpp $(APPSRCDIR)/configtree.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/custompropertydialog.o: $(APPSRCDIR)/custompropertydialog.cpp $(APPSRCDIR)/custompropertydialog.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/htmlparser.o: $(APPSRCDIR)/htmlparser.cpp $(APPSRCDIR)/htmlparser.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/mainframe.o: $(APPSRCDIR)/mainframe.cpp $(APPINCDIR)/mainframe.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/propeditor.o: $(APPSRCDIR)/propeditor.cpp $(APPINCDIR)/propeditor.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/property.o: $(APPSRCDIR)/property.cpp $(APPINCDIR)/property.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/settingsdialog.o: $(APPSRCDIR)/settingsdialog.cpp $(APPINCDIR)/settingsdialog.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/utils.o: $(APPSRCDIR)/utils.cpp $(APPINCDIR)/imagewindow.h $(APPSRCDIR)/symbols.h
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+$(APPBUILDDIR)/wxconfigtool_resources.o: $(APPSRCDIR)/wxconfigtool.rc
+ $(RESCOMP) -i $< -o $@ $(RESFLAGS) --include-dir $(APPSRCDIR)
+
--- /dev/null
+#
+# File: Makefile.in
+# Author: Julian Smart
+# Created: 2003
+# Updated:
+# Copyright: (c) 2003 Julian Smart
+#
+# "%W% %G%"
+#
+# Makefile for wxWindows Configuration Tool (Unix)
+
+top_srcdir = @top_srcdir@/..
+top_builddir = ../../..
+program_dir = utils/configtool/src
+
+PROGRAM=wxconfigtool
+
+OBJECTS = wxconfigtool.o appsettings.o configitem.o configitemselector.o configtooldoc.o \
+ configtoolview.o configtree.o custompropertydialog.o htmlparser.o mainframe.o \
+ propeditor.o property.o settingsdialog.o utils.o
+
+DEPFILES=wxconfigtool.d appsettings.d configitem.d configitemselector.d configtooldoc.d \
+ configtoolview.d configtree.d custompropertydialog.d htmlparser.d mainframe.d \
+ propeditor.d property.d settingsdialog.o utils.d
+
+include ../../../src/makeprog.env
+
+-include $(DEPFILES)
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: appsettings.cpp
+// Purpose: Implements settings-related functionality
+// Author: Julian Smart
+// Modified by:
+// Created: 2002-09-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation appsettings.h
+#endif
+
+#include "wx/wx.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+
+#include "wx/wfstream.h"
+#include "wx/datstrm.h"
+#include "wx/config.h"
+#include "wx/fileconf.h"
+#include "wx/dir.h"
+#include "wx/valgen.h"
+#include "wx/colordlg.h"
+#include "wx/wxhtml.h"
+#include "wx/effects.h"
+#include "wx/spinctrl.h"
+#include "wx/tooltip.h"
+
+#include "utils.h"
+#include "wxconfigtool.h"
+#include "appsettings.h"
+#include "mainframe.h"
+#include "symbols.h"
+#include "settingsdialog.h"
+
+/*
+ * User-changeable settings
+ */
+
+IMPLEMENT_DYNAMIC_CLASS(ctSettings, wxObject)
+
+ctSettings::ctSettings()
+{
+ m_noUses = 0;
+ m_showToolBar = TRUE;
+ m_showWelcomeDialog = TRUE;
+ m_exportDir = wxEmptyString;
+
+ m_frameSize = wxRect(10, 10, 600, 500);
+ // m_backgroundColour = wxColour(140, 172, 179); // blue-grey
+ m_editWindowFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
+
+ m_appName = wxT("wxWindows Configuration Tool");
+ m_appNameShort = wxT("Configuration Tool");
+ m_showSplashScreen = FALSE;
+ m_userName = wxEmptyString;
+ m_frameStatus = ctSHOW_STATUS_NORMAL;
+ m_loadLastDocument = TRUE;
+ m_firstTimeRun = TRUE;
+ m_smallToolbar = TRUE;
+ m_mainSashSize = 200;
+ m_useToolTips = TRUE;
+ m_showTrayIcon = TRUE;
+ m_trayIconIsShown = FALSE;
+ m_useEnvironmentVariable = TRUE;
+ m_frameworkDir = wxEmptyString;
+}
+
+// Copy constructor
+ctSettings::ctSettings(const ctSettings& settings)
+{
+ Copy(settings);
+}
+
+
+ctSettings::~ctSettings()
+{
+}
+
+void ctSettings::operator = (const ctSettings& settings)
+{
+ Copy(settings);
+}
+
+void ctSettings::Copy (const ctSettings& settings)
+{
+ m_currentDocumentDir = settings.m_currentDocumentDir;
+ m_lastDocument = settings.m_lastDocument;
+ m_showToolBar = settings.m_showToolBar;
+ m_frameSize = settings.m_frameSize;
+ m_editWindowFont = settings.m_editWindowFont;
+ m_showSplashScreen = settings.m_showSplashScreen;
+ m_userName = settings.m_userName;
+ m_loadLastDocument = settings.m_loadLastDocument;
+ m_exportDir = settings.m_exportDir;
+ m_firstTimeRun = settings.m_firstTimeRun;
+ m_noUses = settings.m_noUses;
+ m_smallToolbar = settings.m_smallToolbar;
+ m_useToolTips = settings.m_useToolTips;
+ m_showWelcomeDialog = settings.m_showWelcomeDialog;
+ m_mainSashSize = settings.m_mainSashSize;
+
+ m_showTrayIcon = settings.m_showTrayIcon;
+ m_trayIconIsShown = settings.m_trayIconIsShown;
+
+ m_useEnvironmentVariable = settings.m_useEnvironmentVariable;
+ m_frameworkDir = settings.m_frameworkDir;
+}
+
+// Do some initialisation within stApp::OnInit
+bool ctSettings::Init()
+{
+ m_currentDocumentDir = wxEmptyString;
+ if (m_userName.IsEmpty())
+ m_userName = wxGetUserName();
+
+ return TRUE;
+}
+
+// Create new filename
+wxString ctSettings::GenerateFilename(const wxString& rootName)
+{
+ wxString path;
+ if (!m_lastFilename.IsEmpty())
+ path = wxPathOnly(m_lastFilename);
+ else
+ path = wxGetApp().GetAppDir();
+
+ wxString filename(path);
+ if (filename.Last() != wxFILE_SEP_PATH )
+ filename += wxFILE_SEP_PATH;
+ filename += rootName;
+
+ wxString fullFilename = filename + wxT(".wxs");
+ int i = 0;
+ wxString postfixStr;
+ while (wxFileExists(fullFilename))
+ {
+ i ++;
+ postfixStr.Printf("%d", i);
+ fullFilename = filename + postfixStr + wxT(".wxs");
+ }
+
+ m_lastFilename = fullFilename;
+ return fullFilename;
+}
+
+// Load config info
+bool ctSettings::LoadConfig()
+{
+ wxConfig config(wxGetApp().GetSettings().GetAppName(), wxT("wxWindows"));
+
+ config.Read(wxT("Files/LastFile"), & m_lastFilename);
+ config.Read(wxT("Files/DocumentDir"), & m_currentDocumentDir);
+ config.Read(wxT("Files/ExportDir"), & m_exportDir);
+ config.Read(wxT("Files/FrameworkDir"), & m_frameworkDir);
+ config.Read(wxT("Files/UseEnvironmentVariable"), (bool*) & m_useEnvironmentVariable);
+
+ config.Read(wxT("Misc/UserName"), & m_userName);
+ config.Read(wxT("Misc/FrameStatus"), & m_frameStatus);
+ config.Read(wxT("Misc/ShowToolTips"), (bool*) & m_useToolTips);
+ config.Read(wxT("Misc/LastDocument"), & m_lastDocument);
+ config.Read(wxT("Misc/LoadLastDocument"), (bool*) & m_loadLastDocument);
+ config.Read(wxT("Misc/ShowWelcomeDialog"), (bool*) & m_showWelcomeDialog);
+ config.Read(wxT("Misc/Ran"), & m_noUses);
+ config.Read(wxT("Misc/ShowTrayIcon"), (bool*) & m_showTrayIcon);
+
+ m_noUses ++;
+
+ config.Read(wxT("Windows/ShowToolBar"), (bool*) & m_showToolBar);
+
+ m_firstTimeRun = !(config.Read(wxT("Windows/WindowX"), & m_frameSize.x));
+ config.Read(wxT("Windows/WindowY"), & m_frameSize.y);
+ config.Read(wxT("Windows/WindowWidth"), & m_frameSize.width);
+ config.Read(wxT("Windows/WindowHeight"), & m_frameSize.height);
+ config.Read(wxT("Windows/ShowSplashScreen"), (bool*) & m_showSplashScreen);
+ config.Read(wxT("Windows/SmallToolbar"), (bool*) & m_smallToolbar);
+ config.Read(wxT("Windows/MainSashSize"), & m_mainSashSize);
+
+ wxString fontSpec;
+
+ fontSpec = wxEmptyString;
+ config.Read(wxT("Style/EditWindowFont"), & fontSpec);
+ if (!fontSpec.IsEmpty())
+ m_editWindowFont = apStringToFont(fontSpec);
+
+ // Crash-resistance
+ int runningProgram = 0;
+ config.Read(wxT("Misc/RunningProgram"), & runningProgram);
+
+#ifndef __WXDEBUG__
+ // runningProgram should be zero if all is well. If 1,
+ // it crashed during a run, so we should disable the auto-load
+ // facility just in case it's trying to load a damaged file.
+ if (runningProgram != 0)
+ {
+ m_loadLastDocument = FALSE;
+ }
+#endif
+
+ config.Write(wxT("Misc/RunningProgram"), (long) 1);
+
+ return TRUE;
+}
+
+// Save config info
+bool ctSettings::SaveConfig()
+{
+ wxConfig config(wxGetApp().GetSettings().GetAppName(), wxT("wxWindows"));
+
+ config.Write(wxT("Files/LastFile"), m_lastFilename);
+ config.Write(wxT("Files/DocumentDir"), m_currentDocumentDir);
+ config.Write(wxT("Files/ExportDir"), m_exportDir);
+ config.Write(wxT("Files/FrameworkDir"), m_frameworkDir);
+ config.Write(wxT("Files/UseEnvironmentVariable"), m_useEnvironmentVariable);
+
+ config.Write(wxT("Misc/UserName"), m_userName);
+ config.Write(wxT("Misc/FrameStatus"), (long) m_frameStatus);
+ config.Write(wxT("Misc/ShowToolTips"), m_useToolTips);
+ config.Write(wxT("Misc/LastDocument"), m_lastDocument);
+ config.Write(wxT("Misc/LoadLastDocument"), (long) m_loadLastDocument);
+ config.Write(wxT("Misc/ShowWelcomeDialog"), (long) m_showWelcomeDialog);
+ config.Write(wxT("Misc/Ran"), m_noUses);
+ config.Write(wxT("Misc/ShowTrayIcon"), (long) m_showTrayIcon);
+
+ config.Write(wxT("Windows/ShowToolBar"), m_showToolBar);
+ config.Write(wxT("Windows/WindowX"), (long) m_frameSize.x);
+ config.Write(wxT("Windows/WindowY"), (long) m_frameSize.y);
+ config.Write(wxT("Windows/WindowWidth"), (long) m_frameSize.width);
+ config.Write(wxT("Windows/WindowHeight"), (long) m_frameSize.height);
+
+ config.Write(wxT("Windows/ShowSplashScreen"), m_showSplashScreen);
+ config.Write(wxT("Windows/SmallToolbar"), (long) m_smallToolbar);
+ config.Write(wxT("Windows/MainSashSize"), (long) m_mainSashSize);
+
+ /*
+ wxString backgroundColour(apColourToHexString(m_backgroundColour));
+ config.Write(wxT("Style/BackgroundColour"), backgroundColour);
+ */
+
+ config.Write(wxT("Style/EditWindowFont"), apFontToString(m_editWindowFont));
+
+ // Indicate that we're no longer running, so we know if the program
+ // crashed last time around.
+ config.Write(wxT("Misc/RunningProgram"), (long) 0);
+
+ {
+ config.SetPath(wxT("FileHistory/"));
+ wxGetApp().GetDocManager()->FileHistorySave(config);
+ }
+
+ return TRUE;
+}
+
+void ctSettings::ShowSettingsDialog(const wxString& page)
+{
+ ctSettingsDialog* dialog = new ctSettingsDialog(wxGetApp().GetTopWindow());
+// if (!page.IsEmpty())
+// dialog->GetNotebook()->SetSelection(apFindNotebookPage(dialog->GetNotebook(), page));
+
+ /* int ret = */ dialog->ShowModal();
+ dialog->Destroy();
+}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: appsettings.h
+// Purpose: Settings-related classes
+// Author: Julian Smart
+// Modified by:
+// Created: 2002-09-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _AP_APPSETTINGS_H_
+#define _AP_APPSETTINGS_H_
+
+#ifdef __GNUG__
+#pragma interface appsettings.cpp
+#endif
+
+#include "wx/notebook.h"
+#include "wx/dialog.h"
+#include "wx/datetime.h"
+#include "wx/wave.h"
+
+#include "wxconfigtool.h"
+
+// Frame status
+#define ctSHOW_STATUS_NORMAL 0x01
+#define ctSHOW_STATUS_MINIMIZED 0x02
+#define ctSHOW_STATUS_MAXIMIZED 0x03
+
+/*!
+ * \brief ctSettings holds all the settings that can be altered
+ * by the user (and probably some that can't).
+ */
+
+class ctSettings: public wxObject
+{
+DECLARE_DYNAMIC_CLASS(ctSettings)
+public:
+ /// Default constructor.
+ ctSettings();
+
+ /// Copy constructor.
+ ctSettings(const ctSettings& settings);
+
+ /// Destructor.
+ ~ctSettings();
+
+// Operations
+
+ /// Assignment operator.
+ void operator = (const ctSettings& settings);
+
+ /// Copy function.
+ void Copy (const ctSettings& settings);
+
+ /// Loads configuration information from the registry or a file.
+ bool LoadConfig();
+
+ /// Saves configuration information to the registry or a file.
+ bool SaveConfig();
+
+ /// Initialisation before LoadConfig is called.
+ bool Init();
+
+ /// Shows the settings dialog.
+ void ShowSettingsDialog(const wxString& page = wxEmptyString);
+
+ /// Generates a new document filename.
+ wxString GenerateFilename(const wxString& rootName);
+
+// Accessors
+
+ /// Returns the long application name. This name is used
+ /// for the registry key and main frame titlebar.
+ wxString GetAppName() const { return m_appName; }
+
+ /// Returns the short application name.
+ wxString GetShortAppName() const { return m_appNameShort; }
+
+ /// Gets the name of the last filename to be loaded.
+ /// May not be needed in this application.
+ wxString& GetLastFilename() { return m_lastFilename; }
+
+ /// Returns TRUE if this is the first time the application
+ /// has been run.
+ bool GetFirstTimeRun() const { return m_firstTimeRun; }
+
+public:
+ wxString m_currentDocumentDir; // Not yet used
+ wxString m_lastDocument; // Last document
+ bool m_showToolBar;
+ bool m_smallToolbar;
+ wxRect m_frameSize;
+ // wxColour m_backgroundColour; // background colour
+ wxFont m_editWindowFont;
+ int m_noUses; // Number of times the app was invoked
+
+ wxString m_appName; // The current name of the app...
+ wxString m_appNameShort; // The short name of the app...
+ bool m_showSplashScreen; // Show the splash screen
+ wxString m_userName;
+ wxString m_lastFilename; // So we can auto-generate sensible filenames
+ bool m_loadLastDocument;
+ bool m_useToolTips; // Use tooltips on dialogs
+ int m_frameStatus;
+ wxString m_exportDir; // Where files are exported to
+
+ wxString m_frameworkDir; // Where the wxWin hierarchy is
+ bool m_useEnvironmentVariable; // Use WXWIN
+
+ /// This isn't explicitly held in the registry
+ /// but deduced from whether there are values there
+ bool m_firstTimeRun;
+ bool m_showWelcomeDialog; // Show opening helpful dialog
+
+ int m_mainSashSize;
+ bool m_showTrayIcon;
+ bool m_trayIconIsShown;
+};
+
+#endif
+ // _AP_APPSETTINGS_H_
+
--- /dev/null
+/* XPM */\r
+static char * checked_xpm[] = {\r
+"16 16 4 1",\r
+" c None",\r
+". c #808080",\r
+"X c Black",\r
+"o c #c0c0c0",\r
+" ",\r
+" ",\r
+" ............ ",\r
+" .XXXXXXXXXXo ",\r
+" .X o ",\r
+" .X X o ",\r
+" .X XX o ",\r
+" .X X XXX o ",\r
+" .X XX XXX o ",\r
+" .X XXXXX o ",\r
+" .X XXX o ",\r
+" .X X o ",\r
+" .X o ",\r
+" .ooooooooooo ",\r
+" ",\r
+" "};\r
--- /dev/null
+/* XPM */\r
+static char * checked_dis_xpm[] = {\r
+"16 16 4 1",\r
+" c None",\r
+". c #808080",\r
+"X c Black",\r
+"o c #c0c0c0",\r
+" ",\r
+" ",\r
+" ............ ",\r
+" .XXXXXXXXXXo ",\r
+" .Xoooooooooo ",\r
+" .Xooooooo.oo ",\r
+" .Xoooooo..oo ",\r
+" .Xo.ooo...oo ",\r
+" .Xo..o...ooo ",\r
+" .Xo.....oooo ",\r
+" .Xoo...ooooo ",\r
+" .Xooo.oooooo ",\r
+" .Xoooooooooo ",\r
+" .ooooooooooo ",\r
+" ",\r
+" "};\r
--- /dev/null
+/* XPM */
+static char *checkedfolder_xpm[] = {
+"16 16 6 1",
+" c None",
+". c #808080",
+"X c #FFFF00",
+"o c #C0C0C0",
+"O c #FFFFFF",
+"+ c #000000",
+" ",
+" ..... ",
+" .XoXoX. ",
+" .XoXoXoX...... ",
+" .OOOOOOOOOOOO.+",
+" .OXoXoXoXo+oX.+",
+" .OoXoXoXo++Xo.+",
+" .OXo+oXo+++oX.+",
+" .OoX++o+++oXo.+",
+" .OXo+++++oXoX.+",
+" .OoXo+++oXoXo.+",
+" .OXoXo+oXoXoX.+",
+" ..............+",
+" ++++++++++++++",
+" ",
+" "};
--- /dev/null
+/* XPM */
+static char *checkedfolder_dis_xpm[] = {
+"16 16 4 1",
+" c None",
+". c #808080",
+"X c #C0C0C0",
+"o c #000000",
+" ",
+" ..... ",
+" .XXXXX. ",
+".XXXXXXX...... ",
+".XXXXXXXXXXXX.o ",
+".XXXXXXXXX.XX.o ",
+".XXXXXXXX..XX.o ",
+".XXX.XXX...XX.o ",
+".XXX..X...XXX.o ",
+".XXX.....XXXX.o ",
+".XXXX...XXXXX.o ",
+".XXXXX.XXXXXX.o ",
+"..............o ",
+" oooooooooooooo ",
+" ",
+" "};
--- /dev/null
+/* XPM */\r
+static char * closedfolder_xpm[] = {\r
+"16 16 6 1",\r
+" c None",\r
+". c #808080",\r
+"X c Yellow",\r
+"o c #c0c0c0",\r
+"O c Gray100",\r
+"+ c Black",\r
+" ",\r
+" ..... ",\r
+" .XoXoX. ",\r
+" .XoXoXoX...... ",\r
+" .OOOOOOOOOOOO.+",\r
+" .OXoXoXoXoXoX.+",\r
+" .OoXoXoXoXoXo.+",\r
+" .OXoXoXoXoXoX.+",\r
+" .OoXoXoXoXoXo.+",\r
+" .OXoXoXoXoXoX.+",\r
+" .OoXoXoXoXoXo.+",\r
+" .OXoXoXoXoXoX.+",\r
+" ..............+",\r
+" ++++++++++++++",\r
+" ",\r
+" "};\r
--- /dev/null
+/* XPM */
+static char *closedfolder_dis_xpm[] = {
+"16 16 4 1",
+" c None",
+". c #808080",
+"X c #C0C0C0",
+"o c #000000",
+" ",
+" ..... ",
+" .XXXXX. ",
+" .XXXXXXX...... ",
+" .XXXXXXXXXXXX.o",
+" .XXXXXXXXXXXX.o",
+" .XXXXXXXXXXXX.o",
+" .XXXXXXXXXXXX.o",
+" .XXXXXXXXXXXX.o",
+" .XXXXXXXXXXXX.o",
+" .XXXXXXXXXXXX.o",
+" .XXXXXXXXXXXX.o",
+" ..............o",
+" oooooooooooooo",
+" ",
+" "};
--- /dev/null
+/* XPM */
+static char *copy_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 4 1",
+" c None",
+". c Black",
+"X c Gray100",
+"o c #000080",
+/* pixels */
+" ",
+" ...... ",
+" .XXXX.. ",
+" .XXXX.X. ",
+" .X..X.oooooo ",
+" .XXXXXoXXXXoo ",
+" .X....oXXXXoXo ",
+" .XXXXXoX..Xoooo",
+" .X....oXXXXXXXo",
+" .XXXXXoX.....Xo",
+" ......oXXXXXXXo",
+" oX.....Xo",
+" oXXXXXXXo",
+" ooooooooo",
+" "
+};
--- /dev/null
+/* XPM */
+static char *cut_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 3 1",
+" c None",
+". c Black",
+"X c #000080",
+/* pixels */
+" ",
+" . . ",
+" . . ",
+" . . ",
+" .. .. ",
+" . . ",
+" ... ",
+" . ",
+" X.X ",
+" X XXX ",
+" XXX X X ",
+" X X X X ",
+" X X X X ",
+" X X XX ",
+" XX "
+};
--- /dev/null
+/* XPM */
+static char *ellipsis_xpm[] = {
+"16 16 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .. .. .. ",
+" .. .. .. ",
+" ",
+" ",
+" ",
+" "};
--- /dev/null
+/* XPM */\r
+static char * folder1_xpm[] = {\r
+"16 16 6 1",\r
+" c None",\r
+". c #808080",\r
+"X c Yellow",\r
+"o c None",\r
+"O c Gray100",\r
+"+ c Black",\r
+" ",\r
+" ..... ",\r
+" .XoXoX. ",\r
+" .XoXoXoX...... ",\r
+" .OOOOOOOOOOOO.+",\r
+" .OXoXoXoXoXoX.+",\r
+" .OoXoXoXoXoXo.+",\r
+" .OXoXoXoXoXoX.+",\r
+" .OoXoXoXoXoXo.+",\r
+" .OXoXoXoXoXoX.+",\r
+" .OoXoXoXoXoXo.+",\r
+" .OXoXoXoXoXoX.+",\r
+" ..............+",\r
+" ++++++++++++++",\r
+" ",\r
+" "};\r
--- /dev/null
+/* XPM */
+static char *help_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 3 1",
+" c None",
+". c Black",
+"X c #008080",
+/* pixels */
+" ",
+" ...... ",
+" .XXXXX.. ",
+" .XX...XX.. ",
+" .X.. .X.. ",
+" .X.. .XX.. ",
+" .. .XX.. ",
+" .XX.. ",
+" .X.. ",
+" .X.. ",
+" .X.. ",
+" .. ",
+" .XX.. ",
+" .XX.. ",
+" ... "
+};
--- /dev/null
+/* XPM */\r
+static char *helpcs_xpm[] = {\r
+/* width height num_colors chars_per_pixel */\r
+" 16 15 2 1",\r
+/* colors */\r
+". c #000000",\r
+"# c None",\r
+/* pixels */\r
+"################",\r
+".########.....##",\r
+"..######..###..#",\r
+"...####..####...",\r
+"....###..####...",\r
+".....###..###..#",\r
+"......######..##",\r
+".......####..###",\r
+"........##..####",\r
+".....#####..####",\r
+"..#..###########",\r
+".###..####...###",\r
+"####..####...###",\r
+"#####..#########",\r
+"#####..#########"\r
+};\r
--- /dev/null
+/* XPM */
+static char *new_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 3 1",
+" c None",
+". c Black",
+"X c Gray100",
+/* pixels */
+" ",
+" ........ ",
+" .XXXXXX.. ",
+" .XXXXXX.X. ",
+" .XXXXXX.... ",
+" .XXXXXXXXX. ",
+" .XXXXXXXXX. ",
+" .XXXXXXXXX. ",
+" .XXXXXXXXX. ",
+" .XXXXXXXXX. ",
+" .XXXXXXXXX. ",
+" .XXXXXXXXX. ",
+" .XXXXXXXXX. ",
+" ........... ",
+" "
+};
--- /dev/null
+/* XPM */
+static char *open_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 5 1",
+" c None",
+". c Black",
+"X c Yellow",
+"o c Gray100",
+"O c #bfbf00",
+/* pixels */
+" ",
+" ... ",
+" . . .",
+" ..",
+" ... ...",
+" .XoX....... ",
+" .oXoXoXoXo. ",
+" .XoXoXoXoX. ",
+" .oXoX..........",
+" .XoX.OOOOOOOOO.",
+" .oo.OOOOOOOOO. ",
+" .X.OOOOOOOOO. ",
+" ..OOOOOOOOO. ",
+" ........... ",
+" "
+};
--- /dev/null
+/* XPM */
+static char *paste_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 6 1",
+" c None",
+". c Black",
+"X c Yellow",
+"o c #808080",
+"O c #000080",
+"+ c Gray100",
+/* pixels */
+" ",
+" .... ",
+" .....XX..... ",
+".ooo.X..X.ooo. ",
+".oo. .oo. ",
+".oo........oo. ",
+".oooooooooooo. ",
+".oooooOOOOOOO. ",
+".oooooO+++++OO ",
+".oooooO+++++O+O ",
+".oooooO+OOO+OOO ",
+".oooooO+++++++O ",
+".oooooO+OOOOO+O ",
+" .....O+++++++O ",
+" OOOOOOOOO "
+};
--- /dev/null
+/* XPM */
+static char *radiofolderoff_xpm[] = {
+"16 16 6 1",
+" c None",
+". c #808080",
+"X c #FFFF00",
+"o c #C0C0C0",
+"O c #FFFFFF",
+"+ c #000000",
+" ",
+" ..... ",
+" .XoXoX. ",
+" .XoXoXoX...... ",
+" .OOOOOOOOOOOO.+",
+" .OXoX...XoXoX.+",
+" .OoX.OOO.XoXo.+",
+" .OX.OOOOO.XoX.+",
+" .Oo.OOOOO.oXo.+",
+" .OX.OOOOO.XoX.+",
+" .OoX.OOO.XoXo.+",
+" .OXoX...XoXoX.+",
+" ..............+",
+" ++++++++++++++",
+" ",
+" "};
--- /dev/null
+/* XPM */
+static char *radiofolderoff_dis_xpm[] = {
+"16 16 4 1",
+" c None",
+". c #808080",
+"X c #C0C0C0",
+"o c #000000",
+" ",
+" ..... ",
+" .XXXXX. ",
+" .XXXXXXX...... ",
+" .XXXXXXXXXXXX.o",
+" .XXXX...XXXXX.o",
+" .XXX.XXX.XXXX.o",
+" .XX.XXXXX.XXX.o",
+" .XX.XXXXX.XXX.o",
+" .XX.XXXXX.XXX.o",
+" .XXX.XXX.XXXX.o",
+" .XXXX...XXXXX.o",
+" ..............o",
+" oooooooooooooo",
+" ",
+" "};
--- /dev/null
+/* XPM */
+static char *radiofolderon_xpm[] = {
+"16 16 6 1",
+" c None",
+". c #808080",
+"X c #FFFF00",
+"o c #C0C0C0",
+"O c #FFFFFF",
+"+ c #000000",
+" ",
+" ..... ",
+" .XoXoX. ",
+" .XoXoXoX...... ",
+" .OOOOOOOOOOOO.+",
+" .OXoX...XoXoX.+",
+" .OoX.OOO.XoXo.+",
+" .OX.O+++O.XoX.+",
+" .Oo.O+++O.oXo.+",
+" .OX.O+++O.XoX.+",
+" .OoX.OOO.XoXo.+",
+" .OXoX...XoXoX.+",
+" ..............+",
+" ++++++++++++++",
+" ",
+" "};
--- /dev/null
+/* XPM */
+static char *radiofolderon_dis_xpm[] = {
+"16 16 4 1",
+" c None",
+". c #808080",
+"X c #C0C0C0",
+"o c #000000",
+" ",
+" ..... ",
+" .XXXXX. ",
+" .XXXXXXX...... ",
+" .XXXXXXXXXXXX.o",
+" .XXXX...XXXXX.o",
+" .XXX.XXX.XXXX.o",
+" .XX.X...X.XXX.o",
+" .XX.X...X.XXX.o",
+" .XX.X...X.XXX.o",
+" .XXX.XXX.XXXX.o",
+" .XXXX...XXXXX.o",
+" ..............o",
+" oooooooooooooo",
+" ",
+" "};
--- /dev/null
+/* XPM */\r
+static char * radiooff_xpm[] = {\r
+"16 16 4 1",\r
+" c None",\r
+". c #808080",\r
+"X c Black",\r
+"o c #c0c0c0",\r
+" ",\r
+" ",\r
+" .... ",\r
+" ..XXXX.. ",\r
+" .XX XXo ",\r
+" .X oo ",\r
+" .X oo ",\r
+" .X oo ",\r
+" .X oo ",\r
+" .X oo ",\r
+" .X oo ",\r
+" .oo ooo ",\r
+" oooooooo ",\r
+" oooo ",\r
+" ",\r
+" "};\r
--- /dev/null
+/* XPM */\r
+static char * radiooff_dis_xpm[] = {\r
+"16 16 4 1",\r
+" c None",\r
+". c #808080",\r
+"X c Black",\r
+"o c #c0c0c0",\r
+" ",\r
+" ",\r
+" .... ",\r
+" ..XXXX.. ",\r
+" .XXooooXXo ",\r
+" .Xoooooooo ",\r
+" .Xoooooooooo ",\r
+" .Xoooooooooo ",\r
+" .Xoooooooooo ",\r
+" .Xoooooooooo ",\r
+" .Xoooooooo ",\r
+" .ooooooooo ",\r
+" oooooooo ",\r
+" oooo ",\r
+" ",\r
+" "};\r
--- /dev/null
+/* XPM */\r
+static char * radioon_xpm[] = {\r
+"16 16 4 1",\r
+" c None",\r
+". c #808080",\r
+"X c Black",\r
+"o c #c0c0c0",\r
+" ",\r
+" ",\r
+" .... ",\r
+" ..XXXX.. ",\r
+" .XX XXo ",\r
+" .X oo ",\r
+" .X XX oo ",\r
+" .X XXXX oo ",\r
+" .X XXXX oo ",\r
+" .X XX oo ",\r
+" .X oo ",\r
+" .oo ooo ",\r
+" oooooooo ",\r
+" oooo ",\r
+" ",\r
+" "};\r
--- /dev/null
+/* XPM */\r
+static char * radioon_dis_xpm[] = {\r
+"16 16 4 1",\r
+" c None",\r
+". c #808080",\r
+"X c Black",\r
+"o c #c0c0c0",\r
+" ",\r
+" ",\r
+" .... ",\r
+" ..XXXX.. ",\r
+" .XXooooXXo ",\r
+" .Xoooooooo ",\r
+" .Xooo..ooooo ",\r
+" .Xoo....oooo ",\r
+" .Xoo....oooo ",\r
+" .Xooo..ooooo ",\r
+" .Xoooooooo ",\r
+" .ooooooooo ",\r
+" oooooooo ",\r
+" oooo ",\r
+" ",\r
+" "};\r
--- /dev/null
+/* XPM */
+static char *redo_xpm[] = {
+/* width height num_colors chars_per_pixel */
+" 16 15 3 1",
+/* colors */
+". c #000080",
+"# c #c0c0c0",
+"a c #808080",
+/* pixels */
+"################",
+"################",
+"################",
+"################",
+"###a....########",
+"##a.####..###.##",
+"##.#######.#..##",
+"##.########...##",
+"##.#######....##",
+"##a.#####.....##",
+"###.a###########",
+"################",
+"################",
+"################",
+"################"
+};
--- /dev/null
+/* XPM */
+static char *save_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 4 1",
+" c None",
+". c Black",
+"X c #808000",
+"o c #808080",
+/* pixels */
+" ",
+" .............. ",
+" .X. . . ",
+" .X. ... ",
+" .X. .X. ",
+" .X. .X. ",
+" .X. .X. ",
+" .X. .X. ",
+" .XX........oX. ",
+" .XXXXXXXXXXXX. ",
+" .XX.........X. ",
+" .XX...... .X. ",
+" .XX...... .X. ",
+" .XX...... .X. ",
+" ............. "
+};
--- /dev/null
+/* XPM */\r
+static char * unchecked_xpm[] = {\r
+"16 16 4 1",\r
+" c None",\r
+". c #808080",\r
+"X c Black",\r
+"o c #c0c0c0",\r
+" ",\r
+" ",\r
+" ............ ",\r
+" .XXXXXXXXXXo ",\r
+" .X o ",\r
+" .X o ",\r
+" .X o ",\r
+" .X o ",\r
+" .X o ",\r
+" .X o ",\r
+" .X o ",\r
+" .X o ",\r
+" .X o ",\r
+" .ooooooooooo ",\r
+" ",\r
+" "};\r
--- /dev/null
+/* XPM */\r
+static char * unchecked_dis_xpm[] = {\r
+"16 16 4 1",\r
+" c None",\r
+". c #808080",\r
+"X c Black",\r
+"o c #c0c0c0",\r
+" ",\r
+" ",\r
+" ............ ",\r
+" .XXXXXXXXXXo ",\r
+" .Xoooooooooo ",\r
+" .Xoooooooooo ",\r
+" .Xoooooooooo ",\r
+" .Xoooooooooo ",\r
+" .Xoooooooooo ",\r
+" .Xoooooooooo ",\r
+" .Xoooooooooo ",\r
+" .Xoooooooooo ",\r
+" .Xoooooooooo ",\r
+" .ooooooooooo ",\r
+" ",\r
+" "};\r
--- /dev/null
+/* XPM */
+static char *uncheckedfolder_xpm[] = {
+"16 16 6 1",
+" c None",
+". c #808080",
+"X c #FFFF00",
+"o c #C0C0C0",
+"O c #FFFFFF",
+"+ c #000000",
+" ",
+" ..... ",
+" .XoXoX. ",
+" .XoXoXoX...... ",
+" .OOOOOOOOOOOO.+",
+" .OXoXoXoXoXoX.+",
+" .OoX++oX++oXo.+",
+" .OXoX++++oXoX.+",
+" .OoXoX++oXoXo.+",
+" .OXoX++++oXoX.+",
+" .OoX++oX++oXo.+",
+" .OXoXoXoXoXoX.+",
+" ..............+",
+" ++++++++++++++",
+" ",
+" "};
--- /dev/null
+/* XPM */
+static char *uncheckedfolder_dis_xpm[] = {
+"16 16 4 1",
+" c None",
+". c #808080",
+"X c #C0C0C0",
+"o c #000000",
+" ",
+" ..... ",
+" .XXXXX. ",
+" .XXXXXXX...... ",
+" .XXXXXXXXXXXX.o",
+" .XXXXXXXXXXXX.o",
+" .XXX..XX..XXX.o",
+" .XXXX....XXXX.o",
+" .XXXXX..XXXXX.o",
+" .XXXX....XXXX.o",
+" .XXX..XX..XXX.o",
+" .XXXXXXXXXXXX.o",
+" ..............o",
+" oooooooooooooo",
+" ",
+" "};
--- /dev/null
+/* XPM */
+static char *undo_xpm[] = {
+/* width height num_colors chars_per_pixel */
+" 16 15 3 1",
+/* colors */
+". c #000080",
+"# c #c0c0c0",
+"a c #808080",
+/* pixels */
+"################",
+"################",
+"################",
+"################",
+"########....a###",
+"##.###..####.a##",
+"##..#.#######.##",
+"##...########.##",
+"##....#######.##",
+"##.....#####.a##",
+"###########a.###",
+"################",
+"################",
+"################",
+"################"
+};
--- /dev/null
+/* XPM */
+static char *wxconfigtool_xpm[] = {
+"32 32 6 1",
+" c None",
+". c #000000",
+"X c #000084",
+"o c #FFFFFF",
+"O c #FFFF00",
+"+ c #FF0000",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .XooXXXXXXXXX. ",
+" .XooXXXXXXXXX. ",
+" .XooXXXXXXXXX. ",
+" .XooXXXXXX..............",
+" .XooXXXXXX.OOOOOOOOOOOO.",
+".........XooXXXXXX.OOOOOOOOOOOO.",
+".+++++++.XooXXXXXX.OooOOOOOOOOO.",
+".+++++++.XooXXXXXX.OooOOOOOOOOO.",
+".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
+".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
+".+oo++++...........OooOOOOOOOOO.",
+".+oo+++++++++. .OooOOOOOOOOO.",
+".+oo+++++++++. .OooOOOOOOOOO.",
+".+oo+++++++++. .OooOOOOOOOOO.",
+".+oo+++++++++. .OOOOOOOOOOOO.",
+".+oo+++++++++. .OOOOOOOOOOOO.",
+".++++++++++++. ..............",
+".++++++++++++. ",
+".............. ",
+" ",
+" ",
+" ",
+" ",
+" "};
--- /dev/null
+/* XPM */
+static char *wxconfigtool16x16_xpm[] = {
+"16 16 6 1",
+" c None",
+". c #000000",
+"X c #000084",
+"o c #FFFFFF",
+"O c #FFFF00",
+"+ c #FF0000",
+" ",
+" ",
+" ",
+" ....... ",
+" .XXXXX. ",
+" .oXXXX. ",
+" .oXXX.......",
+".....oXXX.OOOOO.",
+".+++.XXXX.oOOOO.",
+".o++......oOOOO.",
+".o++++. .oOOOO.",
+".o++++. .OOOOO.",
+".+++++. .......",
+"....... ",
+" ",
+" "};
--- /dev/null
+/* XPM */
+static char *wxconfigtool32x32_xpm[] = {
+"32 32 6 1",
+" c None",
+". c #000000",
+"X c #000084",
+"o c #FFFFFF",
+"O c #FFFF00",
+"+ c #FF0000",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .XooXXXXXXXXX. ",
+" .XooXXXXXXXXX. ",
+" .XooXXXXXXXXX. ",
+" .XooXXXXXX..............",
+" .XooXXXXXX.OOOOOOOOOOOO.",
+".........XooXXXXXX.OOOOOOOOOOOO.",
+".+++++++.XooXXXXXX.OooOOOOOOOOO.",
+".+++++++.XooXXXXXX.OooOOOOOOOOO.",
+".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
+".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
+".+oo++++...........OooOOOOOOOOO.",
+".+oo+++++++++. .OooOOOOOOOOO.",
+".+oo+++++++++. .OooOOOOOOOOO.",
+".+oo+++++++++. .OooOOOOOOOOO.",
+".+oo+++++++++. .OOOOOOOOOOOO.",
+".+oo+++++++++. .OOOOOOOOOOOO.",
+".++++++++++++. ..............",
+".++++++++++++. ",
+".............. ",
+" ",
+" ",
+" ",
+" ",
+" "};
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: configitem.cpp
+// Purpose: wxWindows Configuration Tool config item class
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-03
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "configitem.h"
+#endif
+
+// Includes other headers for precompiled compilation
+#include "wx/wx.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include "wx/tokenzr.h"
+
+#include "configitem.h"
+#include "configtree.h"
+#include "configtooldoc.h"
+#include "configtoolview.h"
+#include "wxconfigtool.h"
+#include "mainframe.h"
+
+IMPLEMENT_CLASS(ctConfigItem, wxObject)
+
+ctConfigItem::ctConfigItem()
+{
+ m_modified = FALSE;
+ m_type = ctTypeBoolCheck;
+ m_treeItemId = wxTreeItemId();
+ m_enabled = TRUE;
+ m_parent = NULL;
+ m_active = TRUE;
+}
+
+ctConfigItem::ctConfigItem(ctConfigItem* parent, ctConfigType type, const wxString& name)
+{
+ m_modified = FALSE;
+ m_type = type;
+ m_treeItemId = wxTreeItemId();
+ m_enabled = FALSE;
+ m_active = TRUE;
+ SetName(name);
+ m_parent = parent;
+ if (parent)
+ parent->AddChild(this);
+}
+
+ctConfigItem::~ctConfigItem()
+{
+ ctConfigTreeCtrl* treeCtrl = wxGetApp().GetMainFrame()->GetConfigTreeCtrl();
+ if (m_treeItemId.IsOk() && treeCtrl)
+ {
+ ctTreeItemData* data = (ctTreeItemData*) treeCtrl->GetItemData(m_treeItemId);
+ if (data)
+ data->SetConfigItem(NULL);
+ }
+ if (GetParent())
+ GetParent()->RemoveChild(this);
+ else
+ {
+ if (wxGetApp().GetMainFrame()->GetDocument() &&
+ wxGetApp().GetMainFrame()->GetDocument()->GetTopItem() == this)
+ wxGetApp().GetMainFrame()->GetDocument()->SetTopItem(NULL);
+ }
+
+ Clear();
+}
+
+/// Can we edit this property?
+bool ctConfigItem::CanEditProperty(const wxString& propName) const
+{
+ ctProperty* prop = m_properties.FindProperty(propName);
+ if (prop)
+ return !prop->GetReadOnly();
+ else
+ return FALSE;
+}
+
+/// Assignment operator.
+void ctConfigItem::operator= (const ctConfigItem& item)
+{
+ m_properties = item.m_properties;
+ m_modified = item.m_modified;
+ m_defaultProperty = item.m_defaultProperty;
+ m_type = item.m_type;
+ m_enabled = item.m_enabled;
+ m_active = item.m_active;
+}
+
+/// Sets the name property.
+void ctConfigItem::SetName(const wxString& name )
+{
+ m_properties.SetProperty(wxT("name"), name);
+}
+
+/// Clear children
+void ctConfigItem::Clear()
+{
+ wxNode* node = m_children.GetFirst();
+ while (node)
+ {
+ wxNode* next = node->GetNext();
+ ctConfigItem* child = (ctConfigItem*) node->GetData();
+
+ // This should delete 'node' too, assuming
+ // child's m_parent points to 'this'. If not,
+ // it'll be cleaned up by m_children.Clear().
+ delete child;
+
+ node = next;
+ }
+ m_children.Clear();
+}
+
+// Get the nth child
+ctConfigItem* ctConfigItem::GetChild(int n) const
+{
+ wxASSERT ( n < GetChildCount() && n > -1 );
+
+ if ( n < GetChildCount() && n > -1 )
+ {
+ ctConfigItem* child = wxDynamicCast(m_children.Nth(n)->Data(), ctConfigItem);
+ return child;
+ }
+ else
+ return NULL;
+}
+
+// Get the child count
+int ctConfigItem::GetChildCount() const
+{
+ return m_children.GetCount();
+}
+
+/// Add a child
+void ctConfigItem::AddChild(ctConfigItem* item)
+{
+ m_children.Append(item);
+ item->SetParent(this);
+}
+
+/// Remove (but don't delete) a child
+void ctConfigItem::RemoveChild(ctConfigItem* item)
+{
+ m_children.DeleteObject(item);
+ item->SetParent(NULL);
+}
+
+/// Initialise standard properties
+void ctConfigItem::InitProperties()
+{
+ ctProperty* prop = m_properties.FindProperty(wxT("name"));
+ if (!prop)
+ {
+ prop = new ctProperty;
+ m_properties.AddProperty(prop);
+ }
+ prop->SetDescription(_("<B>Name</B><P> The name of the configuration setting."));
+ prop->SetReadOnly(TRUE);
+
+ m_properties.AddProperty(
+ new ctProperty(
+ wxT("<B>Description</B><P> The setting description."),
+ wxVariant(wxT(""), wxT("description")),
+ wxT("multiline")));
+
+ m_properties.AddProperty(
+ new ctProperty(
+ wxT("<B>Default-state</B><P> The default state."),
+ wxVariant((bool) TRUE, wxT("default-state")),
+ wxT("bool")));
+
+ if (GetType() == ctTypeString)
+ {
+ m_properties.AddProperty(
+ new ctProperty(
+ wxT("<B>Default-value</B><P> The default value."),
+ wxVariant((bool) TRUE, wxT("default-value")),
+ wxT("")));
+ }
+ else if (GetType() == ctTypeInteger)
+ {
+ m_properties.AddProperty(
+ new ctProperty(
+ wxT("<B>Default-value</B><P> The default value."),
+ wxVariant((long) 0, wxT("default-value")),
+ wxT("")));
+ }
+
+ m_properties.AddProperty(
+ new ctProperty(
+ wxT("<B>Requires</B><P> When any of the given settings are 0, this setting <I>must</I> be 0. Taking wxUSE_ZIPSTREAM as an example:<P> If wxUSE_STREAMS is 0, then wxUSE_ZIPSTREAM must be 0.<BR>If wxUSE_STREAMS is 1, then wxUSE_ZIPSTREAM may be 0 or 1."),
+ wxVariant(wxT(""), wxT("requires")),
+ wxT("configitems")));
+
+ m_properties.AddProperty(
+ new ctProperty(
+ wxT("<B>Precludes</B><P> When any of these settings are 1, this setting <I>must</I> be 0. Taking wxUSE_ODBC as an example:<P> If wxUSE_UNICODE is 1, then wxUSE_ODBC must be 0.<BR>If wxUSE_UNICODE is 0, then wxUSE_ODBC may be 0 or 1."),
+ wxVariant(wxT(""), wxT("precludes")),
+ wxT("configitems")));
+
+ m_properties.AddProperty(
+ new ctProperty(
+ wxT("<B>Enabled-if</B><P> When any of these settings are 1, this setting <I>must</I> be 1."),
+ wxVariant(wxT(""), wxT("enabled-if")),
+ wxT("configitems")));
+
+ m_properties.AddProperty(
+ new ctProperty(
+ wxT("<B>Enabled-if-not</B><P> When any of these settings are 0, this setting <I>must</I> be 1. Taking wxUSE_TOOLBAR_SIMPLE as an example:<P>If wxUSE_TOOLBAR_NATIVE is 0, wxUSE_TOOLBAR_SIMPLE must be 1.<BR>If wxUSE_TOOLBAR_NATIVE is 1, wxUSE_TOOLBAR_SIMPLE may be 0 or 1."),
+ wxVariant(wxT(""), wxT("enabled-if-not")),
+ wxT("configitems")));
+
+ m_properties.AddProperty(
+ new ctProperty(
+ wxT("<B>Exclusivity</B><P> The settings that are mutually exclusive with this one."),
+ wxVariant(wxT(""), wxT("exclusivity")),
+ wxT("configitems")));
+
+ m_properties.AddProperty(
+ new ctProperty(
+ wxT("<B>Context</B><P> A list of symbols (config settings), at least one of which must be enabled for this item to participate in dependency rules.<P>\nIf empty, this item will always be used in dependency rules.<P>\nMostly this will be used to specify the applicable platforms, but it can contain other symbols, for example compilers."),
+ wxVariant(wxT(""), wxT("context")),
+ wxT("configitems")));
+
+ m_properties.AddProperty(
+ new ctProperty(
+ wxT("<B>Configure-command</B><P> Configure command to generate if this is on."),
+ wxVariant(wxT(""), wxT("configure-command")),
+ wxT("multiline")));
+
+ m_properties.AddProperty(
+ new ctProperty(
+ wxT("<B>Help-topic</B><P> The help topic in the wxWindows manual for this component or setting."),
+ wxVariant(wxT(""), wxT("help-topic")),
+ wxT("multiline")));
+
+ m_properties.AddProperty(
+ new ctProperty(
+ wxT("<B>Notes</B><P> User notes."),
+ wxVariant(wxT(""), wxT("notes")),
+ wxT("multiline")));
+
+ m_defaultProperty = wxT("description");
+}
+
+/// Do additional actions to apply the property to the internal
+/// representation.
+void ctConfigItem::ApplyProperty(ctProperty* prop, const wxVariant& oldValue)
+{
+ ctConfigToolDoc* doc = GetDocument();
+ bool oldModified = doc->IsModified();
+ doc->Modify(TRUE);
+
+ wxString name = prop->GetName();
+ if (name == wxT("requires") ||
+ name == wxT("precludes") ||
+ name == wxT("enabled-if") ||
+ name == wxT("enabled-if-not") ||
+ name == wxT("context"))
+ {
+ doc->RefreshDependencies();
+ }
+ if (doc && doc->GetFirstView() && oldModified != doc->IsModified())
+ ((ctConfigToolView*)doc->GetFirstView())->OnChangeFilename();
+}
+
+/// Get the associated document (currently, assumes
+/// there's only ever one document active)
+ctConfigToolDoc* ctConfigItem::GetDocument()
+{
+ ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
+ return doc;
+}
+
+/// Convert string containing config item names to
+/// an array of config item names
+void ctConfigItem::StringToArray(const wxString& items, wxArrayString& itemsArray)
+{
+ wxStringTokenizer tokenizer(items, wxT(","));
+ while (tokenizer.HasMoreTokens())
+ {
+ wxString token = tokenizer.GetNextToken();
+ itemsArray.Add(token);
+ }
+}
+
+/// Convert array containing config item names to
+/// a string
+void ctConfigItem::ArrayToString(const wxArrayString& itemsArray, wxString& items)
+{
+ items = wxEmptyString;
+ size_t i;
+ for (i = 0; i < itemsArray.GetCount(); i++)
+ {
+ items += itemsArray[i];
+ if (i < (itemsArray.GetCount() - 1))
+ items += wxT(",");
+ }
+}
+
+/// Populate a list of items found in the string.
+void ctConfigItem::StringToItems(ctConfigItem* topItem, const wxString& items, wxList& list)
+{
+ wxArrayString strArray;
+ StringToArray(items, strArray);
+ size_t i;
+ for (i = 0; i < strArray.GetCount(); i++)
+ {
+ wxString str(strArray[i]);
+ ctConfigItem* item = topItem->FindItem(str);
+ if (item)
+ list.Append(item);
+ }
+}
+
+/// Find an item in this hierarchy
+ctConfigItem* ctConfigItem::FindItem(const wxString& name)
+{
+ if (GetName() == name)
+ return this;
+
+ for ( wxNode* node = GetChildren().GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* child = (ctConfigItem*) node->GetData();
+ ctConfigItem* found = child->FindItem(name);
+ if (found)
+ return found;
+ }
+ return NULL;
+}
+
+/// Find the next sibling
+ctConfigItem* ctConfigItem::FindNextSibling()
+{
+ if (!GetParent())
+ return NULL;
+ wxNode* node = GetParent()->GetChildren().Member(this);
+ if (node && node->GetNext())
+ {
+ return (ctConfigItem*) node->GetNext()->GetData();
+ }
+ return NULL;
+}
+
+/// Find the previous sibling
+ctConfigItem* ctConfigItem::FindPreviousSibling()
+{
+ if (!GetParent())
+ return NULL;
+ wxNode* node = GetParent()->GetChildren().Member(this);
+ if (node && node->GetPrevious())
+ {
+ return (ctConfigItem*) node->GetPrevious()->GetData();
+ }
+ return NULL;
+}
+
+/// Sync appearance
+void ctConfigItem::Sync()
+{
+ if (GetDocument())
+ {
+ ctConfigToolView* view = (ctConfigToolView*) GetDocument()->GetFirstView();
+ if (view)
+ {
+ view->SyncItem(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), this);
+ }
+ }
+}
+
+/// Create a clone of this and children
+ctConfigItem* ctConfigItem::DeepClone()
+{
+ ctConfigItem* newItem = Clone();
+
+ for ( wxNode* node = GetChildren().GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* child = (ctConfigItem*) node->GetData();
+ ctConfigItem* newChild = child->DeepClone();
+ newItem->AddChild(newChild);
+ }
+ return newItem;
+}
+
+/// Detach: remove from parent, and remove tree items
+void ctConfigItem::Detach()
+{
+ if (GetParent())
+ GetParent()->RemoveChild(this);
+ else
+ GetDocument()->SetTopItem(NULL);
+ SetParent(NULL);
+
+ wxTreeItemId treeItem = GetTreeItemId();
+
+ DetachFromTree();
+
+ // Will delete the branch, but not the config items.
+ wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->Delete(treeItem);
+}
+
+/// Hide from tree: make sure tree deletions won't delete
+/// the config items
+void ctConfigItem::DetachFromTree()
+{
+ wxTreeItemId item = GetTreeItemId();
+
+ ctTreeItemData* data = (ctTreeItemData*) wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetItemData(item);
+ data->SetConfigItem(NULL);
+ m_treeItemId = wxTreeItemId();
+
+ for ( wxNode* node = GetChildren().GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* child = (ctConfigItem*) node->GetData();
+ child->DetachFromTree();
+ }
+}
+
+/// Attach: insert after the given position
+void ctConfigItem::Attach(ctConfigItem* parent, ctConfigItem* insertBefore)
+{
+ if (parent)
+ {
+ SetParent(parent);
+ wxNode* node = NULL;
+ if (insertBefore)
+ node = parent->GetChildren().Member(insertBefore);
+
+ if (node)
+ parent->GetChildren().Insert(node, this);
+ else
+ parent->GetChildren().Append(this);
+ }
+ else
+ {
+ GetDocument()->SetTopItem(this);
+ }
+}
+
+/// Can have children?
+bool ctConfigItem::CanHaveChildren() const
+{
+ return (GetType() == ctTypeGroup ||
+ GetType() == ctTypeCheckGroup ||
+ GetType() == ctTypeRadioGroup);
+}
+
+// An item is in the active context if:
+// The context field is empty; or
+// The context field contains a symbol that is currently enabled.
+bool ctConfigItem::IsInActiveContext()
+{
+ wxString context = GetPropertyString(wxT("context"));
+ if (context.IsEmpty())
+ return TRUE;
+
+ wxList contextItems;
+ StringToItems(GetDocument()->GetTopItem(), context, contextItems);
+
+ for ( wxNode* node = contextItems.GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
+ if (otherItem->IsEnabled())
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/// Evaluate the requires properties:
+/// if any of the 'requires' items are disabled,
+/// then this one is disabled (and inactive).
+void ctConfigItem::EvaluateDependencies()
+{
+ wxList items;
+ wxString requires = GetPropertyString(wxT("requires"));
+ wxString precludes = GetPropertyString(wxT("precludes"));
+ wxString enabledIf = GetPropertyString(wxT("enabled-if"));
+ wxString enabledIfNot = GetPropertyString(wxT("enabled-if-not"));
+
+ bool active = TRUE;
+ bool enabled = IsEnabled();
+ bool oldEnabled = enabled;
+ bool oldActive = IsActive();
+ bool explicitlyEnabled = FALSE;
+ bool explicitlyDisabled = FALSE;
+ bool inActiveContext = IsInActiveContext();
+
+ // Add the parent to the list of dependencies, if the
+ // parent is a check or radio group.
+ ctConfigItem* parent = GetParent();
+ if (parent &&
+ (parent->GetType() == ctTypeCheckGroup ||
+ parent->GetType() == ctTypeRadioGroup))
+ items.Append(parent);
+
+ wxList tempItems;
+ StringToItems(GetDocument()->GetTopItem(), requires, tempItems);
+
+ wxNode* node;
+ for ( node = tempItems.GetFirst(); node; node = node->GetNext() )
+ {
+ // Only consider the dependency if both items are in
+ // an active context.
+ // Each is in the active context if:
+ // The context field is empty; or
+ // The context field contains a symbol that is currently enabled.
+ ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
+ if (inActiveContext && otherItem->IsInActiveContext())
+ items.Append(otherItem);
+ }
+
+ {
+ int enabledCount = 0;
+ for ( node = items.GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
+
+ if (otherItem->IsEnabled())
+ {
+ enabledCount ++;
+ }
+ }
+ if (items.GetCount() > 0 && enabledCount == 0)
+ {
+ // None of the items were enabled
+ enabled = FALSE;
+ active = FALSE;
+ explicitlyDisabled = TRUE;
+ }
+ }
+
+ items.Clear();
+ if (!enabledIfNot.IsEmpty())
+ {
+ StringToItems(GetDocument()->GetTopItem(), enabledIfNot, items);
+ int disabledCount = 0;
+ int inContextCount = 0;
+
+ for ( wxNode* node = items.GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
+
+ if (inActiveContext && otherItem->IsInActiveContext())
+ {
+ // Make this enabled and inactive, _unless_ it's
+ // already been explicitly disabled in the previous
+ // requires evaluation (it really _has_ to be off)
+ if (!otherItem->IsEnabled())
+ {
+ disabledCount ++;
+ }
+ inContextCount ++;
+ }
+ }
+ // Enable if there were no related items that were enabled
+ if (inContextCount > 0 && (disabledCount == inContextCount) && !explicitlyDisabled)
+ {
+ explicitlyEnabled = TRUE;
+ enabled = TRUE;
+ active = FALSE;
+ }
+ }
+
+ items.Clear();
+ if (!enabledIf.IsEmpty())
+ {
+ StringToItems(GetDocument()->GetTopItem(), enabledIf, items);
+ int enabledCount = 0;
+ int inContextCount = 0;
+
+ for ( wxNode* node = items.GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
+
+ if (inActiveContext && otherItem->IsInActiveContext())
+ {
+ // Make this enabled and inactive, _unless_ it's
+ // already been explicitly disabled in the previous
+ // requires evaluation (it really _has_ to be off)
+ if (otherItem->IsEnabled())
+ {
+ enabledCount ++;
+ }
+ inContextCount ++;
+ }
+ }
+ // Enable if there were no related items that were disabled
+ if (inContextCount > 0 && (enabledCount > 0) && !explicitlyDisabled)
+ {
+ explicitlyEnabled = TRUE;
+ enabled = TRUE;
+ active = FALSE;
+ }
+ }
+
+ items.Clear();
+ if (!precludes.IsEmpty())
+ {
+ StringToItems(GetDocument()->GetTopItem(), precludes, items);
+ int enabledCount = 0;
+ int inContextCount = 0;
+
+ for ( wxNode* node = items.GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
+
+ if (inActiveContext && otherItem->IsInActiveContext())
+ {
+ // Make this enabled and inactive, _unless_ it's
+ // already been explicitly disabled in the previous
+ // requires evaluation (it really _has_ to be off)
+ if (otherItem->IsEnabled())
+ {
+ enabledCount ++;
+ }
+ }
+ }
+ // Disable if there were no related items that were disabled
+ if (inContextCount > 0 && (enabledCount == inContextCount) && !explicitlyEnabled)
+ {
+ enabled = FALSE;
+ active = FALSE;
+ }
+ }
+
+ // Finally check a sort of dependency: whether our
+ // context is active. If not, make this inactive.
+ if (!IsInActiveContext())
+ active = FALSE;
+
+ SetActive(active);
+
+ // If going active, set enabled state to the default state
+ if (active &&
+ oldActive != active &&
+ (GetType() == ctTypeBoolCheck || GetType() == ctTypeCheckGroup) &&
+ m_properties.FindProperty(wxT("default-state")))
+ {
+ bool defaultState = m_properties.FindProperty(wxT("default-state"))->GetVariant().GetBool();
+ enabled = defaultState;
+ }
+ Enable(enabled);
+
+ // Deal with setting a radio button
+ if (enabled && enabled != oldEnabled &&
+ (GetType() == ctTypeBoolRadio || GetType() == ctTypeRadioGroup))
+ {
+ wxList considered;
+ PropagateRadioButton(considered);
+ }
+}
+
+/// Get description, which may be dynamically
+/// generated depending on the property.
+wxString ctConfigItem::GetDescription(ctProperty* property)
+{
+ if (property->GetName() == wxT("description"))
+ {
+ wxString value(property->GetValue());
+ if (value.IsEmpty())
+ return wxT("Double-click on <B>description</B> to write a brief explanation of the setting.<P>");
+ else
+ return value;
+ }
+ else if (property->GetName() == wxT("notes"))
+ {
+ wxString value(property->GetValue());
+ if (value.IsEmpty())
+ return wxT("Double-click on <B>notes</B> to write notes about this setting.<P>");
+ else
+ return value;
+ }
+ return property->GetDescription();
+}
+
+/// Get the title for the property editor
+wxString ctConfigItem::GetTitle()
+{
+ wxString title(GetName());
+ if (GetType() == ctTypeCheckGroup ||
+ GetType() == ctTypeRadioGroup ||
+ GetType() == ctTypeBoolCheck ||
+ GetType() == ctTypeBoolRadio)
+ {
+ if (IsEnabled())
+ title = title + _T(" - enabled");
+ else
+ title = title + _T(" - disabled");
+ }
+ return title;
+}
+
+/// Propagate a change in enabled/disabled status
+void ctConfigItem::PropagateChange(wxList& considered)
+{
+ if (GetType() == ctTypeCheckGroup ||
+ GetType() == ctTypeRadioGroup ||
+ GetType() == ctTypeBoolCheck ||
+ GetType() == ctTypeBoolRadio)
+ {
+ // TODO: what about string, integer? Can they have
+ // dependencies?
+
+ for ( wxNode* node = GetDependents().GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* child = (ctConfigItem*) node->GetData();
+
+ // Avoid loops
+ if (!considered.Member(child))
+ {
+ considered.Append(child);
+
+ child->EvaluateDependencies();
+ child->Sync();
+
+ child->PropagateChange(considered);
+ }
+ }
+ }
+}
+
+/// Process radio button selection
+void ctConfigItem::PropagateRadioButton(wxList& considered)
+{
+ if ((GetType() == ctTypeBoolRadio || GetType() == ctTypeRadioGroup) && IsEnabled())
+ {
+ wxString mutuallyExclusive(GetPropertyString(wxT("exclusivity")));
+
+ wxList list;
+ StringToItems(GetDocument()->GetTopItem(), mutuallyExclusive, list);
+
+ for ( wxNode* node = list.GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* child = (ctConfigItem*) node->GetData();
+ if (child->IsEnabled() && child != this)
+ {
+ child->Enable(FALSE);
+ child->Sync();
+
+ if (!considered.Member(child))
+ child->PropagateChange(considered);
+ }
+ }
+ }
+}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: configitem.h
+// Purpose: wxWindows Configuration Tool config item class
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-03
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _CT_CONFIGITEM_H_
+#define _CT_CONFIGITEM_H_
+
+#ifdef __GNUG__
+#pragma interface "configitem.cpp"
+#endif
+
+#include "wx/wx.h"
+#include "wx/treectrl.h"
+
+#include "property.h"
+
+class ctConfigToolDoc;
+
+/*!
+ * The type of config item
+ */
+
+enum ctConfigType
+{
+ ctTypeUnknown,
+ ctTypeGroup, // A group with no checkbox
+ ctTypeCheckGroup, // A group that can be switched on/off (check)
+ ctTypeRadioGroup, // A group that can be switched on/off (radio)
+ ctTypeString, // An option with a string value
+ ctTypeInteger, // An option with an integer value
+ ctTypeBoolCheck, // An on/off option
+ ctTypeBoolRadio // An on/off mutually exclusive option
+};
+
+/*!
+ * ctConfigItem represents a configuration setting.
+ * Each setting has a number of properties, some of
+ * which may be specific to a particular kind of
+ * setting, so we make it quite generic and extensible
+ * by using a property list.
+ */
+
+class ctConfigItem: public wxObject
+{
+public:
+ /// Ctor and dtor
+ ctConfigItem(ctConfigItem* parent, ctConfigType type, const wxString& name);
+ ctConfigItem();
+ ~ctConfigItem();
+
+ /// Copy constructor.
+ ctConfigItem(const ctConfigItem& item)
+ {
+ (*this) = item;
+ }
+
+/// Operations
+
+ /// Assignment operator.
+ void operator= (const ctConfigItem& item);
+
+ /// Create a clone
+ ctConfigItem* Clone()
+ {
+ ctConfigItem* item = new ctConfigItem;
+ *item = *this;
+ return item;
+ }
+
+ /// Create a clone of this and children
+ ctConfigItem* DeepClone();
+
+ /// Do additional actions to apply the property to the internal
+ /// representation.
+ void ApplyProperty(ctProperty* prop, const wxVariant& oldValue);
+
+ /// Clear children
+ void Clear();
+
+ /// Add a child
+ void AddChild(ctConfigItem* item);
+
+ /// Remove (but don't delete) a child
+ void RemoveChild(ctConfigItem* item);
+
+ /// Initialise standard properties
+ void InitProperties();
+
+ /// Convert string containing config item names to
+ /// an array of config item names
+ static void StringToArray(const wxString& items, wxArrayString& itemsArray);
+
+ /// Convert array containing config item names to
+ /// a string
+ static void ArrayToString(const wxArrayString& itemsArray, wxString& items);
+
+ /// Populate a list of items found in the string.
+ static void StringToItems(ctConfigItem* topItem, const wxString& items, wxList& list);
+
+ /// Find an item in this hierarchy
+ ctConfigItem* FindItem(const wxString& name);
+
+ /// Find the next sibling
+ ctConfigItem* FindNextSibling();
+
+ /// Find the previous sibling
+ ctConfigItem* FindPreviousSibling();
+
+ /// Sync appearance
+ void Sync();
+
+ /// Detach: remove from parent, and remove tree items
+ void Detach();
+
+ /// Attach: insert before the given position
+ void Attach(ctConfigItem* parent, ctConfigItem* insertbefore);
+
+ /// Hide from tree: make sure tree deletions won't delete
+ /// the config items
+ void DetachFromTree();
+
+ /// Evaluate the depends-on properties:
+ /// if any of the depends-on items are disabled,
+ /// then this one is disabled (and inactive).
+ void EvaluateDependencies();
+
+ /// Propagate a change in enabled/disabled status
+ void PropagateChange(wxList& considered);
+
+ /// Process radio button selection
+ void PropagateRadioButton(wxList& considered);
+
+ // An item is in the active context if:
+ // The context field is empty; or
+ // The context field contains a symbol that is currently enabled.
+ bool IsInActiveContext();
+
+/// Accessors
+
+ /// Returns the name property.
+ wxString GetName() const { return GetPropertyString(wxT("name")); }
+
+ /// Sets the name property.
+ void SetName(const wxString& name ) ;
+
+ /// Returns the value property.
+ wxVariant GetValue() const { return m_properties.FindPropertyValue(wxT("value")); }
+
+ /// Sets the value property.
+ void SetValue(const wxVariant& value ) ;
+
+ /// Returns the string for the given property.
+ wxString GetPropertyString(const wxString& propName) const { return m_properties.FindPropertyValueString(propName); }
+
+ /// Sets the string for the given property.
+ void SetPropertyString(const wxString& propName, const wxString& value) { m_properties.SetProperty(propName, value); }
+
+ /// Can we edit this property?
+ bool CanEditProperty(const wxString& propName) const ;
+
+ /// Returns the list of properties for
+ /// this item.
+ ctProperties& GetProperties() { return m_properties; }
+
+ /// Set the default property.
+ void SetDefaultProperty(const wxString& defaultProp) { m_defaultProperty = defaultProp; }
+
+ /// Get the default property.
+ wxString GetDefaultProperty() const { return m_defaultProperty; }
+
+ /// Is this item modified?
+ bool IsModified() const { return m_modified; }
+
+ /// Mark this as modified.
+ void Modify(bool modified = TRUE) { m_modified = modified; }
+
+ /// Is this item enabled? (checked/unchecked)
+ bool IsEnabled() const { return m_enabled; }
+
+ /// Enable or disable (check/uncheck)
+ void Enable(bool enable = TRUE) { m_enabled = enable; }
+
+ /// Is this item active? (sensitive to user input)
+ bool IsActive() const { return m_active; }
+
+ /// Make this (in)active
+ void SetActive(bool active = TRUE) { m_active = active; }
+
+ /// Set the type
+ void SetType(ctConfigType type) { m_type = type; }
+
+ // Get the type
+ ctConfigType GetType() const { return m_type; }
+
+ /// Set the tree item id
+ void SetTreeItem(wxTreeItemId id) { m_treeItemId = id; }
+
+ // Get the type
+ wxTreeItemId GetTreeItemId() const { return m_treeItemId ; }
+
+ /// Get the list of children
+ wxList& GetChildren() { return m_children; }
+
+ /// Get the nth child
+ ctConfigItem* GetChild(int n) const;
+
+ /// Get the child count
+ int GetChildCount() const;
+
+ /// Get the list of dependents
+ wxList& GetDependents() { return m_dependents; }
+
+ /// Get the parent
+ ctConfigItem* GetParent() const { return m_parent; }
+
+ /// Set the parent
+ void SetParent(ctConfigItem* parent) { m_parent = parent; }
+
+ /// Get the associated document (currently, assumes
+ /// there's only ever one document active)
+ ctConfigToolDoc* GetDocument() ;
+
+ /// Can have children?
+ bool CanHaveChildren() const;
+
+ /// Get description, which may be dynamically
+ /// generated depending on the property.
+ wxString GetDescription(ctProperty* property);
+
+ /// Get the title for the property editor
+ wxString GetTitle();
+
+protected:
+
+ /// The properties for this item.
+ ctProperties m_properties;
+
+ /// The default property, from the point of
+ /// of double-clicking the config item.
+ wxString m_defaultProperty;
+
+ /// Whether modified
+ bool m_modified;
+
+ /// The type of the config item
+ ctConfigType m_type;
+
+ /// The corresponding tree item
+ wxTreeItemId m_treeItemId;
+
+ /// Is this option enabled? (checked/unchecked)
+ bool m_enabled;
+
+ /// Is this option active? (i.e. sensitive to user input)
+ bool m_active;
+
+ /// The list of children.
+ wxList m_children;
+
+ /// The list of items that are dependent upon
+ // this one. This is refreshed when the configuration
+ // structurally changes, and is not saved to file.
+ wxList m_dependents;
+
+ /// The parent config item
+ ctConfigItem* m_parent;
+
+DECLARE_CLASS(ctConfigItem)
+};
+
+#endif
+// _CT_CONFIGITEM_H_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: configitemselector.cpp
+// Purpose: Selector for one or more config items
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation configitemselector.cpp
+#endif
+
+#include <wx/wx.h>
+#include <wx/cshelp.h>
+#include <wx/statline.h>
+#include <wx/splitter.h>
+#include <wx/scrolwin.h>
+#include <wx/spinctrl.h>
+#include <wx/spinbutt.h>
+#include <wx/valgen.h>
+
+#include "configitemselector.h"
+#include "configtooldoc.h"
+#include "configtoolview.h"
+#include "configitem.h"
+#include "mainframe.h"
+#include "wxconfigtool.h"
+
+////@begin XPM images
+////@end XPM images
+
+/*!
+ * ctConfigItemsSelector type definition
+ */
+
+IMPLEMENT_CLASS( ctConfigItemsSelector, wxDialog )
+
+/*!
+ * ctConfigItemsSelector event table definition
+ */
+
+BEGIN_EVENT_TABLE( ctConfigItemsSelector, wxDialog )
+
+////@begin ctConfigItemsSelector event table entries
+ EVT_BUTTON( ID_CONFIG_ADD, ctConfigItemsSelector::OnConfigAdd )
+ EVT_UPDATE_UI( ID_CONFIG_ADD, ctConfigItemsSelector::OnUpdateConfigAdd )
+
+ EVT_BUTTON( ID_CONFIG_REMOVE, ctConfigItemsSelector::OnConfigRemove )
+ EVT_UPDATE_UI( ID_CONFIG_REMOVE, ctConfigItemsSelector::OnUpdateConfigRemove )
+
+ EVT_BUTTON( wxID_OK, ctConfigItemsSelector::OnOk )
+
+////@end ctConfigItemsSelector event table entries
+
+END_EVENT_TABLE()
+
+/*!
+ * ctConfigItemsSelector constructor
+ */
+
+ctConfigItemsSelector::ctConfigItemsSelector( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
+{
+ wxDialog::Create( parent, id, caption, pos, size, style );
+
+ CreateControls();
+ InitSourceConfigList();
+}
+
+/*!
+ * Control creation for ctConfigItemsSelector
+ */
+
+void ctConfigItemsSelector::CreateControls()
+{
+////@begin ctConfigItemsSelector content construction
+
+ ctConfigItemsSelector* item1 = this;
+
+ wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
+ item1->SetSizer(item2);
+ item1->SetAutoLayout(TRUE);
+
+ wxBoxSizer* item3 = new wxBoxSizer(wxVERTICAL);
+ item2->Add(item3, 1, wxGROW|wxALL, 5);
+
+ wxStaticText* item4 = new wxStaticText(item1, wxID_STATIC, _("Please edit the list of configuration items by selecting from the\nlist below."), wxDefaultPosition, wxDefaultSize, 0);
+ item3->Add(item4, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
+
+ wxStaticText* item5 = new wxStaticText(item1, wxID_STATIC, _("&Available items:"), wxDefaultPosition, wxDefaultSize, 0);
+ item3->Add(item5, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
+
+ wxString* item6Strings = NULL;
+ wxListBox* item6 = new wxListBox(item1, ID_AVAILABLE_CONFIG_ITEMS, wxDefaultPosition, wxSize(-1, 150), 0, item6Strings, wxLB_SINGLE|wxLB_SORT);
+ item3->Add(item6, 1, wxGROW|wxALL, 5);
+
+ wxStaticText* item7 = new wxStaticText(item1, wxID_STATIC, _("&List of configuration items:"), wxDefaultPosition, wxDefaultSize, 0);
+ item3->Add(item7, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
+
+ wxBoxSizer* item8 = new wxBoxSizer(wxHORIZONTAL);
+ item3->Add(item8, 0, wxGROW, 5);
+
+ wxString* item9Strings = NULL;
+ wxListBox* item9 = new wxListBox(item1, ID_CONFIG_ITEMS, wxDefaultPosition, wxSize(-1, 100), 0, item9Strings, wxLB_SINGLE);
+ item8->Add(item9, 1, wxGROW|wxALL, 5);
+
+ wxBoxSizer* item10 = new wxBoxSizer(wxVERTICAL);
+ item8->Add(item10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxButton* item11 = new wxButton(item1, ID_CONFIG_ADD, _("A&dd"), wxDefaultPosition, wxDefaultSize, 0);
+ item10->Add(item11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
+
+ wxButton* item12 = new wxButton(item1, ID_CONFIG_REMOVE, _("&Remove"), wxDefaultPosition, wxDefaultSize, 0);
+ item10->Add(item12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
+
+ wxBoxSizer* item13 = new wxBoxSizer(wxHORIZONTAL);
+ item3->Add(item13, 0, wxGROW, 5);
+
+ item13->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxButton* item15 = new wxButton(item1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0);
+ item15->SetDefault();
+ item13->Add(item15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxButton* item16 = new wxButton(item1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0);
+ item13->Add(item16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ GetSizer()->Fit(this);
+ GetSizer()->SetSizeHints(this);
+ Centre();
+////@end ctConfigItemsSelector content construction
+}
+
+/*!
+ * Event handler for ID_CONFIG_ADD
+ */
+
+void ctConfigItemsSelector::OnConfigAdd( wxCommandEvent& event )
+{
+ wxListBox* masterList = wxDynamicCast(FindWindow(ID_AVAILABLE_CONFIG_ITEMS), wxListBox);
+ wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
+ if (masterList)
+ {
+ if (masterList->GetSelection() > -1)
+ {
+ wxString str = masterList->GetStringSelection();
+ if (m_configItems.Index(str) == wxNOT_FOUND)
+ {
+ listBox->Append(str);
+ m_configItems.Add(str);
+ }
+ }
+ }
+}
+
+/*!
+ * Event handler for ID_CONFIG_REMOVE
+ */
+
+void ctConfigItemsSelector::OnConfigRemove( wxCommandEvent& event )
+{
+ wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
+ if (listBox)
+ {
+ if (listBox->GetSelection() > -1)
+ {
+ wxString str = listBox->GetStringSelection();
+ listBox->Delete(listBox->GetSelection());
+ m_configItems.Remove(str);
+ }
+ }
+}
+
+/*!
+ * Event handler for wxID_OK
+ */
+
+void ctConfigItemsSelector::OnOk( wxCommandEvent& event )
+{
+ // Replace with custom code
+ event.Skip();
+}
+
+/*!
+ * Should we show tooltips?
+ */
+
+bool ctConfigItemsSelector::ShowToolTips()
+{
+ return TRUE;
+}
+/*!
+ * Update event handler for ID_CONFIG_ADD
+ */
+
+void ctConfigItemsSelector::OnUpdateConfigAdd( wxUpdateUIEvent& event )
+{
+ wxListBox* masterList = wxDynamicCast(FindWindow(ID_AVAILABLE_CONFIG_ITEMS), wxListBox);
+ event.Enable(masterList && masterList->GetSelection() != -1);
+}
+
+/*!
+ * Update event handler for ID_CONFIG_REMOVE
+ */
+
+void ctConfigItemsSelector::OnUpdateConfigRemove( wxUpdateUIEvent& event )
+{
+ wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
+ event.Enable(listBox && listBox->GetSelection() != -1);
+}
+
+/// Initialise the master list
+void ctConfigItemsSelector::InitSourceConfigList(ctConfigItem* item)
+{
+ wxListBox* masterList = wxDynamicCast(FindWindow(ID_AVAILABLE_CONFIG_ITEMS), wxListBox);
+ if (!item)
+ item = wxGetApp().GetMainFrame()->GetDocument()->GetTopItem();
+
+ if (!item)
+ return;
+
+ bool addIt = FALSE;
+
+ if (item->GetType() == ctTypeGroup)
+ addIt = FALSE;
+ else if (item->GetType() == ctTypeCheckGroup)
+ addIt = TRUE;
+ else if (item->GetType() == ctTypeRadioGroup)
+ addIt = TRUE;
+ else if (item->GetType() == ctTypeString)
+ addIt = TRUE;
+ else if (item->GetType() == ctTypeBoolCheck)
+ addIt = TRUE;
+ else if (item->GetType() == ctTypeBoolRadio)
+ addIt = TRUE;
+ else if (item->GetType() == ctTypeInteger)
+ addIt = TRUE;
+ if (addIt)
+ {
+ masterList->Append(item->GetName());
+ }
+
+ wxNode* node = item->GetChildren().GetFirst();
+ while (node)
+ {
+ ctConfigItem* child = (ctConfigItem*) node->GetData();
+ InitSourceConfigList(child);
+
+ node = node->Next();
+ }
+}
+
+/// Set the initial list
+void ctConfigItemsSelector::SetConfigList(const wxArrayString& items)
+{
+ m_configItems = items;
+ wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
+ listBox->Clear();
+
+ size_t i;
+ for (i = 0; i < items.GetCount(); i++)
+ listBox->Append(items[i]);
+}
+
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: configitemselector.h
+// Purpose: Selector for one or more config items
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _CONFIGITEMSELECTOR_H_
+#define _CONFIGITEMSELECTOR_H_
+
+#ifdef __GNUG__
+#pragma interface configitemselector.h
+#endif
+
+/*!
+ * Includes
+ */
+
+////@begin includes
+////@end includes
+
+/*!
+ * Forward declarations
+ */
+
+////@begin forward declarations
+////@end forward declarations
+
+/*!
+ * Control identifiers
+ */
+
+////@begin control identifiers
+#define ID_DIALOG 10000
+#define ID_AVAILABLE_CONFIG_ITEMS 10002
+#define ID_CONFIG_ITEMS 10005
+#define ID_CONFIG_ADD 10006
+#define ID_CONFIG_REMOVE 10007
+////@end control identifiers
+
+class ctConfigItem;
+
+/*!
+ * ctConfigItemsSelector class declaration
+ */
+
+class ctConfigItemsSelector: public wxDialog
+{
+public:
+ /// Constructor
+ ctConfigItemsSelector( wxWindow* parent, wxWindowID id = -1, const wxString& caption = _("Configuration Items Selector"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU );
+
+ /// Creates the controls and sizers
+ void CreateControls();
+
+////@begin ctConfigItemsSelector event handler declarations
+
+ /// Event handler for ID_CONFIG_ADD
+ void OnConfigAdd( wxCommandEvent& event );
+
+ /// Update event handler for ID_CONFIG_ADD
+ void OnUpdateConfigAdd( wxUpdateUIEvent& event );
+
+ /// Event handler for ID_CONFIG_REMOVE
+ void OnConfigRemove( wxCommandEvent& event );
+
+ /// Update event handler for ID_CONFIG_REMOVE
+ void OnUpdateConfigRemove( wxUpdateUIEvent& event );
+
+ /// Event handler for wxID_OK
+ void OnOk( wxCommandEvent& event );
+
+////@end ctConfigItemsSelector event handler declarations
+
+////@begin ctConfigItemsSelector member function declarations
+
+////@end ctConfigItemsSelector member function declarations
+
+ /// Initialise the master list
+ void InitSourceConfigList(ctConfigItem* item = NULL);
+
+ /// Set the initial list
+ void SetConfigList(const wxArrayString& items);
+
+ /// Get the list
+ const wxArrayString& GetConfigList() const { return m_configItems; }
+
+ /// Should we show tooltips?
+ static bool ShowToolTips();
+
+ DECLARE_CLASS( ctConfigItemsSelector )
+ DECLARE_EVENT_TABLE()
+
+protected:
+ wxArrayString m_configItems;
+
+};
+
+#endif
+ // _CONFIGITEMSELECTOR_H_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: configtooldoc.h
+// Purpose: Document class
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "configtooldoc.h"
+#endif
+
+#include "wx/wx.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include "wx/config.h"
+#include "wx/textfile.h"
+#include "wx/process.h"
+#include "wx/mimetype.h"
+#include "wx/process.h"
+#include "wx/wfstream.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include "configtooldoc.h"
+#include "configtoolview.h"
+#include "configtree.h"
+#include "mainframe.h"
+#include "utils.h"
+#include "wxconfigtool.h"
+#include "htmlparser.h"
+
+IMPLEMENT_DYNAMIC_CLASS(ctConfigToolDoc, wxDocument)
+
+// Ctor
+ctConfigToolDoc::ctConfigToolDoc()
+{
+ m_topItem = NULL;
+ m_clipboardItem = NULL;
+}
+
+// Dtor
+ctConfigToolDoc::~ctConfigToolDoc()
+{
+ DeleteItems();
+ ClearClipboard();
+ if (GetCommandProcessor())
+ GetCommandProcessor()->SetEditMenu(NULL);
+}
+
+// Delete all the items not already deleted
+void ctConfigToolDoc::DeleteItems()
+{
+ if (m_topItem)
+ delete m_topItem;
+ m_topItem = NULL;
+}
+
+/// Clears the clipboard item.
+void ctConfigToolDoc::ClearClipboard()
+{
+ if (m_clipboardItem)
+ delete m_clipboardItem;
+ m_clipboardItem = NULL;
+}
+
+/// Sets the clipboard item.
+void ctConfigToolDoc::SetClipboardItem(ctConfigItem* item)
+{
+ if (m_clipboardItem)
+ delete m_clipboardItem;
+ m_clipboardItem = item;
+}
+
+
+// Closes and clears the document
+bool ctConfigToolDoc::OnCloseDocument()
+{
+ if (wxDocument::OnCloseDocument())
+ {
+ ctConfigToolHint hint(NULL, ctClear);
+ UpdateAllViews (NULL, & hint);
+
+ DeleteItems();
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+// Saves the doc
+bool ctConfigToolDoc::Save()
+{
+ bool ret = FALSE;
+
+ if (!IsModified() && m_savedYet) return TRUE;
+ if (m_documentFile == wxT("") || !m_savedYet)
+ ret = SaveAs();
+ else
+ ret = OnSaveDocument(m_documentFile);
+ if ( ret )
+ SetDocumentSaved(TRUE);
+ return ret;
+}
+
+// Create the document
+bool ctConfigToolDoc::OnCreate(const wxString& path, long flags)
+{
+ GetCommandProcessor()->SetEditMenu(wxGetApp().GetMainFrame()->GetEditMenu());
+ GetCommandProcessor()->Initialize();
+ GetCommandProcessor()->ClearCommands();
+
+ // wxGetApp().m_currentDoc = this;
+
+ if (flags & wxDOC_NEW)
+ {
+ ctConfigItem* rootItem = new ctConfigItem(NULL, ctTypeGroup, _T("Configuration"));
+ //rootItem->InitProperties();
+ rootItem->GetProperties().AddProperty(
+ new ctProperty(
+ wxT("The item description."),
+ wxVariant(wxT(""), wxT("description")),
+ wxT("multiline")));
+
+ rootItem->SetPropertyString(_T("description"),
+ _T("<B>This is the top-level configuration item.</B>"));
+
+
+ SetTopItem(rootItem);
+
+ Modify(FALSE);
+ SetDocumentSaved(FALSE);
+
+ wxString rootName(wxT("untitled"));
+ wxStripExtension(rootName);
+ SetFilename(wxGetApp().GetSettings().GenerateFilename(rootName));
+ }
+
+ // Creates the view, so do any view updating after this
+ bool success = wxDocument::OnCreate(path, flags);
+
+ if (success)
+ {
+ if (flags & wxDOC_NEW)
+ {
+ wxBusyCursor wait;
+
+ ctConfigToolHint hint(NULL, ctInitialUpdate);
+ UpdateAllViews (NULL, & hint);
+
+ SetFilename(GetFilename(), TRUE);
+ }
+ }
+ return success;
+}
+
+// Save the document
+bool ctConfigToolDoc::OnSaveDocument(const wxString& filename)
+{
+ wxBusyCursor cursor;
+
+ const wxString strOldPath(GetFilename());
+
+ // Do some backing up first
+
+ // This is the backup filename
+ wxString backupFilename(filename);
+ backupFilename += wxT(".bak");
+
+ // This is the temporary copy of the backup
+ wxString tempFilename(filename);
+ tempFilename += wxT(".tmp");
+ if (wxFileExists(tempFilename))
+ wxRemoveFile(tempFilename);
+
+ bool leaveBackup = TRUE;
+
+ bool saved = DoSave(tempFilename);
+
+ if (saved)
+ {
+ // Remove the old .bak file
+ if (wxFileExists(backupFilename))
+ {
+ wxRemoveFile(backupFilename);
+ }
+
+ // Copy the old file to the .bak
+
+ if (leaveBackup)
+ {
+ if (wxFileExists(filename))
+ {
+ if (!wxRenameFile(filename, backupFilename))
+ {
+ wxCopyFile(filename, backupFilename);
+ wxRemoveFile(filename);
+ }
+ }
+ }
+ else
+ {
+ if (wxFileExists(filename))
+ wxRemoveFile(filename);
+ }
+
+ // Finally, copy the temporary file to the proper filename
+ if (!wxRenameFile(tempFilename, filename))
+ {
+ wxCopyFile(tempFilename, filename);
+ wxRemoveFile(tempFilename);
+ }
+
+ Modify(FALSE);
+ ((ctConfigToolView*)GetFirstView())->OnChangeFilename();
+ SetDocumentSaved(TRUE);
+ SetFilename(filename);
+ wxGetApp().GetSettings().m_lastFilename = filename;
+ } else
+ {
+ SetFilename(strOldPath);
+ }
+ wxGetApp().GetMainFrame()->UpdateFrameTitle();
+ return saved;
+}
+
+// Open the document
+bool ctConfigToolDoc::OnOpenDocument(const wxString& filename)
+{
+ wxBusyCursor cursor;
+
+ bool opened = DoOpen(filename);
+
+ if (opened)
+ {
+ SetFilename(filename);
+ wxGetApp().GetSettings().m_lastFilename = filename;
+
+ ((ctConfigToolView*)GetFirstView())->OnChangeFilename();
+
+ RefreshDependencies();
+
+ // ctConfigToolHint hint(NULL, ctFilenameChanged);
+ ctConfigToolHint hint(NULL, ctInitialUpdate);
+ UpdateAllViews (NULL, & hint);
+ }
+
+ SetDocumentSaved(TRUE); // Necessary or it will pop up the Save As dialog
+
+ return opened;
+}
+
+/// Save the settings file
+bool ctConfigToolDoc::DoSave(const wxString& filename)
+{
+ wxFileOutputStream stream(filename);
+ if (!stream.Ok())
+ return FALSE;
+
+ stream << wxT("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
+ stream << wxT("<settings xmlns=\"http://www.wxwindows.org/wxs\" version=\"2.5.0.1\">");
+
+ DoSave(m_topItem, stream, 1);
+
+ stream << wxT("\n</settings>\n");
+
+ return TRUE;
+}
+
+inline static void OutputIndentation(wxOutputStream& stream, int indent)
+{
+ wxString str = wxT("\n");
+ for (int i = 0; i < indent; i++)
+ str << wxT(' ') << wxT(' ');
+ stream << str ;
+}
+
+/// Recursive helper function for file saving
+bool ctConfigToolDoc::DoSave(ctConfigItem* item, wxOutputStream& stream, int indent)
+{
+ OutputIndentation(stream, indent*2);
+
+ wxString name(item->GetName());
+ wxString s;
+ wxString typeStr;
+ if (item->GetType() == ctTypeGroup)
+ typeStr = wxT("group");
+ else if (item->GetType() == ctTypeCheckGroup)
+ typeStr = wxT("check-group");
+ else if (item->GetType() == ctTypeRadioGroup)
+ typeStr = wxT("radio-group");
+ else if (item->GetType() == ctTypeString)
+ typeStr = wxT("string");
+ else if (item->GetType() == ctTypeBoolCheck)
+ typeStr = wxT("bool-check");
+ else if (item->GetType() == ctTypeBoolRadio)
+ typeStr = wxT("bool-radio");
+ else if (item->GetType() == ctTypeInteger)
+ typeStr = wxT("integer");
+ else
+ typeStr = wxT("unknown");
+
+ stream << wxT("<setting type=\"") << typeStr << wxT("\">");
+
+ indent ++;
+
+ OutputIndentation(stream, indent*2);
+ if (item->IsActive())
+ stream << wxT("<active>1</active>");
+ else
+ stream << wxT("<active>0</active>");
+ OutputIndentation(stream, indent*2);
+ if (item->IsEnabled())
+ stream << wxT("<enabled>1</enabled>");
+ else
+ stream << wxT("<enabled>0</enabled>");
+
+ // Output properties
+ wxNode* node = item->GetProperties().GetList().GetFirst();
+ while (node)
+ {
+ ctProperty* prop = (ctProperty*) node->GetData();
+ OutputIndentation(stream, indent*2);
+ stream << wxT("<") << prop->GetName() ;
+
+ if (prop->IsCustom())
+ {
+ stream << wxT(" custom=\"true\"");
+ stream << wxT(" type=\"") << prop->GetVariant().GetType() << wxT("\"");
+ stream << wxT(" editor-type=\"") << prop->GetEditorType() << wxT("\"");
+ stream << wxT(" description=\"") << prop->GetDescription() << wxT("\"");
+ if (prop->GetChoices().GetCount() > 0)
+ {
+ wxString choices;
+ ctConfigItem::ArrayToString(prop->GetChoices(), choices);
+ stream << wxT(" choices=\"") << choices << wxT("\"");
+ }
+ }
+
+ stream << wxT(">");
+
+ stream << ctEscapeHTMLCharacters(prop->GetVariant().GetString()) ;
+ stream << wxT("</") << prop->GetName() << wxT(">");
+
+ node = node->Next();
+ }
+
+ // Output children
+ node = item->GetChildren().GetFirst();
+ while (node)
+ {
+ ctConfigItem* child = (ctConfigItem*) node->GetData();
+ DoSave(child, stream, indent);
+
+ node = node->Next();
+ }
+
+ indent --;
+
+ OutputIndentation(stream, indent*2);
+ stream << wxT("</setting>");
+
+ return TRUE;
+}
+
+/// Open the settings file
+bool ctConfigToolDoc::DoOpen(const wxString& filename)
+{
+ wxSimpleHtmlParser parser;
+ if (parser.ParseFile(filename))
+ {
+ ctConfigToolHint hint(NULL, ctClear);
+ UpdateAllViews (NULL, & hint);
+ m_topItem = NULL;
+
+ if (parser.GetTopLevelTag()->GetChildren())
+ {
+ wxSimpleHtmlTag* settingsTag = parser.GetTopLevelTag()->GetChildren()->FindTag(wxT("settings"));
+ if (settingsTag && settingsTag->GetChildren())
+ {
+ wxSimpleHtmlTag* firstSettingTag = settingsTag->GetChildren();
+ if (firstSettingTag)
+ DoOpen(firstSettingTag, NULL);
+ return TRUE;
+ }
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static bool GetHtmlBoolValue(const wxString& value)
+{
+ if (value == wxT("true") || value == wxT("TRUE") || value == wxT("1"))
+ return TRUE;
+ else
+ return FALSE;
+}
+
+static int GetHtmlIntegerValue(const wxString& value)
+{
+ return wxAtoi(value);
+}
+
+static double GetHtmlDoubleValue(const wxString& value)
+{
+ return wxAtof(value);
+}
+
+bool ctConfigToolDoc::DoOpen(wxSimpleHtmlTag* tag, ctConfigItem* parent)
+{
+ ctConfigItem* newItem = NULL;
+ if (tag->NameIs(wxT("setting")))
+ {
+ wxSimpleHtmlAttribute* attr = tag->FindAttribute(wxT("type"));
+ if (attr)
+ {
+ ctConfigType type = ctTypeUnknown;
+ wxString typeStr(attr->GetValue());
+ if (typeStr == wxT("group"))
+ type = ctTypeGroup;
+ else if (typeStr == wxT("option-group") || typeStr == wxT("check-group"))
+ type = ctTypeCheckGroup;
+ else if (typeStr == wxT("radio-group"))
+ type = ctTypeRadioGroup;
+ else if (typeStr == wxT("bool-check"))
+ type = ctTypeBoolCheck;
+ else if (typeStr == wxT("bool-radio"))
+ type = ctTypeBoolRadio;
+ else if (typeStr == wxT("string"))
+ type = ctTypeString;
+ else if (typeStr == wxT("integer"))
+ type = ctTypeInteger;
+ else
+ {
+ wxLogError(wxT("Unknown type %s"), (const wxChar*) typeStr);
+ }
+ if (type != ctTypeUnknown)
+ {
+ newItem = new ctConfigItem(parent, type, wxT(""));
+ newItem->InitProperties();
+ if (!parent)
+ SetTopItem(newItem);
+ }
+ }
+ }
+ wxSimpleHtmlTag* childTag = tag->GetChildren();
+
+ while (childTag)
+ {
+ if (childTag->GetType() == wxSimpleHtmlTag_Open)
+ {
+ if (childTag->GetName() == wxT("setting"))
+ {
+ DoOpen(childTag, newItem);
+ }
+ else if (childTag->GetName() == wxT("name"))
+ {
+ if (newItem)
+ {
+ wxString name(childTag->GetNext()->GetTagText());
+ newItem->SetName(name);
+ }
+ }
+ else if (childTag->GetName() == wxT("active"))
+ {
+ if (newItem)
+ newItem->SetActive(GetHtmlBoolValue(childTag->GetNext()->GetTagText()));
+ }
+ else if (childTag->GetName() == wxT("enabled"))
+ {
+ if (newItem)
+ newItem->Enable(GetHtmlBoolValue(childTag->GetNext()->GetTagText()));
+ }
+ else
+ {
+ if (newItem)
+ {
+ ctProperty* prop = newItem->GetProperties().FindProperty(childTag->GetName());
+ if (!prop)
+ {
+ // A custom property, else an obsolete
+ // property that we should ignore.
+ wxString isCustom;
+ if (childTag->GetAttributeValue(isCustom, wxT("custom")) &&
+ isCustom == wxT("true"))
+ {
+ prop = new ctProperty;
+
+ wxString name(childTag->GetName());
+ wxString type(wxT("string"));
+ wxString choices;
+ wxString editorType(wxT("string"));
+ wxString description(wxT(""));
+ childTag->GetAttributeValue(type, wxT("type"));
+ childTag->GetAttributeValue(type, wxT("editor-type"));
+ childTag->GetAttributeValue(type, wxT("choices"));
+ childTag->GetAttributeValue(description, wxT("description"));
+
+ if (type == wxT("bool"))
+ prop->GetVariant() = wxVariant((bool) FALSE, name);
+ else if (type == wxT("double"))
+ prop->GetVariant() = wxVariant((double) 0.0, name);
+ else if (type == wxT("long"))
+ prop->GetVariant() = wxVariant((long) 0, name);
+ else
+ prop->GetVariant() = wxVariant(wxT(""), name);
+ prop->SetDescription(description);
+ prop->SetCustom(TRUE);
+ prop->SetEditorType(editorType);
+ if (!choices.IsEmpty())
+ {
+ wxArrayString arr;
+ ctConfigItem::StringToArray(choices, arr);
+ prop->SetChoices(arr);
+ }
+ newItem->GetProperties().AddProperty(prop);
+ }
+ }
+ if (prop)
+ {
+ if (prop->GetVariant().GetType() == wxT("string"))
+ prop->GetVariant() = childTag->GetNext()->GetTagText();
+ else if (prop->GetVariant().GetType() == wxT("long"))
+ prop->GetVariant() = (long) GetHtmlIntegerValue(childTag->GetNext()->GetTagText());
+ else if (prop->GetVariant().GetType() == wxT("bool"))
+ prop->GetVariant() = (bool) GetHtmlBoolValue(childTag->GetNext()->GetTagText());
+ else if (prop->GetVariant().GetType() == wxT("double"))
+ prop->GetVariant() = (double) GetHtmlDoubleValue(childTag->GetNext()->GetTagText());
+ }
+ }
+ }
+ }
+ childTag = childTag->GetNext();
+ }
+ return TRUE;
+}
+
+/// Clear dependencies
+void ctConfigToolDoc::ClearDependencies(ctConfigItem* item)
+{
+ if (!item)
+ item = GetTopItem();
+
+ item->GetDependents().Clear();
+ for ( wxNode* node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* child = (ctConfigItem*) node->GetData();
+ ClearDependencies(child);
+ }
+}
+
+/// Refresh dependencies
+void ctConfigToolDoc::RefreshDependencies()
+{
+ ClearDependencies(GetTopItem());
+ RefreshDependencies(GetTopItem());
+}
+
+/// Refresh dependencies
+void ctConfigToolDoc::RefreshDependencies(ctConfigItem* item)
+{
+ wxArrayString requiresArr;
+ wxString requires = item->GetPropertyString(wxT("requires"));
+ wxString precludes = item->GetPropertyString(wxT("precludes"));
+ wxString enabledIf = item->GetPropertyString(wxT("enabled-if"));
+ wxString enabledIfNot = item->GetPropertyString(wxT("enabled-if-not"));
+ wxString context = item->GetPropertyString(wxT("context"));
+
+ if (!requires.IsEmpty())
+ item->StringToArray(requires, requiresArr);
+
+ if (!precludes.IsEmpty())
+ item->StringToArray(precludes, requiresArr);
+
+ if (!enabledIfNot.IsEmpty())
+ item->StringToArray(enabledIfNot, requiresArr);
+
+ if (!enabledIf.IsEmpty())
+ item->StringToArray(enabledIf, requiresArr);
+
+ // Add the parent to the list of dependencies, if the
+ // parent is a check or radio group.
+ ctConfigItem* parent = item->GetParent();
+ if (parent &&
+ (parent->GetType() == ctTypeCheckGroup ||
+ parent->GetType() == ctTypeRadioGroup))
+ requiresArr.Add(parent->GetName());
+
+ // Also look in 'context' since these items
+ // are another kind of dependency (switching to
+ // a different platform may cause the dependencies
+ // to be evaluated differently).
+ if (!context.IsEmpty())
+ item->StringToArray(context, requiresArr);
+
+ size_t i;
+ for (i = 0; i < requiresArr.GetCount(); i++)
+ {
+ wxString itemName(requiresArr[i]);
+ ctConfigItem* otherItem = GetTopItem()->FindItem(itemName);
+ if (otherItem && !otherItem->GetDependents().Member(item))
+ {
+ otherItem->GetDependents().Append(item);
+ }
+ }
+ for ( wxNode* node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* child = (ctConfigItem*) node->GetData();
+ RefreshDependencies(child);
+ }
+}
+
+/// Generate the text of a setup.h
+wxString ctConfigToolDoc::GenerateSetup()
+{
+ wxString str;
+ str << wxT("/*\n * setup.h\n * Generated by wxConfigTool\n *\n */\n\n");
+
+ GenerateSetup(GetTopItem(), str);
+
+ return str;
+}
+
+/// Helper function
+void ctConfigToolDoc::GenerateSetup(ctConfigItem* item, wxString& str)
+{
+ // Generate the setup.h entries for this item
+ wxString name = item->GetName();
+
+ // We don't process the platform choice
+ if (item->GetName() == wxT("Platform"))
+ return;
+
+ if (item->IsInActiveContext() &&
+ (item->GetType() == ctTypeCheckGroup ||
+ item->GetType() == ctTypeRadioGroup ||
+ item->GetType() == ctTypeBoolCheck ||
+ item->GetType() == ctTypeBoolRadio))
+ {
+ // TODO: write description
+ wxString name = item->GetName();
+ if (name.Left(6) == wxT("wxUSE_") ||
+ name == wxT("REMOVE_UNUSED_ARG") || // Hack alert: change to wxUSE_UNUSED_ARG_REMOVAL
+ name.Find(wxT("COMPATIBILITY")) != wxNOT_FOUND)
+ {
+ str << wxT("#define ") << name ;
+ if (item->IsEnabled())
+ str << wxT(" 1");
+ else
+ str << wxT(" 0");
+ str << wxT("\n\n");
+ }
+ }
+
+ for ( wxNode* node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* child = (ctConfigItem*) node->GetData();
+ GenerateSetup(child, str);
+ }
+}
+
+
+/// Generate a configure command
+wxString ctConfigToolDoc::GenerateConfigureCommand()
+{
+ wxString str;
+ str << wxT("# configurewx\n# Generated by wxConfigTool\n\n");
+
+ wxString path = GetFrameworkDir(TRUE);
+ bool makeUnix = TRUE;
+ if (!path.IsEmpty())
+ {
+ if (makeUnix)
+ path += wxT("/");
+ else
+ path += wxFILE_SEP_PATH ;
+ }
+
+ str << path << wxT("configure");
+
+ // Find the platform option to use
+ ctConfigItem* platformsFolder = GetTopItem()->FindItem(wxT("Platform"));
+ if (platformsFolder)
+ {
+ for ( wxNode* node = platformsFolder->GetChildren().GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* child = (ctConfigItem*) node->GetData();
+ if (child->GetType() == ctTypeBoolRadio && child->IsEnabled())
+ {
+ wxString configureCommand = child->GetPropertyString(wxT("configure-command"));
+ if (!configureCommand.IsEmpty())
+ str << wxT(" ") << configureCommand;
+ }
+ }
+ }
+
+ GenerateConfigureCommand(GetTopItem(), str);
+ return str;
+}
+
+/// Helper function
+void ctConfigToolDoc::GenerateConfigureCommand(ctConfigItem* item, wxString& str)
+{
+ // We don't process the platform group, since we've
+ // already done so.
+ if (item->GetName() == wxT("Platform"))
+ return;
+
+ if (item->IsInActiveContext() &&
+ (item->GetType() == ctTypeCheckGroup ||
+ item->GetType() == ctTypeRadioGroup ||
+ item->GetType() == ctTypeBoolCheck ||
+ item->GetType() == ctTypeBoolRadio))
+ {
+ wxString name = item->GetName();
+ wxString configureCommand = item->GetPropertyString(wxT("configure-command"));
+ if (!configureCommand.IsEmpty())
+ {
+ if (!item->IsEnabled())
+ {
+ // Replace 'enable' with 'disable' if this
+ // option is off.
+ configureCommand.Replace(wxT("--enable-"), wxT("--disable-"));
+ configureCommand.Replace(wxT("--with-"), wxT("--without-"));
+ }
+ ctProperty* prop = item->GetProperties().FindProperty(wxT("builtin"));
+ if (prop && prop->GetVariant().GetType() == wxT("bool"))
+ {
+ bool builtin = prop->GetVariant().GetBool();
+ str << wxT(" ") << configureCommand;
+ if (builtin)
+ str << wxT("=builtin");
+ else
+ str << wxT("=sys");
+ }
+ else
+ {
+ ctProperty* prop = item->GetProperties().FindProperty(wxT("value"));
+ if (prop && prop->GetVariant().GetType() == wxT("string"))
+ {
+ wxString val = prop->GetVariant().GetString();
+ if (item->IsEnabled() && !val.IsEmpty())
+ {
+ str << wxT(" ") << configureCommand;
+ str << wxT("=\"") << val << wxT("\"");
+ }
+ // If the string is empty, ignore this parameter,
+ // since it's obviously intended to be supplied
+ // only if there's a string to use and it's enabled.
+ }
+ else
+ {
+ str << wxT(" ") << configureCommand;
+ }
+ }
+ }
+ }
+
+ for ( wxNode* node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
+ {
+ ctConfigItem* child = (ctConfigItem*) node->GetData();
+ GenerateConfigureCommand(child, str);
+ }
+}
+
+/// Gets the current framework directory
+wxString ctConfigToolDoc::GetFrameworkDir(bool makeUnix)
+{
+ wxString path = wxGetApp().GetSettings().m_frameworkDir;
+ if (wxGetApp().GetSettings().m_useEnvironmentVariable)
+ {
+ // Should probably allow other variables
+ // to be used, and maybe expand variables within m_frameworkDir
+ path = wxGetenv(wxT("WXWIN"));
+#ifdef __WXMSW__
+ if (makeUnix)
+ path.Replace(wxT("\\"), wxT("/"));
+#endif
+ }
+ return path;
+}
+
+
+/*
+ * Implements a document editing command.
+ */
+
+ctConfigCommand::ctConfigCommand(const wxString& name, int cmdId,
+ ctConfigItem* activeState, ctConfigItem* savedState,
+ ctConfigItem* parent, ctConfigItem* insertBefore,
+ bool ignoreFirstTime): wxCommand(TRUE, name)
+{
+ m_activeState = activeState;
+ m_savedState = savedState;
+ m_ignoreThis = ignoreFirstTime;
+ m_cmdId = cmdId;
+ m_properties = NULL;
+ m_parent = parent;
+ m_insertBefore = insertBefore;
+}
+
+ctConfigCommand::ctConfigCommand(const wxString& name, int cmdId,
+ ctConfigItem* activeState, ctProperties* properties,
+ bool ignoreFirstTime): wxCommand(TRUE, name)
+{
+ m_activeState = activeState;
+ m_savedState = NULL;
+ m_properties = properties;
+ m_ignoreThis = ignoreFirstTime;
+ m_cmdId = cmdId;
+ m_properties = properties;
+ m_parent = NULL;
+ m_insertBefore = NULL;
+}
+
+ctConfigCommand::~ctConfigCommand()
+{
+ if (m_savedState)
+ delete m_savedState;
+ if (m_properties)
+ delete m_properties;
+}
+
+bool ctConfigCommand::Do()
+{
+ return DoAndUndo(TRUE);
+}
+
+bool ctConfigCommand::Undo()
+{
+ return DoAndUndo(FALSE);
+}
+
+// Combine Do and Undo into one
+bool ctConfigCommand::DoAndUndo(bool doCmd)
+{
+ switch (m_cmdId)
+ {
+ case ctCMD_CUT:
+ {
+ if (doCmd)
+ {
+ wxASSERT(m_savedState == NULL);
+ wxASSERT(m_activeState != NULL);
+
+ ctConfigItem* newItem = m_activeState->DeepClone();
+ ctConfigToolDoc* doc = m_activeState->GetDocument();
+
+ // This will delete the old clipboard contents, if any.
+ doc->SetClipboardItem(newItem);
+
+ m_parent = m_activeState->GetParent();
+ m_insertBefore = m_activeState->FindNextSibling();
+
+ m_activeState->Detach();
+ m_savedState = m_activeState;
+ m_activeState = NULL;
+
+ m_savedState->GetDocument()->Modify(TRUE);
+ ctConfigToolView* view = (ctConfigToolView*) m_savedState->GetDocument()->GetFirstView();
+ view->OnChangeFilename();
+ }
+ else
+ {
+ wxASSERT(m_savedState != NULL);
+ wxASSERT(m_activeState == NULL);
+
+ m_savedState->GetDocument()->Modify(TRUE);
+ m_savedState->Attach(m_parent, m_insertBefore);
+ ctConfigToolView* view = (ctConfigToolView*) m_savedState->GetDocument()->GetFirstView();
+ view->AddItems(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), m_savedState);
+ m_activeState = m_savedState;
+ m_savedState = NULL;
+ m_parent = NULL;
+ m_insertBefore = NULL;
+ view->OnChangeFilename();
+ }
+ break;
+ }
+ case ctCMD_PASTE:
+ {
+ if (doCmd)
+ {
+ wxASSERT(m_savedState != NULL);
+ wxASSERT(m_activeState == NULL);
+
+ m_savedState->GetDocument()->Modify(TRUE);
+ m_savedState->Attach(m_parent, m_insertBefore);
+ ctConfigToolView* view = (ctConfigToolView*) m_savedState->GetDocument()->GetFirstView();
+ view->AddItems(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), m_savedState);
+ wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->SelectItem(m_savedState->GetTreeItemId());
+ m_activeState = m_savedState;
+ m_savedState = NULL;
+ view->OnChangeFilename();
+ }
+ else
+ {
+ wxASSERT(m_savedState == NULL);
+ wxASSERT(m_activeState != NULL);
+
+ m_activeState->GetDocument()->Modify(TRUE);
+ ctConfigToolView* view = (ctConfigToolView*) m_activeState->GetDocument()->GetFirstView();
+ m_activeState->Detach();
+ m_savedState = m_activeState;
+ m_activeState = NULL;
+ view->OnChangeFilename();
+ }
+ break;
+ }
+ case ctCMD_NEW_ELEMENT:
+ {
+ if (doCmd)
+ {
+ wxASSERT(m_savedState != NULL);
+ wxASSERT(m_activeState == NULL);
+
+ m_savedState->GetDocument()->Modify(TRUE);
+ m_savedState->Attach(m_parent, m_insertBefore);
+ ctConfigToolView* view = (ctConfigToolView*) m_savedState->GetDocument()->GetFirstView();
+ view->AddItems(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), m_savedState);
+ wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->SelectItem(m_savedState->GetTreeItemId());
+
+ m_activeState = m_savedState;
+ m_savedState = NULL;
+ }
+ else
+ {
+ wxASSERT(m_savedState == NULL);
+ wxASSERT(m_activeState != NULL);
+
+ m_activeState->GetDocument()->Modify(TRUE);
+ m_activeState->Detach();
+ m_savedState = m_activeState;
+ m_activeState = NULL;
+ }
+ break;
+ }
+ case ctCMD_APPLY_PROPERTY:
+ {
+ wxASSERT(m_properties != NULL);
+ wxASSERT(m_activeState != NULL);
+
+ // Don't update the properties editor first time
+ // around since it will be done one property at a time
+ // initially (and no property editor update required)
+ if (!m_ignoreThis)
+ {
+ // Just swap the saved and current properties.
+ ctProperties propsTemp = m_activeState->GetProperties() ;
+ m_activeState->GetProperties() = (* m_properties);
+ (* m_properties) = propsTemp;
+
+ // Apply only those that need applying
+ // (those properties in activeState that are not in propsTemp)
+ wxNode* node = m_activeState->GetProperties().GetList().GetFirst();
+ while (node)
+ {
+ ctProperty* prop = (ctProperty*) node->GetData();
+ ctProperty* otherProp = propsTemp.FindProperty(prop->GetName());
+ if (otherProp && ((*prop) != (*otherProp)))
+ {
+ m_activeState->ApplyProperty(prop, otherProp->GetVariant());
+ }
+ node = node->GetNext();
+ }
+ m_activeState->GetDocument()->Modify(TRUE);
+ ctConfigToolView* view = (ctConfigToolView*) m_activeState->GetDocument()->GetFirstView();
+ if (view)
+ {
+ ctConfigToolHint hint(NULL, ctValueChanged);
+ m_activeState->GetDocument()->UpdateAllViews (NULL, & hint);
+ }
+ }
+ m_ignoreThis = FALSE;
+
+ break;
+ }
+ }
+ return TRUE;
+}
+
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: configtooldoc.h
+// Purpose: Document class
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _CT_CONFIGTOOLDOC_H_
+#define _CT_CONFIGTOOLDOC_H_
+
+#ifdef __GNUG__
+#pragma interface "configtooldoc.cpp"
+#endif
+
+#include "wx/docview.h"
+#include "wx/cmdproc.h"
+
+#include "configitem.h"
+
+class wxSimpleHtmlTag;
+
+/*!
+ * ctConfigToolDoc
+ */
+
+class ctConfigToolDoc: public wxDocument
+{
+ DECLARE_DYNAMIC_CLASS(ctConfigToolDoc)
+public:
+ ctConfigToolDoc();
+ ~ctConfigToolDoc();
+
+//// Overrides
+ virtual bool OnCreate(const wxString& path, long flags);
+ virtual bool OnOpenDocument(const wxString& filename);
+ virtual bool OnSaveDocument(const wxString& filename);
+ virtual bool OnNewDocument() { return TRUE; }
+ virtual bool OnCloseDocument() ;
+ virtual bool Save(); // Overridden only to correct bug in wxWindows, docview.cpp
+
+//// Accessors
+
+ /// Returns the top item.
+ ctConfigItem* GetTopItem() const { return m_topItem; }
+
+ /// Sets the top item.
+ void SetTopItem(ctConfigItem* item) { m_topItem = item; }
+
+ /// Returns the clipboard item.
+ ctConfigItem* GetClipboardItem() const { return m_clipboardItem; }
+
+ /// Sets the clipboard item.
+ void SetClipboardItem(ctConfigItem* item) ;
+
+ /// Clears the clipboard item.
+ void ClearClipboard() ;
+
+ /// Gets the current framework directory
+ wxString GetFrameworkDir(bool makeUnix);
+
+//// Operations
+
+ /// Add items
+ void AddItems();
+
+ /// Delete items
+ void DeleteItems();
+
+ /// Save the settings file
+ bool DoSave(const wxString& filename);
+
+ /// Recursive helper function for file saving
+ bool DoSave(ctConfigItem* item, wxOutputStream& stream, int indent);
+
+ /// Open the settings file
+ bool DoOpen(const wxString& filename);
+
+ /// Helper for file opening.
+ bool DoOpen(wxSimpleHtmlTag* tag, ctConfigItem* parent);
+
+ /// Refresh dependencies
+ void RefreshDependencies();
+ void RefreshDependencies(ctConfigItem* item);
+
+ /// Clear dependencies
+ void ClearDependencies(ctConfigItem* item);
+
+ /// Generate the text of a setup.h
+ wxString GenerateSetup();
+
+ /// Helper function
+ void GenerateSetup(ctConfigItem* item, wxString& str);
+
+ /// Generate a configure command
+ wxString GenerateConfigureCommand();
+
+ /// Helper function
+ void GenerateConfigureCommand(ctConfigItem* item, wxString& str);
+
+protected:
+ ctConfigItem* m_topItem;
+ ctConfigItem* m_clipboardItem;
+};
+
+
+/*!
+ * Implements a document editing command.
+ * We only need to store one state at a time,
+ * since we don't have (or need) multiple selection.
+ */
+
+#define ctCMD_NEW_ELEMENT 1
+#define ctCMD_PASTE 2
+#define ctCMD_CUT 3
+#define ctCMD_APPLY_PROPERTY 4
+
+class ctConfigCommand: public wxCommand
+{
+public:
+ ctConfigCommand(const wxString& name, int cmdId,
+ ctConfigItem* activeState, ctConfigItem* savedState,
+ ctConfigItem* parent = NULL, ctConfigItem* insertBefore = NULL,
+ bool ignoreFirstTime = FALSE);
+ ctConfigCommand(const wxString& name, int cmdId,
+ ctConfigItem* activeState, ctProperties* properties,
+ bool ignoreFirstTime = FALSE);
+ ~ctConfigCommand();
+
+ bool Do();
+ bool Undo();
+ bool DoAndUndo(bool doCmd); // Combine Do and Undo into one
+
+protected:
+ ctConfigItem* m_activeState;
+ ctConfigItem* m_savedState;
+ ctProperties* m_properties;
+ bool m_ignoreThis; // Ignore 1st Do because we already did it
+ int m_cmdId;
+ ctConfigItem* m_parent;
+ ctConfigItem* m_insertBefore;
+};
+
+
+#endif
+ // _CT_CONFIGTOOLDOC_H_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: configtoolview.cpp
+// Purpose: View class
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+ #pragma implementation "configtoolview.cpp"
+#endif
+
+// Includes other headers for precompiled compilation
+#include "wx/wx.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#include "wx/wfstream.h"
+
+#include "configtoolview.h"
+#include "configtooldoc.h"
+#include "configtree.h"
+#include "wxconfigtool.h"
+#include "mainframe.h"
+#include "propeditor.h"
+#include "utils.h"
+#include "custompropertydialog.h"
+
+IMPLEMENT_DYNAMIC_CLASS(ctConfigToolView, wxView)
+
+BEGIN_EVENT_TABLE(ctConfigToolView, wxView)
+ EVT_MENU(ctID_ADD_ITEM_CHECKBOX, ctConfigToolView::OnAddCheckBoxItem)
+ EVT_MENU(ctID_ADD_ITEM_RADIOBUTTON, ctConfigToolView::OnAddRadioButtonItem)
+ EVT_MENU(ctID_ADD_ITEM_GROUP, ctConfigToolView::OnAddGroupItem)
+ EVT_MENU(ctID_ADD_ITEM_CHECK_GROUP, ctConfigToolView::OnAddCheckGroupItem)
+ EVT_MENU(ctID_ADD_ITEM_RADIO_GROUP, ctConfigToolView::OnAddRadioGroupItem)
+ EVT_MENU(ctID_ADD_ITEM_STRING, ctConfigToolView::OnAddStringItem)
+ EVT_MENU(ctID_RENAME_ITEM, ctConfigToolView::OnRenameItem)
+ EVT_MENU(ctID_DELETE_ITEM, ctConfigToolView::OnDeleteItem)
+
+ EVT_MENU(wxID_COPY, ctConfigToolView::OnCopy)
+ EVT_MENU(wxID_CUT, ctConfigToolView::OnCut)
+ EVT_MENU(wxID_PASTE, ctConfigToolView::OnPaste)
+
+ EVT_UPDATE_UI(wxID_COPY, ctConfigToolView::OnUpdateCopy)
+ EVT_UPDATE_UI(wxID_CUT, ctConfigToolView::OnUpdateCut)
+ EVT_UPDATE_UI(wxID_PASTE, ctConfigToolView::OnUpdatePaste)
+
+ EVT_MENU(ctID_ITEM_HELP, ctConfigToolView::OnItemHelp)
+
+ EVT_UPDATE_UI(ctID_ADD_ITEM_CHECKBOX, ctConfigToolView::OnUpdateAddItem)
+ EVT_UPDATE_UI(ctID_ADD_ITEM_RADIOBUTTON, ctConfigToolView::OnUpdateAddItem)
+ EVT_UPDATE_UI(ctID_ADD_ITEM_GROUP, ctConfigToolView::OnUpdateAddItem)
+ EVT_UPDATE_UI(ctID_ADD_ITEM_CHECK_GROUP, ctConfigToolView::OnUpdateAddItem)
+ EVT_UPDATE_UI(ctID_ADD_ITEM_RADIO_GROUP, ctConfigToolView::OnUpdateAddItem)
+ EVT_UPDATE_UI(ctID_ADD_ITEM_STRING, ctConfigToolView::OnUpdateAddItem)
+ EVT_UPDATE_UI(ctID_RENAME_ITEM, ctConfigToolView::OnUpdateCut)
+ EVT_UPDATE_UI(ctID_DELETE_ITEM, ctConfigToolView::OnUpdateCut)
+ EVT_UPDATE_UI(ctID_ITEM_HELP, ctConfigToolView::OnUpdateItemHelp)
+
+ EVT_MENU(ctID_TREE_COPY, ctConfigToolView::OnContextCopy)
+ EVT_MENU(ctID_TREE_CUT, ctConfigToolView::OnContextCut)
+ EVT_MENU(ctID_TREE_PASTE_BEFORE, ctConfigToolView::OnContextPasteBefore)
+ EVT_MENU(ctID_TREE_PASTE_AFTER, ctConfigToolView::OnContextPasteAfter)
+ EVT_MENU(ctID_TREE_PASTE_AS_CHILD, ctConfigToolView::OnContextPasteAsChild)
+ EVT_UPDATE_UI(ctID_TREE_COPY, ctConfigToolView::OnUpdateContextCopy)
+ EVT_UPDATE_UI(ctID_TREE_CUT, ctConfigToolView::OnUpdateContextCut)
+ EVT_UPDATE_UI(ctID_TREE_PASTE_BEFORE, ctConfigToolView::OnUpdateContextPasteBefore)
+ EVT_UPDATE_UI(ctID_TREE_PASTE_AFTER, ctConfigToolView::OnUpdateContextPasteAfter)
+ EVT_UPDATE_UI(ctID_TREE_PASTE_AS_CHILD, ctConfigToolView::OnUpdateContextPasteAsChild)
+
+ EVT_MENU(ctID_ADD_CUSTOM_PROPERTY, ctConfigToolView::OnAddCustomProperty)
+ EVT_MENU(ctID_EDIT_CUSTOM_PROPERTY, ctConfigToolView::OnEditCustomProperty)
+ EVT_MENU(ctID_DELETE_CUSTOM_PROPERTY, ctConfigToolView::OnDeleteCustomProperty)
+ EVT_UPDATE_UI(ctID_ADD_CUSTOM_PROPERTY, ctConfigToolView::OnUpdateAddCustomProperty)
+ EVT_UPDATE_UI(ctID_EDIT_CUSTOM_PROPERTY, ctConfigToolView::OnUpdateEditCustomProperty)
+ EVT_UPDATE_UI(ctID_DELETE_CUSTOM_PROPERTY, ctConfigToolView::OnUpdateDeleteCustomProperty)
+
+ EVT_NOTEBOOK_PAGE_CHANGED(-1, ctConfigToolView::OnTabSelect)
+
+ EVT_MENU(ctID_SAVE_SETUP_FILE, ctConfigToolView::OnSaveSetupFile)
+ EVT_MENU(ctID_SAVE_CONFIGURE_COMMAND, ctConfigToolView::OnSaveConfigureCommand)
+ EVT_UPDATE_UI(ctID_SAVE_SETUP_FILE, ctConfigToolView::OnUpdateSaveSetupFile)
+ EVT_UPDATE_UI(ctID_SAVE_CONFIGURE_COMMAND, ctConfigToolView::OnUpdateSaveConfigureCommand)
+END_EVENT_TABLE()
+
+ctConfigToolView::ctConfigToolView()
+{
+}
+
+// What to do when a view is created. Creates actual
+// windows for displaying the view.
+bool ctConfigToolView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
+{
+ wxGetApp().GetDocManager()->ActivateView(this, TRUE);
+ wxGetApp().GetMainFrame()->SetDocument((ctConfigToolDoc*) doc);
+ wxGetApp().GetMainFrame()->GetSetupPage()->SetDocument((ctConfigToolDoc*) doc) ;
+ wxGetApp().GetMainFrame()->GetConfigurePage()->SetDocument((ctConfigToolDoc*) doc) ;
+
+ return TRUE;
+}
+
+void ctConfigToolView::OnDraw(wxDC *dc)
+{
+}
+
+void ctConfigToolView::OnUpdate(wxView *WXUNUSED(sender), wxObject *hintObj)
+{
+ ctConfigToolDoc* doc = wxDynamicCast(GetDocument(), ctConfigToolDoc);
+ ctConfigTreeCtrl* treeCtrl = wxGetApp().GetMainFrame()->GetConfigTreeCtrl();
+ if (!treeCtrl)
+ return;
+
+ wxASSERT (doc != NULL);
+
+ ctConfigItem* selItem = NULL;
+
+ wxTreeItemId sel = treeCtrl->GetSelection();
+ if (sel.IsOk())
+ {
+ ctTreeItemData* data = (ctTreeItemData*) treeCtrl->GetItemData(sel);
+ if (data)
+ selItem = data->GetConfigItem() ;
+ }
+
+ ctConfigToolHint* hint = (ctConfigToolHint*) hintObj;
+ int hintOp = ctNoHint;
+ if (hint)
+ hintOp = hint->m_op;
+
+ switch (hintOp)
+ {
+ case ctInitialUpdate:
+ {
+ if (doc && doc->GetTopItem())
+ {
+ wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->DeleteAllItems();
+ AddItems(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), doc->GetTopItem());
+ wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->Expand(doc->GetTopItem()->GetTreeItemId());
+ }
+ }
+ break;
+ case ctSelChanged:
+ {
+ if (selItem)
+ {
+ wxGetApp().GetMainFrame()->GetPropertyEditor()->ShowItem(selItem);
+ }
+ }
+ break;
+ case ctAllSaved:
+ {
+ // TODO: update windows and frame title
+ }
+ break;
+ case ctFilenameChanged:
+ {
+ wxGetApp().GetMainFrame()->UpdateFrameTitle();
+ }
+ break;
+ case ctClear:
+ {
+ // TODO: update windows
+ treeCtrl->DeleteAllItems();
+ wxGetApp().GetMainFrame()->GetPropertyEditor()->ShowItem(NULL);
+ break;
+ }
+ case ctValueChanged:
+ {
+ // ctConfigItem& ti = *(ctConfigItem *)hint->m_item;
+ wxGetApp().GetMainFrame()->GetPropertyEditor()->ShowItem(selItem);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+// Clean up windows used for displaying the view.
+bool ctConfigToolView::OnClose(bool deleteWindow)
+{
+ if (!GetDocument()->Close())
+ return FALSE;
+
+ ctConfigToolHint hint(NULL, ctClear);
+ GetDocument()->UpdateAllViews (NULL, & hint);
+
+ wxGetApp().GetDocManager()->ActivateView(this, FALSE);
+
+ Activate(FALSE);
+
+ wxGetApp().GetMainFrame()->SetDocument(NULL);
+ wxGetApp().GetMainFrame()->GetSetupPage()->SetDocument(NULL) ;
+ wxGetApp().GetMainFrame()->GetConfigurePage()->SetDocument(NULL) ;
+
+ return TRUE;
+}
+
+void ctConfigToolView::OnChangeFilename()
+{
+ if (wxGetApp().GetTopWindow() && GetDocument())
+ {
+ wxString docTitle(wxFileNameFromPath(GetDocument()->GetFilename()));
+ wxStripExtension(docTitle);
+ GetDocument()->SetTitle(docTitle);
+
+ wxString name(GetDocument()->GetFilename());
+ wxStripExtension(name);
+
+ wxString title;
+
+ wxString modifiedMarker;
+ if (GetDocument()->IsModified())
+ modifiedMarker = wxT("*");
+
+ title = docTitle + modifiedMarker + wxString(wxT(" - ")) + wxGetApp().GetSettings().GetAppName() ;
+
+ ((wxFrame*) wxGetApp().GetTopWindow())->SetTitle(title);
+ }
+}
+
+// General disabler
+void ctConfigToolView::OnUpdateDisable(wxUpdateUIEvent& event)
+{
+ event.Enable( FALSE );
+}
+
+void ctConfigToolView::OnUpdateAddItem(wxUpdateUIEvent& event)
+{
+ event.Enable( TRUE );
+}
+
+/// Add item and its children to the tree
+void ctConfigToolView::AddItems(ctConfigTreeCtrl* treeControl, ctConfigItem* item)
+{
+ SyncItem(treeControl, item);
+
+ int count = item->GetChildCount();
+ int i;
+ for (i = 0; i < count; i++)
+ {
+ ctConfigItem* child = item->GetChild(i);
+ AddItems(treeControl, child);
+ }
+}
+
+/// Gets the tree item in sync with the item
+void ctConfigToolView::SyncItem(ctConfigTreeCtrl* treeControl, ctConfigItem* item)
+{
+ if (!item->GetTreeItemId().IsOk())
+ {
+ if (!item->GetParent())
+ {
+ item->SetTreeItem(treeControl->AddRoot(_(""), -1, -1, new ctTreeItemData(item)));
+ }
+ else
+ {
+ // Find the item to insert the new item after.
+ ctConfigItem* previousItem = item->FindPreviousSibling();
+ if (previousItem && previousItem->GetTreeItemId().IsOk())
+ {
+ item->SetTreeItem(treeControl->InsertItem(item->GetParent()->GetTreeItemId(),
+ previousItem->GetTreeItemId(),
+ item->GetName(), -1, -1, new ctTreeItemData(item)));
+ }
+ else if (!previousItem && item->GetParent()->GetChildCount() > 1
+ )
+ {
+ // Insert at the beginning
+ item->SetTreeItem(treeControl->InsertItem(item->GetParent()->GetTreeItemId(),
+ (size_t) 0, // Insert at first position
+ item->GetName(), -1, -1, new ctTreeItemData(item)));
+ }
+ else
+ {
+ item->SetTreeItem(treeControl->AppendItem(item->GetParent()->GetTreeItemId(),
+ item->GetName(), -1, -1, new ctTreeItemData(item)));
+ }
+ }
+ }
+
+ if (item->GetTreeItemId().IsOk())
+ {
+ treeControl->SetItemText(item->GetTreeItemId(), item->GetName());
+
+ int iconId = 0;
+
+ if (item->GetType() == ctTypeGroup)
+ {
+ iconId = treeControl->GetIconTable().GetIconId(wxT("Group"), 0, item->IsActive());
+ }
+ else if (item->GetType() == ctTypeCheckGroup)
+ {
+ iconId = treeControl->GetIconTable().GetIconId(wxT("CheckGroup"), item->IsEnabled() ? 0 : 1, item->IsActive());
+ }
+ else if (item->GetType() == ctTypeRadioGroup)
+ {
+ iconId = treeControl->GetIconTable().GetIconId(wxT("RadioGroup"), item->IsEnabled() ? 0 : 1, item->IsActive());
+ }
+ else if (item->GetType() == ctTypeBoolCheck)
+ {
+ iconId = treeControl->GetIconTable().GetIconId(wxT("Checkbox"), item->IsEnabled() ? 0 : 1, item->IsActive());
+ }
+ else if (item->GetType() == ctTypeBoolRadio)
+ {
+ iconId = treeControl->GetIconTable().GetIconId(wxT("Radiobutton"), item->IsEnabled() ? 0 : 1, item->IsActive());
+ }
+ treeControl->SetItemImage(item->GetTreeItemId(), iconId, wxTreeItemIcon_Normal);
+ treeControl->SetItemImage(item->GetTreeItemId(), iconId, wxTreeItemIcon_Selected);
+
+ if (treeControl->GetSelection() == item->GetTreeItemId())
+ {
+ if (wxGetApp().GetMainFrame()->GetPropertyEditor()->GetItem())
+ wxGetApp().GetMainFrame()->GetPropertyEditor()->UpdateTitle();
+ }
+ }
+}
+
+/// Clicked an icon
+void ctConfigToolView::OnIconLeftDown(ctConfigTreeCtrl* treeControl, ctConfigItem* item)
+{
+ if (!item->IsActive())
+ return;
+
+ if (item->GetType() == ctTypeCheckGroup ||
+ item->GetType() == ctTypeBoolCheck ||
+ item->GetType() == ctTypeBoolRadio ||
+ item->GetType() == ctTypeRadioGroup
+ )
+ {
+ // Don't toggle a radio button that's already
+ // enabled.
+ if ((item->GetType() == ctTypeBoolRadio || item->GetType() == ctTypeRadioGroup)
+ && item->IsEnabled())
+ return;
+
+ item->Enable(!item->IsEnabled());
+
+ GetDocument()->Modify(TRUE);
+ OnChangeFilename();
+
+ SyncItem(treeControl, item);
+
+ wxList considered;
+ item->PropagateChange(considered);
+ if ((item->GetType() == ctTypeBoolRadio || item->GetType() == ctTypeRadioGroup) && item->IsEnabled())
+ {
+ item->PropagateRadioButton(considered);
+ }
+ }
+}
+
+/// Returns the selected config item, if any.
+ctConfigItem* ctConfigToolView::GetSelection()
+{
+ wxTreeCtrl* treeCtrl = wxGetApp().GetMainFrame()->GetConfigTreeCtrl();
+ if (!treeCtrl)
+ return NULL;
+
+ wxTreeItemId sel = treeCtrl->GetSelection();
+ if (sel.IsOk())
+ {
+ ctTreeItemData* data = (ctTreeItemData*) treeCtrl->GetItemData(sel);
+ if (data)
+ return data->GetConfigItem() ;
+ }
+ return NULL;
+}
+
+/// Add a checkbox item
+void ctConfigToolView::OnAddCheckBoxItem(wxCommandEvent& event)
+{
+ AddItem(ctTypeBoolCheck, _("New checkbox item"));
+}
+
+/// Add a radiobutton item
+void ctConfigToolView::OnAddRadioButtonItem(wxCommandEvent& event)
+{
+ AddItem(ctTypeBoolRadio, _("New radio button item"));
+}
+
+/// Add a group item
+void ctConfigToolView::OnAddGroupItem(wxCommandEvent& event)
+{
+ AddItem(ctTypeGroup, _("New group item"));
+}
+
+/// Add a group option item
+void ctConfigToolView::OnAddCheckGroupItem(wxCommandEvent& event)
+{
+ AddItem(ctTypeCheckGroup, _("New check group item"));
+}
+
+/// Add a group option item
+void ctConfigToolView::OnAddRadioGroupItem(wxCommandEvent& event)
+{
+ AddItem(ctTypeRadioGroup, _("New radio group item"));
+}
+
+/// Add a string item
+void ctConfigToolView::OnAddStringItem(wxCommandEvent& event)
+{
+ AddItem(ctTypeString, _("New string item"));
+}
+
+/// Add an item
+void ctConfigToolView::AddItem(ctConfigType type, const wxString& msg)
+{
+ ctConfigItem* sel = GetSelection();
+ if (sel)
+ {
+ wxString name = wxGetTextFromUser(_("Please enter a name for the new item."),
+ msg, wxT(""));
+ if (!name.IsEmpty())
+ {
+ ctConfigItem* parent ;
+ ctConfigItem* insertBefore ;
+ if (sel->CanHaveChildren())
+ {
+ parent = sel;
+ insertBefore = NULL;
+ }
+ else
+ {
+ parent = sel->GetParent();
+ insertBefore = sel->FindNextSibling();
+ }
+
+ ctConfigItem* newItem = new ctConfigItem(NULL, type, name);
+ newItem->InitProperties();
+
+ newItem->GetDocument()->GetCommandProcessor()->Submit(
+ new ctConfigCommand(msg, ctCMD_NEW_ELEMENT, NULL, newItem,
+ parent, insertBefore));
+ }
+ }
+}
+
+/// Delete an item
+void ctConfigToolView::OnDeleteItem(wxCommandEvent& event)
+{
+ ctConfigItem* sel = GetSelection();
+ if (sel)
+ {
+ wxString msg;
+ msg.Printf(_("Delete %s?"), sel->GetName());
+ if (wxYES == wxMessageBox(msg, _("Delete item"), wxICON_QUESTION|wxYES_NO))
+ {
+ wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->Delete(sel->GetTreeItemId());
+ }
+ }
+}
+
+/// Rename an item
+void ctConfigToolView::OnRenameItem(wxCommandEvent& event)
+{
+ ctConfigItem* sel = GetSelection();
+ if (sel)
+ {
+ wxString name = wxGetTextFromUser(_("Please enter a new name for the item."),
+ _("Rename item"), sel->GetName());
+ if (!name.IsEmpty())
+ {
+ sel->SetName(name);
+ SyncItem(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), sel);
+
+ ctConfigToolHint hint(NULL, ctSelChanged);
+ GetDocument()->UpdateAllViews (NULL, & hint);
+ }
+ }
+}
+
+/// Copy an item to the clipboard
+void ctConfigToolView::OnCopy(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = GetSelection();
+ if (sel)
+ {
+ doc->SetClipboardItem(sel->DeepClone());
+ }
+}
+
+/// Copy an item to the clipboard and cut the item
+void ctConfigToolView::OnCut(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = GetSelection();
+ if (sel)
+ {
+ {
+ ctConfigCommand* cmd = new ctConfigCommand(wxT("Cut Config Item"), ctCMD_CUT,
+ sel, (ctConfigItem*) NULL);
+ doc->GetCommandProcessor()->Submit(cmd);
+ }
+ }
+}
+
+/// Paste an item from the clipboard to the tree
+void ctConfigToolView::OnPaste(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = GetSelection();
+ if (sel && doc->GetClipboardItem())
+ {
+ ctConfigItem* parent ;
+ ctConfigItem* insertBefore ;
+ if (sel->CanHaveChildren())
+ {
+ parent = sel;
+ insertBefore = NULL;
+ }
+ else
+ {
+ parent = sel->GetParent();
+ insertBefore = sel->FindNextSibling();
+ }
+
+ ctConfigItem* newItem = doc->GetClipboardItem()->DeepClone();
+ ctConfigCommand* cmd = new ctConfigCommand(wxT("Paste Config Item"), ctCMD_PASTE,
+ NULL, newItem, parent, insertBefore);
+ doc->GetCommandProcessor()->Submit(cmd);
+ }
+}
+
+/// Update for copy command
+void ctConfigToolView::OnUpdateCopy(wxUpdateUIEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ event.Enable( doc && GetSelection() && GetSelection()->GetParent() );
+}
+
+/// Update for cut
+void ctConfigToolView::OnUpdateCut(wxUpdateUIEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ event.Enable( doc && GetSelection() && GetSelection()->GetParent() );
+}
+
+/// Update for paste
+void ctConfigToolView::OnUpdatePaste(wxUpdateUIEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ event.Enable( doc && doc->GetClipboardItem() && GetSelection() );
+}
+
+/// Copy an item to the clipboard
+void ctConfigToolView::OnContextCopy(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
+ if (doc && sel)
+ {
+ doc->SetClipboardItem(sel->DeepClone());
+ }
+}
+
+/// Copy an item to the clipboard and cut the item
+void ctConfigToolView::OnContextCut(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
+ if (sel)
+ {
+ {
+ ctConfigCommand* cmd = new ctConfigCommand(wxT("Cut Config Item"), ctCMD_CUT,
+ sel, (ctConfigItem*) NULL);
+ doc->GetCommandProcessor()->Submit(cmd);
+ }
+ }
+}
+
+/// Paste an item from the clipboard to the tree
+void ctConfigToolView::OnContextPasteBefore(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
+ if (sel && doc->GetClipboardItem())
+ {
+ ctConfigItem* parent = sel->GetParent();
+ ctConfigItem* insertBefore = sel;
+
+ ctConfigItem* newItem = doc->GetClipboardItem()->DeepClone();
+ ctConfigCommand* cmd = new ctConfigCommand(wxT("Paste Config Item"), ctCMD_PASTE,
+ NULL, newItem, parent, insertBefore);
+ doc->GetCommandProcessor()->Submit(cmd);
+ }
+}
+
+/// Paste an item from the clipboard to the tree
+void ctConfigToolView::OnContextPasteAfter(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
+ if (sel && doc->GetClipboardItem())
+ {
+ ctConfigItem* parent = sel->GetParent();
+ ctConfigItem* insertBefore = sel->FindNextSibling();
+
+ ctConfigItem* newItem = doc->GetClipboardItem()->DeepClone();
+ ctConfigCommand* cmd = new ctConfigCommand(wxT("Paste Config Item"), ctCMD_PASTE,
+ NULL, newItem, parent, insertBefore);
+ doc->GetCommandProcessor()->Submit(cmd);
+ }
+}
+
+/// Paste an item from the clipboard to the tree
+void ctConfigToolView::OnContextPasteAsChild(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
+ if (sel && doc->GetClipboardItem())
+ {
+ if (sel->CanHaveChildren())
+ {
+ ctConfigItem* parent = sel;
+ ctConfigItem* insertBefore = NULL;
+
+ ctConfigItem* newItem = doc->GetClipboardItem()->DeepClone();
+ ctConfigCommand* cmd = new ctConfigCommand(wxT("Paste Config Item"), ctCMD_PASTE,
+ NULL, newItem, parent, insertBefore);
+ doc->GetCommandProcessor()->Submit(cmd);
+ }
+ }
+}
+
+/// Copy an item to the clipboard
+void ctConfigToolView::OnUpdateContextCopy(wxUpdateUIEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
+ event.Enable( doc && sel && sel->GetParent() );
+}
+
+/// Copy an item to the clipboard and cut the item
+void ctConfigToolView::OnUpdateContextCut(wxUpdateUIEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
+ event.Enable( doc && sel && sel->GetParent() );
+}
+
+/// Paste an item from the clipboard to the tree
+void ctConfigToolView::OnUpdateContextPasteBefore(wxUpdateUIEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
+ event.Enable( doc && sel && sel->GetParent() && doc->GetClipboardItem() );
+}
+
+/// Paste an item from the clipboard to the tree
+void ctConfigToolView::OnUpdateContextPasteAfter(wxUpdateUIEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
+ event.Enable( doc && sel && sel->GetParent() && doc->GetClipboardItem() );
+}
+
+/// Paste an item from the clipboard to the tree
+void ctConfigToolView::OnUpdateContextPasteAsChild(wxUpdateUIEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
+ event.Enable( doc && sel && sel->CanHaveChildren() && doc->GetClipboardItem() );
+}
+
+/// Item help
+void ctConfigToolView::OnItemHelp(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ if ( doc && GetSelection() )
+ {
+ wxString helpTopic = GetSelection()->GetPropertyString(wxT("help-topic"));
+ if (!helpTopic.IsEmpty())
+ {
+ wxGetApp().GetReferenceHelpController().DisplaySection(helpTopic);
+ }
+ }
+}
+
+/// Item help update
+void ctConfigToolView::OnUpdateItemHelp(wxUpdateUIEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ event.Enable( doc && GetSelection() );
+}
+
+/// Add a custom property
+void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = GetSelection();
+ ctPropertyEditor* editor = wxGetApp().GetMainFrame()->GetPropertyEditor();
+ if (doc && sel && editor)
+ {
+ ctCustomPropertyDialog dialog(wxGetApp().GetMainFrame(),
+ -1, _("Add a custom property"));
+ if (dialog.ShowModal() == wxID_OK)
+ {
+ wxString name = dialog.GetPropertyName();
+ wxString type = dialog.GetPropertyType();
+ wxString descr = dialog.GetPropertyDescription();
+ wxString editorType = dialog.GetEditorType();
+ wxArrayString choices = dialog.GetChoices();
+
+ if (sel->GetProperties().FindProperty(name))
+ {
+ wxMessageBox(_("Sorry, this name already exists."), _T("Add custom property"),
+ wxOK|wxICON_INFORMATION);
+ return;
+ }
+ ctProperty* property = new ctProperty;
+ if (type == wxT("bool"))
+ property->GetVariant() = wxVariant((bool) FALSE, name);
+ else if (type == wxT("double"))
+ property->GetVariant() = wxVariant((double) 0.0, name);
+ else if (type == wxT("long"))
+ property->GetVariant() = wxVariant((long) 0, name);
+ else
+ property->GetVariant() = wxVariant(wxT(""), name);
+ property->SetCustom(TRUE);
+ property->SetDescription(descr);
+ property->SetChoices(choices);
+ property->SetEditorType(editorType);
+
+ sel->GetProperties().AddProperty(property);
+ editor->ShowItem(sel);
+ OnChangeFilename();
+ }
+ }
+}
+
+/// Edit a custom property
+void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = GetSelection();
+ ctPropertyEditor* editor = wxGetApp().GetMainFrame()->GetPropertyEditor();
+ if (doc && sel && editor)
+ {
+ int row;
+ ctProperty* property = editor->FindSelectedProperty(row) ;
+ if (property && property->IsCustom())
+ {
+ wxString oldName = property->GetName();
+ wxString oldDescription = property->GetDescription();
+ wxString oldType = property->GetVariant().GetType();
+ wxString oldEditorType = property->GetEditorType();
+ wxArrayString oldChoices = property->GetChoices();
+
+ ctCustomPropertyDialog dialog(wxGetApp().GetMainFrame(),
+ -1, _("Edit custom property"));
+ dialog.SetPropertyName(oldName);
+ dialog.SetPropertyType(oldType);
+ dialog.SetPropertyDescription(oldDescription);
+ if (dialog.ShowModal() == wxID_OK)
+ {
+ wxString name = dialog.GetPropertyName();
+ wxString type = dialog.GetPropertyType();
+ wxString editorType = dialog.GetEditorType();
+ wxArrayString choices = dialog.GetChoices();
+ wxString descr = dialog.GetPropertyDescription();
+
+ if (name != oldName && sel->GetProperties().FindProperty(name))
+ {
+ wxMessageBox(_("Sorry, this name already exists."), _T("Add custom property"),
+ wxOK|wxICON_INFORMATION);
+ return;
+ }
+ if (type != oldType)
+ {
+ if (type == wxT("bool"))
+ property->GetVariant() = wxVariant((bool) FALSE, name);
+ else if (type == wxT("double"))
+ property->GetVariant() = wxVariant((double) 0.0, name);
+ else if (type == wxT("long"))
+ property->GetVariant() = wxVariant((long) 0, name);
+ else
+ property->GetVariant() = wxVariant(wxT(""), name);
+ }
+ if (name != oldName)
+ property->GetVariant().SetName(name);
+
+ if (choices != oldChoices)
+ property->SetChoices(choices);
+
+ if (editorType != oldEditorType)
+ property->SetEditorType(editorType);
+
+ if (name != oldName)
+ property->GetVariant().SetName(name);
+
+ property->SetCustom(TRUE);
+
+ if (descr != oldDescription)
+ property->SetDescription(descr);
+
+ editor->ShowItem(sel);
+ OnChangeFilename();
+ }
+ }
+ }
+}
+
+/// Delete a custom property
+void ctConfigToolView::OnDeleteCustomProperty(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = GetSelection();
+ ctPropertyEditor* editor = wxGetApp().GetMainFrame()->GetPropertyEditor();
+ if (doc && sel && editor)
+ {
+ int row;
+ ctProperty* property = editor->FindSelectedProperty(row) ;
+ if (property && property->IsCustom())
+ {
+ wxString name(property->GetName());
+ wxString msg;
+ msg.Printf(_("Delete custom property '%s'?"), (const wxChar*) name);
+ if (wxYES == wxMessageBox(msg, _("Delete property"), wxICON_EXCLAMATION|wxYES_NO))
+ {
+ sel->GetProperties().RemoveProperty(property);
+ editor->ShowItem(sel);
+ delete property;
+ OnChangeFilename();
+ }
+ }
+ }
+}
+
+/// Add a custom property: update event
+void ctConfigToolView::OnUpdateAddCustomProperty(wxUpdateUIEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ event.Enable( doc && GetSelection() && GetSelection()->GetParent() );
+}
+
+/// Edit a custom property: update event
+void ctConfigToolView::OnUpdateEditCustomProperty(wxUpdateUIEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = GetSelection();
+ ctPropertyEditor* editor = wxGetApp().GetMainFrame()->GetPropertyEditor();
+ int row;
+ event.Enable( doc && sel && sel->GetParent() && editor &&
+ editor->FindSelectedProperty(row) &&
+ editor->FindSelectedProperty(row)->IsCustom() );
+}
+
+/// Delete a custom property: update event
+void ctConfigToolView::OnUpdateDeleteCustomProperty(wxUpdateUIEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctConfigItem* sel = GetSelection();
+ ctPropertyEditor* editor = wxGetApp().GetMainFrame()->GetPropertyEditor();
+ int row;
+ event.Enable( doc && sel && sel->GetParent() && editor &&
+ editor->FindSelectedProperty(row) &&
+ editor->FindSelectedProperty(row)->IsCustom() );
+}
+
+/// Regenerate setup.h and configure command
+void ctConfigToolView::RegenerateSetup()
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ ctOutputWindow* setupPage = wxGetApp().GetMainFrame()->GetSetupPage() ;
+ ctOutputWindow* configurePage = wxGetApp().GetMainFrame()->GetConfigurePage() ;
+
+ wxString setupStr = doc->GenerateSetup();
+ wxString configureStr = doc->GenerateConfigureCommand();
+
+ setupPage->SetText(setupStr);
+ configurePage->SetText(configureStr);
+}
+
+/// Regenerate if selected a tab
+void ctConfigToolView::OnTabSelect(wxNotebookEvent& event)
+{
+ if (wxGetApp().GetMainFrame()->GetMainNotebook() != event.GetEventObject())
+ {
+ event.Skip();
+ return;
+ }
+
+ if (event.GetSelection() > 0)
+ {
+ RegenerateSetup();
+ }
+}
+
+void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ wxString setupStr = doc->GenerateSetup();
+
+ wxString filename = _T("setup.h");
+ wxString path = doc->GetFrameworkDir(FALSE);
+ wxString wildcard = _T("Header files (*.h)|*.h|All files (*.*)|*.*");
+
+ wxFileDialog dialog(wxTheApp->GetTopWindow(),
+ _("Save Setup File As"),
+ path, filename ,
+ wildcard, wxSAVE|wxOVERWRITE_PROMPT);
+
+ if (dialog.ShowModal() == wxID_OK)
+ {
+ wxString fullPath = dialog.GetPath();
+
+ // TODO: save last saved path in settings.
+
+ wxFileOutputStream stream(fullPath);
+ if (!stream.Ok())
+ {
+ wxMessageBox(_("Sorry, could not save this file."), _("Save Setup File"), wxICON_EXCLAMATION|wxOK);
+ return;
+ }
+
+ stream << setupStr;
+ }
+}
+
+void ctConfigToolView::OnSaveConfigureCommand(wxCommandEvent& event)
+{
+ ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
+ wxString configureStr = doc->GenerateConfigureCommand();
+
+ wxString filename = _T("configurewx.sh");
+ wxString path = doc->GetFrameworkDir(FALSE);
+ wxString wildcard = _T("Shell script files (*.sh)|*.sh|All files (*.*)|*.*");
+
+ wxFileDialog dialog(wxTheApp->GetTopWindow(),
+ _("Save Configure Command File As"),
+ path, filename ,
+ wildcard, wxSAVE|wxOVERWRITE_PROMPT);
+
+ if (dialog.ShowModal() == wxID_OK)
+ {
+ wxString fullPath = dialog.GetPath();
+
+ // TODO: save last saved path in settings.
+
+ wxFileOutputStream stream(fullPath);
+ if (!stream.Ok())
+ {
+ wxMessageBox(_("Sorry, could not save this file."), _("Save Configure Command File"), wxICON_EXCLAMATION|wxOK);
+ return;
+ }
+
+ stream << configureStr;
+ }
+}
+
+void ctConfigToolView::OnUpdateSaveSetupFile(wxUpdateUIEvent& event)
+{
+ event.Enable(TRUE);
+}
+
+void ctConfigToolView::OnUpdateSaveConfigureCommand(wxUpdateUIEvent& event)
+{
+ event.Enable(TRUE);
+}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: configtoolview.h
+// Purpose: View class
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _CT_CONFIGTOOLVIEW_H_
+#define _CT_CONFIGTOOLVIEW_H_
+
+#ifdef __GNUG__
+#pragma interface "configtoolview.cpp"
+#endif
+
+#include "wx/docview.h"
+#include "wx/treectrl.h"
+#include "configitem.h"
+
+class ctConfigTreeCtrl;
+class WXDLLEXPORT wxNotebookEvent;
+
+/*
+ * ctConfigToolView
+ */
+
+class ctConfigItem;
+class ctConfigToolView: public wxView
+{
+ DECLARE_DYNAMIC_CLASS(ctConfigToolView)
+public:
+ ctConfigToolView();
+ ~ctConfigToolView() {};
+
+//// Overrides
+
+ bool OnCreate(wxDocument *doc, long flags);
+ void OnDraw(wxDC *dc);
+ void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
+ bool OnClose(bool deleteWindow = TRUE);
+ void OnChangeFilename();
+
+//// Operations
+
+ /// Gets the tree item in sync with the item.
+ void SyncItem(ctConfigTreeCtrl* treeControl, ctConfigItem* item);
+
+ /// Add item and its children to the tree
+ void AddItems(ctConfigTreeCtrl* treeControl, ctConfigItem* item);
+
+ /// Clicked an icon
+ void OnIconLeftDown(ctConfigTreeCtrl* treeControl, ctConfigItem* item);
+
+ /// Add an item
+ void AddItem(ctConfigType type, const wxString& msg);
+
+ /// Regenerate setup.h and configure command
+ void RegenerateSetup();
+
+//// Accessors
+
+ /// Returns the selected config item, if any.
+ ctConfigItem* GetSelection();
+
+//// Event handlers
+
+ /// General disabler
+ void OnUpdateDisable(wxUpdateUIEvent& event);
+
+ /// Enable add item menu items
+ void OnUpdateAddItem(wxUpdateUIEvent& event);
+
+ /// Add a checkbox item
+ void OnAddCheckBoxItem(wxCommandEvent& event);
+
+ /// Add a radiobutton item
+ void OnAddRadioButtonItem(wxCommandEvent& event);
+
+ /// Add a group item
+ void OnAddGroupItem(wxCommandEvent& event);
+
+ /// Add a check group item
+ void OnAddCheckGroupItem(wxCommandEvent& event);
+
+ /// Add a radio group item
+ void OnAddRadioGroupItem(wxCommandEvent& event);
+
+ /// Add a string item
+ void OnAddStringItem(wxCommandEvent& event);
+
+ /// Delete an item
+ void OnDeleteItem(wxCommandEvent& event);
+
+ /// Rename an item
+ void OnRenameItem(wxCommandEvent& event);
+
+ /// Copy an item to the clipboard
+ void OnCopy(wxCommandEvent& event);
+
+ /// Copy an item to the clipboard and cut the item
+ void OnCut(wxCommandEvent& event);
+
+ /// Paste an item from the clipboard to the tree
+ void OnPaste(wxCommandEvent& event);
+
+ /// Item help
+ void OnItemHelp(wxCommandEvent& event);
+
+ /// Update for copy command
+ void OnUpdateCopy(wxUpdateUIEvent& event);
+
+ /// Update for cut
+ void OnUpdateCut(wxUpdateUIEvent& event);
+
+ /// Update for paste
+ void OnUpdatePaste(wxUpdateUIEvent& event);
+
+ /// Update for item help
+ void OnUpdateItemHelp(wxUpdateUIEvent& event);
+
+ // Context menu events
+
+ /// Copy an item to the clipboard
+ void OnContextCopy(wxCommandEvent& event);
+
+ /// Copy an item to the clipboard and cut the item
+ void OnContextCut(wxCommandEvent& event);
+
+ /// Paste an item from the clipboard to the tree
+ void OnContextPasteBefore(wxCommandEvent& event);
+
+ /// Paste an item from the clipboard to the tree
+ void OnContextPasteAfter(wxCommandEvent& event);
+
+ /// Paste an item from the clipboard to the tree
+ void OnContextPasteAsChild(wxCommandEvent& event);
+
+ /// Copy an item to the clipboard
+ void OnUpdateContextCopy(wxUpdateUIEvent& event);
+
+ /// Copy an item to the clipboard and cut the item
+ void OnUpdateContextCut(wxUpdateUIEvent& event);
+
+ /// Paste an item from the clipboard to the tree
+ void OnUpdateContextPasteBefore(wxUpdateUIEvent& event);
+
+ /// Paste an item from the clipboard to the tree
+ void OnUpdateContextPasteAfter(wxUpdateUIEvent& event);
+
+ /// Paste an item from the clipboard to the tree
+ void OnUpdateContextPasteAsChild(wxUpdateUIEvent& event);
+
+ // Custom property events
+
+ /// Add a custom property
+ void OnAddCustomProperty(wxCommandEvent& event);
+
+ /// Edit a custom property
+ void OnEditCustomProperty(wxCommandEvent& event);
+
+ /// Delete a custom property
+ void OnDeleteCustomProperty(wxCommandEvent& event);
+
+ /// Add a custom property: update event
+ void OnUpdateAddCustomProperty(wxUpdateUIEvent& event);
+
+ /// Edit a custom property: update event
+ void OnUpdateEditCustomProperty(wxUpdateUIEvent& event);
+
+ /// Delete a custom property: update event
+ void OnUpdateDeleteCustomProperty(wxUpdateUIEvent& event);
+
+ // Notebook events
+
+ /// Regenerate if selected a tab
+ void OnTabSelect(wxNotebookEvent& event);
+
+ /// Saving setup file
+ void OnSaveSetupFile(wxCommandEvent& event);
+
+ /// Save configure command file
+ void OnSaveConfigureCommand(wxCommandEvent& event);
+
+ /// Saving setup file update handler
+ void OnUpdateSaveSetupFile(wxUpdateUIEvent& event);
+
+ /// Save configure command file update handler
+ void OnUpdateSaveConfigureCommand(wxUpdateUIEvent& event);
+
+DECLARE_EVENT_TABLE()
+
+protected:
+};
+
+/*
+ * ctConfigToolHint
+ *
+ * Hint to pass to UpdateAllViews
+ *
+ */
+
+// Update hint symbols
+#define ctNoHint 0
+#define ctAllSaved 1
+#define ctClear 2
+#define ctValueChanged 3
+#define ctSelChanged 4
+#define ctFilenameChanged 5
+#define ctInitialUpdate 6
+
+class ctConfigItem;
+class ctConfigToolHint: public wxObject
+{
+public:
+ ctConfigToolHint(ctConfigItem* item, int op) { m_item = item; m_op = op; }
+
+ ctConfigItem* m_item;
+ int m_op;
+};
+
+#endif
+ // _CT_CONFIGTOOLVIEW_H_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: configtree.h
+// Purpose: wxWindows Configuration Tool tree class
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-03
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "configtree.h"
+#endif
+
+// Includes other headers for precompiled compilation
+#include "wx/wx.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include "wx/imaglist.h"
+#include "wx/cshelp.h"
+
+// Include XPM icons
+#include "bitmaps/folder1.xpm"
+
+#include "bitmaps/closedfolder.xpm"
+#include "bitmaps/closedfolder_dis.xpm"
+
+#include "bitmaps/checked.xpm"
+#include "bitmaps/checked_dis.xpm"
+#include "bitmaps/unchecked.xpm"
+#include "bitmaps/unchecked_dis.xpm"
+
+#include "bitmaps/radioon.xpm"
+#include "bitmaps/radioon_dis.xpm"
+#include "bitmaps/radiooff.xpm"
+#include "bitmaps/radiooff_dis.xpm"
+
+#include "bitmaps/checkedfolder.xpm"
+#include "bitmaps/checkedfolder_dis.xpm"
+#include "bitmaps/uncheckedfolder.xpm"
+#include "bitmaps/uncheckedfolder_dis.xpm"
+
+#include "bitmaps/radiofolderon.xpm"
+#include "bitmaps/radiofolderon_dis.xpm"
+#include "bitmaps/radiofolderoff.xpm"
+#include "bitmaps/radiofolderoff_dis.xpm"
+
+#include "configtree.h"
+#include "configtooldoc.h"
+#include "configtoolview.h"
+#include "wxconfigtool.h"
+#include "mainframe.h"
+
+/*
+ * ctConfigTreeCtrl
+ */
+
+IMPLEMENT_CLASS(ctConfigTreeCtrl, wxTreeCtrl)
+
+BEGIN_EVENT_TABLE(ctConfigTreeCtrl, wxTreeCtrl)
+ EVT_MOUSE_EVENTS(ctConfigTreeCtrl::OnMouseEvent)
+ EVT_CHAR(ctConfigTreeCtrl::OnKeyDown)
+ EVT_TREE_SEL_CHANGED(-1, ctConfigTreeCtrl::OnSelChanged)
+ EVT_HELP(-1, ctConfigTreeCtrl::OnHelp)
+END_EVENT_TABLE()
+
+ctConfigTreeCtrl::ctConfigTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt,
+ const wxSize& sz, long style):
+wxTreeCtrl(parent, id, pt, sz, style)
+{
+ LoadIcons();
+
+ m_contextMenu = NULL;
+ m_contextMenu = new wxMenu;
+
+ m_contextMenu->Append(ctID_TREE_PASTE_BEFORE, _("Paste &before this option"));
+ m_contextMenu->Append(ctID_TREE_PASTE_AFTER, _("Paste &after this option"));
+ m_contextMenu->Append(ctID_TREE_PASTE_AS_CHILD, _("Paste as &child of this option"));
+ m_contextMenu->AppendSeparator();
+ m_contextMenu->Append(ctID_TREE_COPY, _("C&opy"));
+ m_contextMenu->Append(ctID_TREE_CUT, _("Cu&t"));
+
+ SetHelpText(_("This shows configuration settings that you can enable and disable."));
+}
+
+// Load the icons and initialize the tree
+void ctConfigTreeCtrl::LoadIcons()
+{
+ m_imageList = new wxImageList(16, 16, TRUE);
+ m_iconTable.SetImageList(m_imageList);
+ SetImageList(m_imageList);
+
+ m_iconTable.AddInfo("Group", wxIcon(closedfolder_xpm), 0, TRUE);
+ m_iconTable.AddInfo("Group", wxIcon(closedfolder_dis_xpm), 0, FALSE);
+
+ m_iconTable.AddInfo("Checkbox", wxIcon(checked_xpm), 0, TRUE);
+ m_iconTable.AddInfo("Checkbox", wxIcon(checked_dis_xpm), 0, FALSE);
+ m_iconTable.AddInfo("Checkbox", wxIcon(unchecked_xpm), 1, TRUE);
+ m_iconTable.AddInfo("Checkbox", wxIcon(unchecked_dis_xpm), 1, FALSE);
+
+ m_iconTable.AddInfo("CheckGroup", wxIcon(checkedfolder_xpm), 0, TRUE);
+ m_iconTable.AddInfo("CheckGroup", wxIcon(checkedfolder_dis_xpm), 0, FALSE);
+ m_iconTable.AddInfo("CheckGroup", wxIcon(uncheckedfolder_xpm), 1, TRUE);
+ m_iconTable.AddInfo("CheckGroup", wxIcon(uncheckedfolder_dis_xpm), 1, FALSE);
+
+ m_iconTable.AddInfo("RadioGroup", wxIcon(radiofolderon_xpm), 0, TRUE);
+ m_iconTable.AddInfo("RadioGroup", wxIcon(radiofolderon_dis_xpm), 0, FALSE);
+ m_iconTable.AddInfo("RadioGroup", wxIcon(radiofolderoff_xpm), 1, TRUE);
+ m_iconTable.AddInfo("RadioGroup", wxIcon(radiofolderoff_dis_xpm), 1, FALSE);
+
+ m_iconTable.AddInfo("Radiobutton", wxIcon(radioon_xpm), 0, TRUE);
+ m_iconTable.AddInfo("Radiobutton", wxIcon(radioon_dis_xpm), 0, FALSE);
+ m_iconTable.AddInfo("Radiobutton", wxIcon(radiooff_xpm), 1, TRUE);
+ m_iconTable.AddInfo("Radiobutton", wxIcon(radiooff_dis_xpm), 1, FALSE);
+}
+
+ctConfigTreeCtrl::~ctConfigTreeCtrl()
+{
+ SetImageList(NULL);
+ delete m_imageList;
+
+ delete m_contextMenu;
+}
+
+void ctConfigTreeCtrl::OnSelChanged(wxTreeEvent& event)
+{
+ ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
+ if (doc)
+ {
+ ctConfigToolHint hint(NULL, ctSelChanged);
+ doc->UpdateAllViews(NULL, & hint);
+ }
+}
+
+void ctConfigTreeCtrl::OnMouseEvent(wxMouseEvent& event)
+{
+ int flags = 0;
+ wxTreeItemId item = HitTest(wxPoint(event.GetX(), event.GetY()), flags);
+
+ if (event.LeftDown())
+ {
+ if (flags & wxTREE_HITTEST_ONITEMICON)
+ {
+ ctTreeItemData* data = (ctTreeItemData*) GetItemData(item);
+ ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
+ if (doc)
+ {
+ ctConfigToolView* view = wxDynamicCast(doc->GetFirstView(), ctConfigToolView);
+ if (view)
+ view->OnIconLeftDown(this, data->GetConfigItem());
+ }
+ }
+ }
+ else if (event.RightDown())
+ {
+ if ((flags & wxTREE_HITTEST_ONITEMBUTTON) ||
+ (flags & wxTREE_HITTEST_ONITEMICON) ||
+ (flags & wxTREE_HITTEST_ONITEMINDENT) ||
+ (flags & wxTREE_HITTEST_ONITEMLABEL))
+ {
+ ctTreeItemData* data = (ctTreeItemData*) GetItemData(item);
+ ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
+ if (doc && data)
+ {
+ m_contextItem = data->GetConfigItem();
+ PopupMenu(m_contextMenu, event.GetX(), event.GetY());
+ }
+ }
+ }
+
+ event.Skip();
+}
+
+void ctConfigTreeCtrl::OnKeyDown(wxKeyEvent& event)
+{
+ wxTreeItemId id = GetSelection();
+ if (event.GetKeyCode() == WXK_SPACE)
+ {
+ if (id.IsOk())
+ {
+ ctConfigItem* item = ((ctTreeItemData*) GetItemData(id))->GetConfigItem();
+ ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
+ if (doc)
+ {
+ ctConfigToolView* view = wxDynamicCast(doc->GetFirstView(), ctConfigToolView);
+ if (view)
+ view->OnIconLeftDown(this, item);
+ }
+ }
+ }
+ else
+ {
+ event.Skip();
+ }
+}
+
+// Show help for this window
+void ctConfigTreeCtrl::OnHelp(wxHelpEvent& event)
+{
+ wxPoint pt = ScreenToClient(event.GetPosition());
+ int flags = 0;
+ wxTreeItemId id = HitTest(pt, flags);
+ wxHelpProvider *helpProvider = wxHelpProvider::Get();
+ if ( helpProvider && id > 0)
+ {
+ ctConfigItem* item = ((ctTreeItemData*) GetItemData(id))->GetConfigItem();
+ if (item)
+ {
+ wxString helpTopic = item->GetPropertyString(wxT("help-topic"));
+ if (!helpTopic.IsEmpty())
+ {
+ wxGetApp().GetReferenceHelpController().DisplaySection(helpTopic);
+ return;
+ }
+ }
+ }
+
+ event.Skip();
+}
+
+ctTreeItemData::~ctTreeItemData()
+{
+ if (m_configItem) delete m_configItem;
+}
+
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: configtree.h
+// Purpose: wxWindows Configuration Tool tree class
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-03
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+
+#ifndef _CT_CONFIGTREE_H_
+#define _CT_CONFIGTREE_H_
+
+#ifdef __GNUG__
+#pragma interface "configtree.cpp"
+#endif
+
+#include "wx/wx.h"
+#include "wx/treectrl.h"
+
+#include "configitem.h"
+#include "utils.h"
+
+/*!
+ * ctTreeItemData
+ * Holds the ctConfigItem for each tree item.
+ */
+
+class ctTreeItemData : public wxTreeItemData
+{
+public:
+ ctTreeItemData(ctConfigItem* item) : m_configItem(item) { }
+ ~ctTreeItemData() ;
+
+ ctConfigItem *GetConfigItem() const { return m_configItem; }
+ void SetConfigItem(ctConfigItem *item) { m_configItem = item; }
+
+private:
+ ctConfigItem* m_configItem;
+};
+
+
+/*!
+ * ctConfigTreeCtrl
+ * The options hierarchy viewer.
+ */
+
+class ctConfigTreeCtrl: public wxTreeCtrl
+{
+ DECLARE_CLASS(ctConfigTreeCtrl)
+public:
+ ctConfigTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS);
+ ~ctConfigTreeCtrl();
+
+//// Event handlers
+ void OnMouseEvent(wxMouseEvent& event);
+ void OnSelChanged(wxTreeEvent& event);
+ void OnHelp(wxHelpEvent& event);
+ void OnKeyDown(wxKeyEvent& event);
+
+//// Accessors
+
+ /// Get the table of icons
+ wxIconTable& GetIconTable() { return m_iconTable; }
+
+ /// Get the context menu
+ wxMenu* GetMenu() { return m_contextMenu; }
+
+ /// Get the item associated with the context menu events
+ ctConfigItem* GetContextItem() { return m_contextItem; }
+
+//// Operations
+
+ /// Loads the icons.
+ void LoadIcons();
+
+protected:
+ wxImageList* m_imageList;
+ wxIconTable m_iconTable;
+ wxMenu* m_contextMenu;
+ // The item associated with the context menu events
+ ctConfigItem* m_contextItem;
+
+ DECLARE_EVENT_TABLE()
+};
+
+#endif
+// _CT_CONFIGTREE_H_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: custompropertydialog.cpp
+// Purpose: Custom property dialog
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation custompropertydialog.h
+#endif
+
+#include <wx/wx.h>
+#include <wx/cshelp.h>
+#include <wx/statline.h>
+#include <wx/splitter.h>
+#include <wx/scrolwin.h>
+#include <wx/spinctrl.h>
+#include <wx/spinbutt.h>
+#include <wx/valgen.h>
+
+#include "custompropertydialog.h"
+
+////@begin XPM images
+////@end XPM images
+
+/*!
+ * ctCustomPropertyDialog type definition
+ */
+
+IMPLEMENT_CLASS( ctCustomPropertyDialog, wxDialog )
+
+/*!
+ * ctCustomPropertyDialog event table definition
+ */
+
+BEGIN_EVENT_TABLE( ctCustomPropertyDialog, wxDialog )
+
+////@begin ctCustomPropertyDialog event table entries
+ EVT_UPDATE_UI( ID_PROPERTY_CHOICES, ctCustomPropertyDialog::OnUpdatePropertyChoices )
+
+ EVT_BUTTON( ID_PROPERTY_CHOICE_ADD, ctCustomPropertyDialog::OnPropertyChoiceAdd )
+ EVT_UPDATE_UI( ID_PROPERTY_CHOICE_ADD, ctCustomPropertyDialog::OnUpdatePropertyChoiceAdd )
+
+ EVT_BUTTON( ID_PROPERTY_CHOICE_REMOVE, ctCustomPropertyDialog::OnPropertyChoiceRemove )
+ EVT_UPDATE_UI( ID_PROPERTY_CHOICE_REMOVE, ctCustomPropertyDialog::OnUpdatePropertyChoiceRemove )
+
+////@end ctCustomPropertyDialog event table entries
+
+END_EVENT_TABLE()
+
+/*!
+ * ctCustomPropertyDialog constructor
+ */
+
+ctCustomPropertyDialog::ctCustomPropertyDialog( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
+{
+ m_type = wxT("string");
+
+ wxDialog::Create( parent, id, caption, pos, size, style );
+
+ CreateControls();
+}
+
+/*!
+ * Control creation for ctCustomPropertyDialog
+ */
+
+void ctCustomPropertyDialog::CreateControls()
+{
+////@begin ctCustomPropertyDialog content construction
+
+ ctCustomPropertyDialog* item1 = this;
+
+ wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
+ item1->SetSizer(item2);
+ item1->SetAutoLayout(TRUE);
+
+ wxBoxSizer* item3 = new wxBoxSizer(wxVERTICAL);
+ item2->Add(item3, 1, wxGROW|wxALL, 5);
+
+ wxStaticText* item4 = new wxStaticText(item1, wxID_STATIC, _("&Enter name, type and description for your custom property."), wxDefaultPosition, wxDefaultSize, 0);
+ item3->Add(item4, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
+
+ wxStaticText* item5 = new wxStaticText(item1, wxID_STATIC, _("&Name:"), wxDefaultPosition, wxDefaultSize, 0);
+ item3->Add(item5, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
+
+ wxTextCtrl* item6 = new wxTextCtrl(item1, ID_CUSTOMPROPERTYNAME, _(""), wxDefaultPosition, wxDefaultSize, 0);
+ item3->Add(item6, 0, wxGROW|wxALL, 5);
+
+ wxBoxSizer* item7 = new wxBoxSizer(wxHORIZONTAL);
+ item3->Add(item7, 0, wxGROW, 5);
+
+ wxBoxSizer* item8 = new wxBoxSizer(wxVERTICAL);
+ item7->Add(item8, 1, wxGROW, 5);
+
+ wxStaticText* item9 = new wxStaticText(item1, wxID_STATIC, _("&Data type:"), wxDefaultPosition, wxDefaultSize, 0);
+ item8->Add(item9, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
+
+ wxString item10Strings[] = {
+ _("string"),
+ _("bool"),
+ _("double"),
+ _("long")
+ };
+ wxChoice* item10 = new wxChoice(item1, ID_CUSTOMPROPERTYTYPE, wxDefaultPosition, wxDefaultSize, 4, item10Strings, 0);
+ item10->SetStringSelection(_("string"));
+ item8->Add(item10, 1, wxGROW|wxALL, 5);
+
+ wxBoxSizer* item11 = new wxBoxSizer(wxVERTICAL);
+ item7->Add(item11, 0, wxALIGN_CENTER_VERTICAL, 5);
+
+ wxStaticText* item12 = new wxStaticText(item1, wxID_STATIC, _("&Editor type:"), wxDefaultPosition, wxDefaultSize, 0);
+ item11->Add(item12, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
+
+ wxString item13Strings[] = {
+ _("string"),
+ _("choice"),
+ _("bool"),
+ _("float"),
+ _("integer"),
+ _("configitems")
+ };
+ wxChoice* item13 = new wxChoice(item1, ID_CUSTOMPROPERTYEDITORTYPE, wxDefaultPosition, wxDefaultSize, 6, item13Strings, 0);
+ item13->SetStringSelection(_("string"));
+ item11->Add(item13, 1, wxGROW|wxALL, 5);
+
+ wxStaticBox* item14Static = new wxStaticBox(item1, -1, _("Choices"));
+ wxStaticBoxSizer* item14 = new wxStaticBoxSizer(item14Static, wxHORIZONTAL);
+ item3->Add(item14, 0, wxGROW|wxALL, 5);
+
+ wxString* item15Strings = NULL;
+ wxListBox* item15 = new wxListBox(item1, ID_PROPERTY_CHOICES, wxDefaultPosition, wxDefaultSize, 0, item15Strings, wxLB_SINGLE);
+ item14->Add(item15, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxBoxSizer* item16 = new wxBoxSizer(wxVERTICAL);
+ item14->Add(item16, 0, wxALIGN_CENTER_VERTICAL, 5);
+
+ wxButton* item17 = new wxButton(item1, ID_PROPERTY_CHOICE_ADD, _("&Add..."), wxDefaultPosition, wxDefaultSize, 0);
+ item16->Add(item17, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
+
+ wxButton* item18 = new wxButton(item1, ID_PROPERTY_CHOICE_REMOVE, _("&Remove"), wxDefaultPosition, wxDefaultSize, 0);
+ item16->Add(item18, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
+
+ wxStaticText* item19 = new wxStaticText(item1, wxID_STATIC, _("&Description:"), wxDefaultPosition, wxDefaultSize, 0);
+ item3->Add(item19, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
+
+ wxTextCtrl* item20 = new wxTextCtrl(item1, ID_CUSTOMPROPERTYDESCRIPTION, _(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH);
+ item3->Add(item20, 1, wxGROW|wxALL, 5);
+
+ wxBoxSizer* item21 = new wxBoxSizer(wxHORIZONTAL);
+ item3->Add(item21, 0, wxGROW|wxALL, 5);
+
+ item21->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxButton* item23 = new wxButton(item1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0);
+ item21->Add(item23, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxButton* item24 = new wxButton(item1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0);
+ item21->Add(item24, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxButton* item25 = new wxButton(item1, wxID_HELP, _("&Help"), wxDefaultPosition, wxDefaultSize, 0);
+ item21->Add(item25, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ GetSizer()->Fit(this);
+ GetSizer()->SetSizeHints(this);
+ Centre();
+////@end ctCustomPropertyDialog content construction
+
+ // Add validators
+ FindWindow(ID_CUSTOMPROPERTYNAME)->SetValidator(wxGenericValidator(& m_name));
+ FindWindow(ID_CUSTOMPROPERTYTYPE)->SetValidator(wxGenericValidator(& m_type));
+ FindWindow(ID_CUSTOMPROPERTYEDITORTYPE)->SetValidator(wxGenericValidator(& m_editorType));
+ FindWindow(ID_CUSTOMPROPERTYDESCRIPTION)->SetValidator(wxGenericValidator(& m_description));
+}
+
+/*!
+ * Should we show tooltips?
+ */
+
+bool ctCustomPropertyDialog::ShowToolTips()
+{
+ return TRUE;
+}
+
+/*!
+ * Update event handler for ID_PROPERTY_CHOICES
+ */
+
+void ctCustomPropertyDialog::OnUpdatePropertyChoices( wxUpdateUIEvent& event )
+{
+ wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYTYPE);
+ event.Enable( choice->GetSelection() > -1 && choice->GetStringSelection() == wxT("choice") );
+}
+
+/*!
+ * Event handler for ID_PROPERTY_CHOICE_ADD
+ */
+
+void ctCustomPropertyDialog::OnPropertyChoiceAdd( wxCommandEvent& event )
+{
+ wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYTYPE);
+ if ( choice->GetSelection() > -1 && choice->GetStringSelection() == wxT("choice") )
+ {
+ wxString str = wxGetTextFromUser(_T("New choice"), _("Add choice"));
+ if (!str.IsEmpty())
+ {
+ wxListBox* listBox = (wxListBox* ) FindWindow(ID_PROPERTY_CHOICES);
+ listBox->Append(str);
+ m_choices.Add(str);
+ }
+ }
+}
+
+/*!
+ * Update event handler for ID_PROPERTY_CHOICE_ADD
+ */
+
+void ctCustomPropertyDialog::OnUpdatePropertyChoiceAdd( wxUpdateUIEvent& event )
+{
+ wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYEDITORTYPE);
+ event.Enable( choice->GetSelection() > -1 && choice->GetStringSelection() == wxT("choice") );
+}
+
+/*!
+ * Event handler for ID_PROPERTY_CHOICE_REMOVE
+ */
+
+void ctCustomPropertyDialog::OnPropertyChoiceRemove( wxCommandEvent& event )
+{
+ wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYEDITORTYPE);
+ wxListBox* listBox = (wxListBox* ) FindWindow(ID_PROPERTY_CHOICES);
+ if (listBox->GetSelection() > -1)
+ {
+ listBox->Delete(listBox->GetSelection());
+ m_choices.Remove(listBox->GetSelection());
+ }
+}
+
+/*!
+ * Update event handler for ID_PROPERTY_CHOICE_REMOVE
+ */
+
+void ctCustomPropertyDialog::OnUpdatePropertyChoiceRemove( wxUpdateUIEvent& event )
+{
+ wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYEDITORTYPE);
+ wxListBox* listBox = (wxListBox* ) FindWindow(ID_PROPERTY_CHOICES);
+ event.Enable( choice->GetSelection() > -1 && choice->GetStringSelection() == wxT("choice") &&
+ listBox->GetSelection() > -1 );
+}
+
+void ctCustomPropertyDialog::SetChoices(const wxArrayString& choices)
+{
+ wxListBox* listBox = (wxListBox* ) FindWindow(ID_PROPERTY_CHOICES);
+ size_t i, len = choices.GetCount();
+ for (i = 0; i < len; i++)
+ listBox->Append(m_choices[i]);
+}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: custompropertydialog.h
+// Purpose: Custom property dialog
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _CUSTOMPROPERTYDIALOG_H_
+#define _CUSTOMPROPERTYDIALOG_H_
+
+#ifdef __GNUG__
+#pragma interface custompropertydialog.cpp
+#endif
+
+/*!
+ * Includes
+ */
+
+////@begin includes
+////@end includes
+
+/*!
+ * Forward declarations
+ */
+
+////@begin forward declarations
+////@end forward declarations
+
+/*!
+ * Control identifiers
+ */
+
+////@begin control identifiers
+#define ID_CUSTOMPROPERTYDIALOG 10000
+#define ID_CUSTOMPROPERTYNAME 10003
+#define ID_CUSTOMPROPERTYTYPE 10002
+#define ID_CUSTOMPROPERTYEDITORTYPE 10008
+#define ID_PROPERTY_CHOICES 10001
+#define ID_PROPERTY_CHOICE_ADD 10005
+#define ID_PROPERTY_CHOICE_REMOVE 10006
+#define ID_CUSTOMPROPERTYDESCRIPTION 10004
+////@end control identifiers
+
+/*!
+ * ctCustomPropertyDialog class declaration
+ */
+
+class ctCustomPropertyDialog: public wxDialog
+{
+public:
+ /// Constructor
+ ctCustomPropertyDialog( wxWindow* parent, wxWindowID id = -1, const wxString& caption = _("Edit Custom Property"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU );
+
+ /// Creates the controls and sizers
+ void CreateControls();
+
+////@begin ctCustomPropertyDialog event handler declarations
+
+ /// Update event handler for ID_PROPERTY_CHOICES
+ void OnUpdatePropertyChoices( wxUpdateUIEvent& event );
+
+ /// Event handler for ID_PROPERTY_CHOICE_ADD
+ void OnPropertyChoiceAdd( wxCommandEvent& event );
+
+ /// Update event handler for ID_PROPERTY_CHOICE_ADD
+ void OnUpdatePropertyChoiceAdd( wxUpdateUIEvent& event );
+
+ /// Event handler for ID_PROPERTY_CHOICE_REMOVE
+ void OnPropertyChoiceRemove( wxCommandEvent& event );
+
+ /// Update event handler for ID_PROPERTY_CHOICE_REMOVE
+ void OnUpdatePropertyChoiceRemove( wxUpdateUIEvent& event );
+
+////@end ctCustomPropertyDialog event handler declarations
+
+////@begin ctCustomPropertyDialog member function declarations
+
+////@end ctCustomPropertyDialog member function declarations
+
+ /// Should we show tooltips?
+ static bool ShowToolTips();
+
+ void SetPropertyName(const wxString& name) { m_name = name; }
+ wxString GetPropertyName() { return m_name; }
+
+ void SetPropertyType(const wxString& type) { m_type = type; }
+ wxString GetPropertyType() { return m_type; }
+
+ void SetEditorType(const wxString& type) { m_editorType = type; }
+ wxString GetEditorType() { return m_editorType; }
+
+ void SetPropertyDescription(const wxString& descr) { m_description = descr; }
+ wxString GetPropertyDescription() { return m_description; }
+
+ void SetChoices(const wxArrayString& choices) ;
+ wxArrayString GetChoices() { return m_choices; }
+
+ DECLARE_CLASS( ctCustomPropertyDialog )
+ DECLARE_EVENT_TABLE()
+
+ wxString m_name;
+ wxString m_type;
+ wxString m_description;
+ wxString m_editorType;
+ wxArrayString m_choices;
+};
+
+#endif
+ // _CUSTOMPROPERTYDIALOG_H_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: htmlparser.cpp
+// Purpose: Simple HTML parser
+// Author: Julian Smart
+// Modified by:
+// Created: 2002-09-25
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+#ifdef __GNUG__
+ #pragma implementation "htmlparser.h"
+#endif
+
+#include "wx/wx.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include "wx/textfile.h"
+#include "wx/wfstream.h"
+#include "wx/txtstrm.h"
+
+#include <ctype.h>
+
+#include "htmlparser.h"
+
+/// Useful insertion operators for wxOutputStream.
+static wxOutputStream& operator <<(wxOutputStream& stream, const wxString& s)
+{
+ wxTextOutputStream txt(stream); // This is to make sure the line-ending is native!
+
+ txt.WriteString(s);
+ return stream;
+}
+
+#if 0 // Gives warning because not used...
+static wxOutputStream& operator <<(wxOutputStream& stream, long l)
+{
+ wxString str;
+ str.Printf("%ld", l);
+ return stream << str;
+}
+
+static wxOutputStream& operator <<(wxOutputStream& stream, const char c)
+{
+ wxString str;
+ str.Printf("%c", c);
+ return stream << str;
+}
+#endif // 0
+
+/*
+ * wxSimpleHtmlAttribute
+ * Representation of an attribute
+ */
+
+wxSimpleHtmlParser::wxSimpleHtmlParser()
+{
+ m_topLevel = NULL;
+ m_pos = 0;
+}
+
+
+wxSimpleHtmlParser::~wxSimpleHtmlParser()
+{
+ Clear();
+}
+
+bool wxSimpleHtmlParser::ParseFile(const wxString& filename)
+{
+ wxTextFile textFile;
+
+ if (textFile.Open(filename))
+ {
+ wxString text;
+ wxString line;
+ int i;
+ int count = textFile.GetLineCount();
+ for (i = 0; i < count; i++)
+ {
+ if (i == 0)
+ line = textFile.GetFirstLine();
+ else
+ line = textFile.GetNextLine();
+
+ text += line;
+ if (i != (count - 1))
+ text += wxT("\n");
+ }
+
+#if 0
+ for ( line = textFile.GetFirstLine(); !textFile.Eof(); line = textFile.GetNextLine() )
+ {
+ text += line;
+ if (!textFile.Eof())
+ text += wxT("\n");
+ }
+#endif
+
+ return ParseString(text);
+ }
+ else
+ return FALSE;
+}
+
+bool wxSimpleHtmlParser::ParseString(const wxString& str)
+{
+ Clear();
+
+ m_pos = 0;
+ m_text = str;
+ m_length = str.Length();
+
+ m_topLevel = new wxSimpleHtmlTag(wxT("TOPLEVEL"), wxSimpleHtmlTag_TopLevel);
+
+ bool bResult = ParseHtml(m_topLevel);
+
+ wxASSERT(bResult); // Failed to parse the TAGs.
+ // Hint: Check if every open tag has a close tag!
+
+ return bResult;
+}
+
+// Main recursive parsing function
+bool wxSimpleHtmlParser::ParseHtml(wxSimpleHtmlTag* parent)
+{
+ if (!parent)
+ return FALSE;
+
+ while (!Eof())
+ {
+ EatWhitespace();
+ if (IsComment())
+ {
+ ParseComment();
+ }
+ else if (IsDirective())
+ {
+ wxSimpleHtmlTag* tag = ParseDirective();
+ if (tag)
+ parent->AppendTag(tag);
+ }
+ else if (IsXMLDeclaration())
+ {
+ wxSimpleHtmlTag* tag = ParseXMLDeclaration();
+ if (tag)
+ parent->AppendTag(tag);
+ }
+ else if (IsTagClose())
+ {
+ wxSimpleHtmlTag* tag = ParseTagClose();
+ if (tag)
+ {
+ if (IsCloseTagNeeded(tag->GetName()))
+ {
+ if (!parent->GetParent())
+ return FALSE;
+ parent->GetParent()->AppendTag(tag);
+ return TRUE;
+ }
+ else
+ parent->AppendTag(tag);
+ }
+ }
+ else if (IsTagStartBracket(GetChar(m_pos)))
+ {
+ wxSimpleHtmlTag* tag = ParseTagHeader();
+ if (tag)
+ parent->AppendTag(tag);
+
+ if (IsCloseTagNeeded(tag->GetName()))
+ {
+ if (!ParseHtml(tag))
+ return FALSE; // Something didn't go ok, so don't continue.
+ }
+ }
+ else
+ {
+ // Just a text string
+ wxString text;
+ ParseText(text);
+
+ wxSimpleHtmlTag* tag = new wxSimpleHtmlTag(wxT("TEXT"), wxSimpleHtmlTag_Text);
+ tag->SetText(text);
+ if(parent->GetParent())
+ parent->GetParent()->AppendTag(tag);
+ else
+ parent->AppendTag(tag); // When this occurs it is probably the
+ // empty lines at the end of the file...
+ }
+ }
+ return TRUE;
+}
+
+// Plain text, up until an angled bracket
+bool wxSimpleHtmlParser::ParseText(wxString& text)
+{
+ while (!Eof() && GetChar(m_pos) != wxT('<'))
+ {
+ text += GetChar(m_pos);
+ m_pos ++;
+ }
+ DecodeSpecialChars(text);
+ return TRUE;
+}
+
+wxSimpleHtmlTag* wxSimpleHtmlParser::ParseTagHeader()
+{
+ if (IsTagStartBracket(GetChar(m_pos)))
+ {
+ m_pos ++;
+ EatWhitespace();
+
+ wxString word;
+ ReadWord(word, TRUE);
+
+ EatWhitespace();
+
+ wxSimpleHtmlTag* tag = new wxSimpleHtmlTag(word, wxSimpleHtmlTag_Open);
+
+ ParseAttributes(tag);
+
+ EatWhitespace();
+
+ if (IsTagEndBracket(GetChar(m_pos)))
+ m_pos ++;
+
+ return tag;
+ }
+ else
+ return NULL;
+}
+
+wxSimpleHtmlTag* wxSimpleHtmlParser::ParseTagClose()
+{
+ Matches(wxT("</"), TRUE);
+
+ EatWhitespace();
+
+ wxString word;
+ ReadWord(word, TRUE);
+
+ EatWhitespace();
+ m_pos ++;
+
+ wxSimpleHtmlTag* tag = new wxSimpleHtmlTag(word, wxSimpleHtmlTag_Close);
+ return tag;
+}
+
+bool wxSimpleHtmlParser::ParseAttributes(wxSimpleHtmlTag* tag)
+{
+ // Parse attributes of a tag header until we reach >
+ while (!IsTagEndBracket(GetChar(m_pos)) && !Eof())
+ {
+ EatWhitespace();
+
+ wxString attrName, attrValue;
+
+ if (IsString())
+ {
+ ReadString(attrName, TRUE);
+ tag->AppendAttribute(attrName, wxEmptyString);
+ }
+ else if (IsNumeric(GetChar(m_pos)))
+ {
+ ReadNumber(attrName, TRUE);
+ tag->AppendAttribute(attrName, wxEmptyString);
+ }
+ else
+ {
+ // Try to read an attribute name/value pair, or at least a name
+ // without the value
+ ReadLiteral(attrName, TRUE);
+ EatWhitespace();
+
+ if (GetChar(m_pos) == wxT('='))
+ {
+ m_pos ++;
+ EatWhitespace();
+
+ if (IsString())
+ ReadString(attrValue, TRUE);
+ else if (!Eof() && !IsTagEndBracket(GetChar(m_pos)))
+ ReadLiteral(attrValue, TRUE);
+ }
+ if (!attrName.IsEmpty())
+ tag->AppendAttribute(attrName, attrValue);
+ }
+ }
+ return TRUE;
+}
+
+// e.g. <!DOCTYPE ....>
+wxSimpleHtmlTag* wxSimpleHtmlParser::ParseDirective()
+{
+ Matches(wxT("<!"), TRUE);
+
+ EatWhitespace();
+
+ wxString word;
+ ReadWord(word, TRUE);
+
+ EatWhitespace();
+
+ wxSimpleHtmlTag* tag = new wxSimpleHtmlTag(word, wxSimpleHtmlTag_Directive);
+
+ ParseAttributes(tag);
+
+ EatWhitespace();
+
+ if (IsTagEndBracket(GetChar(m_pos)))
+ m_pos ++;
+
+ return tag;
+}
+
+// e.g. <?xml .... ?>
+wxSimpleHtmlTag* wxSimpleHtmlParser::ParseXMLDeclaration()
+{
+ Matches(wxT("<?"), TRUE);
+
+ EatWhitespace();
+
+ wxString word;
+ ReadWord(word, TRUE);
+
+ EatWhitespace();
+
+ wxSimpleHtmlTag* tag = new wxSimpleHtmlTag(word, wxSimpleHtmlTag_XMLDeclaration);
+
+ ParseAttributes(tag);
+
+ EatWhitespace();
+
+ if (IsTagEndBracket(GetChar(m_pos)))
+ m_pos ++;
+
+ return tag;
+}
+
+bool wxSimpleHtmlParser::ParseComment()
+{
+ // Eat the comment tag start
+ Matches(wxT("<!--"), TRUE);
+
+ while (!Eof() && !Matches(wxT("-->"), TRUE))
+ {
+ m_pos ++;
+ }
+
+ return TRUE;
+}
+
+bool wxSimpleHtmlParser::EatWhitespace()
+{
+ while (!Eof() && IsWhitespace(GetChar(m_pos)))
+ m_pos ++;
+ return TRUE;
+}
+
+bool wxSimpleHtmlParser::EatWhitespace(int& pos)
+{
+ while (!Eof(pos) && IsWhitespace(GetChar(pos)))
+ pos ++;
+ return TRUE;
+}
+
+bool wxSimpleHtmlParser::ReadString(wxString& str, bool eatIt)
+{
+ int pos = m_pos;
+ if (GetChar(pos) == (int) '"')
+ {
+ pos ++;
+ while (!Eof(pos) && GetChar(pos) != (int) '"')
+ {
+ // TODO: how are quotes escaped in HTML?
+ str += (wxChar) GetChar(pos);
+ pos ++;
+ }
+ if (GetChar(pos) == (int) '"')
+ pos ++;
+ if (eatIt)
+ m_pos = pos;
+ DecodeSpecialChars(str);
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+bool wxSimpleHtmlParser::ReadWord(wxString& str, bool eatIt)
+{
+ int pos = m_pos;
+
+ if (!IsAlpha(GetChar(pos)))
+ return FALSE;
+
+ str += (wxChar) GetChar(pos) ;
+ pos ++;
+
+ while (!Eof(pos) && IsWordChar(GetChar(pos)))
+ {
+ str += (wxChar) GetChar(pos);
+ pos ++;
+ }
+ if (eatIt)
+ m_pos = pos;
+ DecodeSpecialChars(str);
+ return TRUE;
+}
+
+bool wxSimpleHtmlParser::ReadNumber(wxString& str, bool eatIt)
+{
+ int pos = m_pos;
+
+ if (!IsNumeric(GetChar(pos)))
+ return FALSE;
+
+ str += (wxChar) GetChar(pos) ;
+ pos ++;
+
+ while (!Eof(pos) && IsNumeric(GetChar(pos)))
+ {
+ str += (wxChar) GetChar(pos);
+ pos ++;
+ }
+ if (eatIt)
+ m_pos = pos;
+ DecodeSpecialChars(str);
+ return TRUE;
+}
+
+// Could be number, string, whatever, but read up until whitespace or end of tag (but not a quoted string)
+bool wxSimpleHtmlParser::ReadLiteral(wxString& str, bool eatIt)
+{
+ int pos = m_pos;
+
+ while (!Eof(pos) && !IsWhitespace(GetChar(pos)) && !IsTagEndBracket(GetChar(pos)) && GetChar(pos) != wxT('='))
+ {
+ str += GetChar(pos);
+ pos ++;
+ }
+ if (eatIt)
+ m_pos = pos;
+ DecodeSpecialChars(str);
+ return TRUE;
+}
+
+bool wxSimpleHtmlParser::IsComment()
+{
+ return Matches(wxT("<!--"));
+}
+
+bool wxSimpleHtmlParser::IsDirective()
+{
+ return Matches(wxT("<!"));
+}
+
+bool wxSimpleHtmlParser::IsXMLDeclaration()
+{
+ return Matches(wxT("<?xml"));
+}
+
+bool wxSimpleHtmlParser::IsString()
+{
+ return (GetChar(m_pos) == (int) '"') ;
+}
+
+bool wxSimpleHtmlParser::IsWord()
+{
+ return (IsAlpha(GetChar(m_pos)));
+}
+
+bool wxSimpleHtmlParser::IsTagClose()
+{
+ return Matches(wxT("</"));
+}
+
+bool wxSimpleHtmlParser::IsTagStartBracket(int ch)
+{
+ return (ch == wxT('<'));
+}
+
+bool wxSimpleHtmlParser::IsTagEndBracket(int ch)
+{
+ return (ch == wxT('>'));
+}
+
+bool wxSimpleHtmlParser::IsWhitespace(int ch)
+{
+ return ((ch == 13) || (ch == 10) || (ch == 32) || (ch == (int) '\t')) ;
+}
+
+bool wxSimpleHtmlParser::IsAlpha(int ch)
+{
+ return (wxIsalpha((wxChar) ch) != 0);
+}
+
+bool wxSimpleHtmlParser::IsWordChar(int ch)
+{
+ return (wxIsalpha((wxChar) ch) != 0 || ch == wxT('-') || ch == wxT('_') || IsNumeric(ch));
+}
+
+bool wxSimpleHtmlParser::IsNumeric(int ch)
+{
+ return (wxIsdigit((wxChar) ch) != 0 || ch == wxT('-') || ch == wxT('.')) ;
+}
+
+bool wxSimpleHtmlParser::IsCloseTagNeeded(const wxString &name)
+{
+ if (name.IsSameAs(wxT("P"), FALSE)) // e.g <P>
+ return FALSE;
+
+ // ToDo add more items here.
+
+ return TRUE;
+}
+
+// Encode/Decode Special Characters.
+// See here for the used table: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsql/ac_xml1_1nqk.asp
+/* static */ void wxSimpleHtmlParser::DecodeSpecialChars(wxString &value)
+{
+ // XML translation
+ value.Replace(wxT(">"), wxT(">"), TRUE);
+ value.Replace(wxT("<"), wxT("<"), TRUE);
+ value.Replace(wxT("""), wxT("\""), TRUE);
+ value.Replace(wxT("'"), wxT("'"), TRUE);
+ value.Replace(wxT("&"), wxT("&"), TRUE); // Note: do this as last to prevent replace problems.
+}
+
+/* static */ wxString wxSimpleHtmlParser::EncodeSpecialChars(const wxString &value)
+{
+ wxString newvalue = value;
+
+ // XML translation
+ newvalue.Replace(wxT("&"), wxT("&"), TRUE); // Note: do this as first to prevent replace problems.
+ newvalue.Replace(wxT(">"), wxT(">"), TRUE);
+ newvalue.Replace(wxT("<"), wxT("<"), TRUE);
+ newvalue.Replace(wxT("\""),wxT("""), TRUE);
+ newvalue.Replace(wxT("'"), wxT("'"), TRUE);
+
+ return newvalue;
+}
+
+// Matches this string (case insensitive)
+bool wxSimpleHtmlParser::Matches(const wxString& tok, bool eatIt)
+{
+ wxString text(m_text.Mid(m_pos, tok.Length()));
+ bool success = (text.CmpNoCase(tok) == 0) ;
+ if (success && eatIt)
+ {
+ m_pos += tok.Length();
+ }
+ return success;
+}
+
+// Safe way of getting a character
+int wxSimpleHtmlParser::GetChar(size_t i) const
+{
+ if (i >= (size_t) m_length)
+ return -1;
+ return m_text[i];
+}
+
+void wxSimpleHtmlParser::Clear()
+{
+ if (m_topLevel)
+ delete m_topLevel;
+ m_topLevel = NULL;
+ m_text = wxEmptyString;
+ m_pos = 0;
+ m_length = 0;
+}
+
+// Write this file
+void wxSimpleHtmlParser::Write(wxOutputStream& stream)
+{
+ if (m_topLevel)
+ m_topLevel->Write(stream);
+}
+
+bool wxSimpleHtmlParser::WriteFile(wxString& filename)
+{
+ wxFileOutputStream fstream(filename);
+ if (fstream.Ok())
+ {
+ Write(fstream);
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+/*
+ * wxSimpleHtmlTag
+ * Representation of a tag or chunk of text
+ */
+
+wxSimpleHtmlTag::wxSimpleHtmlTag(const wxString& tagName, int tagType)
+{
+ m_name = tagName;
+ m_type = tagType;
+ m_attributes = NULL;
+ m_children = NULL;
+ m_parent = NULL;
+ m_next = NULL;
+}
+
+wxSimpleHtmlTag::~wxSimpleHtmlTag()
+{
+ ClearAttributes();
+ ClearChildren();
+}
+
+//// Operations
+void wxSimpleHtmlTag::ClearAttributes()
+{
+ if (m_attributes)
+ {
+ wxSimpleHtmlAttribute* attr = m_attributes;
+ while (attr)
+ {
+ wxSimpleHtmlAttribute* next = attr->m_next;
+
+ attr->m_next = NULL;
+ delete attr;
+ attr = next;
+ }
+ m_attributes = NULL;
+ }
+}
+
+wxSimpleHtmlAttribute* wxSimpleHtmlTag::FindAttribute(const wxString& name) const
+{
+ wxSimpleHtmlAttribute* attr = m_attributes;
+ while (attr)
+ {
+ if (attr->GetName().CmpNoCase(name) == 0)
+ {
+ return attr;
+ }
+ attr = attr->m_next;
+ }
+ return NULL;
+}
+
+void wxSimpleHtmlTag::AppendAttribute(const wxString& name, const wxString& value)
+{
+ wxSimpleHtmlAttribute* attr = new wxSimpleHtmlAttribute(name, value);
+ if (m_attributes)
+ {
+ // Find tail
+ wxSimpleHtmlAttribute* last = m_attributes;
+ while (last->m_next)
+ last = last->m_next;
+
+ last->m_next = attr;
+ }
+ else
+ m_attributes = attr;
+}
+
+void wxSimpleHtmlTag::ClearChildren()
+{
+ if (m_children)
+ {
+ wxSimpleHtmlTag* child = m_children;
+ while (child)
+ {
+ wxSimpleHtmlTag* next = child->m_next;
+
+ child->m_next = NULL;
+ delete child;
+ child = next;
+ }
+ m_children = NULL;
+ }
+}
+
+void wxSimpleHtmlTag::RemoveChild(wxSimpleHtmlTag *remove)
+{
+ if (m_children)
+ {
+ wxSimpleHtmlTag* child = m_children;
+ wxSimpleHtmlTag* prev = NULL;
+ while (child)
+ {
+ wxSimpleHtmlTag* next = child->m_next;
+
+ if (child == remove)
+ {
+ child->m_next = NULL;
+ delete child;
+
+ if (prev != NULL)
+ prev->m_next = next;
+ else
+ m_children = next;
+
+ return;
+ }
+ prev = child;
+ child = next;
+ }
+ }
+}
+
+void wxSimpleHtmlTag::AppendTag(wxSimpleHtmlTag* tag)
+{
+ if (!tag)
+ return;
+
+ if (m_children)
+ {
+ // Find tail
+ wxSimpleHtmlTag* last = m_children;
+ while (last->m_next)
+ last = last->m_next;
+
+ last->m_next = tag;
+ }
+ else
+ {
+ m_children = tag;
+ }
+
+ tag->m_parent = this;
+}
+
+void wxSimpleHtmlTag::AppendTagAfterUs(wxSimpleHtmlTag* tag)
+{
+ if (!tag)
+ return;
+
+ tag->m_parent = m_parent;
+ tag->m_next = m_next;
+ m_next = tag;
+}
+
+// Gets the text from this tag and its descendants
+wxString wxSimpleHtmlTag::GetTagText()
+{
+ wxString text;
+ if (m_children)
+ {
+ wxSimpleHtmlTag* tag = m_children;
+ while (tag)
+ {
+ text += tag->GetTagText();
+ tag = tag->m_next;
+ }
+ return text;
+ }
+ else if (GetType() == wxSimpleHtmlTag_Text)
+ return GetText();
+ else
+ return wxEmptyString;
+}
+
+int wxSimpleHtmlTag::GetAttributeCount() const
+{
+ int count = 0;
+ wxSimpleHtmlAttribute* attr = m_attributes;
+ while (attr)
+ {
+ count ++;
+ attr = attr->m_next;
+ }
+ return count;
+}
+
+wxSimpleHtmlAttribute* wxSimpleHtmlTag::GetAttribute(int i) const
+{
+ int count = 0;
+ wxSimpleHtmlAttribute* attr = m_attributes;
+ while (attr)
+ {
+ if (count == i)
+ return attr;
+ count ++;
+ attr = attr->m_next;
+ }
+ return NULL;
+}
+
+int wxSimpleHtmlTag::GetChildCount() const
+{
+ int count = 0;
+ wxSimpleHtmlTag* tag = m_children;
+ while (tag)
+ {
+ count ++;
+ tag = tag->m_next;
+ }
+ return count;
+}
+
+bool wxSimpleHtmlTag::HasAttribute(const wxString& name, const wxString& value) const
+{
+ wxSimpleHtmlAttribute* attr = FindAttribute(name);
+
+ return (attr && (attr->GetValue().CmpNoCase(value) == 0)) ;
+}
+
+bool wxSimpleHtmlTag::HasAttribute(const wxString& name) const
+{
+ return FindAttribute(name) != NULL ;
+}
+
+bool wxSimpleHtmlTag::GetAttributeValue(wxString& value, const wxString& attrName)
+{
+ wxSimpleHtmlAttribute* attr = FindAttribute(attrName);
+ if (attr)
+ {
+ value = attr->GetValue();
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+// Search forward from this tag until we find a tag with this name & attribute
+wxSimpleHtmlTag* wxSimpleHtmlTag::FindTag(const wxString& tagName, const wxString& attrName)
+{
+ wxSimpleHtmlTag* tag = m_next;
+ while (tag)
+ {
+ if (tag->NameIs(tagName) && (attrName.IsEmpty() || tag->FindAttribute(attrName)))
+ return tag;
+
+ tag = tag->m_next;
+ }
+ return NULL;
+}
+
+bool wxSimpleHtmlTag::FindTextUntilTagClose(wxString& text, const wxString& tagName)
+{
+ wxSimpleHtmlTag* tag = this;
+ while (tag)
+ {
+ if (tag->GetType() == wxSimpleHtmlTag_Close && tag->NameIs(tagName))
+ return TRUE;
+
+ if (tag->GetType() == wxSimpleHtmlTag_Text)
+ text += tag->GetText();
+
+ tag = tag->m_next;
+ }
+ return TRUE;
+}
+
+
+wxSimpleHtmlTag* wxSimpleHtmlTag::GetChild(int i) const
+{
+ int count = 0;
+ wxSimpleHtmlTag* tag = m_children;
+ while (tag)
+ {
+ if (count == i)
+ return tag;
+
+ count ++;
+ tag = tag->m_next;
+ }
+ return NULL;
+}
+
+void wxSimpleHtmlTag::Write(wxOutputStream& stream)
+{
+ // Some helpers to layout the open and close tags.
+ static bool sbUseTab = TRUE;
+ static size_t snTabLevel = 0;
+
+#if 0 // Enable if no tabs should be used to align the tags.
+ snTabLevel = 0;
+#endif
+
+ // Handle the different types of tags we can write.
+ switch (GetType())
+ {
+ case wxSimpleHtmlTag_Text:
+ {
+ stream << wxSimpleHtmlParser::EncodeSpecialChars(m_text);
+ break;
+ }
+ case wxSimpleHtmlTag_Open:
+ {
+ size_t tab;
+ for(tab = 0; tab < snTabLevel; tab++)
+ stream << wxT("\t");
+ stream << wxT("<") << wxSimpleHtmlParser::EncodeSpecialChars(m_name);
+ if (GetAttributeCount() > 0)
+ stream << wxT(" ");
+ int i;
+ for (i = 0; i < GetAttributeCount(); i++)
+ {
+ wxSimpleHtmlAttribute* attr = GetAttribute(i);
+ attr->Write(stream);
+ if (i < GetAttributeCount() - 1)
+ stream << wxT(" ");
+ }
+ if(!m_children)
+ {
+ sbUseTab = FALSE; // We're putting the open a close tag on the same line,
+ // so we don't wan't any tabs
+ stream << wxT(">");
+ }
+ else
+ {
+ // sbUseTab = TRUE;
+ stream << wxT(">\n");
+ }
+ snTabLevel++;
+ break;
+ }
+ case wxSimpleHtmlTag_Directive:
+ {
+ stream << wxT("<!") << wxSimpleHtmlParser::EncodeSpecialChars(m_name) << wxT(" ");
+ int i;
+ for (i = 0; i < GetAttributeCount(); i++)
+ {
+ wxSimpleHtmlAttribute* attr = GetAttribute(i);
+ attr->Write(stream);
+ if (i < GetAttributeCount() - 1)
+ stream << wxT(" ");
+ }
+ stream << wxT(">\n");
+ break;
+ }
+ case wxSimpleHtmlTag_XMLDeclaration:
+ {
+ stream << wxT("<?") << wxSimpleHtmlParser::EncodeSpecialChars(m_name) << wxT(" ");
+ int i;
+ for (i = 0; i < GetAttributeCount(); i++)
+ {
+ wxSimpleHtmlAttribute* attr = GetAttribute(i);
+ attr->Write(stream);
+ if (i < GetAttributeCount() - 1)
+ stream << wxT(" ");
+ }
+ stream << wxT(">\n\n");
+ break;
+ }
+ case wxSimpleHtmlTag_Close:
+ {
+ if (snTabLevel) // Safety to prevent going around...
+ snTabLevel--; // Reduce the tab level
+ if (sbUseTab) // Do we write the open tag and close tag on a other line?
+ {
+ size_t tab;
+ for(tab = 0; tab < snTabLevel; tab++)
+ stream << wxT("\t");
+ }
+ stream << wxT("</") << wxSimpleHtmlParser::EncodeSpecialChars(m_name) << wxT(">\n");
+ sbUseTab = TRUE;
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+ wxSimpleHtmlTag* tag = m_children;
+ while (tag)
+ {
+ tag->Write(stream);
+ tag = tag->m_next;
+ }
+
+}
+
+void wxSimpleHtmlAttribute::Write(wxOutputStream& stream)
+{
+ if (m_value.IsEmpty())
+ stream << wxSimpleHtmlParser::EncodeSpecialChars(m_name);
+ else
+ {
+ stream << wxSimpleHtmlParser::EncodeSpecialChars(m_name);
+ stream << wxT("=\"");
+ stream << wxSimpleHtmlParser::EncodeSpecialChars(m_value);
+ stream << wxT("\"");
+ }
+}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: htmlparser.cpp
+// Purpose: Simple HTML parser
+// Author: Julian Smart
+// Modified by:
+// Created: 2002-09-25
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _HTMLPARSER_H_
+#define _HTMLPARSER_H_
+
+#ifdef __GNUG__
+ #pragma interface "htmlparser.h"
+#endif
+
+//#include "wx/module.h"
+#include "wx/stream.h"
+
+/*
+ * wxSimpleHtmlAttribute
+ * Representation of an attribute
+ */
+
+class wxSimpleHtmlAttribute
+{
+ friend class wxSimpleHtmlTag;
+public:
+ wxSimpleHtmlAttribute(const wxString& name, const wxString& value)
+ {
+ m_name = name; m_value = value; m_next = NULL;
+ }
+//// Operations
+
+ // Write this attribute
+ void Write(wxOutputStream& stream);
+
+//// Accessors
+ const wxString& GetName() const { return m_name; }
+ const wxString& GetValue() const { return m_value; }
+ void SetName(const wxString& name) { m_name = name; }
+ void SetValue(const wxString& value) { m_value = value; }
+
+ wxSimpleHtmlAttribute* GetNextAttribute() { return m_next; }
+ void SetNextAttribute(wxSimpleHtmlAttribute* attr) { m_next = attr; }
+
+ bool HasName(const wxString& name) const { return (0 == m_name.CmpNoCase(name)); }
+ bool HasValue(const wxString& val) const { return (0 == m_value.CmpNoCase(val)); }
+
+private:
+ wxString m_name;
+ wxString m_value;
+ wxSimpleHtmlAttribute* m_next;
+};
+
+
+/*
+ * wxSimpleHtmlTag
+ * Representation of a tag or chunk of text
+ */
+
+enum { wxSimpleHtmlTag_Text, wxSimpleHtmlTag_TopLevel, wxSimpleHtmlTag_Open, wxSimpleHtmlTag_Close, wxSimpleHtmlTag_Directive, wxSimpleHtmlTag_XMLDeclaration };
+
+class wxSimpleHtmlTag
+{
+public:
+ wxSimpleHtmlTag(const wxString& tagName, int tagType);
+ ~wxSimpleHtmlTag();
+
+//// Operations
+ void ClearAttributes();
+ wxSimpleHtmlAttribute* FindAttribute(const wxString& name) const ;
+ void AppendAttribute(const wxString& name, const wxString& value);
+ void ClearChildren();
+ // Remove 1 tag from the child list.
+ void RemoveChild(wxSimpleHtmlTag *remove);
+ // Appaned tag to the end of the child list.
+ void AppendTag(wxSimpleHtmlTag* tag);
+ // Insert tag after ourself in the parents child list.
+ void AppendTagAfterUs(wxSimpleHtmlTag* tag);
+ // Write this tag
+ void Write(wxOutputStream& stream);
+
+ // Gets the text from this tag and its descendants
+ wxString GetTagText();
+
+//// Accessors
+ const wxString& GetName() const { return m_name; }
+ void SetName(const wxString& name) { m_name = name; }
+
+ int GetType() const { return m_type; }
+ void SetType(int t) { m_type = t; }
+
+ // If type is wxSimpleHtmlTag_Text, m_text will contain some text.
+ const wxString& GetText() const { return m_text; }
+ void SetText(const wxString& text) { m_text = text; }
+
+ wxSimpleHtmlAttribute* GetFirstAttribute() { return m_attributes; }
+ void SetFirstAttribute(wxSimpleHtmlAttribute* attr) { m_attributes = attr; }
+
+ int GetAttributeCount() const ;
+ wxSimpleHtmlAttribute* GetAttribute(int i) const ;
+
+ wxSimpleHtmlTag* GetChildren() const { return m_children; }
+ void SetChildren(wxSimpleHtmlTag* children) { m_children = children; }
+
+ wxSimpleHtmlTag* GetParent() const { return m_parent; }
+ void SetParent(wxSimpleHtmlTag* parent) { m_parent = parent; }
+ int GetChildCount() const;
+ wxSimpleHtmlTag* GetChild(int i) const;
+ wxSimpleHtmlTag* GetNext() const { return m_next; }
+
+//// Convenience accessors & search functions
+ bool NameIs(const wxString& name) { return (m_name.CmpNoCase(name) == 0); }
+ bool HasAttribute(const wxString& name, const wxString& value) const;
+ bool HasAttribute(const wxString& name) const;
+ bool GetAttributeValue(wxString& value, const wxString& attrName);
+
+ // Search forward from this tag until we find a tag with this name & optionally attribute
+ wxSimpleHtmlTag* FindTag(const wxString& tagName, const wxString& attrName = wxEmptyString);
+
+ // Gather the text until we hit the given close tag
+ bool FindTextUntilTagClose(wxString& text, const wxString& tagName);
+
+private:
+ wxString m_name;
+ int m_type;
+ wxString m_text;
+ wxSimpleHtmlAttribute* m_attributes;
+
+ // List of children
+ wxSimpleHtmlTag* m_children;
+ wxSimpleHtmlTag* m_next; // Next sibling
+ wxSimpleHtmlTag* m_parent;
+};
+
+/*
+ * wxSimpleHtmlParser
+ * Simple HTML parser, for such tasks as scanning HTML for keywords, contents, etc.
+ */
+
+class wxSimpleHtmlParser : public wxObject
+{
+
+public:
+ wxSimpleHtmlParser();
+ ~wxSimpleHtmlParser();
+
+//// Operations
+ bool ParseFile(const wxString& filename);
+ bool ParseString(const wxString& str);
+ void Clear();
+ // Write this file
+ void Write(wxOutputStream& stream);
+ bool WriteFile(wxString& filename);
+
+//// Helpers
+
+ // Main recursive parsing function
+ bool ParseHtml(wxSimpleHtmlTag* parent);
+
+ wxSimpleHtmlTag* ParseTagHeader();
+ wxSimpleHtmlTag* ParseTagClose();
+ bool ParseAttributes(wxSimpleHtmlTag* tag);
+ wxSimpleHtmlTag* ParseDirective(); // e.g. <!DOCTYPE ....>
+ wxSimpleHtmlTag* ParseXMLDeclaration(); // e.g. <?xml .... ?>
+ bool ParseComment(); // Throw away comments
+ // Plain text, up until an angled bracket
+ bool ParseText(wxString& text);
+
+ bool EatWhitespace(); // Throw away whitespace
+ bool EatWhitespace(int& pos); // Throw away whitespace: using 'pos'
+ bool ReadString(wxString& str, bool eatIt = FALSE);
+ bool ReadWord(wxString& str, bool eatIt = FALSE);
+ bool ReadNumber(wxString& str, bool eatIt = FALSE);
+ // Could be number, string, whatever, but read up until whitespace.
+ bool ReadLiteral(wxString& str, bool eatIt = FALSE);
+
+ bool IsComment();
+ bool IsDirective();
+ bool IsXMLDeclaration();
+ bool IsString();
+ bool IsWord();
+ bool IsTagClose();
+ bool IsTagStartBracket(int ch);
+ bool IsTagEndBracket(int ch);
+ bool IsWhitespace(int ch);
+ bool IsAlpha(int ch);
+ bool IsWordChar(int ch);
+ bool IsNumeric(int ch);
+ // Check if a specific tag needs a close tag. If not this function should return FALSE.
+ // If no close tag is needed the result will be that the tag will be insert in a none
+ // hierarchical way. i.e. if the function would return FALSE all the time we would get
+ // a flat list of all tags (like it used to be previously).
+ virtual bool IsCloseTagNeeded(const wxString &name);
+
+ // Encode/Decode Special Characters like:
+ // > Begins a tag. >
+ // < Ends a tag. <
+ // " Quotation mark. "
+ // ' Apostrophe. '
+ // & Ampersand. &
+ static void DecodeSpecialChars(wxString &value);
+ static wxString EncodeSpecialChars(const wxString &value);
+
+ // Matches this string (case insensitive)
+ bool Matches(const wxString& tok, bool eatIt = FALSE) ;
+ bool Eof() const { return (m_pos >= m_length); }
+ bool Eof(int pos) const { return (pos >= m_length); }
+
+ void SetPosition(int pos) { m_pos = pos; }
+
+
+//// Accessors
+ wxSimpleHtmlTag* GetTopLevelTag() const { return m_topLevel; }
+
+ // Safe way of getting a character
+ int GetChar(size_t i) const;
+
+private:
+
+ wxSimpleHtmlTag* m_topLevel;
+ int m_pos; // Position in string
+ int m_length; // Length of string
+ wxString m_text; // The actual text
+
+};
+
+/*
+ * wxSimpleHtmlTagSpec
+ * Describes a tag, and what type it is.
+ * wxSimpleHtmlModule will initialise/cleanup a list of these, one per tag type
+ */
+
+#if 0
+class wxSimpleHtmlTagSpec : public wxObject
+{
+
+public:
+ wxSimpleHtmlTagSpec(const wxString& name, int type);
+
+//// Operations
+ static void AddTagSpec(wxSimpleHtmlTagSpec* spec);
+ static void Clear();
+
+//// Accessors
+ const wxString& GetName() const { return m_name; }
+ int GetType() const { return m_type; }
+
+private:
+
+ wxString m_name;
+ int m_type;
+
+ static wxList* sm_tagSpecs;
+};
+
+/*
+ * wxSimpleHtmlModule
+ * Responsible for init/cleanup of appropriate data structures
+ */
+
+class wxSimpleHtmlModule : public wxModule
+{
+DECLARE_DYNAMIC_CLASS(wxSimpleHtmlModule)
+
+public:
+ wxSimpleHtmlModule() {};
+
+ bool OnInit() ;
+ void OnExit() ;
+};
+#endif
+
+#endif
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: mainframe.cpp
+// Purpose: Main frame
+// Author: Julian Smart
+// Modified by:
+// Created: 2002-09-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#include "wx/wx.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include "wx/html/htmlwin.h"
+#include "wx/notebook.h"
+#include "wx/splitter.h"
+#include "wx/clipbrd.h"
+#include "wx/cshelp.h"
+
+#include "wxconfigtool.h"
+#include "mainframe.h"
+#include "appsettings.h"
+#include "symbols.h"
+#include "configtree.h"
+#include "propeditor.h"
+#include "configtooldoc.h"
+#include "configtoolview.h"
+
+#include "bitmaps/wxconfigtool.xpm"
+
+#include "bitmaps/copy.xpm"
+#include "bitmaps/cut.xpm"
+#include "bitmaps/paste.xpm"
+#include "bitmaps/open.xpm"
+#include "bitmaps/save.xpm"
+#include "bitmaps/print.xpm"
+#include "bitmaps/new.xpm"
+#include "bitmaps/help.xpm"
+#include "bitmaps/undo.xpm"
+#include "bitmaps/redo.xpm"
+#include "bitmaps/helpcs.xpm"
+
+IMPLEMENT_CLASS(ctMainFrame, wxDocParentFrame)
+
+BEGIN_EVENT_TABLE(ctMainFrame, wxDocParentFrame)
+ EVT_CLOSE(ctMainFrame::OnCloseWindow)
+ EVT_MENU(wxID_ABOUT, ctMainFrame::OnAbout)
+ EVT_MENU(wxID_OPEN, ctMainFrame::OnOpen)
+ EVT_MENU(wxID_NEW, ctMainFrame::OnNew)
+ EVT_MENU(wxID_EXIT, ctMainFrame::OnExit)
+ EVT_MENU(ctID_SETTINGS, ctMainFrame::OnSettings)
+ EVT_MENU(ctID_SHOW_TOOLBAR, ctMainFrame::OnShowToolbar)
+ EVT_MENU(wxID_HELP, ctMainFrame::OnHelp)
+ EVT_MENU(ctID_REFERENCE_CONTENTS, ctMainFrame::OnReferenceHelp)
+ EVT_MENU(wxID_HELP_CONTEXT, ctMainFrame::OnContextHelp)
+
+ EVT_UPDATE_UI(ctID_ADD_ITEM_CHECKBOX, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(ctID_ADD_ITEM_RADIOBUTTON, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(ctID_ADD_ITEM_GROUP, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(ctID_ADD_ITEM_CHECK_GROUP, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(ctID_ADD_ITEM_RADIO_GROUP, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(ctID_ADD_ITEM_STRING, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(ctID_DELETE_ITEM, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(ctID_RENAME_ITEM, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(wxID_COPY, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(wxID_CUT, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(wxID_PASTE, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(ctID_ITEM_HELP, ctMainFrame::OnUpdateDisable)
+
+ EVT_UPDATE_UI(ctID_ADD_CUSTOM_PROPERTY, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(ctID_EDIT_CUSTOM_PROPERTY, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(ctID_DELETE_CUSTOM_PROPERTY, ctMainFrame::OnUpdateDisable)
+
+ EVT_UPDATE_UI(ctID_SAVE_SETUP_FILE, ctMainFrame::OnUpdateDisable)
+ EVT_UPDATE_UI(ctID_SAVE_CONFIGURE_COMMAND, ctMainFrame::OnUpdateDisable)
+END_EVENT_TABLE()
+
+// Define my frame constructor
+ctMainFrame::ctMainFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size,
+ long style):
+ wxDocParentFrame(manager, parent, id, title, pos, size, style)
+{
+ m_document = NULL;
+ m_editMenu = NULL;
+ m_configurePage = NULL;
+ m_setupPage = NULL;
+ m_mainNotebook = NULL;
+
+ m_treeSplitterWindow = new wxSplitterWindow(this, -1, wxDefaultPosition, wxSize(400, 300),
+ wxSP_3DSASH|wxSP_3DBORDER);
+
+ m_configTreeCtrl = new ctConfigTreeCtrl(m_treeSplitterWindow, -1, wxDefaultPosition, wxDefaultSize,
+ wxTR_HAS_BUTTONS|wxNO_BORDER);
+
+ m_mainNotebook = new wxNotebook(m_treeSplitterWindow, -1, wxDefaultPosition, wxSize(300, 300));
+
+ m_propertyEditor = new ctPropertyEditor(m_mainNotebook, -1, wxDefaultPosition, wxSize(300, 200),
+ wxNO_BORDER);
+ m_setupPage = new ctOutputWindow(m_mainNotebook, -1, wxDefaultPosition, wxSize(300, 200),
+ wxNO_BORDER);
+ m_configurePage = new ctOutputWindow(m_mainNotebook, -1, wxDefaultPosition, wxSize(300, 200),
+ wxNO_BORDER);
+ m_mainNotebook->AddPage(m_propertyEditor, _T("Properties"));
+ m_mainNotebook->AddPage(m_setupPage, _T("setup.h"));
+ m_mainNotebook->AddPage(m_configurePage, _T("configure"));
+
+ // Need to do this afterwards since wxWin sets the XP background
+ // in AddPage
+ m_propertyEditor->GetDescriptionWindow()->SetBackgroundColour(ctDESCRIPTION_BACKGROUND_COLOUR);
+
+ int sashPos = wxGetApp().GetSettings().m_mainSashSize;
+ m_treeSplitterWindow->SplitVertically(m_configTreeCtrl, m_mainNotebook, sashPos);
+
+ SetIcon(wxIcon(wxconfigtool_xpm));
+
+ CreateStatusBar(2);
+
+ wxMenuBar* menuBar = CreateMenuBar();
+ SetMenuBar(menuBar);
+
+ CreateToolBar(wxNO_BORDER|wxTB_FLAT|wxTB_HORIZONTAL);
+ InitToolBar(GetToolBar());
+
+ if (wxGetApp().GetSettings().m_showToolBar)
+ {
+ menuBar->Check(ctID_SHOW_TOOLBAR, TRUE);
+ }
+ else
+ {
+ menuBar->Check(ctID_SHOW_TOOLBAR, FALSE);
+ GetToolBar()->Show(FALSE);
+ ResizeFrame();
+ }
+}
+
+void ctMainFrame::OnCloseWindow(wxCloseEvent& event)
+{
+ if (GetDocument())
+ {
+ if (!GetDocument()->DeleteAllViews() && event.CanVeto())
+ {
+ event.Veto();
+ return;
+ }
+ }
+
+ Show(FALSE);
+
+ if (IsMaximized())
+ wxGetApp().GetSettings().m_frameStatus = ctSHOW_STATUS_MAXIMIZED ;
+ else if (IsIconized())
+ wxGetApp().GetSettings().m_frameStatus = ctSHOW_STATUS_MINIMIZED ;
+ else
+ wxGetApp().GetSettings().m_frameStatus = ctSHOW_STATUS_NORMAL ;
+
+ // Must delete this now since the DLL loading library will be
+ // uninitialised by the time the app object is deleted
+ wxGetApp().ClearHelpControllers();
+
+ if (!IsMaximized() && !IsIconized())
+ {
+ wxGetApp().GetSettings().m_frameSize = GetRect();
+ wxGetApp().GetSettings().m_mainSashSize = m_treeSplitterWindow->GetSashPosition();
+ }
+
+ Destroy();
+}
+
+void ctMainFrame::OnAbout(wxCommandEvent& event)
+{
+ wxString msg = wxGetApp().GetSettings().GetAppName() + wxT(" (c) Julian Smart");
+ wxString caption = wxT("About ") + wxGetApp().GetSettings().GetAppName();
+ wxMessageBox(msg, caption, wxID_OK|wxICON_INFORMATION);
+}
+
+void ctMainFrame::OnOpen(wxCommandEvent& event)
+{
+ wxGetApp().GetDocManager()->OnFileOpen(event);
+}
+
+void ctMainFrame::OnNew(wxCommandEvent& event)
+{
+ wxGetApp().GetDocManager()->OnFileNew(event);
+}
+
+void ctMainFrame::OnExit(wxCommandEvent& event)
+{
+ Close();
+}
+
+void ctMainFrame::OnSettings(wxCommandEvent& event)
+{
+ wxGetApp().GetSettings().ShowSettingsDialog();
+}
+
+void ctMainFrame::InitToolBar(wxToolBar* toolBar)
+{
+ toolBar->SetHelpText(wxT("The toolbar gives you easy access to commonly used commands."));
+
+ // Set up toolbar
+ wxBitmap toolBarBitmaps[20];
+
+ toolBarBitmaps[0] = wxBitmap(new_xpm);
+ toolBarBitmaps[1] = wxBitmap(open_xpm);
+ toolBarBitmaps[2] = wxBitmap(save_xpm);
+ toolBarBitmaps[3] = wxBitmap(copy_xpm);
+ toolBarBitmaps[4] = wxBitmap(cut_xpm);
+ toolBarBitmaps[5] = wxBitmap(paste_xpm);
+ toolBarBitmaps[6] = wxBitmap(print_xpm);
+ toolBarBitmaps[7] = wxBitmap(help_xpm);
+ toolBarBitmaps[10] = wxBitmap(undo_xpm);
+ toolBarBitmaps[11] = wxBitmap(redo_xpm);
+ toolBarBitmaps[12] = wxBitmap(help_xpm);
+ toolBarBitmaps[13] = wxBitmap(helpcs_xpm);
+
+ toolBar->AddTool(wxID_NEW, toolBarBitmaps[0], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("New project"));
+ toolBar->AddTool(wxID_OPEN, toolBarBitmaps[1], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Open project"));
+ toolBar->AddTool(wxID_SAVE, toolBarBitmaps[2], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Save project"));
+
+ toolBar->AddSeparator();
+ toolBar->AddTool(wxID_CUT, toolBarBitmaps[4], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Cut"));
+ toolBar->AddTool(wxID_COPY, toolBarBitmaps[3], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Copy"));
+ toolBar->AddTool(wxID_PASTE, toolBarBitmaps[5], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Paste"));
+ toolBar->AddSeparator();
+ toolBar->AddTool(wxID_UNDO, toolBarBitmaps[10], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Undo"));
+ toolBar->AddTool(wxID_REDO, toolBarBitmaps[11], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Redo"));
+ toolBar->AddSeparator();
+ toolBar->AddTool(ctID_ITEM_HELP, toolBarBitmaps[12], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Show help for this option"));
+ toolBar->AddTool(wxID_HELP_CONTEXT, toolBarBitmaps[13], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Show help on the clicked item"));
+
+ // after adding the buttons to the toolbar, must call Realize() to reflect
+ // the changes
+ toolBar->Realize();
+}
+
+wxMenuBar* ctMainFrame::CreateMenuBar()
+{
+ // Make a menubar
+ wxMenu *fileMenu = new wxMenu;
+
+ wxGetApp().GetFileHistory().UseMenu(fileMenu);
+
+ fileMenu->Append(wxID_NEW, wxT("&New...\tCtrl+N"), wxT("Create a new settings document"));
+ fileMenu->Append(wxID_OPEN, wxT("&Open...\tCtrl+O"), wxT("Open a settings document"));
+ fileMenu->Append(wxID_CLOSE, wxT("&Close\tCtrl+W"), wxT("Close the current settings document"));
+ fileMenu->AppendSeparator();
+ fileMenu->Append(wxID_SAVE, wxT("&Save\tCtrl+S"), wxT("Save the settings document"));
+ fileMenu->Append(wxID_SAVEAS, wxT("&Save As..."), wxT("Save the settings document under a new filename"));
+ fileMenu->AppendSeparator();
+ fileMenu->Append(ctID_SAVE_SETUP_FILE, wxT("Save Setup.&h...\tCtrl+H"), wxT("Save the setup.h file"));
+ fileMenu->Append(ctID_SAVE_CONFIGURE_COMMAND, wxT("Save Configure Script...\tCtrl+G"), wxT("Save the configure script file"));
+ fileMenu->AppendSeparator();
+ fileMenu->Append(wxID_EXIT, wxT("E&xit\tAlt+F4"), wxT("Exit the application"));
+
+ wxGetApp().GetDocManager()->FileHistoryUseMenu(fileMenu);
+
+ wxMenu *editMenu = new wxMenu;
+
+ editMenu->Append(wxID_UNDO, _("&Undo\tCtrl+Z"));
+ editMenu->Append(wxID_REDO, _("&Redo\tCtrl+Y"));
+ editMenu->AppendSeparator();
+ editMenu->Append(wxID_COPY, _("&Copy\tCtrl+C"));
+ editMenu->Append(wxID_CUT, _("Cu&t\tCtrl+X"));
+ editMenu->Append(wxID_PASTE, _("&Paste\tCtrl+V"));
+ editMenu->AppendSeparator();
+
+ wxMenu* itemMenu = new wxMenu;
+ itemMenu->Append(ctID_ADD_ITEM_CHECKBOX, _("Add &Checkbox Option"), _("Add a checkbox configuration option"));
+ itemMenu->Append(ctID_ADD_ITEM_RADIOBUTTON, _("Add &Radio Button Option"), _("Add a radio button configuration option"));
+// TODO. However we can also simply use custom properties;
+// but then the C++ code has to be special-cased.
+// itemMenu->Append(ctID_ADD_ITEM_STRING, _("Add &String Option"), _("Add a string configuration option"));
+ itemMenu->Append(ctID_ADD_ITEM_GROUP, _("Add &Group Option"), _("Add a group configuration option"));
+ itemMenu->Append(ctID_ADD_ITEM_CHECK_GROUP, _("Add Chec&k Group Option"), _("Add a check group configuration option"));
+ itemMenu->Append(ctID_ADD_ITEM_RADIO_GROUP, _("Add Rad&io Group Option"), _("Add a radio group configuration option"));
+
+ editMenu->Append(ctID_ADD_ITEM, wxT("Add &Option"), itemMenu, _("Add a configuration option"));
+ editMenu->AppendSeparator();
+
+ wxMenu* propertyMenu = new wxMenu;
+ propertyMenu->Append(ctID_ADD_CUSTOM_PROPERTY, _("&Add Custom Property"), _("Adds a custom property to the current option"));
+ propertyMenu->Append(ctID_EDIT_CUSTOM_PROPERTY, _("&Edit Custom Property"), _("Edits the currently selected custom property"));
+ propertyMenu->Append(ctID_DELETE_CUSTOM_PROPERTY, _("&Delete Custom Property"), _("Deletes the currently selected custom property"));
+ editMenu->Append(ctID_CUSTOM_PROPERTY, _("Custom P&roperty"), propertyMenu, _("Custom property commands"));
+
+ editMenu->AppendSeparator();
+ editMenu->Append(ctID_DELETE_ITEM, _("&Delete Option"), _("Delete a configuration option"));
+ editMenu->Append(ctID_RENAME_ITEM, _("&Rename Option"), _("Rename a configuration option"));
+
+ // Save for the command processor.
+ m_editMenu = editMenu;
+
+ wxMenu *viewMenu = new wxMenu;
+ viewMenu->Append(ctID_SHOW_TOOLBAR, wxT("Show &Toolbar"), wxT("Toggle the toolbar on and off"),
+ wxITEM_CHECK);
+ viewMenu->Append(ctID_SETTINGS, wxT("&Settings...\tCtrl+T"), wxT("Show application settings"));
+
+ wxMenu *helpMenu = new wxMenu;
+ helpMenu->Append(wxID_HELP, wxT("&Help Contents"), wxT("Show Configuration Tool help"));
+ helpMenu->Append(ctID_REFERENCE_CONTENTS, wxT("&wxWindows Help Contents"), wxT("Show wxWindows reference"));
+ helpMenu->AppendSeparator();
+ helpMenu->Append(ctID_ITEM_HELP, wxT("&Configuration Option Help\tF1"), wxT("Show help for the selected option"));
+ helpMenu->Append(wxID_HELP_CONTEXT, wxT("&What's this?"), wxT("Show help on the clicked item"));
+ helpMenu->AppendSeparator();
+ helpMenu->Append(wxID_ABOUT, wxT("&About..."), wxT("Show details about this application"));
+
+ wxMenuBar *menuBar = new wxMenuBar;
+
+ menuBar->Append(fileMenu, wxT("&File"));
+ menuBar->Append(editMenu, wxT("&Edit"));
+ menuBar->Append(viewMenu, wxT("&View"));
+ menuBar->Append(helpMenu, wxT("&Help"));
+
+ {
+ wxConfig config(wxGetApp().GetSettings().GetAppName(), wxT("wxWindows"));
+ config.SetPath(wxT("FileHistory/"));
+ wxGetApp().GetDocManager()->FileHistoryLoad(config);
+ }
+
+ return menuBar;
+}
+
+/// Handles the Show Toolbar menu event.
+void ctMainFrame::OnShowToolbar(wxCommandEvent& event)
+{
+ wxGetApp().GetSettings().m_showToolBar = !wxGetApp().GetSettings().m_showToolBar;
+ GetToolBar()->Show(wxGetApp().GetSettings().m_showToolBar);
+ ResizeFrame();
+}
+
+/// Handles the Help Contents menu event.
+void ctMainFrame::OnHelp(wxCommandEvent& event)
+{
+ wxGetApp().GetHelpController().DisplayContents();
+}
+
+/// Handles context help
+void ctMainFrame::OnContextHelp(wxCommandEvent& event)
+{
+ wxContextHelp contextHelp;
+}
+
+/// Handles the Help Contents menu event for the reference manual.
+void ctMainFrame::OnReferenceHelp(wxCommandEvent& event)
+{
+ wxGetApp().GetReferenceHelpController().DisplayContents();
+}
+
+/// Resizes the main frame according to the
+/// state of the toolbar
+void ctMainFrame::ResizeFrame()
+{
+ PositionToolBar();
+ wxSizeEvent event(GetSize(), GetId());
+ this->ProcessEvent(event);
+}
+
+/// Update the frame title.
+void ctMainFrame::UpdateFrameTitle()
+{
+ // TODO
+}
+
+// General disabler
+void ctMainFrame::OnUpdateDisable(wxUpdateUIEvent& event)
+{
+ event.Enable( FALSE );
+}
+
+/*!
+ * ctOutputWindow represents a page showing a setup.h file or config command.
+ */
+
+IMPLEMENT_CLASS(ctOutputWindow, wxPanel)
+
+BEGIN_EVENT_TABLE(ctOutputWindow, wxPanel)
+ EVT_BUTTON(wxID_COPY, ctOutputWindow::OnCopyToClipboard)
+ EVT_BUTTON(wxID_SAVE, ctOutputWindow::OnSaveText)
+ EVT_BUTTON(ctID_REGENERATE, ctOutputWindow::OnRegenerate)
+ EVT_UPDATE_UI(wxID_SAVE, ctOutputWindow::OnUpdateSaveText)
+ EVT_UPDATE_UI(ctID_REGENERATE, ctOutputWindow::OnUpdateRegenerate)
+ EVT_UPDATE_UI(wxID_COPY, ctOutputWindow::OnUpdateCopy)
+END_EVENT_TABLE()
+
+ctOutputWindow::ctOutputWindow(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size, long style):
+ wxPanel(parent, id, pos, size, style)
+{
+ m_codeCtrl = NULL;
+ m_filenameCtrl = NULL;
+ m_doc = NULL;
+ CreateWindows();
+}
+
+ctOutputWindow::~ctOutputWindow()
+{
+}
+
+/// Initialise the windows.
+void ctOutputWindow::CreateWindows()
+{
+ wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer *item2 = new wxBoxSizer( wxHORIZONTAL );
+ item0->Add( item2, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxButton *item4 = new wxButton( this, wxID_COPY, _("&Copy"), wxDefaultPosition, wxDefaultSize, 0 );
+ item2->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ item4->SetHelpText(_("Copies the selection or whole file to the clipboard."));
+
+ wxButton *item5 = new wxButton( this, ctID_REGENERATE, _("Re&generate"), wxDefaultPosition, wxDefaultSize, 0 );
+ item2->Add( item5, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ item5->SetHelpText(_("Regenerates the code."));
+
+#if 0
+ m_filenameCtrl = new wxTextCtrl(this, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTE_READONLY);
+ item2->Add( m_filenameCtrl, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+ m_filenameCtrl->SetHelpText(_("Shows the filename where the code is being saved."));
+#else
+ m_filenameCtrl = NULL;
+#endif
+
+ // The code editor
+ m_codeCtrl = new wxTextCtrl(this, -1, wxEmptyString, wxDefaultPosition, wxSize(100, 100), wxTE_RICH|wxTE_MULTILINE|wxSUNKEN_BORDER);
+ item0->Add( m_codeCtrl, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );
+
+ SetAutoLayout( TRUE );
+ SetSizer( item0 );
+}
+
+/// Copies the text to the clipboard.
+void ctOutputWindow::OnCopyToClipboard(wxCommandEvent& event)
+{
+ // Try to copy the selection first
+ long int selFrom, selTo;
+ m_codeCtrl->GetSelection(& selFrom, & selTo);
+ if (selFrom != selTo)
+ {
+ m_codeCtrl->Copy();
+ return;
+ }
+
+ // Copy the whole amount
+ if (!wxTheClipboard->Open())
+ {
+ wxMessageBox(_("Sorry, could not open the clipboard."), _("Clipboard problem"), wxICON_EXCLAMATION|wxOK);
+ return;
+ }
+
+ wxString value(m_codeCtrl->GetValue());
+#ifdef __WXMSW__
+ value.Replace(_T("\n"), _T("\r\n"));
+#endif
+ wxTextDataObject *data = new wxTextDataObject( value );
+
+ if (!wxTheClipboard->SetData( data ))
+ {
+ wxTheClipboard->Close();
+ wxMessageBox(_("Sorry, could not copy to the clipboard."), _("Clipboard problem"), wxICON_EXCLAMATION|wxOK);
+ }
+ else
+ {
+ wxTheClipboard->Close();
+ }
+}
+
+/// Sets the code in the text control.
+void ctOutputWindow::SetText(const wxString& text)
+{
+ if (m_codeCtrl)
+ m_codeCtrl->SetValue(text);
+}
+
+/// Sets the filename.
+void ctOutputWindow::SetFilename(const wxString& filename)
+{
+ if (m_filenameCtrl)
+ m_filenameCtrl->SetValue(filename);
+}
+
+/// Saves the file.
+void ctOutputWindow::OnSaveText(wxCommandEvent& event)
+{
+ if (m_codeCtrl->IsModified())
+ {
+ wxString filename(m_filenameCtrl->GetValue());
+ if (!filename.IsEmpty())
+ {
+ m_codeCtrl->SaveFile(filename);
+ m_codeCtrl->DiscardEdits();
+ }
+ }
+}
+
+void ctOutputWindow::OnUpdateSaveText(wxUpdateUIEvent& event)
+{
+ event.Enable(m_doc && m_codeCtrl && m_codeCtrl->IsModified());
+}
+
+void ctOutputWindow::OnRegenerate(wxCommandEvent& event)
+{
+ if (m_doc)
+ {
+ ctConfigToolView* view = (ctConfigToolView*) m_doc->GetFirstView();
+ view->RegenerateSetup();
+ }
+}
+
+void ctOutputWindow::OnUpdateRegenerate(wxUpdateUIEvent& event)
+{
+ event.Enable( m_doc != NULL );
+}
+
+void ctOutputWindow::OnUpdateCopy(wxUpdateUIEvent& event)
+{
+ event.Enable( m_doc != NULL );
+}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: mainframe.h
+// Purpose: Main frame class
+// Author: Julian Smart
+// Modified by:
+// Created: 2002-09-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _AP_MAINFRAME_H_
+#define _AP_MAINFRAME_H_
+
+#include "wx/imaglist.h"
+#include "wx/docview.h"
+
+class WXDLLEXPORT wxHtmlWindow;
+class WXDLLEXPORT wxSplitterWindow;
+class WXDLLEXPORT wxNotebookEvent;
+
+class ctConfigTreeCtrl;
+class ctPropertyEditor;
+class ctOutputWindow;
+
+/*!
+ * \brief The main window of the application.
+ */
+
+class ctMainFrame: public wxDocParentFrame
+{
+ DECLARE_CLASS(ctMainFrame)
+ public:
+ /// Constructor.
+ ctMainFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style);
+
+// Event handlers
+
+ /// Handles the close window event.
+ void OnCloseWindow(wxCloseEvent& event);
+
+ /// Handles the About menu event.
+ void OnAbout(wxCommandEvent& event);
+
+ /// Handles the frame activation event.
+ void OnActivate(wxActivateEvent& event);
+
+ /// Handles the File Open menu event.
+ void OnOpen(wxCommandEvent& event);
+
+ /// Handles the File New menu event.
+ void OnNew(wxCommandEvent& event);
+
+ /// Handles the Exit menu event.
+ void OnExit(wxCommandEvent& event);
+
+ /// Handles the Settings menu event.
+ void OnSettings(wxCommandEvent& event);
+
+ /// Handles the Show Toolbar menu event.
+ void OnShowToolbar(wxCommandEvent& event);
+
+ /// Handles the Help Contents menu event.
+ void OnHelp(wxCommandEvent& event);
+
+ /// Handles context help
+ void OnContextHelp(wxCommandEvent& event);
+
+ /// Handles the Help Contents menu event for the reference manual.
+ void OnReferenceHelp(wxCommandEvent& event);
+
+ /// General disabler
+ void OnUpdateDisable(wxUpdateUIEvent& event);
+
+// Operations
+
+ /// Creates the main frame subwindows.
+ bool CreateWindows(wxWindow* parent);
+
+ /// Initialises the toolbar.
+ void InitToolBar(wxToolBar* toolbar);
+
+ /// Creates the menubar.
+ wxMenuBar* CreateMenuBar();
+
+ /// Resizes the main frame according to the
+ /// state of the toolbar
+ void ResizeFrame();
+
+ /// Update the frame title.
+ void UpdateFrameTitle();
+
+// Accessors
+
+ /// Returns the tree control.
+ ctConfigTreeCtrl* GetConfigTreeCtrl() const { return m_configTreeCtrl; }
+
+ /// Returns the property editor window.
+ ctPropertyEditor* GetPropertyEditor() const { return m_propertyEditor; }
+
+ /// Returns the document for this frame.
+ ctConfigToolDoc* GetDocument() const { return m_document; }
+
+ /// Sets the document for this frame.
+ void SetDocument(ctConfigToolDoc* doc) { m_document = doc; }
+
+ /// Returns the edit menu.
+ wxMenu* GetEditMenu() const { return m_editMenu; }
+
+ /// Returns the setup page window
+ ctOutputWindow* GetSetupPage() const { return m_setupPage; }
+
+ /// Returns the configure page window
+ ctOutputWindow* GetConfigurePage() const { return m_configurePage; }
+
+ /// Returns the main notebook containing editor and text tabs
+ wxNotebook* GetMainNotebook() const { return m_mainNotebook; }
+
+DECLARE_EVENT_TABLE()
+
+protected:
+ wxImageList m_imageList;
+
+ /// The splitter between the tree and the property window.
+ wxSplitterWindow* m_treeSplitterWindow;
+
+ /// The config tree window.
+ ctConfigTreeCtrl* m_configTreeCtrl;
+
+ /// The property editor window.
+ ctPropertyEditor* m_propertyEditor;
+
+ /// The document for this frame.
+ ctConfigToolDoc* m_document;
+
+ /// The edit menu.
+ wxMenu* m_editMenu;
+
+ /// The notebook with property editor and setup.h/configure
+ /// views
+ wxNotebook* m_mainNotebook;
+ ctOutputWindow* m_setupPage;
+ ctOutputWindow* m_configurePage;
+};
+
+/*!
+ * ctOutputWindow represents a page showing a setup.h file or config command.
+ */
+
+class ctOutputWindow: public wxPanel
+{
+DECLARE_CLASS(ctOutputWindow)
+public:
+ ctOutputWindow(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0);
+ ~ctOutputWindow();
+
+ /// Initialise the windows.
+ void CreateWindows();
+
+ /// Copies the text to the clipboard.
+ void OnCopyToClipboard(wxCommandEvent& event);
+ void OnUpdateCopy(wxUpdateUIEvent& event);
+
+ /// Regenerates setup.h/configure command
+ void OnRegenerate(wxCommandEvent& event);
+ void OnUpdateRegenerate(wxUpdateUIEvent& event);
+
+ /// Saves the file.
+ void OnSaveText(wxCommandEvent& event);
+ void OnUpdateSaveText(wxUpdateUIEvent& event);
+
+ /// Sets the code in the text control.
+ void SetText(const wxString& text);
+
+ /// Sets the filename.
+ void SetFilename(const wxString& filename);
+
+ /// Sets the document
+ void SetDocument(ctConfigToolDoc* doc) { m_doc = doc; }
+
+ /// Get text control
+ wxTextCtrl* GetCodeCtrl() const { return m_codeCtrl; }
+
+ /// Get filename control
+ wxTextCtrl* GetFilenameCtrl() const { return m_filenameCtrl; }
+
+protected:
+ wxTextCtrl* m_codeCtrl;
+ wxTextCtrl* m_filenameCtrl;
+ ctConfigToolDoc* m_doc;
+
+DECLARE_EVENT_TABLE()
+};
+
+
+#endif
+ // _AP_MAINFRAME_H_
+
--- /dev/null
+#
+# File: makefile.b32
+# Author: Julian Smart
+# Created: 1999
+# Updated:
+# Copyright:
+#
+# Makefile : Builds application for 32-bit BC++
+
+WXDIR = $(WXWIN)
+
+TARGET=wxconfigtool
+OBJECTS = $(TARGET).obj wxconfigtool.obj appsettings.obj configitem.obj \
+ configitemselector.obj configtooldoc.obj configtoolview.obj configtree.obj \
+ custompropertydialog.obj htmlparser.obj mainframe.obj propeditor.obj \
+ property.obj settingsdialog.obj utils.obj
+
+!include $(WXDIR)\src\makeprog.b32
+
--- /dev/null
+#
+# File: makefile.g95
+# Author: Julian Smart
+# Created: 2003
+# Updated:
+# Copyright: (c) Julian Smart, 2003
+#
+# Makefile for wxWindows Configuration Tool (Cygwin/Mingw32).
+
+WXDIR = ../../..
+
+TARGET=wxconfigtool
+OBJECTS = $(TARGET).o wxconfigtool.o appsettings.o configitem.o \
+ configitemselector.o configtooldoc.o configtoolview.o configtree.o \
+ custompropertydialog.o htmlparser.o mainframe.o propeditor.o \
+ property.o settingsdialog.o utils.o
+
+include $(WXDIR)/src/makeprog.g95
+
--- /dev/null
+# makefile
+
+CXXFLAGS = `wx-config --cxxflags`
+LDFLAGS = `wx-config --libs`
+
+PROGRAM = wxconfigtool
+
+OBJECTS = $(TARGET).o wxconfigtool.o appsettings.o configitem.o \
+ configitemselector.o configtooldoc.o configtoolview.o configtree.o \
+ custompropertydialog.o htmlparser.o mainframe.o propeditor.o \
+ property.o settingsdialog.o utils.o
+
+# implementation
+
+.SUFFIXES: .o .cpp
+
+.cpp.o :
+ $(CXX) -c $(CXXFLAGS) -o $@ $<
+
+all: $(PROGRAM)
+
+$(PROGRAM): $(OBJECTS)
+ $(CXX) -o $(PROGRAM) $(OBJECTS) $(LDFLAGS)
+
+clean:
+ rm -f *.o $(PROGRAM)
+
--- /dev/null
+#
+# File: makefile.vc
+# Author: Julian Smart
+# Created: 2003
+# Updated:
+# Copyright: (c) Julian Smart
+#
+# Makefile : Builds wxWindows Configuration Tool (VC++, WIN32)
+# Use FINAL=1 argument to nmake to build final version with no debug info.
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+
+PROGRAM=wxconfigtool
+OBJECTS = wxconfigtool.obj appsettings.obj configitem.obj configitemselector.obj configtooldoc.obj \
+ configtoolview.obj configtree.obj custompropertydialog.obj htmlparser.obj mainframe.obj \
+ propeditor.obj property.obj settingsdialog.obj utils.obj
+
+!include $(WXDIR)\src\makeprog.vc
+
--- /dev/null
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+#
+#
+#
+#
+PROGRAM = wxconfigtool
+OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj $(OUTPUTDIR)\appsettings.obj &
+ $(OUTPUTDIR)\configitem.obj $(OUTPUTDIR)\configitemselector.obj &
+ $(OUTPUTDIR)\configtooldoc.obj $(OUTPUTDIR)\configtoolview.obj &
+ $(OUTPUTDIR)\configtree.obj $(OUTPUTDIR)\custompropertydialog.obj &
+ $(OUTPUTDIR)\htmlparser.obj $(OUTPUTDIR)\mainframe.obj $(OUTPUTDIR)\propeditor.obj &
+ $(OUTPUTDIR)\property.obj $(OUTPUTDIR)\settingsdialog.obj $(OUTPUTDIR)\utils.obj
+
+#
+!include $(%WXWIN)\src\makeprog.wat
--- /dev/null
+# THIS IS JUST A DUMMY FILE for allowing the makefile
+# to work before there a real makeprog.env has been
+# created by configure.
+
+# Make environment for making samples on Unix
+
+# The binary program extension, if any, including dots (e.g. '.exe')
+PROGRAM_EXT =
+BIN_PROGRAM = $(PROGRAM)$(PROGRAM_EXT)
+RES_PROGRAM_OBJ =
+BUNDLE = $(BIN_PROGRAM).app/Contents
+
+# NB: see remark in Makefile.in as to why we don't use %.foo: %.bar rules
+.SUFFIXES: .o .c .cpp .cxx .rc _resources.o
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
+
+.rc_resources.o:
+ $(RESCOMP) -i $< -o $@ $(RESFLAGS)
+
+
+# the comment at the end of the next line is needed because otherwise autoconf
+# would remove this line completely - it contains a built-in hack to remove
+# any VPATH assignment not containing ':'
+VPATH = :$(top_srcdir)/$(program_dir) # ':' for autoconf
+
+#
+# File: make.env
+# Author: Julian Smart, Robert Roebling, Vadim Zeitlin, Ron Lee
+# Created: 1993
+# Updated: 2001
+# Copyright:(c) 1993, AIAI, University of Edinburgh,
+# Copyright:(c) 1999, Vadim Zeitlin
+# Copyright:(c) 1999, Robert Roebling
+# Copyright:(c) 2001, Ron Lee
+#
+
+####################### GENERAL SETTINGS ############################
+
+# see comment near LDFLAGS at the end of file
+EXTRALIBS = -framework Carbon -framework System -lz -lm -lpthread
+OPENGLLIBS =
+LDLIBS = ${APPEXTRALIBS} ${top_builddir}/lib/libwx_macd-2.3.a ${EXTRALIBS}
+
+TOOLKIT = MAC
+TOOLKITDIR = mac
+
+WXLIB = libwx_macd-2.3.a
+WXSHLIB = libwx_macd-2.3.dylib.2.0.0
+
+########################### VERSION #################################
+
+WX_MAJOR_VERSION_NUMBER = 2
+WX_MINOR_VERSION_NUMBER = 3
+WX_RELEASE_NUMBER = 3
+
+########################### Programs #################################
+
+CXX = c++
+CC = gcc
+
+# Compiler for lex/yacc .c programs
+CCLEX = gcc
+
+LEX = flex
+YACC = bison -y
+AR = ar
+AS =
+NM =
+LN_S = ln -s
+STRIP = strip
+AROPTIONS = rcu
+RANLIB = ranlib
+LD =
+MAKEINFO =
+RM = rm -f
+
+SHARED_LD =
+
+RESFLAGS =
+RESCOMP = /Developer/Tools/Rez
+
+DEREZ = /Developer/Tools/DeRez
+
+DLLTOOL =
+
+INSTALL = /usr/bin/install -c
+INSTALL_PROGRAM = cp -fp
+INSTALL_DATA = cp -fp
+INSTALL_SCRIPT = /usr/bin/install -c
+
+########################### Flags #################################
+
+CPPFLAGS = ${APPEXTRACPPFLAGS} -no-cpp-precomp -I/Developer/Headers/FlatCarbon -I${top_srcdir}/src/mac/morefile $(EXTRADEFS) $(APPEXTRADEFS) -D__WXMAC__ -D__WXDEBUG__
+CFLAGS = ${APPEXTRACFLAGS} ${CPPFLAGS} -MMD -fpascal-strings -g -I${top_builddir}/lib/wx/include/macd-2.3 -I${top_srcdir}/include -I${top_srcdir}/src/png -I${top_srcdir}/src/tiff -Wall
+CXXFLAGS = ${APPEXTRACXXFLAGS} ${CPPFLAGS} -MMD -fpascal-strings -g -I${top_builddir}/lib/wx/include/macd-2.3 -I${top_srcdir}/include -I${top_srcdir}/src/png -I${top_srcdir}/src/tiff -Wall
+PICFLAGS =
+
+# taking into account how SHARED_LD is defined, appending LDFLAGS to it
+# doesn't work, so we put them in the end of the linker command line in
+# EXTRALIBS instead (see above)
+# LDFLAGS = -framework Carbon -framework System
+
+# specific linker flags for when building executables since there
+# Mac OS X requires specific linker flags for executables linked
+# against dynamic shared libraries
+LDFLAGS_EXE =
+
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: propeditor.cpp
+// Purpose: wxWindows Configuration Tool property editor
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-03
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "propeditor.h"
+#endif
+
+#include <wx/wx.h>
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include "wx/html/htmlwin.h"
+#include "wx/grid.h"
+#include "wx/filedlg.h"
+#include "wx/tokenzr.h"
+#include "wx/valgen.h"
+
+#include "propeditor.h"
+#include "symbols.h"
+#include "utils.h"
+#include "configtooldoc.h"
+#include "configitemselector.h"
+#include "bitmaps/ellipsis.xpm"
+
+
+/*!
+ * A container window for the property editor.
+ * and attribute editor.
+ */
+
+IMPLEMENT_CLASS(ctPropertyEditor, wxPanel)
+
+BEGIN_EVENT_TABLE(ctPropertyEditor, wxPanel)
+ EVT_BUTTON(ctID_ATTRIBUTE_EDITOR_EDIT_DETAILS, ctPropertyEditor::OnEditDetails)
+ EVT_GRID_SELECT_CELL(ctPropertyEditor::OnSelectCell)
+ EVT_GRID_CELL_CHANGE(ctPropertyEditor::OnChangeCell)
+ EVT_GRID_CELL_LEFT_DCLICK(ctPropertyEditor::OnDClickCell)
+ EVT_UPDATE_UI(ctID_ATTRIBUTE_EDITOR_EDIT_DETAILS, ctPropertyEditor::OnUpdateEditDetails)
+END_EVENT_TABLE()
+
+ctPropertyEditor::ctPropertyEditor(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style):
+ wxPanel(parent, id, pos, size, style)
+{
+ m_splitterWindow = NULL;
+ m_attributeEditorGrid = NULL;
+ m_propertyDescriptionWindow = NULL;
+ m_elementTitleTextCtrl = NULL;
+
+ CreateControls(this);
+}
+
+ctPropertyEditor::~ctPropertyEditor()
+{
+}
+
+void ctPropertyEditor::CreateControls(wxWindow* parent)
+{
+ m_elementTitleTextCtrl = new wxTextCtrl(this, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
+ wxBitmap detailsIcon(ellipsis_xpm);
+
+ wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxTextCtrl *item2 = m_elementTitleTextCtrl;
+ item1->Add( item2, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ wxButton *item3a = new wxButton( parent, ctID_ATTRIBUTE_EDITOR_EDIT_DETAILS, wxT("Edit..."), wxDefaultPosition, wxSize(-1, -1));
+ item1->Add( item3a, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );
+
+ item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
+
+ // TODO: find sash pos from last time
+ int sashPos = 100;
+
+ m_splitterWindow = new wxSplitterWindow(parent, ctID_PROPERTY_EDITOR_SPLITTER, wxDefaultPosition, wxSize(500, 400), wxSP_3DSASH|wxSP_FULLSASH/*|wxCLIP_CHILDREN*/ |wxBORDER_NONE|wxNO_FULL_REPAINT_ON_RESIZE);
+ m_splitterWindow->SetMinimumPaneSize(10);
+
+ m_propertyDescriptionWindow = new wxHtmlWindow(m_splitterWindow, ctID_ATTRIBUTE_EDITOR_DESCRIPTION, wxDefaultPosition, wxSize(200, 60), wxSUNKEN_BORDER);
+ m_propertyDescriptionWindow->SetBackgroundColour(ctDESCRIPTION_BACKGROUND_COLOUR);
+ m_propertyDescriptionWindow->SetBorders(4);
+ m_attributeEditorGrid = new ctPropertyEditorGrid(m_splitterWindow, ctID_ATTRIBUTE_EDITOR_GRID , wxPoint(0, 0), wxSize(200, 100), wxBORDER_SUNKEN | wxWANTS_CHARS);
+
+ m_splitterWindow->SplitHorizontally(m_propertyDescriptionWindow, m_attributeEditorGrid, sashPos);
+
+ // TODO: show or hide description window
+// if (some-setting)
+// ShowDescriptionWindow(FALSE);
+
+ item0->Add( m_splitterWindow, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );
+
+ this->SetAutoLayout( TRUE );
+ this->SetSizer( item0 );
+
+ /// Add help text
+ m_elementTitleTextCtrl->SetHelpText(_("The title of the property being edited."));
+ FindWindow(ctID_ATTRIBUTE_EDITOR_EDIT_DETAILS)->SetHelpText(_("Click to use an appropriate editor for the selected property (if any)."));
+ FindWindow(ctID_ATTRIBUTE_EDITOR_GRID)->SetHelpText(_("Shows the properties of the selected item."));
+ FindWindow(ctID_ATTRIBUTE_EDITOR_DESCRIPTION)->SetHelpText(_("Shows a description of the selected property, or a summary of the whole item."));
+
+ /// Set up the grid to display properties
+ m_attributeEditorGrid->RegisterDataType(ctGRID_VALUE_STRING,
+ new wxGridCellStringRenderer,
+ new ctGridCellTextEditor);
+
+ m_attributeEditorGrid->CreateGrid( 0, 2, wxGrid::wxGridSelectRows );
+ m_attributeEditorGrid->SetRowLabelSize(0);
+ m_attributeEditorGrid->SetColLabelSize(0 /* 18 */);
+
+ wxArrayString columns;
+ columns.Add(_T("Name"));
+ columns.Add(_T("Value"));
+
+ m_attributeEditorGrid->SetColSize(0, 140);
+ m_attributeEditorGrid->SetColSize(1, 80);
+
+ m_attributeEditorGrid->SetColumnsToDisplay(columns);
+ m_attributeEditorGrid->DisplayLabels();
+
+ m_attributeEditorGrid->SetStretchableColumn(1);
+
+ m_attributeEditorGrid->SetDefaultCellBackgroundColour(ctCELL_BACKGROUND_COLOUR);
+
+ UpdateDescription();
+}
+
+/// Show/hide the description control
+void ctPropertyEditor::ShowDescriptionWindow(bool show)
+{
+ if (!show)
+ {
+ if (m_splitterWindow->IsSplit())
+ m_splitterWindow->Unsplit(m_propertyDescriptionWindow);
+ }
+ else
+ {
+ // TODO
+ int pos = 100;
+ m_propertyDescriptionWindow->Show(TRUE);
+ if (!m_splitterWindow->IsSplit())
+ {
+ m_splitterWindow->SplitHorizontally(m_propertyDescriptionWindow, m_attributeEditorGrid, pos);
+ }
+ }
+}
+
+/// Clear grid editor
+void ctPropertyEditor::ClearEditor()
+{
+ m_attributeEditorGrid->ClearAttributes();
+ m_propertyDescriptionWindow->SetPage(WrapDescription(wxEmptyString));
+ m_elementTitleTextCtrl->SetValue(_T(""));
+}
+
+/// Handles detailed editing event.
+void ctPropertyEditor::OnEditDetails(wxCommandEvent& event)
+{
+ wxWindow* parentFrame = this;
+ while (parentFrame && !parentFrame->IsKindOf(CLASSINFO(wxFrame)))
+ parentFrame = parentFrame->GetParent();
+
+ EditDetails(parentFrame);
+}
+
+/// Handles detailed editing update event.
+void ctPropertyEditor::OnUpdateEditDetails(wxUpdateUIEvent& event)
+{
+ event.Enable(CanEditDetails());
+}
+
+/// Can we edit the details of the selected property?
+bool ctPropertyEditor::CanEditDetails()
+{
+ if (!m_item)
+ return FALSE;
+
+ int row;
+ ctProperty* prop = FindSelectedProperty(row);
+ if (!prop || prop->GetEditorType().IsEmpty())
+ return FALSE;
+ return TRUE;
+}
+
+/// Shows the item
+void ctPropertyEditor::ShowItem(ctConfigItem* item)
+{
+ if (m_attributeEditorGrid->IsCellEditControlEnabled())
+ m_attributeEditorGrid->SaveEditControlValue();
+
+ ClearEditor();
+ if (item)
+ {
+ m_item = item;
+
+ UpdateTitle();
+
+ m_attributeEditorGrid->AppendRows(m_item->GetProperties().GetCount());
+
+ wxNode* node = m_item->GetProperties().GetList().GetFirst();
+ int i = 0;
+ while (node)
+ {
+ ctProperty* prop = (ctProperty*) node->GetData();
+ DisplayProperty(i, prop);
+
+ i ++;
+ node = node->GetNext();
+ }
+ // Make sure scrollbars are up-to-date, etc.
+ wxSizeEvent event(m_attributeEditorGrid->GetSize(), m_attributeEditorGrid->GetId());
+ m_attributeEditorGrid->GetEventHandler()->ProcessEvent(event);
+
+ DisplayDefaultProperty();
+ }
+ else
+ {
+ m_item = NULL;
+ }
+}
+
+/// Determine background colour for this property.
+void ctPropertyEditor::DeterminePropertyColour(ctProperty* prop, wxColour& colour)
+{
+ if (prop->IsCustom())
+ colour = ctCUSTOM_CELL_BACKGROUND_COLOUR;
+ else
+ colour = ctCELL_BACKGROUND_COLOUR;
+}
+
+/// Update the title at the top of the property editor
+void ctPropertyEditor::UpdateTitle()
+{
+ if (m_item)
+ {
+ wxString name(m_item->GetTitle());
+ m_elementTitleTextCtrl->SetValue(name);
+ }
+}
+
+/// Updates the item display, assuming it was already displayed.
+void ctPropertyEditor::UpdateItem()
+{
+ if (m_attributeEditorGrid->IsCellEditControlEnabled())
+ m_attributeEditorGrid->SaveEditControlValue();
+ if (m_item)
+ {
+ UpdateTitle();
+
+ wxNode* node = m_item->GetProperties().GetList().GetFirst();
+ int i = 0;
+ while (node)
+ {
+ ctProperty* prop = (ctProperty*) node->GetData();
+ DisplayProperty(i, prop, TRUE);
+
+ i ++;
+ node = node->GetNext();
+ }
+ // Make sure scrollbars are up-to-date, etc.
+ wxSizeEvent event(m_attributeEditorGrid->GetSize(), this->GetId());
+ m_attributeEditorGrid->GetEventHandler()->ProcessEvent(event);
+ }
+}
+
+/// Display attribute at given row
+bool ctPropertyEditor::DisplayProperty(int row, ctProperty* prop, bool valueOnly)
+{
+ wxColour backgroundColour;
+
+ DeterminePropertyColour(prop, backgroundColour);
+
+ if (!valueOnly)
+ {
+ m_attributeEditorGrid->SetCellBackgroundColour(row, 0, backgroundColour);
+ m_attributeEditorGrid->SetCellBackgroundColour(row, 1, backgroundColour);
+
+ m_attributeEditorGrid->SetCellValue(row, 0, prop->GetName());
+
+ m_attributeEditorGrid->SetReadOnly(row, 0);
+ // Set the alignment
+ m_attributeEditorGrid->SetCellAlignment(row, 1, wxALIGN_LEFT, wxALIGN_CENTER);
+ }
+
+ if (!m_item->CanEditProperty(prop->GetName()))
+ {
+ m_attributeEditorGrid->SetReadOnly(row, 1);
+
+ wxColour col(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT));
+ m_attributeEditorGrid->SetCellTextColour(row, 1, col);
+ }
+ else
+ {
+ m_attributeEditorGrid->SetReadOnly(row, 1, FALSE);
+ m_attributeEditorGrid->SetCellTextColour(row, 1, * wxBLACK);
+ }
+
+ // Set the value
+ m_attributeEditorGrid->SetCellValue(row, 1, ctConvertToSingleText(prop->GetValue()));
+
+ if (valueOnly)
+ return TRUE;
+
+ // Set the value type
+ if (prop->GetEditorType() == _T("choice"))
+ {
+ wxString* strArr = prop->GetChoices().GetStringArray();
+
+ m_attributeEditorGrid->SetCellEditor(row, 1,
+ new wxGridCellChoiceEditor(prop->GetChoices().GetCount(), strArr));
+
+ delete[] strArr;
+ }
+ else if (prop->GetEditorType() == _T("integer") || prop->GetVariant().GetType() == _T("long"))
+ {
+ m_attributeEditorGrid->SetCellEditor(row, 1,
+ new wxGridCellNumberEditor);
+ }
+ else if (prop->GetEditorType() == _T("float") || prop->GetVariant().GetType() == _T("double"))
+ {
+ m_attributeEditorGrid->SetCellEditor(row, 1,
+ new wxGridCellFloatEditor);
+ }
+ else if (prop->GetEditorType() == _T("bool") || prop->GetVariant().GetType() == _T("bool"))
+ {
+ m_attributeEditorGrid->SetCellValue(row, 1, prop->GetVariant().GetBool() ? _T("1") : _T("0"));
+ m_attributeEditorGrid->SetCellEditor(row, 1,
+ new wxGridCellBoolEditor);
+ m_attributeEditorGrid->SetCellRenderer(row, 1, new wxGridCellBoolRenderer);
+ }
+ else
+ {
+ m_attributeEditorGrid->SetCellEditor(row, 1,
+ new ctGridCellTextEditor);
+ }
+
+ return TRUE;
+}
+
+/// Display attribute value
+bool ctPropertyEditor::DisplayProperty(ctProperty* prop)
+{
+ if (!m_item)
+ return FALSE;
+
+ int index = m_item->GetProperties().GetList().IndexOf(prop);
+ return DisplayProperty(index, prop, TRUE);
+}
+
+/// Display the default property
+bool ctPropertyEditor::DisplayDefaultProperty()
+{
+ if (!m_item)
+ return FALSE;
+
+ wxString str = m_item->GetDefaultProperty();
+
+ ctProperty* prop = m_item->GetProperties().FindProperty(str);
+ if (prop)
+ {
+ int index = m_item->GetProperties().GetList().IndexOf(prop);
+ this->m_attributeEditorGrid->SelectRow(index);
+ this->m_attributeEditorGrid->SetGridCursor(index, 1);
+ }
+ return TRUE;
+}
+
+/// Edit the default property
+bool ctPropertyEditor::EditDefaultProperty(ctConfigItem* item)
+{
+ wxString defaultPropertyName = item->GetDefaultProperty();
+ if (!defaultPropertyName.IsEmpty())
+ {
+ ctProperty* prop = item->GetProperties().FindProperty(defaultPropertyName);
+ if (prop)
+ {
+ int index = item->GetProperties().GetList().IndexOf(prop);
+ if (index >= 0)
+ {
+ this->m_attributeEditorGrid->SelectRow(index);
+ this->m_attributeEditorGrid->SetGridCursor(index, 1);
+ EditDetails(wxTheApp->GetTopWindow());
+ return TRUE;
+ }
+ }
+
+ }
+ return FALSE;
+}
+
+/// Find the selected property
+ctProperty* ctPropertyEditor::FindSelectedProperty(int& row)
+{
+ if (!m_item)
+ return NULL;
+
+ int selRow = m_attributeEditorGrid->GetCursorRow();
+ if (selRow > -1)
+ {
+ row = selRow;
+
+ if (selRow < (int) m_item->GetProperties().GetCount())
+ {
+ ctProperty* prop = m_item->GetProperties().GetNth(selRow);
+ return prop;
+ }
+ }
+ return NULL;
+}
+
+/// Find the property
+ctProperty* ctPropertyEditor::FindProperty(int row)
+{
+ if (!m_item)
+ return NULL;
+
+ if (row > -1)
+ {
+ if (row < (int) m_item->GetProperties().GetCount())
+ {
+ ctProperty* prop = m_item->GetProperties().GetNth(row);
+ return prop;
+ }
+ }
+ return NULL;
+}
+
+/// Edit the details of this cell appropriately.
+bool ctPropertyEditor::EditDetails(wxWindow* parent)
+{
+ if (CanEditDetails())
+ {
+ int row;
+ ctProperty* prop = FindSelectedProperty(row);
+ if (!prop)
+ return FALSE;
+
+ wxString type(prop->GetEditorType());
+ wxString value = m_attributeEditorGrid->GetCellValue(row, 1);
+
+ if (type == _T("multiline"))
+ {
+ value = ctConvertToMultilineText(value);
+ wxString msg;
+ msg.Printf(wxT("Edit %s:"), (const wxChar*) prop->GetName());
+ ctMultiLineTextEditor dialog(wxTheApp->GetTopWindow(),
+ -1, wxT("Edit Text Property"), msg, value);
+ if (dialog.ShowModal() == wxID_OK)
+ {
+ value = ctConvertToSingleText(dialog.GetText());
+ m_attributeEditorGrid->SetCellValue(row, 1, value);
+ ApplyCellValueToProperty(row, 1);
+ return TRUE;
+ }
+ else
+ return FALSE;
+ }
+ else if (type == _T("filename"))
+ {
+ wxString fullPath = value;
+ wxString defaultDir ;
+ wxString defaultFilename = wxFileNameFromPath(fullPath);
+
+ defaultDir = wxPathOnly(value);
+
+ wxString msg = wxT("Choose a filename");
+ wxFileDialog dialog(wxTheApp->GetTopWindow(),
+ msg, defaultDir, defaultFilename, wxT("*.*"));
+ if (dialog.ShowModal() == wxID_OK)
+ {
+ fullPath = dialog.GetPath();
+ value = fullPath;
+
+ m_attributeEditorGrid->SetCellValue(row, 1, value);
+ ApplyCellValueToProperty(row, 1);
+ return TRUE;
+ }
+ else
+ return FALSE;
+ }
+ else if (type == _T("configitems"))
+ {
+ wxArrayString items;
+ ctConfigItem::StringToArray(value, items);
+
+ ctConfigItemsSelector dialog(wxTheApp->GetTopWindow(),
+ -1, wxT("Select Configuration Items"));
+ dialog.SetConfigList(items);
+ if (dialog.ShowModal() == wxID_OK)
+ {
+ wxString newValue;
+ items = dialog.GetConfigList();
+ ctConfigItem::ArrayToString(items, newValue);
+
+ m_attributeEditorGrid->SetCellValue(row, 1, newValue);
+ ApplyCellValueToProperty(row, 1);
+ return TRUE;
+ }
+ else
+ return FALSE;
+ }
+ }
+
+ return FALSE;
+}
+
+/// Intercept selection event.
+void ctPropertyEditor::OnSelectCell(wxGridEvent& event)
+{
+ int row = event.GetRow();
+
+ UpdateDescription(row);
+
+ event.Skip();
+}
+
+/// Update the description
+void ctPropertyEditor::UpdateDescription(int row)
+{
+ if (row == -1)
+ {
+ row = m_attributeEditorGrid->GetCursorRow();
+ }
+ if (row == -1)
+ {
+ wxString str = WrapDescription(wxEmptyString);
+ m_propertyDescriptionWindow->SetPage(str);
+ }
+ else
+ {
+ ctProperty* prop = FindProperty(row);
+ if (prop)
+ {
+ wxString str = WrapDescription(m_item->GetDescription(prop));
+ m_propertyDescriptionWindow->SetPage(str);
+ }
+ }
+}
+
+/// Wraps a description string in HTML
+wxString ctPropertyEditor::WrapDescription(const wxString& s)
+{
+ /// Convert a colour to a 6-digit hex string
+ wxColour col = ctDESCRIPTION_BACKGROUND_COLOUR;
+ wxString colStr = apColourToHexString(col);
+ colStr = wxT("#") + colStr;
+
+ wxString str;
+ str << _T("<HTML><BODY BGCOLOR=\"") << colStr << wxT("\"><FONT SIZE=-1>") ;
+ str << s;
+ str << _T("</FONT></BODY></HTML>");
+
+ return str;
+}
+
+/// Intercept cell data change event.
+void ctPropertyEditor::OnChangeCell(wxGridEvent& event)
+{
+ int row = event.GetRow();
+ int col = event.GetCol();
+
+ ApplyCellValueToProperty(row, col);
+}
+
+/// Double-click to show specialised editor.
+void ctPropertyEditor::OnDClickCell(wxGridEvent& event)
+{
+ wxWindow* parentFrame = this;
+ while (parentFrame && !parentFrame->IsKindOf(CLASSINFO(wxFrame)))
+ parentFrame = parentFrame->GetParent();
+
+ EditDetails(parentFrame);
+}
+
+/// Apply the cell value to the property, and notify the
+/// item object.
+void ctPropertyEditor::ApplyCellValueToProperty(int row, int col)
+{
+ static bool s_Applying = FALSE;
+
+ if (s_Applying)
+ return;
+
+ s_Applying = TRUE;
+ if (col == 1 && m_item)
+ {
+ ctProperty* prop = m_item->GetProperties().GetNth(row);
+
+ wxString value = m_attributeEditorGrid->GetCellValue(row, col);
+ if (prop->GetEditorType() == wxT("multiline"))
+ value = ctConvertToMultilineText(value);
+
+ wxVariant variant = prop->GetVariant();
+
+ if (prop->GetVariant().GetType() == _T("bool"))
+ {
+ if (value == _T("1"))
+ variant = (bool) TRUE;
+ else
+ variant = (bool) FALSE;
+ }
+ else if (prop->GetVariant().GetType() == _T("long"))
+ {
+ long l;
+ value.ToLong(& l);
+ variant = l;
+ }
+ else if (prop->GetVariant().GetType() == _T("double"))
+ {
+ double d;
+ value.ToDouble(& d);
+ variant = d;
+ }
+ else
+ {
+ variant = value;
+ }
+
+ ApplyPropertyValue(m_item, prop, variant);
+
+ if (prop->GetName() == _T("description"))
+ UpdateDescription(row);
+ }
+ s_Applying = FALSE;
+}
+
+/// Apply the cell value to the property, and notify the
+/// item object.
+void ctPropertyEditor::ApplyPropertyValue(ctConfigItem* item, ctProperty* property, const wxVariant& variant)
+{
+ static bool s_Applying = FALSE;
+
+ if (s_Applying)
+ return;
+
+ s_Applying = TRUE;
+
+ // Save the old values
+ ctProperties* oldProperties = new ctProperties(item->GetProperties());
+
+ wxVariant oldValue = property->GetVariant();
+
+ // Apply the new value
+ property->GetVariant() = variant;
+ item->ApplyProperty(property, oldValue);
+ item->Modify();
+
+ UpdateItem();
+
+ wxString menuLabel(_T("Change ") + property->GetName());
+
+ // This won't do anything first time Do is applied,
+ // since we've already done the action for this property.
+ // But when we Undo or Redo, the changed properties will be applied.
+ item->GetDocument()->GetCommandProcessor()->Submit(
+ new ctConfigCommand(menuLabel, ctCMD_APPLY_PROPERTY,
+ item, oldProperties, TRUE));
+
+ s_Applying = FALSE;
+}
+
+/*!
+ * Attribute editor grid
+ */
+
+IMPLEMENT_CLASS(ctPropertyEditorGrid, wxGrid)
+
+BEGIN_EVENT_TABLE(ctPropertyEditorGrid, wxGrid)
+ EVT_SIZE(ctPropertyEditorGrid::OnSize)
+END_EVENT_TABLE()
+
+ctPropertyEditorGrid::ctPropertyEditorGrid(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& sz, long style):
+ wxGrid(parent, id, pos, sz, style)
+
+{
+ m_stretchableColumn = -1;
+}
+
+void ctPropertyEditorGrid::OnSize(wxSizeEvent& event)
+{
+ if (m_stretchableColumn != -1)
+ {
+ // This window's client size = the internal window's
+ // client size if it has no borders
+ wxSize sz = GetClientSize();
+
+ int totalSize = 0;
+ int i;
+ for (i = 0; i < GetNumberCols(); i ++)
+ {
+ if (i != m_stretchableColumn)
+ {
+ totalSize += GetColSize(i);
+ }
+ }
+
+ // Allow for grid lines
+ totalSize += 1;
+
+ int stretchSize = wxMax(5, sz.x - totalSize);
+ SetColSize(m_stretchableColumn, stretchSize);
+ }
+
+ event.Skip();
+}
+
+/// Use m_columnsToDisplay to set the label strings
+void ctPropertyEditorGrid::DisplayLabels()
+{
+ size_t i;
+ for (i = 0; i < m_columnsToDisplay.GetCount(); i++)
+ {
+ SetColLabelValue(i, m_columnsToDisplay[i]);
+ }
+}
+
+/// Clear attributes
+bool ctPropertyEditorGrid::ClearAttributes()
+{
+ if (GetNumberRows() > 0)
+ DeleteRows(0, GetNumberRows());
+ return TRUE;
+}
+
+/*!
+ * Use a single-line text control.
+ */
+
+void ctGridCellTextEditor::Create(wxWindow* parent, wxWindowID id,
+ wxEvtHandler* evtHandler)
+{
+ m_control = new wxTextCtrl(parent, id, wxEmptyString,
+ wxDefaultPosition, wxDefaultSize
+ );
+
+ wxGridCellEditor::Create(parent, id, evtHandler);
+}
+
+
+/// Translate the value to one which can be edited in a single-line
+/// text control
+wxString ctConvertToSingleText(const wxString& value)
+{
+ wxString value1(value);
+ value1.Replace(wxT("\n"), wxT("\\n"));
+ value1.Replace(wxT("\t"), wxT("\\t"));
+ return value1;
+}
+
+/// Translate back to 'real' characters, i.e. newlines are real
+/// newlines.
+wxString ctConvertToMultilineText(const wxString& value)
+{
+ wxString value1(value);
+ value1.Replace(wxT("\\n"), wxT("\n"));
+ value1.Replace(wxT("\\t"), wxT("\t"));
+ return value1;
+}
+
+//----------------------------------------------------------------------------
+// ctMultiLineTextEditor
+//----------------------------------------------------------------------------
+
+BEGIN_EVENT_TABLE(ctMultiLineTextEditor, wxDialog)
+END_EVENT_TABLE()
+
+ctMultiLineTextEditor::ctMultiLineTextEditor( wxWindow *parent, wxWindowID id, const wxString &title,
+ const wxString& msg,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style):
+ wxDialog(parent, id, title, pos, size, style)
+{
+ m_text = value;
+ AddControls(this, msg);
+ Centre();
+}
+
+bool ctMultiLineTextEditor::AddControls(wxWindow* parent, const wxString& msg)
+{
+ wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer *item1 = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticText *item2 = new wxStaticText( parent, wxID_STATIC, msg, wxDefaultPosition, wxDefaultSize, 0 );
+ item1->Add( item2, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT, 5 );
+
+ wxTextCtrl *item3 = new wxTextCtrl( parent, -1, wxT(""), wxDefaultPosition, wxSize(330,180), wxTE_MULTILINE|wxTE_RICH );
+ item1->Add( item3, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ wxBoxSizer *item4 = new wxBoxSizer( wxHORIZONTAL );
+
+ item4->Add( 5, 5, 1, wxALIGN_CENTRE|wxALL, 5 );
+
+ wxButton *item5 = new wxButton( parent, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
+ item5->SetDefault();
+ item4->Add( item5, 0, wxALIGN_CENTRE|wxALL, 5 );
+
+ wxButton *item6 = new wxButton( parent, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+ item4->Add( item6, 0, wxALIGN_CENTRE|wxALL, 5 );
+
+ item1->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
+
+ item0->Add( item1, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ item3->SetValue(m_text);
+ item3->SetValidator(wxGenericValidator(& m_text));
+
+
+ item3->SetFocus();
+ ((wxButton*) FindWindow(wxID_OK))->SetDefault();
+
+ parent->SetAutoLayout( TRUE );
+ parent->SetSizer(item0);
+ item0->Fit(parent);
+
+ return TRUE;
+}
+
+/*
+ * Special-purpose splitter window for changing sash look and
+ * also saving sash width
+ */
+
+BEGIN_EVENT_TABLE(ctSplitterWindow, wxSplitterWindow)
+ EVT_SPLITTER_SASH_POS_CHANGED(-1, ctSplitterWindow::OnChangeSash)
+END_EVENT_TABLE()
+
+ctSplitterWindow::ctSplitterWindow(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size, long style):
+ wxSplitterWindow(parent, id, pos, size, style)
+{
+ m_updateSettings = FALSE;
+ m_position = 0;
+}
+
+void ctSplitterWindow::OnChangeSash(wxSplitterEvent& event)
+{
+ if (!m_updateSettings)
+ return;
+
+ m_position = event.GetSashPosition();
+}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: propeditor.cpp
+// Purpose: Property editor for wxWindows configuration tool
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-03
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _CT_PROPEDITOR_H_
+#define _CT_PROPEDITOR_H_
+
+#ifdef __GNUG__
+#pragma interface "propeditor.cpp"
+#endif
+
+#include "wx/splitter.h"
+#include "wx/grid.h"
+
+#include "configitem.h"
+#include "property.h"
+
+class WXDLLEXPORT wxHtmlWindow;
+
+class ctPropertyEditorGrid;
+
+/*!
+ * A container window for the property editor.
+ */
+
+class ctPropertyEditor: public wxPanel
+{
+ DECLARE_CLASS(ctPropertyEditor)
+ public:
+ ctPropertyEditor(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style);
+ ~ctPropertyEditor();
+
+// Event handlers
+
+ /// Handles detailed editing event.
+ void OnEditDetails(wxCommandEvent& event);
+
+ /// Handles detailed editing update event.
+ void OnUpdateEditDetails(wxUpdateUIEvent& event);
+
+ /// Intercept selection event.
+ void OnSelectCell(wxGridEvent& event);
+
+ /// Intercept cell data change event.
+ void OnChangeCell(wxGridEvent& event);
+
+ /// Double-click to show specialised editor.
+ void OnDClickCell(wxGridEvent& event);
+
+// Operations
+
+ /// Creates the controls
+ void CreateControls(wxWindow* parent);
+
+ /// Clear grid editor
+ void ClearEditor();
+
+ /// Can we edit the details of the selected property?
+ bool CanEditDetails();
+
+ /// Edit the details of this cell appropriately.
+ bool EditDetails(wxWindow* parent);
+
+ /// Shows the given config item
+ void ShowItem(ctConfigItem* configItem);
+
+ /// Updates the proxy display, assuming it was already displayed.
+ void UpdateItem();
+
+ /// Display attribute at given row
+ bool DisplayProperty(int row, ctProperty* prop, bool valueOnly = FALSE);
+
+ /// Display attribute value
+ bool DisplayProperty(ctProperty* prop);
+
+ /// Edit the default property
+ bool EditDefaultProperty(ctConfigItem* proxy);
+
+ /// Select the default property
+ bool DisplayDefaultProperty();
+
+ /// Determine background colour for this property.
+ void DeterminePropertyColour(ctProperty* prop, wxColour& colour);
+
+ /// Update the title at the top of the property editor
+ void UpdateTitle();
+
+ /// Update the description
+ void UpdateDescription(int row = -1);
+
+ /// Wraps a description string in HTML
+ wxString WrapDescription(const wxString& str);
+
+ /// Find the selected property
+ ctProperty* FindSelectedProperty(int& row);
+
+ /// Find the nth property
+ ctProperty* FindProperty(int row);
+
+ /// Apply the cell value to the property, and notify the
+ /// proxy object.
+ void ApplyCellValueToProperty(int row, int col);
+
+ /// Apply the cell value to the property, and notify the
+ /// proxy object. This will be undoable.
+ void ApplyPropertyValue(ctConfigItem* item, ctProperty* property, const wxVariant& variant);
+
+ /// Show/hide the description control
+ void ShowDescriptionWindow(bool show);
+
+// Accessors
+
+ //// Returns the grid used as the attribute editor
+ ctPropertyEditorGrid* GetAttributeEditorGrid() const { return m_attributeEditorGrid; }
+
+ /// Returns the title text control
+ wxTextCtrl* GetElementTitleTextCtrl() const { return m_elementTitleTextCtrl; }
+
+ /// Returns the splitter window between the property grid and
+ /// the description window.
+ wxSplitterWindow* GetSplitterWindow() const { return m_splitterWindow; }
+
+ /// Returns the HTML description window
+ wxHtmlWindow* GetDescriptionWindow() const { return m_propertyDescriptionWindow; }
+
+ /// Returns the config item
+ ctConfigItem* GetItem() const { return m_item; }
+
+ /// Sets the proxy
+ void SetItem(ctConfigItem* configItem) { m_item = configItem; }
+
+DECLARE_EVENT_TABLE()
+
+protected:
+ ctPropertyEditorGrid* m_attributeEditorGrid;
+ wxHtmlWindow* m_propertyDescriptionWindow;
+ wxSplitterWindow* m_splitterWindow;
+
+ // Displays the title of the element being edited
+ wxTextCtrl* m_elementTitleTextCtrl;
+
+ // The config item object being edited
+ ctConfigItem* m_item;
+};
+
+#define ctID_ATTRIBUTE_EDITOR_INSERT 2001
+#define ctID_ATTRIBUTE_EDITOR_GRID 2002
+#define ctID_ATTRIBUTE_EDITOR_DESCRIPTION 2003
+#define ctID_ATTRIBUTE_EDITOR_EDIT_DETAILS 2004
+
+/*!
+ * Attribute editor grid
+ */
+
+class ctPropertyEditorGrid: public wxGrid
+{
+DECLARE_CLASS(ctPropertyEditorGrid)
+public:
+ ctPropertyEditorGrid(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize, long style = wxWANTS_CHARS);
+
+ /// Intercept size event.
+ void OnSize(wxSizeEvent& event);
+
+ void SetStretchableColumn(int which) { m_stretchableColumn = which; }
+ int GetStretchableColumn() const { return m_stretchableColumn; }
+
+ /// An array denoting which columns to display,
+ /// and in what order.
+ void SetColumnsToDisplay(wxArrayString& columns) { m_columnsToDisplay = columns; }
+ wxArrayString& GetColumnsToDisplay() { return m_columnsToDisplay; }
+
+ /// Use m_columnsToDisplay to set the label strings
+ void DisplayLabels();
+
+ /// Clear attributes
+ bool ClearAttributes();
+
+DECLARE_EVENT_TABLE()
+
+private:
+ int m_stretchableColumn;
+ wxArrayString m_columnsToDisplay;
+};
+
+// Utility functions
+
+/// Translate the value to one which can be edited in a single-line
+/// text control
+wxString ctConvertToSingleText(const wxString& value);
+
+/// Translate back to 'real' characters, i.e. newlines are real
+/// newlines.
+wxString ctConvertToMultilineText(const wxString& value);
+
+//----------------------------------------------------------------------------
+// ctMultiLineTextEditor
+//----------------------------------------------------------------------------
+
+class ctMultiLineTextEditor: public wxDialog
+{
+public:
+ // constructors and destructors
+ ctMultiLineTextEditor( wxWindow *parent, wxWindowID id, const wxString &title,
+ const wxString& msg,
+ const wxString& value,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+
+ bool AddControls(wxWindow* parent, const wxString& msg);
+
+ wxString GetText() const { return m_text; }
+ void SetText(const wxString& text) { m_text = text; }
+
+private:
+ DECLARE_EVENT_TABLE()
+ wxString m_text;
+};
+
+/*
+ * Special-purpose splitter window for changing sash look and
+ * also saving sash width
+ */
+
+class ctSplitterWindow: public wxSplitterWindow
+{
+public:
+ ctSplitterWindow(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size, long style);
+
+ // Draws the sash
+ //virtual void DrawSash(wxDC& dc);
+
+ void OnChangeSash(wxSplitterEvent& event);
+
+ void UpdateSettings(bool updateSettings) { m_updateSettings = updateSettings; }
+
+ int GetLastPosition() const { return m_position; }
+ void SetLastPosition(int pos) { m_position = pos; }
+
+protected:
+ // Don't update settings if the window is still being created,
+ // since it could override the saved settings
+ bool m_updateSettings;
+ int m_position;
+
+DECLARE_EVENT_TABLE()
+};
+
+/*!
+ * Use a single-line text control.
+ */
+
+class ctGridCellTextEditor: public wxGridCellTextEditor
+{
+public:
+ virtual void Create(wxWindow* parent, wxWindowID id,
+ wxEvtHandler* evtHandler);
+};
+
+#define ctGRID_VALUE_STRING wxT("singlelinestring")
+
+#define ctID_PROPERTY_EDITOR_SPLITTER 1600
+
+#endif
+ // _WB_PROPEDITOR_H_
+
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: property.cpp
+// Purpose: ctProperty objects represent name/value pairs,
+// for properties of a configuration item.
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-03
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "property.h"
+#endif
+
+#include "wx/wx.h"
+
+#include "property.h"
+
+IMPLEMENT_CLASS(ctProperty, wxObject)
+IMPLEMENT_CLASS(ctProperties, wxObject)
+
+void ctProperties::AddProperty(ctProperty* property, const wxString& insertAfter)
+{
+ ctProperty* oldProp = FindProperty(property->GetName());
+ if (oldProp)
+ m_list.DeleteObject(oldProp);
+
+ wxNode* insertBeforeNode = NULL;
+ if (insertAfter)
+ {
+ ctProperty* insertAfterProp = FindProperty(insertAfter);
+ if (insertAfterProp)
+ {
+ wxNode* node = m_list.Member(insertAfterProp);
+ if (node)
+ insertBeforeNode = node->GetNext();
+ }
+ }
+ if (insertBeforeNode)
+ m_list.Insert(insertBeforeNode, property);
+ else
+ m_list.Append(property);
+
+ if (oldProp)
+ {
+ property->GetVariant() = oldProp->GetVariant();
+
+ delete oldProp;
+ }
+}
+
+void ctProperties::RemoveProperty(ctProperty* property)
+{
+ m_list.DeleteObject(property);
+}
+
+void ctProperties::DeleteProperty(const wxString& name)
+{
+ ctProperty* prop = FindProperty(name);
+ if (prop)
+ {
+ m_list.DeleteObject(prop);
+ delete prop;
+ }
+}
+
+ctProperty* ctProperties::FindProperty(const wxString& name) const
+{
+ wxNode* node = m_list.GetFirst();
+ while (node)
+ {
+ ctProperty* prop = (ctProperty*) node->GetData();
+ if (prop->GetName() == name)
+ return prop;
+
+ node = node->GetNext();
+ }
+ return (ctProperty*) NULL;
+}
+
+wxVariant ctProperties::FindPropertyValue(const wxString& name) const
+{
+ ctProperty* prop = FindProperty(name);
+ if (prop)
+ return prop->m_variant;
+ else
+ return wxEmptyString;
+}
+
+wxString ctProperties::FindPropertyValueString(const wxString& name) const
+{
+ ctProperty* prop = FindProperty(name);
+ if (prop)
+ return prop->m_variant.GetString();
+ else
+ return wxEmptyString;
+}
+
+ctProperty* ctProperties::FindOrCreateProperty(const wxString& name)
+{
+ ctProperty* prop = FindProperty(name);
+ if (!prop)
+ {
+ prop = new ctProperty(name);
+ AddProperty(prop);
+ }
+ return prop;
+}
+
+void ctProperties::Clear()
+{
+ m_list.DeleteContents(TRUE);
+ m_list.Clear();
+ m_list.DeleteContents(FALSE);
+}
+
+void ctProperties::Copy(const ctProperties& properties)
+{
+ wxNode* node = properties.m_list.GetFirst();
+ while (node)
+ {
+ ctProperty* prop = (ctProperty*) node->GetData();
+
+ AddProperty(new ctProperty(* prop));
+
+ node = node->GetNext();
+ }
+}
+
+void ctProperties::SetProperty(const wxString& name, const wxString& value)
+{
+ ctProperty* prop = FindOrCreateProperty(name);
+ prop->SetValue(value);
+}
+
+void ctProperties::SetProperty(const wxString& name, long value)
+{
+ ctProperty* prop = FindOrCreateProperty(name);
+ prop->GetVariant() = value;
+}
+
+void ctProperties::SetProperty(const wxString& name, bool value)
+{
+ ctProperty* prop = FindOrCreateProperty(name);
+ prop->GetVariant() = (bool) value;
+}
+
+void ctProperties::SetProperty(const wxString& name, const wxVariant& value)
+{
+ ctProperty* prop = FindOrCreateProperty(name);
+ prop->SetValue(value);
+}
+
+ctProperty* ctProperties::GetNth(int i) const
+{
+ wxASSERT( i < (int) GetCount() );
+ if (i < (int) GetCount())
+ {
+ wxNode* node = m_list.Nth(i);
+ return (ctProperty*) node->GetData();
+ }
+ return NULL;
+}
+
+#if 0
+/// Combine the styles of all selected properties
+/// with this group name.
+long ctProperties::CombineStyles(const wxString& groupName)
+{
+ long styleValue = 0;
+
+ wxNode* node = m_list.GetFirst();
+ while (node)
+ {
+ ctProperty* prop = (ctProperty*) node->GetData();
+
+ if (prop->GetGroupName() == groupName && prop->GetVariant().GetBool())
+ {
+ styleValue |= prop->GetStyleValue();
+ }
+
+ node = node->GetNext();
+ }
+ return styleValue;
+}
+
+/// Combine the styles of all selected properties
+/// with this group name.
+wxString ctProperties::CombineStylesString(const wxString& groupName)
+{
+ wxString styleList;
+
+ wxNode* node = m_list.GetFirst();
+ while (node)
+ {
+ ctProperty* prop = (ctProperty*) node->GetData();
+
+ if (prop->GetGroupName() == groupName && prop->GetVariant().GetBool())
+ {
+ if (styleList.IsEmpty())
+ styleList = prop->GetName();
+ else
+ styleList = styleList + _T("|") + prop->GetName();
+ }
+
+ node = node->GetNext();
+ }
+ return styleList;
+}
+
+// Remove any spurious properties that need garbage
+// collecting.
+void ctProperties::RemoveHiddenProperties()
+{
+ wxNode* node = m_list.GetFirst();
+ while (node)
+ {
+ ctProperty* prop = (ctProperty*) node->GetData();
+ wxNode* next = node->GetNext();
+
+ if (!prop->IsShown())
+ {
+ delete node;
+ delete prop;
+ }
+
+ node = next;
+ }
+}
+#endif
\ No newline at end of file
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: property.h
+// Purpose: ctProperty objects represent name/value pairs,
+// for properties of a configuration item.
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-03
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _CT_PROPERTY_H_
+#define _CT_PROPERTY_H_
+
+#ifdef __GNUG__
+#pragma interface "property.cpp"
+#endif
+
+#include "wx/variant.h"
+
+/*!
+ * A property/name pair, with other specialised members for
+ * storing window/sizer information.
+ */
+
+class ctProperty: public wxObject
+{
+ DECLARE_CLASS(ctProperty)
+public:
+ ctProperty()
+ {
+ m_readOnly = FALSE;
+ m_custom = FALSE;
+ m_show = TRUE;
+ }
+ ctProperty(const ctProperty& property) { Copy(property); }
+ ctProperty(const wxString& descr, const wxVariant& variant,
+ const wxString& editorType = wxEmptyString,
+ bool readOnly = FALSE)
+ {
+ m_description = descr;
+ m_variant = variant;
+ m_editorType = editorType;
+ m_show = TRUE;
+ m_readOnly = readOnly;
+ m_custom = FALSE;
+ }
+
+ ctProperty(const wxString& name, const wxString& value = wxEmptyString)
+ {
+ m_variant.SetName(name);
+ m_variant = value;
+ m_readOnly = FALSE;
+ m_custom = FALSE;
+ m_show = TRUE;
+ }
+
+ void operator= (const ctProperty& property) { Copy(property); }
+ void Copy(const ctProperty& property)
+ {
+ m_variant = property.m_variant;
+ m_editorType = property.m_editorType;
+ m_description = property.m_description;
+ m_choices = property.m_choices;
+ m_show = property.m_show;
+ m_readOnly = property.m_readOnly;
+ m_custom = property.m_custom;
+ }
+
+ bool operator== (const ctProperty& property) const
+ {
+ return ((m_variant == property.m_variant) &&
+ (m_editorType == property.m_editorType) &&
+ (m_description == property.m_description) &&
+ (m_show == property.m_show) &&
+ (m_custom == property.m_custom) &&
+ (m_readOnly == property.m_readOnly) &&
+ (m_choices == property.m_choices));
+ }
+
+ bool operator!= (const ctProperty& property) const
+ {
+ return !((*this) == property);
+ }
+
+ inline const wxString& GetName() const { return m_variant.GetName(); }
+ inline wxString GetValue() const { return m_variant.GetString(); }
+ inline wxVariant& GetVariant() { return m_variant; }
+ inline const wxString& GetEditorType() const { return m_editorType; }
+ inline const wxArrayString& GetChoices() const { return m_choices; }
+ inline const wxString& GetDescription() const { return m_description; }
+ inline bool IsCustom() const { return m_custom; }
+
+ inline void SetName(const wxString& name) { m_variant.SetName(name); }
+ inline void SetValue(const wxString& value) { m_variant = value; }
+ inline void SetValue(const wxVariant& value) { m_variant = value; }
+ inline void SetEditorType(const wxString& type) { m_editorType = type; }
+ inline void SetChoices(const wxArrayString& choices) { m_choices = choices; }
+ inline void SetDescription(const wxString& descr) { m_description = descr; }
+ inline void Show(bool show) { m_show = show; }
+ inline bool IsShown() const { return m_show; }
+ inline bool GetReadOnly() const { return m_readOnly; }
+ inline void SetReadOnly(bool readOnly) { m_readOnly = readOnly; }
+ inline void SetCustom(bool custom) { m_custom = custom; }
+
+ // The name and value
+ wxVariant m_variant;
+
+ // The editor type name (e.g. "file")
+ // used to choose an editor.
+ wxString m_editorType;
+
+ // Array of choices
+ wxArrayString m_choices;
+
+ // Description
+ wxString m_description;
+
+ // Whether to show or hide (e.g. not properly initialized)
+ bool m_show;
+
+ // Read-only
+ bool m_readOnly;
+
+ // Whether it's a custom property (so save
+ // type/description)
+ bool m_custom;
+};
+
+// A class to manage properties
+class ctProperties: public wxObject
+{
+ DECLARE_CLASS(ctProperties)
+public:
+ ctProperties() {}
+ ctProperties(const ctProperties& properties) { Copy(properties); }
+ ~ctProperties() { Clear(); }
+
+ void operator = (const ctProperties& properties) { Clear(); Copy(properties); }
+ void Copy(const ctProperties& properties);
+
+ inline const wxList& GetList() const { return m_list; }
+
+ inline size_t GetCount() const { return m_list.GetCount(); }
+
+ void AddProperty(ctProperty* property, const wxString& insertAfter = wxEmptyString);
+ void SetProperty(const wxString& name, const wxString& value);
+ void SetProperty(const wxString& name, long value);
+ void SetProperty(const wxString& name, bool value);
+ void SetProperty(const wxString& name, const wxVariant& value);
+ void RemoveProperty(ctProperty* property);
+ void DeleteProperty(const wxString& name);
+ ctProperty* FindProperty(const wxString& name) const;
+ ctProperty* FindOrCreateProperty(const wxString& name);
+ wxString FindPropertyValueString(const wxString& name) const;
+ wxVariant FindPropertyValue(const wxString& name) const;
+ ctProperty* GetNth(int i) const;
+
+ void Clear();
+
+private:
+ wxList m_list;
+};
+
+#endif
+ // _CT_PROPERTY_H_
+
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: settingsdialog.cpp
+// Purpose:
+// Author:
+// Modified by:
+// Created:
+// RCS-ID:
+// Copyright:
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#include "wx/wx.h"
+#include "wx/cshelp.h"
+#include "wx/statline.h"
+#include "wx/splitter.h"
+#include "wx/scrolwin.h"
+#include "wx/spinctrl.h"
+#include "wx/spinbutt.h"
+#include "wx/valgen.h"
+#include "wx/notebook.h"
+
+#include "wxconfigtool.h"
+#include "settingsdialog.h"
+
+////@begin XPM images
+////@end XPM images
+
+/*!
+ * ctSettingsDialog type definition
+ */
+
+IMPLEMENT_CLASS( ctSettingsDialog, wxDialog )
+
+/*!
+ * ctSettingsDialog event table definition
+ */
+
+BEGIN_EVENT_TABLE( ctSettingsDialog, wxDialog )
+
+////@begin ctSettingsDialog event table entries
+ EVT_BUTTON( wxID_OK, ctSettingsDialog::OnOk )
+
+ EVT_BUTTON( wxID_CANCEL, ctSettingsDialog::OnCancel )
+
+ EVT_BUTTON( wxID_HELP, ctSettingsDialog::OnHelp )
+
+////@end ctSettingsDialog event table entries
+
+END_EVENT_TABLE()
+
+/*!
+ * ctSettingsDialog constructor
+ */
+
+ctSettingsDialog::ctSettingsDialog( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
+{
+ SetExtraStyle(wxDIALOG_EX_CONTEXTHELP|wxWS_EX_VALIDATE_RECURSIVELY);
+ wxDialog::Create( parent, id, caption, pos, size, style );
+
+ CreateControls();
+}
+
+/*!
+ * Control creation for ctSettingsDialog
+ */
+
+void ctSettingsDialog::CreateControls()
+{
+////@begin ctSettingsDialog content construction
+
+ ctSettingsDialog* item1 = this;
+
+ wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
+ item1->SetSizer(item2);
+ item1->SetAutoLayout(TRUE);
+
+ wxNotebook* item3 = new wxNotebook(item1, ID_NOTEBOOK, wxDefaultPosition, wxSize(200, 200), wxNB_TOP);
+ wxNotebookSizer* item3Sizer = new wxNotebookSizer(item3);
+ ctGeneralSettingsDialog* item4 = new ctGeneralSettingsDialog(item3, ID_GENERAL_SETTINGS_DIALOG, wxDefaultPosition, wxSize(100, 80), 0);
+ item3->AddPage(item4, _("General"));
+ ctLocationSettingsDialog* item9 = new ctLocationSettingsDialog(item3, ID_LOCATION_SETTINGS_DIALOG, wxDefaultPosition, wxSize(100, 80), 0);
+ item3->AddPage(item9, _("Locations"));
+ item2->Add(item3Sizer, 0, wxGROW|wxALL, 5);
+
+ wxBoxSizer* item19 = new wxBoxSizer(wxHORIZONTAL);
+ item2->Add(item19, 0, wxGROW|wxALL, 5);
+
+ item19->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxButton* item21 = new wxButton(item1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0);
+ item21->SetDefault();
+ item19->Add(item21, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxButton* item22 = new wxButton(item1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0);
+ item19->Add(item22, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxButton* item23 = new wxButton(item1, wxID_HELP, _("&Help"), wxDefaultPosition, wxDefaultSize, 0);
+ item19->Add(item23, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+#if defined(__WXGTK__) || defined(__WXMAC__)
+ wxContextHelpButton* item24 = new wxContextHelpButton(item1, wxID_CONTEXT_HELP, wxDefaultPosition, wxSize(20, -1), wxBU_AUTODRAW);
+ item19->Add(item24, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+#endif
+
+ GetSizer()->Fit(this);
+ GetSizer()->SetSizeHints(this);
+ Centre();
+////@end ctSettingsDialog content construction
+}
+
+/*!
+ * Event handler for wxID_OK
+ */
+
+void ctSettingsDialog::OnOk( wxCommandEvent& event )
+{
+ // Replace with custom code
+ event.Skip();
+}
+
+/*!
+ * Event handler for wxID_CANCEL
+ */
+
+void ctSettingsDialog::OnCancel( wxCommandEvent& event )
+{
+ // Replace with custom code
+ event.Skip();
+}
+
+/*!
+ * Event handler for wxID_HELP
+ */
+
+void ctSettingsDialog::OnHelp( wxCommandEvent& event )
+{
+ wxNotebook* notebook = (wxNotebook*) FindWindow(ID_NOTEBOOK);
+
+ int sel = notebook->GetSelection();
+
+ wxASSERT_MSG( (sel != -1), wxT("A notebook tab should always be selected."));
+
+ wxWindow* page = (wxWindow*) notebook->GetPage(sel);
+
+ wxString helpTopic;
+ if (page->GetId() == ID_GENERAL_SETTINGS_DIALOG)
+ {
+ helpTopic = wxT("General settings dialog");
+ }
+ else if (page->GetId() == ID_LOCATION_SETTINGS_DIALOG)
+ {
+ helpTopic = wxT("Location dialog");
+ }
+
+ if (!helpTopic.IsEmpty())
+ {
+ wxGetApp().GetHelpController().DisplaySection(helpTopic);
+ }
+}
+
+/*!
+ * Should we show tooltips?
+ */
+
+bool ctSettingsDialog::ShowToolTips()
+{
+ return TRUE;
+}
+
+/*!
+ * ctGeneralSettingsDialog type definition
+ */
+
+IMPLEMENT_CLASS( ctGeneralSettingsDialog, wxPanel )
+
+/*!
+ * ctGeneralSettingsDialog event table definition
+ */
+
+BEGIN_EVENT_TABLE( ctGeneralSettingsDialog, wxPanel )
+
+////@begin ctGeneralSettingsDialog event table entries
+////@end ctGeneralSettingsDialog event table entries
+
+END_EVENT_TABLE()
+
+/*!
+ * ctGeneralSettingsDialog constructor
+ */
+
+ctGeneralSettingsDialog::ctGeneralSettingsDialog( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
+{
+ wxPanel::Create( parent, id, pos, size, style );
+
+ CreateControls();
+}
+
+/*!
+ * Control creation for ctGeneralSettingsDialog
+ */
+
+void ctGeneralSettingsDialog::CreateControls()
+{
+////@begin ctGeneralSettingsDialog content construction
+
+ ctGeneralSettingsDialog* item4 = this;
+
+ wxBoxSizer* item5 = new wxBoxSizer(wxVERTICAL);
+ item4->SetSizer(item5);
+ item4->SetAutoLayout(TRUE);
+
+ wxStaticBox* item6Static = new wxStaticBox(item4, -1, _("General settings"));
+ wxStaticBoxSizer* item6 = new wxStaticBoxSizer(item6Static, wxVERTICAL);
+ item5->Add(item6, 1, wxGROW|wxALL, 5);
+
+ wxCheckBox* item7 = new wxCheckBox(item4, ID_LOAD_LAST_DOCUMENT, _("&Load last document"), wxDefaultPosition, wxDefaultSize, 0);
+ item7->SetValue(FALSE);
+ item6->Add(item7, 0, wxALIGN_LEFT|wxALL, 5);
+
+ wxCheckBox* item8 = new wxCheckBox(item4, ID_SHOW_TOOLTIPS, _("&Show tooltips"), wxDefaultPosition, wxDefaultSize, 0);
+ item8->SetValue(FALSE);
+ item6->Add(item8, 0, wxALIGN_LEFT|wxALL, 5);
+
+ GetSizer()->Fit(this);
+////@end ctGeneralSettingsDialog content construction
+
+ FindWindow(ID_LOAD_LAST_DOCUMENT)->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_loadLastDocument));
+ FindWindow(ID_SHOW_TOOLTIPS)->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_useToolTips));
+}
+
+/*!
+ * Should we show tooltips?
+ */
+
+bool ctGeneralSettingsDialog::ShowToolTips()
+{
+ return TRUE;
+}
+
+/*!
+ * ctLocationSettingsDialog type definition
+ */
+
+IMPLEMENT_CLASS( ctLocationSettingsDialog, wxPanel )
+
+/*!
+ * ctLocationSettingsDialog event table definition
+ */
+
+BEGIN_EVENT_TABLE( ctLocationSettingsDialog, wxPanel )
+
+////@begin ctLocationSettingsDialog event table entries
+ EVT_UPDATE_UI( ID_WXWIN_HIERARCHY, ctLocationSettingsDialog::OnUpdateWxwinHierarchy )
+
+ EVT_BUTTON( ID_CHOOSE_WXWIN_HIERARCHY, ctLocationSettingsDialog::OnChooseWxwinHierarchy )
+ EVT_UPDATE_UI( ID_CHOOSE_WXWIN_HIERARCHY, ctLocationSettingsDialog::OnUpdateChooseWxwinHierarchy )
+
+////@end ctLocationSettingsDialog event table entries
+
+END_EVENT_TABLE()
+
+/*!
+ * ctLocationSettingsDialog constructor
+ */
+
+ctLocationSettingsDialog::ctLocationSettingsDialog( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
+{
+ wxPanel::Create( parent, id, pos, size, style );
+
+ CreateControls();
+}
+
+/*!
+ * Control creation for ctLocationSettingsDialog
+ */
+
+void ctLocationSettingsDialog::CreateControls()
+{
+////@begin ctLocationSettingsDialog content construction
+
+ ctLocationSettingsDialog* item9 = this;
+
+ wxBoxSizer* item10 = new wxBoxSizer(wxVERTICAL);
+ item9->SetSizer(item10);
+ item9->SetAutoLayout(TRUE);
+
+ wxStaticBox* item11Static = new wxStaticBox(item9, -1, _("Locations"));
+ wxStaticBoxSizer* item11 = new wxStaticBoxSizer(item11Static, wxVERTICAL);
+ item10->Add(item11, 1, wxGROW|wxALL, 5);
+
+ wxStaticText* item12 = new wxStaticText(item9, wxID_STATIC, _("&wxWindows hierarchy:"), wxDefaultPosition, wxDefaultSize, 0);
+ item11->Add(item12, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
+
+ wxBoxSizer* item13 = new wxBoxSizer(wxHORIZONTAL);
+ item11->Add(item13, 0, wxGROW, 5);
+
+ wxTextCtrl* item14 = new wxTextCtrl(item9, ID_WXWIN_HIERARCHY, _(""), wxDefaultPosition, wxSize(200, -1), 0);
+ item13->Add(item14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxButton* item15 = new wxButton(item9, ID_CHOOSE_WXWIN_HIERARCHY, _("&Choose..."), wxDefaultPosition, wxDefaultSize, 0);
+ item13->Add(item15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxBoxSizer* item16 = new wxBoxSizer(wxHORIZONTAL);
+ item11->Add(item16, 0, wxGROW, 5);
+
+ item16->Add(60, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxCheckBox* item18 = new wxCheckBox(item9, ID_USE_WXWIN, _("&Use WXWIN environment variable"), wxDefaultPosition, wxDefaultSize, 0);
+ item18->SetValue(FALSE);
+ item16->Add(item18, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ GetSizer()->Fit(this);
+////@end ctLocationSettingsDialog content construction
+
+ FindWindow(ID_WXWIN_HIERARCHY)->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_frameworkDir));
+ FindWindow(ID_USE_WXWIN)->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_useEnvironmentVariable));
+}
+
+/*!
+ * Update event handler for ID_WXWIN_HIERARCHY
+ */
+
+void ctLocationSettingsDialog::OnUpdateWxwinHierarchy( wxUpdateUIEvent& event )
+{
+ wxCheckBox* checkbox = (wxCheckBox*) FindWindow(ID_USE_WXWIN);
+ event.Enable(!checkbox->GetValue());
+}
+
+/*!
+ * Event handler for ID_CHOOSE_WXWIN_HIERARCHY
+ */
+
+void ctLocationSettingsDialog::OnChooseWxwinHierarchy( wxCommandEvent& event )
+{
+ wxTextCtrl* textCtrl = (wxTextCtrl*) FindWindow( ID_WXWIN_HIERARCHY );
+ wxASSERT( textCtrl != NULL );
+ wxString defaultPath = textCtrl->GetValue();
+
+ wxDirDialog dialog(this, _("Choose the location of the wxWindows hierarchy"),
+ defaultPath);
+ if (dialog.ShowModal() == wxID_OK)
+ {
+ textCtrl->SetValue(dialog.GetPath());
+ }
+}
+
+/*!
+ * Update event handler for ID_CHOOSE_WXWIN_HIERARCHY
+ */
+
+void ctLocationSettingsDialog::OnUpdateChooseWxwinHierarchy( wxUpdateUIEvent& event )
+{
+ wxCheckBox* checkbox = (wxCheckBox*) FindWindow(ID_USE_WXWIN);
+ event.Enable(!checkbox->GetValue());
+}
+
+/*!
+ * Should we show tooltips?
+ */
+
+bool ctLocationSettingsDialog::ShowToolTips()
+{
+ return wxGetApp().GetSettings().m_useToolTips;
+}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: settingsdialog.h
+// Purpose:
+// Author:
+// Modified by:
+// Created:
+// RCS-ID:
+// Copyright:
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _SETTINGSDIALOG_H_
+#define _SETTINGSDIALOG_H_
+
+/*!
+ * Includes
+ */
+
+////@begin includes
+////@end includes
+
+/*!
+ * Forward declarations
+ */
+
+////@begin forward declarations
+class ctGeneralSettingsDialog;
+class ctLocationSettingsDialog;
+////@end forward declarations
+
+/*!
+ * Control identifiers
+ */
+
+////@begin control identifiers
+#define ID_SETTINGS_DIALOG 10000
+#define ID_NOTEBOOK 10001
+#define ID_GENERAL_SETTINGS_DIALOG 10005
+#define ID_LOAD_LAST_DOCUMENT 10006
+#define ID_SHOW_TOOLTIPS 10007
+#define ID_LOCATION_SETTINGS_DIALOG 10008
+#define ID_WXWIN_HIERARCHY 10010
+#define ID_CHOOSE_WXWIN_HIERARCHY 10011
+#define ID_USE_WXWIN 10012
+////@end control identifiers
+
+/*!
+ * ctSettingsDialog class declaration
+ */
+
+class ctSettingsDialog: public wxDialog
+{
+public:
+ /// Constructor
+ ctSettingsDialog( wxWindow* parent, wxWindowID id = -1,
+ const wxString& caption = _("Configuration Settings"),
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCAPTION|wxSYSTEM_MENU );
+
+ /// Creates the controls and sizers
+ void CreateControls();
+
+////@begin ctSettingsDialog event handler declarations
+
+ /// Event handler for wxID_OK
+ void OnOk( wxCommandEvent& event );
+
+ /// Event handler for wxID_CANCEL
+ void OnCancel( wxCommandEvent& event );
+
+ /// Event handler for wxID_HELP
+ void OnHelp( wxCommandEvent& event );
+
+////@end ctSettingsDialog event handler declarations
+
+////@begin ctSettingsDialog member function declarations
+
+////@end ctSettingsDialog member function declarations
+
+ /// Should we show tooltips?
+ static bool ShowToolTips();
+
+ DECLARE_CLASS( ctSettingsDialog )
+ DECLARE_EVENT_TABLE()
+};
+
+/*!
+ * ctGeneralSettingsDialog class declaration
+ */
+
+class ctGeneralSettingsDialog: public wxPanel
+{
+public:
+ /// Constructor
+ ctGeneralSettingsDialog( wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER|wxTAB_TRAVERSAL );
+
+ /// Creates the controls and sizers
+ void CreateControls();
+
+////@begin ctGeneralSettingsDialog event handler declarations
+
+////@end ctGeneralSettingsDialog event handler declarations
+
+////@begin ctGeneralSettingsDialog member function declarations
+
+////@end ctGeneralSettingsDialog member function declarations
+
+ /// Should we show tooltips?
+ static bool ShowToolTips();
+
+ DECLARE_CLASS( ctGeneralSettingsDialog )
+ DECLARE_EVENT_TABLE()
+};
+
+/*!
+ * ctLocationSettingsDialog class declaration
+ */
+
+class ctLocationSettingsDialog: public wxPanel
+{
+public:
+ /// Constructor
+ ctLocationSettingsDialog( wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER|wxTAB_TRAVERSAL );
+
+ /// Creates the controls and sizers
+ void CreateControls();
+
+////@begin ctLocationSettingsDialog event handler declarations
+
+ /// Update event handler for ID_WXWIN_HIERARCHY
+ void OnUpdateWxwinHierarchy( wxUpdateUIEvent& event );
+
+ /// Event handler for ID_CHOOSE_WXWIN_HIERARCHY
+ void OnChooseWxwinHierarchy( wxCommandEvent& event );
+
+ /// Update event handler for ID_CHOOSE_WXWIN_HIERARCHY
+ void OnUpdateChooseWxwinHierarchy( wxUpdateUIEvent& event );
+
+////@end ctLocationSettingsDialog event handler declarations
+
+////@begin ctLocationSettingsDialog member function declarations
+
+////@end ctLocationSettingsDialog member function declarations
+
+ /// Should we show tooltips?
+ static bool ShowToolTips();
+
+ DECLARE_CLASS( ctLocationSettingsDialog )
+ DECLARE_EVENT_TABLE()
+};
+
+#endif
+ // _SETTINGSDIALOG_H_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: symbols.h
+// Purpose: Application symbols file
+// Author:
+// Modified by:
+// Created:
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _CT_SYMBOLS_H_
+#define _CT_SYMBOLS_H_
+
+//// Build settings
+
+// Version
+#define ctVERSION_NUMBER 1.0
+
+// Whether to have a splash screen
+#define ctUSE_SPLASH_SCREEN 0
+
+// Cell background colour in property editor
+// Light blue
+#define ctCELL_BACKGROUND_COLOUR wxColour(227, 228, 255)
+
+// Custom property cell background colour in property editor
+// Light blue
+#define ctCUSTOM_CELL_BACKGROUND_COLOUR wxColour(255, 227, 227)
+
+// Description window colour in property editor
+// Light yellow
+#define ctDESCRIPTION_BACKGROUND_COLOUR wxColour(255, 255, 192)
+
+// Misc symbols
+#define ctSYMBOL_WEBSITE wxT("http://www.wxwindows.org")
+
+#endif
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: utils.cpp
+// Purpose: Utility functions and classes
+// Author: Julian Smart
+// Modified by:
+// Created: 2002-09-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+// #pragma implementation
+#endif
+
+#include "wx/wx.h"
+#include "wx/image.h"
+#include "wx/notebook.h"
+#include "wx/splitter.h"
+#include "wx/wfstream.h"
+#include "wx/datstrm.h"
+#include "wx/file.h"
+#include "wx/listctrl.h"
+#include "wx/tokenzr.h"
+#include "wx/process.h"
+#include "wx/mimetype.h"
+#include "wx/variant.h"
+#include "wx/cshelp.h"
+#include "wx/cmdline.h"
+
+#include <math.h>
+
+#ifdef __WXMSW__
+#include <windows.h>
+#include "wx/msw/winundef.h"
+#endif
+
+#include "utils.h"
+
+// Returns the image type, or -1, determined from the extension.
+int apDetermineImageType(const wxString& filename)
+{
+ wxString path, name, ext;
+
+ wxSplitPath(filename, & path, & name, & ext);
+
+ ext.MakeLower();
+ if (ext == "jpg" || ext == "jpeg")
+ return wxBITMAP_TYPE_JPEG;
+ else if (ext == "gif")
+ return wxBITMAP_TYPE_GIF;
+ else if (ext == "bmp")
+ return wxBITMAP_TYPE_BMP;
+ else if (ext == "png")
+ return wxBITMAP_TYPE_PNG;
+ else if (ext == "pcx")
+ return wxBITMAP_TYPE_PCX;
+ else if (ext == "tif" || ext == "tiff")
+ return wxBITMAP_TYPE_TIF;
+ else
+ return -1;
+}
+
+// Convert a colour to a 6-digit hex string
+wxString apColourToHexString(const wxColour& col)
+{
+ wxString hex;
+
+ hex += wxDecToHex(col.Red());
+ hex += wxDecToHex(col.Green());
+ hex += wxDecToHex(col.Blue());
+
+ return hex;
+}
+
+// Convert 6-digit hex string to a colour
+wxColour apHexStringToColour(const wxString& hex)
+{
+ unsigned int r = 0;
+ unsigned int g = 0;
+ unsigned int b = 0;
+ r = wxHexToDec(hex.Mid(0, 2));
+ g = wxHexToDec(hex.Mid(2, 2));
+ b = wxHexToDec(hex.Mid(4, 2));
+
+ return wxColour(r, g, b);
+}
+
+// Convert a wxFont to a string
+wxString apFontToString(const wxFont& font)
+{
+ wxString str;
+ str.Printf(wxT("%d,%d,%d,%d,%d,%s"), (int) font.GetPointSize(),
+ (int) font.GetFamily(), (int) font.GetStyle(), (int) font.GetWeight(),
+ (int) font.GetUnderlined(), font.GetFaceName().c_str());
+
+ return str;
+}
+
+// Convert a string to a wxFont
+wxFont apStringToFont(const wxString& str)
+{
+ int pointSize = 12;
+ int family = wxSWISS;
+ int style = wxNORMAL;
+ int weight = wxNORMAL;
+ int underlined = 0;
+ wxString facename(wxT(""));
+
+ wxStringTokenizer tkz(str, wxT(","));
+ int i = 0;
+ while (tkz.HasMoreTokens())
+ {
+ wxString token = tkz.GetNextToken();
+
+ if (i == 0)
+ {
+ StringToInt(token, & pointSize);
+#if defined(__WXGTK__) || defined(__WXMAC__)
+ if (pointSize < 8)
+ pointSize = 8;
+ if (pointSize == 9)
+ pointSize = 10;
+#endif
+ }
+ else if (i == 1)
+ StringToInt(token, & family);
+ else if (i == 2)
+ StringToInt(token, & style);
+ else if (i == 3)
+ StringToInt(token, & weight);
+ else if (i == 4)
+ StringToInt(token, & underlined);
+ else if (i == 5)
+ {
+ facename = token;
+#if defined(__WXGTK__)
+ if (facename == wxT("Arial"))
+ facename = wxT("helvetica");
+#endif
+ }
+ i ++;
+
+ }
+ return wxFont(pointSize, family, style, weight, (underlined != 0), facename);
+}
+
+
+// Get the index of the given named wxNotebook page
+int apFindNotebookPage(wxNotebook* notebook, const wxString& name)
+{
+ int i;
+ for (i = 0; i < notebook->GetPageCount(); i++)
+ if (name == notebook->GetPageText(i))
+ return i;
+ return -1;
+}
+
+/*
+ * View an HTML file
+ */
+
+void apViewHTMLFile(const wxString& url)
+{
+#ifdef __WXMSW__
+ HKEY hKey;
+ TCHAR szCmdName[1024];
+ DWORD dwType, dw = sizeof(szCmdName);
+ LONG lRes;
+ lRes = RegOpenKey(HKEY_CLASSES_ROOT, "htmlfile\\shell\\open\\command", &hKey);
+ if(lRes == ERROR_SUCCESS && RegQueryValueEx(hKey,(LPTSTR)NULL, NULL,
+ &dwType, (LPBYTE)szCmdName, &dw) == ERROR_SUCCESS)
+ {
+ strcat(szCmdName, (const char*) url);
+ PROCESS_INFORMATION piProcInfo;
+ STARTUPINFO siStartInfo;
+ memset(&siStartInfo, 0, sizeof(STARTUPINFO));
+ siStartInfo.cb = sizeof(STARTUPINFO);
+ CreateProcess(NULL, szCmdName, NULL, NULL, FALSE, 0, NULL,
+ NULL, &siStartInfo, &piProcInfo );
+ }
+ if(lRes == ERROR_SUCCESS)
+ RegCloseKey(hKey);
+#else
+ wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(wxT("html"));
+ if ( !ft )
+ {
+ wxLogError(_T("Impossible to determine the file type for extension html. Please edit your MIME types."));
+ return ;
+ }
+
+ wxString cmd;
+ bool ok = ft->GetOpenCommand(&cmd,
+ wxFileType::MessageParameters(url, _T("")));
+ delete ft;
+
+ if (!ok)
+ {
+ // TODO: some kind of configuration dialog here.
+ wxMessageBox(_("Could not determine the command for running the browser."),
+ wxT("Browsing problem"), wxOK|wxICON_EXCLAMATION);
+ return ;
+ }
+
+ ok = (wxExecute(cmd, FALSE) != 0);
+#endif
+}
+
+wxString wxGetTempDir()
+{
+ wxString dir;
+#if defined(__WXMAC__) && !defined(__DARWIN__)
+ dir = wxMacFindFolder( (short) kOnSystemDisk, kTemporaryFolderType, kCreateFolder ) ;
+#else // !Mac
+ dir = wxGetenv(_T("TMP"));
+ if ( dir.empty() )
+ {
+ dir = wxGetenv(_T("TEMP"));
+ }
+
+ if ( dir.empty() )
+ {
+ // default
+#ifdef __DOS__
+ dir = _T(".");
+#else
+ dir = _T("/tmp");
+#endif
+ }
+#endif // Mac/!Mac
+ return dir;
+}
+
+// Invoke app for file type
+// Eventually we should allow the user to select an app.
+bool apInvokeAppForFile(const wxString& filename)
+{
+ wxString path, file, ext;
+ wxSplitPath(filename, & path, & file, & ext);
+
+ wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(ext);
+ if ( !ft )
+ {
+ wxString msg;
+ msg.Printf(wxT("Sorry, could not determine what application to invoke for extension %s\nYou may need to edit your MIME types."),
+ ext.c_str());
+ wxMessageBox(msg, wxT("Application Invocation"), wxICON_EXCLAMATION|wxOK);
+ return FALSE;
+ }
+
+ wxString cmd;
+ bool ok = ft->GetOpenCommand(&cmd,
+ wxFileType::MessageParameters(filename, _T("")));
+ delete ft;
+
+ ok = (wxExecute(cmd, FALSE) != 0);
+
+ return ok;
+}
+
+// Find the absolute path where this application has been run from.
+// argv0 is wxTheApp->argv[0]
+// cwd is the current working directory (at startup)
+// appVariableName is the name of a variable containing the directory for this app, e.g.
+// MYAPPDIR. This is checked first.
+
+wxString apFindAppPath(const wxString& argv0, const wxString& cwd, const wxString& appVariableName)
+{
+ wxString str;
+
+ // Try appVariableName
+ if (!appVariableName.IsEmpty())
+ {
+ str = wxGetenv(appVariableName);
+ if (!str.IsEmpty())
+ return str;
+ }
+
+ if (wxIsAbsolutePath(argv0))
+ return wxPathOnly(argv0);
+ else
+ {
+ // Is it a relative path?
+ wxString currentDir(cwd);
+ if (currentDir.Last() != wxFILE_SEP_PATH)
+ currentDir += wxFILE_SEP_PATH;
+
+ str = currentDir + argv0;
+ if (wxFileExists(str))
+ return wxPathOnly(str);
+ }
+
+ // OK, it's neither an absolute path nor a relative path.
+ // Search PATH.
+
+ wxPathList pathList;
+ pathList.AddEnvList(wxT("PATH"));
+ str = pathList.FindAbsoluteValidPath(argv0);
+ if (!str.IsEmpty())
+ return wxPathOnly(str);
+
+ // Failed
+ return wxEmptyString;
+}
+
+// Adds a context-sensitive help button, for non-Windows platforms
+void apAddContextHelpButton(wxWindow* parent, wxSizer* sizer, int sizerFlags, int sizerBorder)
+{
+#if defined(__WXGTK__) || defined(__WXMAC__)
+#ifdef __WXMAC__
+ wxSize buttonSize(20, 20);
+#else
+ wxSize buttonSize(-1, -1);
+#endif
+ wxButton *contextButton = new wxContextHelpButton( parent, wxID_CONTEXT_HELP,
+ wxDefaultPosition, buttonSize);
+ sizer->Add( contextButton, 0, sizerFlags, sizerBorder );
+
+ // Add a bit of space on the right, to allow for the dialog resizing
+ // handle
+#ifdef __WXMAC__
+ sizer->Add(0, 0, 0, wxRIGHT, 10);
+#endif
+
+ contextButton->SetHelpText(_("Invokes context-sensitive help for the clicked-on window."));
+ if (wxGetApp().UsingTooltips())
+ {
+ contextButton->SetToolTip(_("Invokes context-sensitive help for the clicked-on window."));
+ }
+#endif
+}
+
+// Get selected wxNotebook page
+wxWindow* apNotebookGetSelectedPage(wxNotebook* notebook)
+{
+ int sel = notebook->GetSelection();
+ if (sel > -1)
+ {
+ return notebook->GetPage(sel);
+ }
+ return NULL;
+}
+
+/*
+* wxIconInfo
+*/
+
+wxIconInfo::wxIconInfo(const wxString& name)
+{
+ m_maxStates = 0;
+ m_name = name;
+ int i;
+ for (i = 0; i < wxMAX_ICON_STATES; i++)
+ m_states[i] = 0;
+}
+
+int wxIconInfo::GetIconId(int state, bool enabled) const
+{
+ wxASSERT ( state < (wxMAX_ICON_STATES * 2) );
+ wxASSERT ( state < m_maxStates );
+
+ return m_states[state * 2 + (enabled ? 0 : 1)];
+}
+
+void wxIconInfo::SetIconId(int state, bool enabled, int iconId)
+{
+ wxASSERT ( state < (wxMAX_ICON_STATES * 2) );
+ if (state+1 > m_maxStates)
+ m_maxStates = state+1;
+
+ m_states[state * 2 + (enabled ? 0 : 1)] = iconId;
+}
+
+/*
+* wxIconTable
+* Contains a list of wxIconInfos
+*/
+
+wxIconTable::wxIconTable(wxImageList* imageList)
+{
+ m_imageList = imageList;
+ DeleteContents(TRUE);
+}
+
+void wxIconTable::AppendInfo(wxIconInfo* info)
+{
+ Append(info);
+}
+
+// Easy way of initialising both the image list and the
+// table. It will generate image ids itself while appending the icon.
+bool wxIconTable::AddInfo(const wxString& name, const wxIcon& icon, int state, bool enabled)
+{
+ wxASSERT (m_imageList != NULL);
+
+ wxIconInfo* info = FindInfo(name);
+ if (!info)
+ {
+ info = new wxIconInfo(name);
+ Append(info);
+ }
+ info->SetIconId(state, enabled, m_imageList->Add(icon));
+ return TRUE;
+}
+
+wxIconInfo* wxIconTable::FindInfo(const wxString& name) const
+{
+ wxNode* node = First();
+ while (node)
+ {
+ wxIconInfo* info = (wxIconInfo*) node->Data();
+ if (info->GetName() == name)
+ return info;
+ node = node->Next();
+ }
+ return NULL;
+}
+
+int wxIconTable::GetIconId(const wxString& name, int state, bool enabled) const
+{
+ wxIconInfo* info = FindInfo(name);
+ if (!info)
+ return -1;
+ return info->GetIconId(state, enabled);
+}
+
+bool wxIconTable::SetIconId(const wxString& name, int state, bool enabled, int iconId)
+{
+ wxIconInfo* info = FindInfo(name);
+ if (!info)
+ return FALSE;
+ info->SetIconId(state, enabled, iconId);
+ return TRUE;
+}
+
+// Output stream operators
+
+wxOutputStream& operator <<(wxOutputStream& stream, const wxString& s)
+{
+ stream.Write(s, s.Length());
+ return stream;
+}
+
+wxOutputStream& operator <<(wxOutputStream& stream, long l)
+{
+ wxString str;
+ str.Printf(_T("%ld"), l);
+ return stream << str;
+}
+
+wxOutputStream& operator <<(wxOutputStream& stream, const char c)
+{
+ wxString str;
+ str.Printf(_T("%c"), c);
+ return stream << str;
+}
+
+// Convert characters to HTML equivalents
+wxString ctEscapeHTMLCharacters(const wxString& str)
+{
+ wxString s;
+ size_t len = str.Length();
+ size_t i;
+ for (i = 0; i < len; i++)
+ {
+ wxChar c = str.GetChar(i);
+ if (c == _T('<'))
+ s += _T("<");
+ else if (c == _T('>'))
+ s += _T(">");
+ else if (c == _T('&'))
+ s += _T("&");
+ else
+ s += c;
+ }
+ return s;
+}
\ No newline at end of file
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: utils.h
+// Purpose: Utility functions and classes
+// Author: Julian Smart
+// Modified by:
+// Created: 2002-09-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+/*!
+ * \file
+ * \brief A file of utility functions and classes.
+ */
+
+#ifdef __GNUG__
+// #pragma interface
+#endif
+
+#ifndef _AP_UTILS_H_
+#define _AP_UTILS_H_
+
+#ifndef DOXYGEN_SKIP
+
+/*!
+ * \defgroup ForwardDeclarations Forward Declations
+ */
+
+/*@{*/
+
+class WXDLLEXPORT wxImage;
+class WXDLLEXPORT wxNotebook;
+class WXDLLEXPORT wxInputStream;
+class WXDLLEXPORT wxOutputStream;
+class WXDLLEXPORT wxFileInputStream;
+class WXDLLEXPORT wxFileOutputStream;
+class WXDLLEXPORT wxDataInputStream;
+class WXDLLEXPORT wxDataOutputStream;
+class WXDLLEXPORT wxSplitterWindow;
+class WXDLLEXPORT wxVariant;
+class WXDLLEXPORT wxListCtrl;
+
+ /* \endif
+ */
+
+/*@}*/
+
+#endif
+
+#ifdef __WXMSW__
+#define wxNEWLINE wxT("\r\n")
+#else
+#define wxNEWLINE wxT("\n")
+#endif
+
+/// Returns the image type, or -1, determined from the extension.
+int apDetermineImageType(const wxString& filename);
+
+/// Convert a colour to a 6-digit hex string
+wxString apColourToHexString(const wxColour& col);
+
+/// Convert 6-digit hex string to a colour
+wxColour apHexStringToColour(const wxString& hex);
+
+/// Convert a wxFont to a string
+wxString apFontToString(const wxFont& font);
+
+/// Convert a string to a wxFont
+wxFont apStringToFont(const wxString& str);
+
+/// Get the index of the given named wxNotebook page
+int apFindNotebookPage(wxNotebook* notebook, const wxString& name);
+
+/// View the given URL
+void apViewHTMLFile(const wxString& url);
+
+/// Returns the system temporary directory.
+wxString wxGetTempDir();
+
+/// Launch the application associated with the filename's extension
+bool apInvokeAppForFile(const wxString& filename);
+
+/// \brief Find the absolute path where this application has been run from.
+///
+/// \param argv0 wxTheApp->argv[0]
+/// \param cwd The current working directory (at startup)
+/// \param appVariableName The name of a variable containing the directory for this app, e.g.
+/// MYAPPDIR. This is used as a last resort.
+wxString apFindAppPath(const wxString& argv0, const wxString& cwd, const wxString& appVariableName = wxEmptyString);
+
+/// Adds a context-sensitive help button, for non-Windows platforms
+void apAddContextHelpButton(wxWindow* parent, wxSizer* sizer, int sizerFlags = wxALIGN_CENTRE|wxALL, int sizerBorder = 5);
+
+/// Get selected wxNotebook page
+wxWindow* apNotebookGetSelectedPage(wxNotebook* notebook);
+
+#define wxMAX_ICON_STATES 4
+
+/*
+
+wxIconInfo, wxIconTable
+associate multiple state icons with items in tree controls
+(and potentially other controls).
+
+So instead of having to remember a lot of image list ids,
+you have a named state info object which contains up to 4 different states
+(identified by the integers 0 - 3). Each of these states can
+be in a further 2 sub-states - enabled or disabled.
+
+wxIconTable holds a list of these state info objects
+and has a convenient API. For example, the following adds
+icons for a checkbox item that can be: on/enabled, off/enabled,
+on/disabled,off/disabled.
+
+ m_iconTable.AddInfo("Checkbox", wxICON(checked), 0, TRUE);
+ m_iconTable.AddInfo("Checkbox", wxICON(checked_dis), 0, FALSE);
+ m_iconTable.AddInfo("Checkbox", wxICON(unchecked), 1, TRUE);
+ m_iconTable.AddInfo("Checkbox", wxICON(unchecked_dis), 1, FALSE);
+
+When you update the item image in response to (e.g.) user interaction,
+you can say something like this:
+
+ int iconId = m_iconTable.GetIconId("Checkbox", 0, FALSE);
+
+ treeCtrl.SetItemImage(itemId, iconId, wxTreeItemIcon_Normal);
+ treeCtrl.SetItemImage(itemId, iconId, wxTreeItemIcon_Selected);
+
+ */
+
+/*
+ * wxIconInfo
+ * Stores information about the visual state of an item in a tree control
+ */
+
+class wxIconInfo: public wxObject
+{
+public:
+ wxIconInfo(const wxString& name);
+
+ // How many states? (Each state
+ // has enabled/disabled state)
+ // Max (say) 4 states, each with
+ // enabled/disabled
+ int GetStateCount() const { return m_maxStates; };
+
+ void SetStateCount(int count) { m_maxStates; }
+ int GetIconId(int state, bool enabled = TRUE) const;
+ void SetIconId(int state, bool enabled, int iconId);
+
+ const wxString& GetName() const { return m_name; }
+
+protected:
+ int m_maxStates;
+ int m_states[wxMAX_ICON_STATES * 2]; // Enabled/disabled
+ wxString m_name; // Name of icon, e.g. "Package"
+};
+
+/*!
+ * wxIconTable
+ * Contains a list of wxIconInfos
+ */
+
+class wxIconTable: public wxList
+{
+public:
+ wxIconTable(wxImageList* imageList = NULL);
+
+ void AppendInfo(wxIconInfo* info);
+
+ // Easy way of initialising both the image list and the
+ // info db. It will generate image ids itself while appending the icon.
+ // 'state' is an integer from 0 up to the max allowed, representing a different
+ // state. There may be only one, or (for a checkbox) there may be two.
+ // A folder that can be open or closed would have two states.
+ // Enabled/disabled is taken as a special case.
+ bool AddInfo(const wxString& name, const wxIcon& icon, int state, bool enabled);
+
+ wxIconInfo* FindInfo(const wxString& name) const;
+
+ int GetIconId(const wxString& name, int state, bool enabled = TRUE) const;
+ bool SetIconId(const wxString& name, int state, bool enabled, int iconId) ;
+
+ void SetImageList(wxImageList* imageList) { m_imageList = imageList; }
+ wxImageList* GetImageList() const { return m_imageList; }
+
+protected:
+ wxImageList* m_imageList;
+};
+
+/// Useful insertion operators for wxOutputStream.
+wxOutputStream& operator <<(wxOutputStream&, const wxString& s);
+wxOutputStream& operator <<(wxOutputStream&, const char c);
+wxOutputStream& operator <<(wxOutputStream&, long l);
+
+// Convert characters to HTML equivalents
+wxString ctEscapeHTMLCharacters(const wxString& str);
+
+#endif
+ // _AP_UTILS_H_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: wxconfigtool.cpp
+// Purpose: Generic application class
+// Author: Julian Smart
+// Modified by:
+// Created: 2002-09-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation wxconfigtool.h
+#endif
+
+#include "wx/wx.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include "wx/config.h"
+#include "wx/laywin.h"
+#include "wx/image.h"
+#include "wx/menuitem.h"
+#include "wx/tooltip.h"
+#include "wx/cshelp.h"
+#include "wx/html/htmprint.h"
+#include "wx/html/htmlwin.h"
+#include "wx/filesys.h"
+#include "wx/fs_mem.h"
+#include "wx/fs_zip.h"
+#include "wx/wfstream.h"
+#include "wx/variant.h"
+
+#include "wxconfigtool.h"
+#include "configtooldoc.h"
+#include "configtoolview.h"
+#include "mainframe.h"
+#include "utils.h"
+
+IMPLEMENT_APP(ctApp)
+
+BEGIN_EVENT_TABLE(ctApp, wxApp)
+END_EVENT_TABLE()
+
+ctApp::ctApp()
+{
+ m_helpController = NULL;
+ m_helpControllerReference = NULL;
+ m_docManager = NULL;
+}
+
+ctApp::~ctApp()
+{
+}
+
+bool ctApp::OnInit(void)
+{
+ wxLog::SetTimestamp(NULL);
+
+ wxHelpProvider::Set(new wxSimpleHelpProvider);
+
+#if wxUSE_LIBPNG
+ wxImage::AddHandler( new wxPNGHandler );
+#endif
+
+#if wxUSE_LIBJPEG
+ wxImage::AddHandler( new wxJPEGHandler );
+#endif
+
+#if wxUSE_GIF
+ wxImage::AddHandler( new wxGIFHandler );
+#endif
+
+#ifdef __WXMSW__
+ m_helpController = new wxCHMHelpController;
+ m_helpControllerReference = new wxCHMHelpController;
+#else
+ m_helpController = new wxHtmlHelpController;
+ m_helpControllerReference = new wxHtmlHelpController;
+#endif
+
+ // Required for HTML help
+#if wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB
+ wxFileSystem::AddHandler(new wxZipFSHandler);
+#endif
+
+ wxString currentDir = wxGetCwd();
+
+ // Use argv to get current app directory
+ m_appDir = apFindAppPath(argv[0], currentDir, wxT("WXCONFIGTOOLDIR"));
+
+#ifdef __WXMSW__
+ // If the development version, go up a directory.
+ if ((m_appDir.Right(5).CmpNoCase("DEBUG") == 0) ||
+ (m_appDir.Right(11).CmpNoCase("DEBUGSTABLE") == 0) ||
+ (m_appDir.Right(7).CmpNoCase("RELEASE") == 0) ||
+ (m_appDir.Right(13).CmpNoCase("RELEASESTABLE") == 0) ||
+ (m_appDir.Right(10).CmpNoCase("RELEASEDEV") == 0) ||
+ (m_appDir.Right(8).CmpNoCase("DEBUGDEV") == 0)
+ )
+ m_appDir = wxPathOnly(m_appDir);
+#endif
+
+ m_docManager = new wxDocManager;
+ m_docManager->SetMaxDocsOpen(1);
+
+ //// Create a template relating documents to their views
+ (void) new wxDocTemplate(m_docManager, wxGetApp().GetSettings().GetShortAppName(), wxT("*.wxs"), wxT(""), wxT("wxs"), wxT("Doc"), wxT("View"),
+ CLASSINFO(ctConfigToolDoc), CLASSINFO(ctConfigToolView));
+
+ m_settings.Init();
+
+ LoadConfig();
+
+ wxString helpFilePathReference(GetFullAppPath(_("wx")));
+ m_helpControllerReference->Initialize(helpFilePathReference);
+
+ wxString helpFilePath(GetFullAppPath(_("configtool")));
+ m_helpController->Initialize(helpFilePath);
+
+ ctMainFrame* frame = new ctMainFrame(m_docManager, NULL, -1, wxGetApp().GetSettings().GetAppName(),
+ GetSettings().m_frameSize.GetPosition(), GetSettings().m_frameSize.GetSize(),
+ wxDEFAULT_FRAME_STYLE);
+ SetTopWindow(frame);
+
+ switch (wxGetApp().GetSettings().m_frameStatus)
+ {
+ case ctSHOW_STATUS_MAXIMIZED:
+ {
+ frame->Maximize(TRUE);
+ break;
+ }
+ case ctSHOW_STATUS_MINIMIZED:
+ {
+ frame->Iconize(TRUE);
+ break;
+ }
+ default:
+ case ctSHOW_STATUS_NORMAL:
+ {
+ break;
+ }
+ }
+
+ // Load the file history. This has to be done AFTER the
+ // main frame has been created, so that the items
+ // will get appended to the file menu.
+ {
+ wxConfig config(wxGetApp().GetSettings().GetAppName(), wxT("Generic Organisation"));
+ GetFileHistory().Load(config);
+ }
+
+ if (argc > 1)
+ {
+ // Concatenate strings since it could have spaces (and quotes)
+ wxString arg;
+ int i;
+ for (i = 1; i < argc; i++)
+ {
+ arg += argv[i];
+ if (i < (argc - 1))
+ arg += wxString(wxT(" "));
+ }
+ if (arg[0u] == '"')
+ arg = arg.Mid(1);
+ if (arg.Last() == '"')
+ arg = arg.Mid(0, arg.Len() - 1);
+
+ // Load the file
+ wxDocument* doc = m_docManager->CreateDocument(arg, wxDOC_SILENT);
+ if (doc)
+ doc->SetDocumentSaved(TRUE);
+ }
+ else
+ {
+ if (GetSettings().m_loadLastDocument)
+ {
+ // Load the file that was last loaded
+ wxDocument* doc = m_docManager->CreateDocument(GetSettings().m_lastFilename, wxDOC_SILENT);
+ if (doc)
+ doc->SetDocumentSaved(TRUE);
+ }
+ }
+
+ GetTopWindow()->Show(TRUE);
+
+ return TRUE;
+}
+
+int ctApp::OnExit(void)
+{
+ SaveConfig();
+
+ // Save the file history
+ {
+ wxConfig config(wxGetApp().GetSettings().GetAppName(), wxT("Generic Organisation"));
+ GetFileHistory().Save(config);
+ }
+
+ delete m_docManager;
+ m_docManager = NULL;
+
+ return 0;
+}
+
+void ctApp::ClearHelpControllers()
+{
+ delete m_helpController;
+ m_helpController = NULL;
+
+ delete m_helpControllerReference;
+ m_helpControllerReference = NULL;
+}
+
+
+// Prepend the current program directory to the name
+wxString ctApp::GetFullAppPath(const wxString& filename) const
+{
+ wxString path(m_appDir);
+ if (path.Last() != wxFILE_SEP_PATH && filename[0] != wxFILE_SEP_PATH)
+ path += wxFILE_SEP_PATH;
+ path += filename;
+
+ return path;
+}
+
+// Load config info
+bool ctApp::LoadConfig()
+{
+ return m_settings.LoadConfig();
+}
+
+// Save config info
+bool ctApp::SaveConfig()
+{
+ return m_settings.SaveConfig();
+}
+
+bool ctApp::UsingTooltips()
+{
+ return GetSettings().m_useToolTips;
+}
+
+/// Returns the main frame
+ctMainFrame* ctApp::GetMainFrame()
+{
+ return wxDynamicCast(wxTheApp->GetTopWindow(), ctMainFrame);
+}
--- /dev/null
+# Microsoft Developer Studio Project File - Name="wxconfigtool" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=wxconfigtool - Win32 DebugDev
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "wxconfigtool.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "wxconfigtool.mak" CFG="wxconfigtool - Win32 DebugDev"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "wxconfigtool - Win32 Debug DLL" (based on "Win32 (x86) Application")
+!MESSAGE "wxconfigtool - Win32 Release DLL" (based on "Win32 (x86) Application")
+!MESSAGE "wxconfigtool - Win32 DebugStable" (based on "Win32 (x86) Application")
+!MESSAGE "wxconfigtool - Win32 ReleaseStable" (based on "Win32 (x86) Application")
+!MESSAGE "wxconfigtool - Win32 DebugDev" (based on "Win32 (x86) Application")
+!MESSAGE "wxconfigtool - Win32 ReleaseDev" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "wxconfigtool - Win32 Debug DLL"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "DebugDLL"
+# PROP BASE Intermediate_Dir "DebugDLL"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugDLL"
+# PROP Intermediate_Dir "DebugDLL"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(WXWIN)/include" /I "$(WXWIN)/lib/mswdlld" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
+# SUBTRACT CPP /YX /Yc /Yu
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 wxvc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib wininet.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /pdbtype:sept /libpath:"$(WXWIN)\lib"
+
+!ELSEIF "$(CFG)" == "wxconfigtool - Win32 Release DLL"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "ReleaseDLL"
+# PROP BASE Intermediate_Dir "ReleaseDLL"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleaseDLL"
+# PROP Intermediate_Dir "ReleaseDLL"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "$(WXWIN)/include" /I "$(WXWIN)/lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:windows /machine:I386
+# ADD LINK32 wxvc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib wininet.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /libpath:"$(WXWIN)\lib"
+
+!ELSEIF "$(CFG)" == "wxconfigtool - Win32 DebugStable"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "wxconfigtool___Win32_DebugStable"
+# PROP BASE Intermediate_Dir "wxconfigtool___Win32_DebugStable"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugStable"
+# PROP Intermediate_Dir "DebugStable"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(WXWIN)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(WXWINSTABLE)/include" /I "$(WXWINSTABLE)/lib/mswd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib wxvc.lib jpeg.lib tiff.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"$(WXWIN)\src\Debug" /libpath:"$(WXWIN)\src\jpeg\Debug" /libpath:"$(WXWIN)\src\tiff\Debug" /libpath:"$(WXWIN)\lib"
+# ADD LINK32 winmm.lib wxmswd.lib jpegd.lib tiffd.lib pngd.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib wininet.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"$(WXWINSTABLE)\lib"
+
+!ELSEIF "$(CFG)" == "wxconfigtool - Win32 ReleaseStable"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "wxconfigtool___Win32_ReleaseStable"
+# PROP BASE Intermediate_Dir "wxconfigtool___Win32_ReleaseStable"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleaseStable"
+# PROP Intermediate_Dir "ReleaseStable"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "$(WXWIN)\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
+# SUBTRACT BASE CPP /YX
+# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "$(WXWINSTABLE)/include" /I "$(WXWINSTABLE)/lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib wxvc.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"$(WXWIN)\src\Release" /libpath:"$(WXWIN)\src\jpeg\Release" /libpath:"$(WXWIN)\src\tiff\Release" /libpath:"$(WXWIN)\lib"
+# ADD LINK32 winmm.lib wxmsw.lib jpeg.lib tiff.lib png.lib zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib wininet.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"$(WXWINSTABLE)\lib"
+
+!ELSEIF "$(CFG)" == "wxconfigtool - Win32 DebugDev"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "wxconfigtool___Win32_DebugDev"
+# PROP BASE Intermediate_Dir "wxconfigtool___Win32_DebugDev"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugDev"
+# PROP Intermediate_Dir "DebugDev"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(WXWINDEV)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(WXWINDEV)/include" /I "$(WXWINDEV)/lib/mswd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib jpegd.lib tiffd.lib pngd.lib zlibd.lib xpmd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"$(WXWINDEV)\lib"
+# ADD LINK32 winmm.lib wxmswd.lib jpegd.lib tiffd.lib pngd.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib wininet.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"$(WXWIN)\lib"
+
+!ELSEIF "$(CFG)" == "wxconfigtool - Win32 ReleaseDev"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "wxconfigtool___Win32_ReleaseDev"
+# PROP BASE Intermediate_Dir "wxconfigtool___Win32_ReleaseDev"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleaseDev"
+# PROP Intermediate_Dir "ReleaseDev"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "$(WXWINDEV)\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "$(WXWINDEV)/include" /I "$(WXWINDEV)/lib/mswd" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib jpeg.lib tiff.lib png.lib xpm.lib zlib.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"$(WXWINDEV)\lib"
+# ADD LINK32 winmm.lib wxmsw.lib jpeg.lib tiff.lib png.lib zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib wininet.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"$(WXWIN)\lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "wxconfigtool - Win32 Debug DLL"
+# Name "wxconfigtool - Win32 Release DLL"
+# Name "wxconfigtool - Win32 DebugStable"
+# Name "wxconfigtool - Win32 ReleaseStable"
+# Name "wxconfigtool - Win32 DebugDev"
+# Name "wxconfigtool - Win32 ReleaseDev"
+# Begin Group "Source files"
+
+# PROP Default_Filter ""
+# Begin Group "Header files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\appsettings.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\configitem.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\configitemselector.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\configtooldoc.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\configtoolview.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\configtree.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\custompropertydialog.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\htmlparser.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mainframe.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\propeditor.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\property.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\settingsdialog.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\symbols.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\utils.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\wxconfigtool.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\appsettings.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\configitem.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\configitemselector.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\configtooldoc.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\configtoolview.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\configtree.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\custompropertydialog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\htmlparser.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\mainframe.cpp
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=.\makefile.b32
+# End Source File
+# Begin Source File
+
+SOURCE=.\propeditor.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\property.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\settingsdialog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\utils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\wxconfigtool.cpp
+# SUBTRACT CPP /YX /Yc
+# End Source File
+# Begin Source File
+
+SOURCE=.\wxconfigtool.rc
+
+!IF "$(CFG)" == "wxconfigtool - Win32 Debug DLL"
+
+# ADD BASE RSC /l 0x809
+# ADD RSC /l 0x809 /i "$(WXWIN)\include"
+
+!ELSEIF "$(CFG)" == "wxconfigtool - Win32 Release DLL"
+
+# ADD BASE RSC /l 0x809
+# ADD RSC /l 0x809 /i "$(WXWIN)\include"
+
+!ELSEIF "$(CFG)" == "wxconfigtool - Win32 DebugStable"
+
+# ADD BASE RSC /l 0x809
+# ADD RSC /l 0x809 /i "$(WXWINSTABLE)\include"
+
+!ELSEIF "$(CFG)" == "wxconfigtool - Win32 ReleaseStable"
+
+# ADD BASE RSC /l 0x809
+# ADD RSC /l 0x809 /i "$(WXWINSTABLE)\include"
+
+!ELSEIF "$(CFG)" == "wxconfigtool - Win32 DebugDev"
+
+# ADD BASE RSC /l 0x809
+# ADD RSC /l 0x809 /i "$(WXWINDEV)\include"
+
+!ELSEIF "$(CFG)" == "wxconfigtool - Win32 ReleaseDev"
+
+# ADD BASE RSC /l 0x809
+# ADD RSC /l 0x809 /i "$(WXWINDEV)\include"
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Group "Documents"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\docs\licence.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\docs\notes.txt
+# End Source File
+# Begin Source File
+
+SOURCE="..\docs\readme-after.txt"
+# End Source File
+# Begin Source File
+
+SOURCE=..\docs\readme.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\docs\todo.txt
+# End Source File
+# End Group
+# Begin Group "Resources"
+
+# PROP Default_Filter ""
+# End Group
+# Begin Group "Distribution"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\scripts\buildapp
+# End Source File
+# Begin Source File
+
+SOURCE=..\scripts\innobott.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\scripts\innotop.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\scripts\makeapp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Makefile
+# End Source File
+# Begin Source File
+
+SOURCE=..\scripts\makeinno.sh
+# End Source File
+# Begin Source File
+
+SOURCE=.\makeprog.env
+# End Source File
+# Begin Source File
+
+SOURCE=..\scripts\makesetup.sh
+# End Source File
+# Begin Source File
+
+SOURCE=..\scripts\maketarball.sh
+# End Source File
+# Begin Source File
+
+SOURCE=..\scripts\setup.var
+# End Source File
+# End Group
+# Begin Group "Manual"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\docs\manual\configtool.tex
+# End Source File
+# Begin Source File
+
+SOURCE=..\docs\manual\Makefile
+# End Source File
+# Begin Source File
+
+SOURCE=..\docs\manual\makefile.vc
+# End Source File
+# Begin Source File
+
+SOURCE=..\docs\manual\tex2rtf.ini
+# End Source File
+# End Group
+# End Target
+# End Project
--- /dev/null
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "wxconfigtool"=.\wxconfigtool.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: wxconfigtool.h
+// Purpose: Generic application class
+// Author: Julian Smart
+// Modified by:
+// Created: 2002-09-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _AP_WXCONFIGTOOL_H_
+#define _AP_WXCONFIGTOOL_H_
+
+#ifdef __GNUG__
+#pragma interface wxconfigtool.cpp
+#endif
+
+#include "wx/docview.h"
+#include "wx/help.h"
+
+#ifdef __WXMSW__
+#include "wx/msw/helpchm.h"
+#else
+#include "wx/html/helpctrl.h"
+#endif
+
+#include "appsettings.h"
+
+class ctMainFrame;
+class ctConfigToolDoc;
+
+/*!
+ * \brief The application class.
+ * The application class controls initialisation,
+ * cleanup and other application-wide issues.
+ */
+
+class ctApp: public wxApp
+{
+public:
+ /// Constructor.
+ ctApp();
+
+ /// Destructor.
+ ~ctApp();
+
+// Accessors
+
+ /// Returns the application directory.
+ wxString GetAppDir() const { return m_appDir; }
+
+ /// Prepends the current app program directory to the name.
+ wxString GetFullAppPath(const wxString& filename) const;
+
+ /// Returns an object containing the application settings.
+ ctSettings& GetSettings() { return m_settings; }
+
+ /// Returns the file history object.
+ wxFileHistory& GetFileHistory() { return m_fileHistory; }
+
+ /// Returns the notebook window.
+ wxNotebook* GetNotebookWindow() { return m_notebookWindow; }
+
+ /// Returns TRUE if the application should show tooltips.
+ virtual bool UsingTooltips();
+
+ /// Returns the help controller object for the manual.
+ wxHelpControllerBase& GetHelpController() { return *m_helpController; }
+
+ /// Returns the help controller object for the wxWindows reference manual.
+ wxHelpControllerBase& GetReferenceHelpController() { return *m_helpControllerReference; }
+
+ /// Returns the document manager object.
+ wxDocManager* GetDocManager() const { return m_docManager; }
+
+ /// Returns the main frame.
+ ctMainFrame* GetMainFrame();
+
+// Operations
+
+ /// Called on application initialisation.
+ bool OnInit(void);
+
+ /// Called on application exit.
+ int OnExit(void);
+
+ /// Loads config info from the registry or a file.
+ virtual bool LoadConfig();
+
+ /// Saves config info to the registry or a file.
+ virtual bool SaveConfig();
+
+ /// The help controller needs to be cleared before wxWindows
+ /// cleanup happens.
+ void ClearHelpControllers() ;
+
+protected:
+ /// The application directory.
+ wxString m_appDir;
+
+ /// Global print data, to remember settings during the session.
+ wxPrintData m_printData;
+
+ /// Global page setup data.
+ wxPageSetupDialogData m_pageSetupData;
+
+ /// Notebook window.
+ wxNotebook* m_notebookWindow;
+
+ /// The help controller object.
+ wxHelpControllerBase* m_helpController;
+
+ /// The help controller object (reference manual).
+ wxHelpControllerBase* m_helpControllerReference;
+
+ /// The file history.
+ wxFileHistory m_fileHistory;
+
+ /// The configuration data.
+ ctSettings m_settings;
+
+ /// The document manager.
+ wxDocManager* m_docManager;
+
+public:
+DECLARE_EVENT_TABLE()
+};
+
+DECLARE_APP(ctApp)
+
+/////////////////////////////////////////////////
+// Menu ids
+/////////////////////////////////////////////////
+
+// File menu ids
+#define ctID_SAVE_SETUP_FILE 1001
+#define ctID_SAVE_CONFIGURE_COMMAND 1002
+
+// Edit menu ids
+#define ctID_ADD_ITEM 1030
+#define ctID_ADD_ITEM_CHECKBOX 1031
+#define ctID_ADD_ITEM_RADIOBUTTON 1032
+#define ctID_ADD_ITEM_STRING 1033
+#define ctID_ADD_ITEM_GROUP 1034
+#define ctID_ADD_ITEM_CHECK_GROUP 1035
+#define ctID_ADD_ITEM_RADIO_GROUP 1036
+#define ctID_DELETE_ITEM 1037
+#define ctID_RENAME_ITEM 1038
+#define ctID_CUSTOM_PROPERTY 1039
+#define ctID_ADD_CUSTOM_PROPERTY 1040
+#define ctID_EDIT_CUSTOM_PROPERTY 1041
+#define ctID_DELETE_CUSTOM_PROPERTY 1042
+
+// View menu ids
+#define ctID_SETTINGS 1020
+#define ctID_SHOW_TOOLBAR 1021
+
+// Help menu ids
+#define ctID_GOTO_WEBSITE 1050
+#define ctID_ITEM_HELP 1051
+#define ctID_REFERENCE_CONTENTS 1052
+
+// Taskbar menu ids
+#define ctID_TASKBAR_EXIT_APP 1202
+#define ctID_TASKBAR_SHOW_APP 1203
+
+// Tree context menu
+#define ctID_TREE_PASTE_BEFORE 1300
+#define ctID_TREE_PASTE_AFTER 1301
+#define ctID_TREE_PASTE_AS_CHILD 1302
+#define ctID_TREE_COPY 1303
+#define ctID_TREE_CUT 1304
+
+/////////////////////////////////////////////////
+// Window/control ids
+/////////////////////////////////////////////////
+
+// Settings dialogs
+#define ctID_SETTINGS_GENERAL 1500
+
+// Regenerate setup.h/configure command
+#define ctID_REGENERATE 1600
+
+#endif
+ // _AP_WXCONFIGTOOL_H_
+
--- /dev/null
+aaaa ICON "bitmaps/wxconfigtool.ico"
+
+wxconfigtool ICON "bitmaps/wxconfigtool.ico"
+
+#include "wx/msw/wx.rc"
+
+1 24 "wxconfigtool.exe.manifest"
+