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/trunk@77002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-08-03 17:56:20 +00:00
parent bd0301b05b
commit bc4261e3c7
11 changed files with 154 additions and 6 deletions

View File

@@ -91,6 +91,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()
@@ -343,6 +344,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