test ShowFullScreen() to verify that restoring menu works correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -66,6 +66,7 @@ IMPLEMENT_APP(MyApp)
|
|||||||
BEGIN_EVENT_TABLE(MyFrame, wxMDIParentFrame)
|
BEGIN_EVENT_TABLE(MyFrame, wxMDIParentFrame)
|
||||||
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
||||||
EVT_MENU(wxID_NEW, MyFrame::OnNewWindow)
|
EVT_MENU(wxID_NEW, MyFrame::OnNewWindow)
|
||||||
|
EVT_MENU(MDI_FULLSCREEN, MyFrame::OnFullScreen)
|
||||||
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
||||||
|
|
||||||
EVT_CLOSE(MyFrame::OnClose)
|
EVT_CLOSE(MyFrame::OnClose)
|
||||||
@@ -135,6 +136,7 @@ MyFrame::MyFrame()
|
|||||||
wxMenu *file_menu = new wxMenu;
|
wxMenu *file_menu = new wxMenu;
|
||||||
|
|
||||||
file_menu->Append(wxID_NEW, "&New window\tCtrl-N", "Create a new child window");
|
file_menu->Append(wxID_NEW, "&New window\tCtrl-N", "Create a new child window");
|
||||||
|
file_menu->AppendCheckItem(MDI_FULLSCREEN, "Show &fullscreen\tCtrl-F");
|
||||||
file_menu->Append(wxID_EXIT, "&Exit\tAlt-X", "Quit the program");
|
file_menu->Append(wxID_EXIT, "&Exit\tAlt-X", "Quit the program");
|
||||||
|
|
||||||
wxMenu *help_menu = new wxMenu;
|
wxMenu *help_menu = new wxMenu;
|
||||||
@@ -229,6 +231,11 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) )
|
|||||||
subframe->Show(true);
|
subframe->Show(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnFullScreen(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
ShowFullScreen(event.IsChecked());
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnSize(wxSizeEvent& event)
|
void MyFrame::OnSize(wxSizeEvent& event)
|
||||||
{
|
{
|
||||||
int w, h;
|
int w, h;
|
||||||
@@ -379,6 +386,7 @@ MyChild::MyChild(wxMDIParentFrame *parent)
|
|||||||
|
|
||||||
file_menu->Append(wxID_NEW, "&New window\tCtrl-N");
|
file_menu->Append(wxID_NEW, "&New window\tCtrl-N");
|
||||||
file_menu->Append(wxID_CLOSE, "&Close child\tCtrl-W", "Close this window");
|
file_menu->Append(wxID_CLOSE, "&Close child\tCtrl-W", "Close this window");
|
||||||
|
file_menu->AppendCheckItem(MDI_FULLSCREEN, "Show &fullscreen\tCtrl-F");
|
||||||
file_menu->Append(wxID_EXIT, "&Exit\tAlt-X", "Quit the program");
|
file_menu->Append(wxID_EXIT, "&Exit\tAlt-X", "Quit the program");
|
||||||
|
|
||||||
wxMenu *option_menu = new wxMenu;
|
wxMenu *option_menu = new wxMenu;
|
||||||
|
@@ -51,6 +51,7 @@ private:
|
|||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
void OnAbout(wxCommandEvent& event);
|
void OnAbout(wxCommandEvent& event);
|
||||||
void OnNewWindow(wxCommandEvent& event);
|
void OnNewWindow(wxCommandEvent& event);
|
||||||
|
void OnFullScreen(wxCommandEvent& event);
|
||||||
void OnQuit(wxCommandEvent& event);
|
void OnQuit(wxCommandEvent& event);
|
||||||
void OnClose(wxCloseEvent& event);
|
void OnClose(wxCloseEvent& event);
|
||||||
|
|
||||||
@@ -95,6 +96,7 @@ private:
|
|||||||
// menu items ids
|
// menu items ids
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
MDI_FULLSCREEN,
|
||||||
MDI_REFRESH,
|
MDI_REFRESH,
|
||||||
MDI_CHANGE_TITLE,
|
MDI_CHANGE_TITLE,
|
||||||
MDI_CHANGE_POSITION,
|
MDI_CHANGE_POSITION,
|
||||||
|
Reference in New Issue
Block a user