X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f9363b96c4869fc760857feb9fe3872a17d7ee07..bc9fa1f694dc8e1894dbb3ce2165ae27dac8b4b3:/docs/latex/wx/txrc.tex?ds=sidebyside diff --git a/docs/latex/wx/txrc.tex b/docs/latex/wx/txrc.tex index 7cbcd7a532..970d15847b 100644 --- a/docs/latex/wx/txrc.tex +++ b/docs/latex/wx/txrc.tex @@ -79,20 +79,23 @@ load using for example {\tt wxXmlResource::Get()->LoadDialog(\&dlg, this, "dlg1" to a suitable integer identifier, for example {\tt EVT\_MENU(XRCID("quit"), MyFrame::OnQuit)}. \end{itemize} -To create an XRC file, use one of the following methods. +To create an XRC file, you can use one of the following methods. \begin{itemize}\itemsep=0pt \item Create the file by hand; \item use \urlref{wxDesigner}{http://www.roebling.de}, a commercial dialog designer/RAD tool; -\item use \urlref{XRCed}{http://www.mema.ucl.ac.be/~rolinsky/xrced/}, a wxPython-based +\item use \urlref{DialogBlocks}{http://www.anthemion.co.uk/dialogblocks}, a commercial dialog editor; +\item use \urlref{XRCed}{http://xrced.sf.net}, a wxPython-based dialog editor that you can find in the {\tt wxPython/tools} subdirectory of the wxWindows CVS archive; -\item use \urlref{wxWorkshop}{http://wxworkshop.sourceforge.net} (under development); +\item use \urlref{Glade}{http://wxglade.sf.net}, a GUI designer written in wxPython. At the moment it can generate Python, C++ and XRC; \item use wxrcedit ({\tt utils/contrib/wxrcedit}) (under development); \item convert WIN32 RC files to XRC with the tool in {\tt contrib/utils/convertrc}. \end{itemize} -It is highly recommended that you use a tool such as wxDesigner, since it's fiddly writing +A complete list of third-party tools that write to XRC can be found at \urlref{www.wxwindows.org/lnk_tool.htm}{http://www.wxwindows.org/lnk_tool.in}. + +It is highly recommended that you use a resource editing tool, since it's fiddly writing XRC files by hand. You can use \helpref{wxXmlResource::Load}{wxxmlresourceload} in a number of ways. @@ -148,6 +151,8 @@ Use the {\tt -c} switch to contain a function called {\it InitXmlResource} (unless you override this with a command line switch). Use it to load the resource: \begin{verbatim} + extern void InitXMLResource(); // defined in generated file + ... wxXmlResource::Get()->InitAllHandlers(); InitXmlResource(); ... @@ -228,8 +233,8 @@ bool MyApp::OnInit() MyFrame *frame = new MyFrame("XML resources demo", wxPoint(50, 50), wxSize(450, 340)); - frame->Show(TRUE); - return TRUE; + frame->Show(true); + return true; } // ---------------------------------------------------------------------------- @@ -249,8 +254,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) // event handlers void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { - // TRUE is to force the frame to close - Close(TRUE); + // true is to force the frame to close + Close(true); } void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))