Add a more complete example of different controls variants in XRC.

Add a dialog showing all the existing variants of a few common controls to
allow seeing at a glance how do they look.

See #16247.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-08-03 17:55:52 +00:00
parent f36b3c9d62
commit 9958ba94b8
12 changed files with 155 additions and 7 deletions

View File

@@ -90,6 +90,7 @@ wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(XRCID("platform_property_tool_or_menuitem"), MyFrame::OnPlatformPropertyToolOrMenuCommand)
EVT_MENU(XRCID("art_provider_tool_or_menuitem"), MyFrame::OnArtProviderToolOrMenuCommand)
EVT_MENU(XRCID("variable_expansion_tool_or_menuitem"), MyFrame::OnVariableExpansionToolOrMenuCommand)
EVT_MENU(XRCID("variants"), MyFrame::OnVariants)
EVT_MENU(XRCID("recursive_load"), MyFrame::OnRecursiveLoad)
EVT_MENU(wxID_ABOUT, MyFrame::OnAboutToolOrMenuCommand)
wxEND_EVENT_TABLE()
@@ -331,6 +332,13 @@ void MyFrame::OnVariableExpansionToolOrMenuCommand(wxCommandEvent& WXUNUSED(even
dlg.ShowModal();
}
void MyFrame::OnVariants(wxCommandEvent& WXUNUSED(event))
{
wxDialog dlg;
wxXmlResource::Get()->LoadDialog(&dlg, this, wxT("variants_dialog"));
dlg.ShowModal();
}
void MyFrame::OnRecursiveLoad(wxCommandEvent& WXUNUSED(event))
{
// this dialog is created manually to show how you can inject a single