XMLID->XRCID, XMLCTRL->XRCCTRL

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2002-01-27 23:51:05 +00:00
parent 5ed345b7ed
commit 094eb71aa4
3 changed files with 10 additions and 10 deletions

View File

@ -73,8 +73,8 @@ These are the typical steps for using XRC files in your application.
and then call \verb$wxXmlResource::Get()->Load("myfile.xrc")$ to load the resource file; and then call \verb$wxXmlResource::Get()->Load("myfile.xrc")$ to load the resource file;
\item to create a dialog from a resource, create it using the default constructor, and then \item to create a dialog from a resource, create it using the default constructor, and then
load using for example \verb$wxXmlResource::Get()->LoadDialog(&dlg, this, "dlg1")$; load using for example \verb$wxXmlResource::Get()->LoadDialog(&dlg, this, "dlg1")$;
\item set up event tables as usual but use the \verb$XMLID(str)$ macro to translate from XRC string names \item set up event tables as usual but use the \verb$XRCID(str)$ macro to translate from XRC string names
to a suitable integer identifier, for example \verb$EVT_MENU(XMLID("quit"), MyFrame::OnQuit)$. to a suitable integer identifier, for example \verb$EVT_MENU(XRCID("quit"), MyFrame::OnQuit)$.
\end{itemize} \end{itemize}
To create an XRC file, use one of the following methods. To create an XRC file, use one of the following methods.
@ -216,10 +216,10 @@ private:
// handlers) which process them. It can be also done at run-time, but for the // handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler. // simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(MyFrame, wxFrame) BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(XMLID("menu_quit"), MyFrame::OnQuit) EVT_MENU(XRCID("menu_quit"), MyFrame::OnQuit)
EVT_MENU(XMLID("menu_about"), MyFrame::OnAbout) EVT_MENU(XRCID("menu_about"), MyFrame::OnAbout)
EVT_MENU(XMLID("menu_dlg1"), MyFrame::OnDlg1) EVT_MENU(XRCID("menu_dlg1"), MyFrame::OnDlg1)
EVT_MENU(XMLID("menu_dlg2"), MyFrame::OnDlg2) EVT_MENU(XRCID("menu_dlg2"), MyFrame::OnDlg2)
END_EVENT_TABLE() END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWindows to create // Create a new application object: this macro will allow wxWindows to create

View File

@ -128,13 +128,13 @@ Returns flags, which may be a bitlist of wxXRC\_USE\_LOCALE and wxXRC\_NO\_SUBCL
Returns version information (a.b.c.d = d+ 256*c + 256\verb|^|2*b + 256\verb|^|3*a). Returns version information (a.b.c.d = d+ 256*c + 256\verb|^|2*b + 256\verb|^|3*a).
\membersection{wxXmlResource::GetXMLID}\label{wxxmlresourcegetxmlid} \membersection{wxXmlResource::GetXRCID}\label{wxxmlresourcegetxmlid}
\func{int}{GetXMLID}{\param{const wxChar* }{str\_id}} \func{int}{GetXRCID}{\param{const wxChar* }{str\_id}}
Returns a numeric ID that is equivalent to the string ID used in an XML Returns a numeric ID that is equivalent to the string ID used in an XML
resource. To be used in event tables. resource. To be used in event tables.
The macro \verb$XMLID(name)$ is provided for convenience. The macro \verb$XRCID(name)$ is provided for convenience.
\membersection{wxXmlResource::InitAllHandlers}\label{wxxmlresourceinitallhandlers} \membersection{wxXmlResource::InitAllHandlers}\label{wxxmlresourceinitallhandlers}

View File

@ -131,7 +131,7 @@ Gets a font.
\func{int}{GetID}{\void} \func{int}{GetID}{\void}
Returns the XMLID. Returns the XRCID.
\membersection{wxXmlResourceHandler::GetIcon}\label{wxxmlresourcehandlergeticon} \membersection{wxXmlResourceHandler::GetIcon}\label{wxxmlresourcehandlergeticon}