- MyFrame *frame = new MyFrame((wxFrame *) NULL,
- "Controls wxWindows App",
- x, y, 540, 430);
-
- frame->SetSizeHints( 500, 425 );
-
- // Give it an icon
- // The wxICON() macros loads an icon from a resource under Windows
- // and uses an #included XPM image under GTK+ and Motif
-
- frame->SetIcon( wxICON(mondrian) );
-
- wxMenu *file_menu = new wxMenu("", wxMENU_TEAROFF);
-
- file_menu->Append(CONTROLS_CLEAR_LOG, "&Clear log\tCtrl-L");
- file_menu->AppendSeparator();
- file_menu->Append(CONTROLS_ABOUT, "&About\tF1");
- file_menu->AppendSeparator();
- file_menu->Append(CONTROLS_QUIT, "E&xit\tAlt-X", "Quit controls sample");
-
- wxMenuBar *menu_bar = new wxMenuBar;
- menu_bar->Append(file_menu, "&File");
-
-#if wxUSE_TOOLTIPS
- wxMenu *tooltip_menu = new wxMenu;
- tooltip_menu->Append(CONTROLS_SET_TOOLTIP_DELAY, "Set &delay\tCtrl-D");
- tooltip_menu->AppendSeparator();
- tooltip_menu->Append(CONTROLS_ENABLE_TOOLTIPS, "&Toggle tooltips\tCtrl-T",
- "enable/disable tooltips", TRUE);
- tooltip_menu->Check(CONTROLS_ENABLE_TOOLTIPS, TRUE);
- menu_bar->Append(tooltip_menu, "&Tooltips");
-#endif // wxUSE_TOOLTIPS
-
- wxMenu *panel_menu = new wxMenu;
- panel_menu->Append(CONTROLS_ENABLE_ALL, "&Disable all\tCtrl-E",
- "Enable/disable all panel controls", TRUE);
- menu_bar->Append(panel_menu, "&Panel");
-
- frame->SetMenuBar(menu_bar);
-