From 84adefa331c4159d432d22840663c38f155cd4c1 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 20 Nov 2009 14:54:40 +0000 Subject: The R13B03 release. --- lib/wx/examples/xrc/rc/appicon.ico | Bin 0 -> 1078 bytes lib/wx/examples/xrc/rc/appicon.xpm | 52 ++ lib/wx/examples/xrc/rc/artprov.xpm | 23 + lib/wx/examples/xrc/rc/artprov.xrc | 67 ++ lib/wx/examples/xrc/rc/basicdlg.xpm | 24 + lib/wx/examples/xrc/rc/basicdlg.xrc | 44 ++ lib/wx/examples/xrc/rc/controls.xpm | 25 + lib/wx/examples/xrc/rc/controls.xrc | 1243 +++++++++++++++++++++++++++++++++++ lib/wx/examples/xrc/rc/custclas.xpm | 26 + lib/wx/examples/xrc/rc/custclas.xrc | 42 ++ lib/wx/examples/xrc/rc/derivdlg.xpm | 25 + lib/wx/examples/xrc/rc/derivdlg.xrc | 78 +++ lib/wx/examples/xrc/rc/fileopen.gif | Bin 0 -> 949 bytes lib/wx/examples/xrc/rc/filesave.gif | Bin 0 -> 927 bytes lib/wx/examples/xrc/rc/frame.xrc | 27 + lib/wx/examples/xrc/rc/fuzzy.gif | Bin 0 -> 116 bytes lib/wx/examples/xrc/rc/menu.xrc | 84 +++ lib/wx/examples/xrc/rc/platform.xpm | 28 + lib/wx/examples/xrc/rc/platform.xrc | 145 ++++ lib/wx/examples/xrc/rc/quotes.gif | Bin 0 -> 82 bytes lib/wx/examples/xrc/rc/resource.xrc | 154 +++++ lib/wx/examples/xrc/rc/stop.xpm | 164 +++++ lib/wx/examples/xrc/rc/throbber.gif | Bin 0 -> 2704 bytes lib/wx/examples/xrc/rc/toolbar.xrc | 51 ++ lib/wx/examples/xrc/rc/uncenter.xpm | 24 + lib/wx/examples/xrc/rc/uncenter.xrc | 47 ++ lib/wx/examples/xrc/rc/update.gif | Bin 0 -> 124 bytes lib/wx/examples/xrc/rc/variable.xpm | 21 + lib/wx/examples/xrc/rc/variable.xrc | 59 ++ 29 files changed, 2453 insertions(+) create mode 100644 lib/wx/examples/xrc/rc/appicon.ico create mode 100644 lib/wx/examples/xrc/rc/appicon.xpm create mode 100644 lib/wx/examples/xrc/rc/artprov.xpm create mode 100644 lib/wx/examples/xrc/rc/artprov.xrc create mode 100644 lib/wx/examples/xrc/rc/basicdlg.xpm create mode 100644 lib/wx/examples/xrc/rc/basicdlg.xrc create mode 100644 lib/wx/examples/xrc/rc/controls.xpm create mode 100644 lib/wx/examples/xrc/rc/controls.xrc create mode 100644 lib/wx/examples/xrc/rc/custclas.xpm create mode 100644 lib/wx/examples/xrc/rc/custclas.xrc create mode 100644 lib/wx/examples/xrc/rc/derivdlg.xpm create mode 100644 lib/wx/examples/xrc/rc/derivdlg.xrc create mode 100644 lib/wx/examples/xrc/rc/fileopen.gif create mode 100644 lib/wx/examples/xrc/rc/filesave.gif create mode 100644 lib/wx/examples/xrc/rc/frame.xrc create mode 100644 lib/wx/examples/xrc/rc/fuzzy.gif create mode 100644 lib/wx/examples/xrc/rc/menu.xrc create mode 100644 lib/wx/examples/xrc/rc/platform.xpm create mode 100644 lib/wx/examples/xrc/rc/platform.xrc create mode 100644 lib/wx/examples/xrc/rc/quotes.gif create mode 100644 lib/wx/examples/xrc/rc/resource.xrc create mode 100644 lib/wx/examples/xrc/rc/stop.xpm create mode 100644 lib/wx/examples/xrc/rc/throbber.gif create mode 100644 lib/wx/examples/xrc/rc/toolbar.xrc create mode 100644 lib/wx/examples/xrc/rc/uncenter.xpm create mode 100644 lib/wx/examples/xrc/rc/uncenter.xrc create mode 100644 lib/wx/examples/xrc/rc/update.gif create mode 100644 lib/wx/examples/xrc/rc/variable.xpm create mode 100644 lib/wx/examples/xrc/rc/variable.xrc (limited to 'lib/wx/examples/xrc/rc') diff --git a/lib/wx/examples/xrc/rc/appicon.ico b/lib/wx/examples/xrc/rc/appicon.ico new file mode 100644 index 0000000000..f3ef7918d2 Binary files /dev/null and b/lib/wx/examples/xrc/rc/appicon.ico differ diff --git a/lib/wx/examples/xrc/rc/appicon.xpm b/lib/wx/examples/xrc/rc/appicon.xpm new file mode 100644 index 0000000000..7c61a99318 --- /dev/null +++ b/lib/wx/examples/xrc/rc/appicon.xpm @@ -0,0 +1,52 @@ +/* XPM */ +static char * appicon_xpm[] = { +"32 32 17 1", +" c None", +". c #000000", +"+ c #800000", +"@ c #008000", +"# c #808000", +"$ c #000080", +"% c #800080", +"& c #008080", +"* c #C0C0C0", +"= c #808080", +"- c #FF0000", +"; c #00FF00", +"> c #FFFF00", +", c #0000FF", +"' c #FF00FF", +") c #00FFFF", +"! c #FFFFFF", +" ", +"===============================.", +"=*****************************=.", +"=*$$$$$$$$$$$$$$$$$$$$$$$$$$$$=.", +"=*$$$$$$$$$$$$$$$$$$$**.**.**.=.", +"=*$$$$$$$$$$$$$$$$$$$**.**.**.=.", +"=*$$$$$$$$$$$$$$$$$$$.........=.", +"=*****************************=.", +"=*=============================.", +"=*=!!!!!!!!!!!!!!!!!!!!!!!!!!*=.", +"=*=!!!!!!!!!!!!!!!!!!!!!!!!!!*=.", +"=*=!!!!!!!!!!!!!!!!!!!!!!!!!!*=.", +"=*=!!!!!!!,!!!!!!!!!!!,!!!!!!*=.", +"=*=!!!!!!,,!!!!!!!!!!!,,!!!!!*=.", +"=*=!!!!!,,!!!!!!!!!!!!!,,!!!!*=.", +"=*=!!!!,,!!...........!!,,!!!*=.", +"=*=!!!,,!!!.$$$$$$!!!.!!!,,!!*=.", +"=*=!!,,!!!!.$$$$$$!!!.!!!!,,!*=.", +"=*=!!,,!!!!.$$$$$$!!!.!!!!,,!*=.", +"=*=!!!,,!!!.$$$$$$!!!.!!!,,!!*=.", +"=*=!!!!,,!!...........!!,,!!!*=.", +"=*=!!!!!,,!!!!!!!!!!!!!,,!!!!*=.", +"=*=!!!!!!,,!!!!!!!!!!!,,!!!!!*=.", +"=*=!!!!!!!,!!!!!!!!!!!,!!!!!!*=.", +"=*=!!!!!!!!!!!!!!!!!!!!!!!!!!*=.", +"=*=!!!!!!!!!!!!!!!!!!!!!!!!!!*=.", +"=*=!!!!!!!!!!!!!!!!!!!!!!!!!!*=.", +"=*****************************=.", +"===============================.", +"................................", +" ", +" "}; diff --git a/lib/wx/examples/xrc/rc/artprov.xpm b/lib/wx/examples/xrc/rc/artprov.xpm new file mode 100644 index 0000000000..55e204881b --- /dev/null +++ b/lib/wx/examples/xrc/rc/artprov.xpm @@ -0,0 +1,23 @@ +/* XPM */ +static char * artprov_xpm[] = { +"16 16 4 1", +" c None", +". c #000000", +"+ c #0E2CEF", +"@ c #FFFFFF", +" . ", +" . . ", +" . . ", +"++++++++++++++++", +"+@@@@@@@@@@@@@@+", +"+@@@@@@++@@@@@@+", +"+@@@@@@@@@@@@@@+", +"+@@@@@+++@@@@@@+", +"+@@@@@@++@@@@@@+", +"+@@@@@@++@@@@@@+", +"+@@@@@@++@@@@@@+", +"+@@@@@++++@@@@@+", +"+@@@@@@@@@@@@@@+", +"++++++++++++++++", +" ", +" "}; diff --git a/lib/wx/examples/xrc/rc/artprov.xrc b/lib/wx/examples/xrc/rc/artprov.xrc new file mode 100644 index 0000000000..2256b73ebf --- /dev/null +++ b/lib/wx/examples/xrc/rc/artprov.xrc @@ -0,0 +1,67 @@ + + + + + + wxArtProvider Example + 1 + + 1 + 0 + 0 + 0 + 0 + 0 + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 500,150 + + You can specify wxArtProvider icons in your XRC resources. These icons will be retrieved from the active wxArtProvider (see wxArtProvider in docs and /samples/artprov for more information on wxArtProvider).\n\nThe most common usage for this is that you want a dialog, toolbar or menu item to have the correct platform-specific icon in your interface, such as a custom "Don't show this again" checkbox message dialog that has the appropriate icon, as shown below.\n\nYou can also use it to manage your own custom bitmaps though, too--instead of having to write multiple versions of an XRC file that only differ in their bitmaps, you can instead just write one XRC file with the bitmap to be retrieved from the wxArtProvider at runtime, having your custom wxArtProvider use some code to serve out the desired bitmap based on such things as a wxConfig n entry of a desired icon set, what OS the application is running on, what size or resolution the display is, and so on.\n\nNote that your application's custom bitmaps are the only thing that will differ between OS's in order to ensure proper Look And Feel, as everything else: windows decoration, colors, fonts, widgets, etc already match perfectly since wxWindows runs natively.\n\nTo use a wxArtProvider bitmap instead of usual bitmap, in your XRC, instead of <bitmap>somefile.png</bitmap>, use <bitmap stock__id="SOME__ART__ID" client="SOME__CLIENT__ID">somefile.png</bitmap>. The stock__id parameter is required for a bitmap to be read from wxArtProvider, stock__client is optional. The image filename is also optional, and is just used as a fallback in case the wxArtProvider couldn't return a bitmap for that particular stock__id (and particular stock__client if your wxArtProvider is set up to also filter stock__client). + + + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 2 + 0 + 0 + 0 + 1 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + derivdlg.xpm + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + diff --git a/lib/wx/examples/xrc/rc/basicdlg.xpm b/lib/wx/examples/xrc/rc/basicdlg.xpm new file mode 100644 index 0000000000..19054822ba --- /dev/null +++ b/lib/wx/examples/xrc/rc/basicdlg.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char * basicdlg_xpm[] = { +"16 16 5 1", +" c None", +". c #000000", +"+ c #808080", +"@ c #0000FF", +"# c #FFFFFF", +" ", +"................", +".++++++++++++++.", +".+@@@@@@@@@@@@+.", +".++++++++++++++.", +".+############+.", +".+############+.", +".+############+.", +".+############+.", +".+############+.", +".+############+.", +".+############+.", +".+############+.", +".++++++++++++++.", +"................", +" "}; diff --git a/lib/wx/examples/xrc/rc/basicdlg.xrc b/lib/wx/examples/xrc/rc/basicdlg.xrc new file mode 100644 index 0000000000..ae632f6e10 --- /dev/null +++ b/lib/wx/examples/xrc/rc/basicdlg.xrc @@ -0,0 +1,44 @@ + + + + + + Non-Derived Dialog Example + 1 + + wxVERTICAL + 1 + 0 + 0 + 0 + 0 + 0 + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 500,150 + + This is the basic non-derived XRC dialog. It is just an instance of wxDialog, not a instance of a class derived from wxDialog that was given some added functionality.\n\nYou can put whatever controls you want on these non-derived dialogs, but the dialog won't interact with the controls, nor do anything in response to any of their events. It only has the built-in functionality of a wxDialog, and that is it. A non-derived dialog can automatically close itself when you hit either the OK or Cancel button (returning a return code of what button you pressed), and not much else.\n\nThese are useful for an About dialog, or a message dialog popup, but that's about it. For the rest you will almost certainly use a derived dialog (see next example). + + + + wxEXPAND|wxALL + 5 + + + + + + + + + + + + + + + + + diff --git a/lib/wx/examples/xrc/rc/controls.xpm b/lib/wx/examples/xrc/rc/controls.xpm new file mode 100644 index 0000000000..2bbdd34857 --- /dev/null +++ b/lib/wx/examples/xrc/rc/controls.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char * controls_xpm[] = { +"16 16 6 1", +" c None", +". c #000000", +"+ c #808080", +"@ c #0000FF", +"# c #FFFFFF", +"$ c #0E2CEF", +" ", +" ", +" ", +" ", +" ", +"................", +".++++++++++++++.", +".+@@@@@@@@####+.", +".+$$$$$$$$####+.", +".+$$$$$$$$####+.", +".++++++++++++++.", +"................", +" ", +" ", +" ", +" "}; diff --git a/lib/wx/examples/xrc/rc/controls.xrc b/lib/wx/examples/xrc/rc/controls.xrc new file mode 100644 index 0000000000..77d5daac3e --- /dev/null +++ b/lib/wx/examples/xrc/rc/controls.xrc @@ -0,0 +1,1243 @@ + + + + + + + + Controls Example + + wxDIALOG_EX_CONTEXTHELP + 1 + + 1 + 0 + 0 + 0 + 0 + 0 + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 1 + 550,250 + + + + 350,280 + + + + 0 + + 200,180 + + + + + + 1 + + + + 2 + + 200,180 + + + + + + 1 + + 200,180 + + + + + + + + + + 2 + 0 + 0 + 0 + 0,1 + 0,1 + + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + 300,60 + + + 2,2 + + Non-Derived Dialog Example + basicdlg.xpm + The basic instance of wxDialog loaded via XRC + + + Derived Dialog Example + derivdlg.xpm + The most important example: load an XRC for a derived dialog + + + Controls Example + controls.xpm + A notebook displaying all the wxWidgets controls + + + Uncentered Example + uncenter.xpm + Disable autocentering of a dialog on its parent + + + + Custom Class Example + custclas.xpm + Embed your own custom classes into an XRC + + + Platform Specific Example + platform.xpm + Customize parts of an interface for a desired platform + + + wxArtProvider Example + artprov.xpm + Use wxArtProvider to insert desired icons at runtime + + + Variable Expansion Example + variable.xpm + Replace variables in the XRC file at runtime + + + + Just + a combobox + in the toolbar + + + + + Owner Drawn + combobox + in the toolbar + + + + + + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + #bbbbff + 2,2 + + Non-Derived Dialog Example + basicdlg.xpm + The basic instance of wxDialog loaded via XRC + + + Derived Dialog Example + derivdlg.xpm + The most important example: load an XRC for a derived dialog + + + Controls Example + controls.xpm + A notebook displaying all the wxWidgets controls + + + Uncentered Example + uncenter.xpm + Disable autocentering of a dialog on its parent + + + + Custom Class Example + custclas.xpm + Embed your own custom classes into an XRC + + + Platform Specific Example + platform.xpm + Customize parts of an interface for a desired platform + + + wxArtProvider Example + artprov.xpm + Use wxArtProvider to insert desired icons at runtime + + + Variable Expansion Example + variable.xpm + Replace variables in the XRC file at runtime + + + + Just + a combobox + in the toolbar + + + + + Owner Drawn + combobox + in the toolbar + + + + + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + controls.xpm + + + + + + + + + + 2 + 0 + 0 + 0 + 0,1 + 0,1 + + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + -1,-1 + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + 1 + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + 180,180 + + Download library + Compile samples + Skim docs + Finish project + Wash car + + + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + 180,-1 + + See + Hear + Feel + Smell + Taste + The Sixth Sense! + + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + 200,-1 + + 4 + + vim + emacs + notepad.exe + bbedit + nedit + + + + + wxALIGN_TOP|wxALIGN_CENTRE_HORIZONTAL|wxALL + 5 + + 200,-1 + + 2 + + This is a + basicdlg.xpm + + + read-only + derivdlg.xpm + + + wxBitmapComboBox + uncenter.xpm + + + control + custclas.xpm + + + + + + + + + + + 2 + 0 + 0 + 0 + 0,1 + 0,1 + + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + 100,-1 + 100 + 50 + + + + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + 40,60 + 100 + 40 + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + 200,200 + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 450,250 + + <h2>XRC Resources HTML</h2> + <p><font color="#0000FF">XRC=Blue skies ahead.</font> + <p>Italics useful for quoted or emphasized text:<i>"Some see things as they are and say why. + I dream things that never were, and say why not"</i> + <p><pre>Fixed width for code snippets.</pre> + <p>Horizontal rules to organize sections: <hr> + <p>A wxImage is worth a thousand words and can be also used. + + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTER|wxALL + 5 + + 250,160 + + + Milk + Pizza + Bread + Orange juice + Paper towels + + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTER|wxALL + 5 + + 250,160 + + + <b>Bold</b> Milk + <i>Rainbow <font color="red">P</font><font color="blue">i</font><font color="yellow">z</font><font color="green">z</font><font color="purple">a</font></i> + <tt>Plain bread</tt> + <font color="orange" size="+1">Orange juice</font> + Paper towels + + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTER|wxALL + 5 + + 220,160 + + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + 200,160 + #0000FF + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + 50 + 100 + 400,200 + + #0000FF + + + #00FF00 + + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + 1 + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + + + 1 + 0 + + Power 108 + WMMS 100.7 + Energy 98.3 + CHUM FM + 92FM + + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + -1,160 + 50 + 100 + 30 + + + + + + + + + + + 2 + 0 + 0 + 0 + 0,1 + 0,1 + + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 100,-1 + + 100 + 0 + + + + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 100,-1 + + 100 + 0 + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + + 100 + 0 + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + 100,-1 + 100 + 0 + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + appicon.xpm + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + wxVERTICAL + + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0,1 + + wxALIGN_CENTRE|wxALL + 5 + + -1,100 + + + + + wxALIGN_CENTRE|wxALL + 5 + + 150,-1 + + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + + + + + 2 + 0 + 0 + 0 + 0,1 + 0,1,2 + + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 180,-1 + A.A. Milne + + + + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 180,-1 + + TooManySecrets + + + + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 180,90 + + "So many pretty widgets" said Pooh, said he. "So many pretty widgets", said Pooh. + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxALIGN_CENTRE|wxALL + 5 + + 280,180 + + + + + + + + + + + + 2 + 0 + 10 + 10 + 0,1 + 0,1,2,3 + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxGROW|wxALL + + 5 + + #00ff00 + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxGROW|wxALL + + 5 + + Here goes a message + + *.png + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxGROW|wxALL + + 5 + + + + Here goes a message + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxGROW|wxALL + + 5 + + + + 20 + wxSYS_DEFAULT_GUI_FONT + + + + + + + + + + + + 2 + 1 + 0 + 0 + 0,1 + 0 + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + wxALIGN_CENTRE|wxALL + 5 + + throbber.gif + stop.xpm + + + + + + + + + + + + 1 + 1 + 0 + 0 + 0 + 0 + + + wxGROW|wxALL + 5 + + + + 0 + + + + 1 + 1 + 0 + 0 + 0 + 0 + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + + + + + + + + + + + + 1 + 0 + 0 + 0 + 0 + 0,1,2,3,4,5,6 + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + 1 + + + + + + diff --git a/lib/wx/examples/xrc/rc/custclas.xpm b/lib/wx/examples/xrc/rc/custclas.xpm new file mode 100644 index 0000000000..49e82d4587 --- /dev/null +++ b/lib/wx/examples/xrc/rc/custclas.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char * custclas_xpm[] = { +"16 16 7 1", +" c None", +". c #EBF70E", +"+ c #000000", +"@ c #808080", +"# c #0000FF", +"$ c #FFFFFF", +"% c #0E2CEF", +" ", +" . ", +" . ", +" . . . ", +" ... ", +"...+....++++++++", +"+@...@@@@@@@@@@+", +"+.#.#.####$$$$@+", +"+@%.%%%%%%$$$$@+", +"+@%.%%%%%%$$$$@+", +"+@@@@@@@@@@@@@@+", +"++++++++++++++++", +" ", +" ", +" ", +" "}; diff --git a/lib/wx/examples/xrc/rc/custclas.xrc b/lib/wx/examples/xrc/rc/custclas.xrc new file mode 100644 index 0000000000..4f0109a992 --- /dev/null +++ b/lib/wx/examples/xrc/rc/custclas.xrc @@ -0,0 +1,42 @@ + + + + + + Custom Class Example + 1 + + + 1 + 0 + 0 + 0 + 0 + 0 + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 500,150 + + You can embed your own custom classes into an XRC file. This is referred to as attaching an unknown control.\n\nThere are 3 main cases when you would want to do this:\n\n(A) Most commonly: you have derived a class from one of the main wxWidgets controls, so that it can manage its own state and look after its own events, because it is better management to have a portable class with all the code for that control in there with the class, instead of being having many event handlers for that control scattered up in its parent dialog (which is allowed, but gets messy if a control has alot of methods). For example, if you require a wxListCtrl that popups a menu when right-clicked on an item, and you want the wxListCtrl to resize its columns in response to an OnSize(), and a few more methods, it makes better sourcecode logic to package all these methods into by a standalone derived wxListCtrl class, instead of having the parent dialog manage all these events and other functions. This is what the example below shows: it does a custom behaviour of resizing its first column to appropriately fill up the width of the control on a resize event, and it pops up a context-menu in response to a left click (and shades out popup menu item appropriately if there is no item currenty selected in the listctrl).\n\n(B)You have an utterly new widget that has no equivalent in the wxWindows class heirarchy, so you thus need to embed your class to get the needed functionality.\n\n(C) You are using one of the rarely used wxWindows controls that doesn't have an XRC handler in the XRC library. However, all of the major controls: wxButton, wxTextCtrl, etc have an XRC handler, so this is pretty rare, and you could always write your own XRC handler for that control if you wanted. You can choose the "Controls example" from the XRC demo menu to see all the controls that have an XRC handler.\n\nThe typical formula for attaching an unknown control is:\n\n(1) If you are deriving your own custom class to be embedded into the XRC, describe that class with its own .cpp and .h file. In this example it is custclass.cpp and custclass.h\n\n(2)Specify an "unknown" tag in the XRC file that you want to embed it into (see the unknown tag in custclass.xrc). This will be the placeholder of the new class.\n\n(3) Load the XRC dialog as usual, but before you show the dialog to the user, construct an instance of your custom control, and then use wxXmlResource::Get()->AttachUnknownControl() to put the custom class into its "unknown" placeholder in the XRC file.\n\nThe result is what you see below, a custom class control that fits in seemlessly with the whole dialog, the same as if it was read from XRC directly. Try out resizing this dialog, and watch the listctrl column resize, and right-click to call up its popup menu. By the way, if you look at the source of this XRC dialog, you will that this dialog node has a set of style flags that includes wxRESIZE__BORDER--that is why this dialog is resizable, whereas most of the rest of the dialogs in the XRC sample that don't include this tag, are not resizable. + + + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 100,100 + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + diff --git a/lib/wx/examples/xrc/rc/derivdlg.xpm b/lib/wx/examples/xrc/rc/derivdlg.xpm new file mode 100644 index 0000000000..ed1978b7f2 --- /dev/null +++ b/lib/wx/examples/xrc/rc/derivdlg.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char * derivdlg_xpm[] = { +"16 16 6 1", +" c None", +". c #EBF70E", +"+ c #000000", +"@ c #808080", +"# c #0000FF", +"$ c #FFFFFF", +" . ", +"+++.++++++++++++", +"+.@.@.@@@@@@@@@+", +"+@...#########@+", +"...@....@@@@@@@+", +"+@...$$$$$$$$$@+", +"+.$.@.@@@@@@$$@+", +"+@$.@@@@@@@@$$@+", +"+@$.$$$$$$$$$$@+", +"+@$$$$$$$$$$$$@+", +"+@$$$$@@@@$$$$@+", +"+@$$$$@@@@$$$$@+", +"+@$$$$$$$$$$$$@+", +"+@@@@@@@@@@@@@@+", +"++++++++++++++++", +" "}; diff --git a/lib/wx/examples/xrc/rc/derivdlg.xrc b/lib/wx/examples/xrc/rc/derivdlg.xrc new file mode 100644 index 0000000000..cb67b9ae87 --- /dev/null +++ b/lib/wx/examples/xrc/rc/derivdlg.xrc @@ -0,0 +1,78 @@ + + + + + + Derived Dialog Example + 1 + + 1 + 0 + 0 + 0 + 0 + 0 + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 500,150 + + This is a derived dialog using XRC. This type of derived dialog will likely be the heart of your project, and thus is the most important example in this demonstration.\n\nIt is recommended to open up derivdlg.cpp, derivdlg.h and derivdlg.xrc and follow along what is going on.\n\nThe steps to use a derived dialog are:\n\n(1) Derive your own dialog from wxDialog (derivdlg.cpp and derivdlg.h are an example).\n\n(2) In the source of the constructor of the derived dialog, load the XRC into the file, using the code as shown in the derivdlg.cpp\n\n(3)Add to the derived dilog's sourcecode some event handlers and other methods you want the dialog to do.\n\n(4)You can now just make an instance of the derived dialog and show it using ShowModal(), as is done in the MyFrame::OnDerivedDialogToolOrMenuCommand() method.\n\nThe remainder of this docuent will talk about how to use events with derived dialogs and XRC. There are 3 bits of an extra event functionality that this derived dialog can do, these will be described in turn:\n\n(A) Something to do when a user clicks on your custom button: This is straightforward. You name a control in the XRC file (in this example it is "my__button"). Then in the .cpp file, put an entry in the event table that will connect button clicks with that ID to a function that will be fired. The event table entry in the example is EVT__BUTTON( XRCID( "my__button" ), PreferencesDialog::OnMyButtonClicked ) This event table entry has 3 parts: The first part, EVT__BUTTON tells that you are describing a button click event. The final part, PreferencesDialog::OnMyButtonClicked() is what you want done in response to a button event. The middle part, XRCID( "my__button" ) is the restriction that only button events generated by a wxButton of that ID should trigger go on to do the function. This XRCID is the name of the wxButton in your XRC file. Now just describe, in the .h file and .cpp file, what you want your custom OnMyButtonClicked() function to do.\n\n(B) The second example is a very common requirement: that a checkbox or radiobutton disables some other control. The event table is set up the same as the "My Button" example above. However, it isn't an EVT__BUTTON event, it is an EVT__UPDATE__UI event: when the dialog does an updating of its UI (and thus fires this event) if the updating if of a control matching that XRCID, then it will do the specified function (which in this case looks at whether or not the checkbox is checked, and if it isn't checked, then disable the textctrl).\n\n(C) The last example shows how to handle the OK button. You will likely want to do something when the user presses OK, like save preferences or start some action (this example shows a simple case of just popping up a dialog and stopping a close). OK buttons are always named wxID__OK, so the XRC file should have it as wxID__OK also. The Event table has an EVT__BUTTON entry for wxID__OK (no XRCID though). Since this is a derived dialog with an event table, in response to an EVT__BUTTON event from a wxID__OK button, it will first look around in its own event table to see if there was any EVT__BUTTON entries, and since there is, it will do that one--if there wasn't it then checks out the base class's event table and sees if there was one there, and so on up the chain of inherited classes. Note that this is exactly what happens with the derived dialog's wxID__CANCEL button. You didn't put any EVT__BUTTON entries with an identifier of wxID__CANCEL, so after it scans your derived dialog's event table, it will then look at wxDialog's event table and see if there is one in that event table, and so on until it finds one. It will find a wxID__CANCEL handler, which will connect to the proper function (which causes the dialog to close). + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + wxHORIZONTAL + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + 80,-1 + + + + + + + wxALIGN_CENTRE|wxALL + 5 + + wxHORIZONTAL + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + + + diff --git a/lib/wx/examples/xrc/rc/fileopen.gif b/lib/wx/examples/xrc/rc/fileopen.gif new file mode 100644 index 0000000000..bc51b401b9 Binary files /dev/null and b/lib/wx/examples/xrc/rc/fileopen.gif differ diff --git a/lib/wx/examples/xrc/rc/filesave.gif b/lib/wx/examples/xrc/rc/filesave.gif new file mode 100644 index 0000000000..6dd1fd98b5 Binary files /dev/null and b/lib/wx/examples/xrc/rc/filesave.gif differ diff --git a/lib/wx/examples/xrc/rc/frame.xrc b/lib/wx/examples/xrc/rc/frame.xrc new file mode 100644 index 0000000000..ad7b03f7d6 --- /dev/null +++ b/lib/wx/examples/xrc/rc/frame.xrc @@ -0,0 +1,27 @@ + + + + + + XML Resources Demo + 1 + + 1 + 0 + 0 + 0 + 0 + 0 + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 500,280 + + Welcome to the wxWidgets XmlResource (XRC) sample! Using wxWidgets XML resources makes your GUI C++ programming much faster and easier.\n\nView the examples under the "Basic" menu to learn how to get up and running with XRC quickly, and later have a look at the examples under the "Advanced" menu for advanced techniques.\n\nThe XML file that described this frame is the sample's frame.xrc file, with the menu in menu.xrc, and the toolbar in toolbar.xrc. The frame XRC file structure is exactly the same as the XRC files for the dialogs, except that the top level node is a wxFrame, not a wxDialog. Each of the other dialog in this example is a separate XRC file, each of which can be examined for how they work. + + + + + + diff --git a/lib/wx/examples/xrc/rc/fuzzy.gif b/lib/wx/examples/xrc/rc/fuzzy.gif new file mode 100644 index 0000000000..b6296c5135 Binary files /dev/null and b/lib/wx/examples/xrc/rc/fuzzy.gif differ diff --git a/lib/wx/examples/xrc/rc/menu.xrc b/lib/wx/examples/xrc/rc/menu.xrc new file mode 100644 index 0000000000..91409e5c21 --- /dev/null +++ b/lib/wx/examples/xrc/rc/menu.xrc @@ -0,0 +1,84 @@ + + + + + + + + + + + + Unload basic dialog resource + + + + Reload basic dialog resource + + + + + + Exit this application + + + + + Basic techniques with XRC + + + basicdlg.xpm + The basic instance of wxDialog loaded via XRC + + + + derivdlg.xpm + The most important example: load an XRC for a derived dialog + + + + controls.xpm + A notebook displaying all the wxWidgets controls + + + + uncenter.xpm + Disable autocentering of a dialog on its parent + + + + + Advanced techniques with XRC + + + custclas.xpm + Embed your own custom classes into an XRC + + + + platform.xpm + Customize parts of an interface for a desired platform + + + + artprov.xpm + Use wxArtProvider to insert desired icons at runtime + + + + variable.xpm + Replace variables in the XRC file at runtime + + + + + + + + + About this application + + + + + diff --git a/lib/wx/examples/xrc/rc/platform.xpm b/lib/wx/examples/xrc/rc/platform.xpm new file mode 100644 index 0000000000..3737055fe7 --- /dev/null +++ b/lib/wx/examples/xrc/rc/platform.xpm @@ -0,0 +1,28 @@ +/* XPM */ +static char *platform_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 6 1", +". c Black", +"o c #FFFFFF", +"X c #000080", +"O c #FFFF00", +" c None", +"+ c #FF0000", +/* pixels */ +" ", +" ", +" ", +" ....... ", +" .XXXXX. ", +" .oXXXX. ", +" .oXXX.......", +".....oXXX.OOOOO.", +".+++.XXXX.oOOOO.", +".o++......oOOOO.", +".o++++. .oOOOO.", +".o++++. .OOOOO.", +".+++++. .......", +"....... ", +" ", +" " +}; diff --git a/lib/wx/examples/xrc/rc/platform.xrc b/lib/wx/examples/xrc/rc/platform.xrc new file mode 100644 index 0000000000..43313cb853 --- /dev/null +++ b/lib/wx/examples/xrc/rc/platform.xrc @@ -0,0 +1,145 @@ + + + + + + Platform Property Example + 1 + + 1 + 0 + 0 + 0 + 0 + 0 + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 500,150 + + You can specify certain nodes of an XRC file to only be used for a certain platform.\n\nTo do this, there is a "platform" property that can be placed in any node [ie inside an opening tag]. The value of the tag can be any combination of the following: mac, win, unix, or os2. Use a | symbol between multiple platforms, for example <label platform="win|mac">\n\nAt runtime, if there is a platform property in the tag, if it matches the current operating system, that node will be included, otherwise it won't.\n\nThe notebook example below shows how you can specify a high level node to only appear on a certain platform: the example here being a page of preferences that only make sense on a certain platform.\n\nThe second example shows how to replace a single attribute of a control: here the label of a download link. It is also very useful for specifying menu item accelerators keystrokes on the target platform. + + + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 1 + 200,160 + + + + + wxVERTICAL + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + + + + + wxVERTICAL + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + + + + + wxVERTICAL + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + + + + + wxVERTICAL + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + + + + + wxVERTICAL + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + diff --git a/lib/wx/examples/xrc/rc/quotes.gif b/lib/wx/examples/xrc/rc/quotes.gif new file mode 100644 index 0000000000..3ea61bde43 Binary files /dev/null and b/lib/wx/examples/xrc/rc/quotes.gif differ diff --git a/lib/wx/examples/xrc/rc/resource.xrc b/lib/wx/examples/xrc/rc/resource.xrc new file mode 100644 index 0000000000..6673e0e8f2 --- /dev/null +++ b/lib/wx/examples/xrc/rc/resource.xrc @@ -0,0 +1,154 @@ + + + + + + + + + + filesave.gif + + + + + + + + + + + + + + + + + 2,2 + + fileopen.gif + Open catalog + + + filesave.gif + Save catalog + + + update.gif + Update catalog - synchronize it with sources + + + + quotes.gif + 1 + Display quotes around the string? + + + + fuzzy.gif + Toggled if selected string is fuzzy translation + 1 + + + + + + + fuzzy.gif + fileopen.gif + + + + + + + + + + wxALIGN_CENTER + + + + + + 10d + wxALL + + + + <h1>Hi,</h1>man + 100,45d + + + + + + + + + + Hello, we are inside a <u>NOTEBOOK</u>... + 50,50d + + + + + + + + + + + + + Hello, we are inside a <u>NOTEBOOK</u>... + 50,50d + + + + + + + 1 + + wxEXPAND + + wxVERTICAL + + + + + wxVERTICAL + + + 200,200d + + Hello, this is an ordinary multiline\n textctrl.... + + + wxEXPAND|wxALL + 10 + + + + + + + 1 + + + + + + + 10 + wxLEFT + + + wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_RIGHT + 10 + + + Second testing dialog + + diff --git a/lib/wx/examples/xrc/rc/stop.xpm b/lib/wx/examples/xrc/rc/stop.xpm new file mode 100644 index 0000000000..7c26312696 --- /dev/null +++ b/lib/wx/examples/xrc/rc/stop.xpm @@ -0,0 +1,164 @@ +/* XPM */ +static char * stop_xpm[] = { +"32 32 129 2", +" c None", +". c #C9CBC8", +"+ c #C3C4C1", +"@ c #C4C6C3", +"# c #C1C3C0", +"$ c #C3C5C2", +"% c #C3C3C0", +"& c #C4C4C1", +"* c #C2C4C1", +"= c #C6C6C3", +"- c #C0C2BF", +"; c #C7C9C6", +"> c #636662", +", c #201F1B", +"' c #242621", +") c #171B16", +"! c #1F221E", +"~ c #1E1B17", +"{ c #222621", +"] c #221F1B", +"^ c #1B1F1A", +"/ c #292622", +"( c #141713", +"_ c #5D605C", +": c #050904", +"< c #60635F", +"[ c #0F0904", +"} c #B50701", +"| c #E40600", +"1 c #850702", +"2 c #C8CAC7", +"3 c #616460", +"4 c #060A05", +"5 c #0E0904", +"6 c #A30701", +"7 c #FF0600", +"8 c #BB0701", +"9 c #0C0904", +"0 c #BC0701", +"a c #8E0702", +"b c #646763", +"c c #676A66", +"d c #AB0701", +"e c #FC0600", +"f c #9B0702", +"g c #5F625E", +"h c #0B0904", +"i c #B30701", +"j c #686B67", +"k c #5B5E5A", +"l c #090904", +"m c #9D0702", +"n c #FA0A04", +"o c #6C6F6B", +"p c #BABCB9", +"q c #AD0701", +"r c #F91B15", +"s c #E35651", +"t c #ED0600", +"u c #FE0802", +"v c #E95753", +"w c #EE211B", +"x c #CC6A66", +"y c #DA3630", +"z c #950702", +"A c #323631", +"B c #EC0600", +"C c #FE0903", +"D c #CAC8C5", +"E c #F23732", +"F c #EA524E", +"G c #CFB4B1", +"H c #FB150F", +"I c #E11D18", +"J c #EB4D48", +"K c #E85A55", +"L c #F62621", +"M c #F42D27", +"N c #E60903", +"O c #F2241E", +"P c #FA140E", +"Q c #EE433E", +"R c #EE1C16", +"S c #F50600", +"T c #FD0D07", +"U c #E6625D", +"V c #C48581", +"W c #F20B05", +"X c #CD6762", +"Y c #F03C36", +"Z c #FD0F09", +"` c #EF302A", +" . c #F62822", +".. c #E56661", +"+. c #FC100A", +"@. c #FA1A14", +"#. c #F91C16", +"$. c #F62823", +"%. c #F91D17", +"&. c #E70600", +"*. c #F03E39", +"=. c #FD0E08", +"-. c #DB534E", +";. c #BEC0BD", +">. c #10140F", +",. c #FD0C06", +"'. c #F90802", +"). c #D26A66", +"!. c #FB1510", +"~. c #FF0701", +"{. c #FE0600", +"]. c #110904", +"^. c #C50701", +"/. c #8A0702", +"(. c #1A0904", +"_. c #BF0701", +":. c #B60701", +"<. c #A40701", +"[. c #BA0701", +"}. c #080C07", +"|. c #1B0904", +"1. c #C70701", +"2. c #FD0600", +"3. c #920702", +"4. c #70736F", +"5. c #380803", +"6. c #340803", +"7. c #5C5F5B", +"8. c #BCBEBB", +". . . . . . . . . . + @ # $ $ % @ & * = - * . . . . . . . . . . ", +". . . . . . . . ; > , ' ) ! ! ~ { ] ^ / ( ^ > ; . . . . . . . . ", +". . . . . . . . _ : : : : : : : : : : : : : : _ . . . . . . . . ", +". . . . . . . < : [ } | | | | | | | | | | 1 [ : < . . . . . . . ", +". . . . . 2 3 4 5 6 7 7 7 7 7 7 7 7 7 7 7 7 8 9 4 3 2 . . . . . ", +". . . . 2 > : : 0 7 7 7 7 7 7 7 7 7 7 7 7 7 7 a : : > 2 . . . . ", +". . . . b : : 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 a [ : b . . . . ", +". . . c : 5 d e 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 f 5 : c . . . ", +". - g 4 h f 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 i h 4 j . . ", +"$ k : l m 7 7 7 7 7 7 7 7 7 7 7 7 7 n 7 7 7 7 7 7 7 7 7 l : o . ", +"p : : q 7 r . . s t . . . . . . u v . . w 7 7 . . . x y z : A . ", +"p : : B C . . . D E . . . . . . F . . . . 7 7 . . . . G B : A . ", +"p : : B H . . I . . J K . . K L . . . . . . 7 . . K . . B : A . ", +"p : : B H . . 7 . . 7 7 . . 7 M . . 7 N . . 7 . . 7 O . B : A . ", +"p : : B P . . . 7 7 7 7 . . 7 Q . . 7 7 . . 7 . . 7 R . B : A . ", +"p : : B S . . . . T 7 7 . . 7 Q . . 7 7 . . 7 . . U V . B : A . ", +"p : : B 7 W X . . . 7 7 . . 7 Q . . 7 7 . . 7 . . . . . B : A . ", +"p : : B 7 7 7 Y . . Z 7 . . 7 Q . . 7 7 . . 7 . . . . ` B : A . ", +"p : : B .. . 7 ... +.7 . . 7 @.. . 7 #.. . 7 . . 7 7 7 B : A . ", +"p : : B $.. . %.. . 7 7 . . 7 &.* . . . . *.7 . . 7 7 7 B : A . ", +"p : : B =.. . . . . 7 7 . . 7 7 -.. . . . 7 7 . . 7 7 7 B : A . ", +";.>.: q 7 r . . . ,.7 7 . . 7 7 '.).. . !.7 7 . . 7 7 7 z : A . ", +". o : l } 7 7 n 7 7 7 7 7 7 7 7 7 7 C ~.7 7 7 7 7 7 {.m l : o . ", +". . j 4 ].^.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 /.: 4 j . . ", +". . . c : (._.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 e d 5 : c . . . ", +". . . . b : [ :.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 f : : b . . . . ", +". . . . 2 > : 9 0 7 7 7 7 7 7 7 7 7 7 7 7 7 7 <.9 : > 2 . . . . ", +". . . . . 2 3 4 5 8 7 7 7 7 7 7 7 7 7 7 7 {.[.5 }.3 2 . . . . . ", +". . . . . . . < : |.1.7 7 7 7 7 7 7 7 7 2.3.: : 4.. . . . . . . ", +". . . . . . . . _ : ].5.5.5.5.5.5.5.5.5.6.: : _ . . . . . . . . ", +". . . . . . . . ; 7.: : : : : : : : : : : : 7.; . . . . . . . . ", +". . . . . . . . . ; 8.8.8.8.8.8.8.8.8.8.8.8.; . . . . . . . . . "}; diff --git a/lib/wx/examples/xrc/rc/throbber.gif b/lib/wx/examples/xrc/rc/throbber.gif new file mode 100644 index 0000000000..82c2170acc Binary files /dev/null and b/lib/wx/examples/xrc/rc/throbber.gif differ diff --git a/lib/wx/examples/xrc/rc/toolbar.xrc b/lib/wx/examples/xrc/rc/toolbar.xrc new file mode 100644 index 0000000000..ee7833309b --- /dev/null +++ b/lib/wx/examples/xrc/rc/toolbar.xrc @@ -0,0 +1,51 @@ + + + + + + + 2,2 + + Non-Derived Dialog Example + basicdlg.xpm + The basic instance of wxDialog loaded via XRC + + + Derived Dialog Example + derivdlg.xpm + The most important example: load an XRC for a derived dialog + + + Controls Example + controls.xpm + A notebook displaying all the wxWidgets controls + + + Uncentered Example + uncenter.xpm + Disable autocentering of a dialog on its parent + + + + Custom Class Example + custclas.xpm + Embed your own custom classes into an XRC + + + Platform Specific Example + platform.xpm + Customize parts of an interface for a desired platform + + + wxArtProvider Example + artprov.xpm + Use wxArtProvider to insert desired icons at runtime + + + Variable Expansion Example + variable.xpm + Replace variables in the XRC file at runtime + + + + diff --git a/lib/wx/examples/xrc/rc/uncenter.xpm b/lib/wx/examples/xrc/rc/uncenter.xpm new file mode 100644 index 0000000000..103b1cb301 --- /dev/null +++ b/lib/wx/examples/xrc/rc/uncenter.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char * uncenter_xpm[] = { +"16 16 5 1", +" c None", +". c #000000", +"+ c #808080", +"@ c #0000FF", +"# c #FFFFFF", +" ", +"................", +".++++++++++++++.", +".+@@@@@@@@@@@@+.", +".++++++++++++++.", +".+############+.", +".+###....#####+.", +".+###..#######+.", +".+###.#.######+.", +".+###.##.#####+.", +".+#######.####+.", +".+########.###+.", +".+############+.", +".++++++++++++++.", +"................", +" "}; diff --git a/lib/wx/examples/xrc/rc/uncenter.xrc b/lib/wx/examples/xrc/rc/uncenter.xrc new file mode 100644 index 0000000000..4f6f6ce532 --- /dev/null +++ b/lib/wx/examples/xrc/rc/uncenter.xrc @@ -0,0 +1,47 @@ + + + + + + Uncentered Example + + 1 + 0 + 0 + 0 + 0 + 0 + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 500,150 + + All of the dialogs in the XRC demo, except for this dialog, center themselves automatically on their parent window, since that is what is most commonly needed. The centering for the other dialogs was done automatically simply by including a <centered>1</centered> as a tag directly under the dialog node.\n\nHowever, there may be some times when you don't want autocentering. If you don't want the dialog centered, just don't use the <centered> tag and the dialog will be placed in the default window position (which is at screen coordinate 0,0 in the upper left corner of the screen). This dialog is an example of when centering is turned off. + + + + wxALIGN_CENTRE|wxALL + 5 + + wxHORIZONTAL + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + + + + + diff --git a/lib/wx/examples/xrc/rc/update.gif b/lib/wx/examples/xrc/rc/update.gif new file mode 100644 index 0000000000..9b66868827 Binary files /dev/null and b/lib/wx/examples/xrc/rc/update.gif differ diff --git a/lib/wx/examples/xrc/rc/variable.xpm b/lib/wx/examples/xrc/rc/variable.xpm new file mode 100644 index 0000000000..3e95bd869d --- /dev/null +++ b/lib/wx/examples/xrc/rc/variable.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static char * variable_xpm[] = { +"16 16 2 1", +" c None", +". c #0E2CEF", +" ", +" . ", +" ... .. ", +" .... .. ", +" ...... .. ", +" . ... .. ", +" . ..... ", +" ... ", +" .... ", +" ..... . ", +" .. ... . ", +" .. ..... ", +" .. ... ", +" . ... ", +" ", +" "}; diff --git a/lib/wx/examples/xrc/rc/variable.xrc b/lib/wx/examples/xrc/rc/variable.xrc new file mode 100644 index 0000000000..91d7d5cc24 --- /dev/null +++ b/lib/wx/examples/xrc/rc/variable.xrc @@ -0,0 +1,59 @@ + + + + + + Variable Expansion Example + 1 + + 1 + 0 + 0 + 0 + 0 + 0 + + wxGROW|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 500,150 + + VARIABLE EXPANSION ISN'T IMPLEMENTED CURRENTLY. You can use variable expansion in your XRC files. The steps to do this are:\n\n(1)Enclose a variable inside a dollarsign and round brackets, like this: dollarsign(version).\n\n(2) Set the XmlResource flags to allow expansion of variables.\n\n(3)Before you use that XML resource, inform the XmlResourceHandler what you want that variable's value to be, via wxResourceHandler::Get()->SetVariable( "version", "2.4.0")\n\n Now, at runtime, the variable will be automatically replace by its value before the control is constructed.\n\nThe number in the version at the bottom of this dialog is an example of this expansion in action.\n\nThis is very handy for things like replacing the text in a wxStaticText, since it is a much simpler way to make a wxStaticText be a proper size: by creating it the proper size. This is in contrast to the alternative way of having using some static non-variable value in your XRC, having XRC construct it, then your application having code to change the text of it, then your app getting its best size, then setting the statictext's size, then laying out the dialog's sizer again, and other work. + + + + wxGROW|wxALIGN_BOTTOM + + 3 + 0 + 0 + 0 + 2 + 0 + + wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM + 5 + + + + + + wxALIGN_CENTRE|wxALL + 5 + + + + + + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + + + + + -- cgit v1.2.3