replaced menu calls Append([...], true) with the less cryptic AppendCheckItem

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2004-06-13 00:02:35 +00:00
parent dabbc6a5a1
commit 2153bf897a
8 changed files with 33 additions and 34 deletions

View File

@@ -312,15 +312,15 @@ bool MyApp::OnInit()
#if wxUSE_FINDREPLDLG
wxMenu *find_menu = new wxMenu;
find_menu->Append(DIALOGS_FIND, _T("&Find dialog\tCtrl-F"), wxEmptyString, true);
find_menu->Append(DIALOGS_REPLACE, _T("Find and &replace dialog\tShift-Ctrl-F"), wxEmptyString, true);
find_menu->AppendCheckItem(DIALOGS_FIND, _T("&Find dialog\tCtrl-F"));
find_menu->AppendCheckItem(DIALOGS_REPLACE, _T("Find and &replace dialog\tShift-Ctrl-F"));
file_menu->Append(wxID_ANY,_T("Searching"),find_menu);
#endif // wxUSE_FINDREPLDLG
#if USE_MODAL_PRESENTATION
wxMenu *modal_menu = new wxMenu;
modal_menu->Append(DIALOGS_MODAL, _T("Mo&dal dialog\tCtrl-W"));
modal_menu->Append(DIALOGS_MODELESS, _T("Modeless &dialog\tCtrl-Z"), wxEmptyString, true);
modal_menu->AppendCheckItem(DIALOGS_MODELESS, _T("Modeless &dialog\tCtrl-Z"));
file_menu->Append(wxID_ANY,_T("Modal/Modeless"),modal_menu);
#endif // USE_MODAL_PRESENTATION

View File

@@ -332,7 +332,7 @@ MyFrame::MyFrame()
{
wxMenu *file_menu = new wxMenu();
file_menu->Append( wxID_ABOUT, _T("&About..."));
file_menu->Append( TEST_USE_SCREEN, _T("&Use whole screen for dragging"), _T("Use whole screen"), true);
file_menu->AppendCheckItem( TEST_USE_SCREEN, _T("&Use whole screen for dragging"), _T("Use whole screen"));
file_menu->Append( wxID_EXIT, _T("E&xit"));
wxMenuBar *menu_bar = new wxMenuBar();

View File

@@ -1079,8 +1079,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
menuUserScale->Append( UserScale_Restore, _T("&Restore to normal\tCtrl-0") );
wxMenu *menuAxis = new wxMenu;
menuAxis->Append( AxisMirror_Horiz, _T("Mirror horizontally\tCtrl-M"), _T(""), true );
menuAxis->Append( AxisMirror_Vertic, _T("Mirror vertically\tCtrl-N"), _T(""), true );
menuAxis->AppendCheckItem( AxisMirror_Horiz, _T("Mirror horizontally\tCtrl-M") );
menuAxis->AppendCheckItem( AxisMirror_Vertic, _T("Mirror vertically\tCtrl-N") );
wxMenu *menuLogical = new wxMenu;
menuLogical->Append( LogicalOrigin_MoveDown, _T("Move &down\tCtrl-D") );
@@ -1095,8 +1095,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
menuColour->Append( Colour_TextForeground, _T("Text &foreground...") );
menuColour->Append( Colour_TextBackground, _T("Text &background...") );
menuColour->Append( Colour_Background, _T("Background &colour...") );
menuColour->Append( Colour_BackgroundMode, _T("&Opaque/transparent\tCtrl-B"), _T(""), true );
menuColour->Append( Colour_TextureBackgound, _T("Draw textured back&ground\tCtrl-T"), _T(""), true);
menuColour->AppendCheckItem( Colour_BackgroundMode, _T("&Opaque/transparent\tCtrl-B") );
menuColour->AppendCheckItem( Colour_TextureBackgound, _T("Draw textured back&ground\tCtrl-T") );
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar;
@@ -1110,7 +1110,6 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(2);
SetStatusText(_T("Welcome to wxWidgets!"));

View File

@@ -243,10 +243,10 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
menuFont->Append(Font_IncSize, wxT("&Increase font size by 2 points\tCtrl-I"));
menuFont->Append(Font_DecSize, wxT("&Decrease font size by 2 points\tCtrl-D"));
menuFont->AppendSeparator();
menuFont->Append(Font_Bold, wxT("&Bold\tCtrl-B"), wxT("Toggle bold state"), true);
menuFont->Append(Font_Italic, wxT("&Oblique\tCtrl-O"), wxT("Toggle italic state"), true);
menuFont->Append(Font_Underlined, wxT("&Underlined\tCtrl-U"),
wxT("Toggle underlined state"), true);
menuFont->AppendCheckItem(Font_Bold, wxT("&Bold\tCtrl-B"), wxT("Toggle bold state"));
menuFont->AppendCheckItem(Font_Italic, wxT("&Oblique\tCtrl-O"), wxT("Toggle italic state"));
menuFont->AppendCheckItem(Font_Underlined, wxT("&Underlined\tCtrl-U"),
wxT("Toggle underlined state"));
menuFont->AppendSeparator();
menuFont->Append(Font_CheckNativeToFromString,

View File

@@ -513,7 +513,7 @@ wxMenu *MyFrame::CreateDummyMenu(wxString *title)
wxMenu *menu = new wxMenu;
menu->Append(Menu_Dummy_First, _T("&First item\tCtrl-F1"));
menu->AppendSeparator();
menu->Append(Menu_Dummy_Second, _T("&Second item\tCtrl-F2"), _T(""), true);
menu->AppendCheckItem(Menu_Dummy_Second, _T("&Second item\tCtrl-F2"));
if ( title )
{
@@ -929,7 +929,7 @@ void MyFrame::ShowContextMenu(const wxPoint& pos)
menu.Append(Menu_Help_About, _T("&About"));
menu.Append(Menu_Popup_Submenu, _T("&Submenu"), CreateDummyMenu(NULL));
menu.Append(Menu_Popup_ToBeDeleted, _T("To be &deleted"));
menu.Append(Menu_Popup_ToBeChecked, _T("To be &checked"), _T(""), true);
menu.AppendCheckItem(Menu_Popup_ToBeChecked, _T("To be &checked"));
menu.Append(Menu_Popup_ToBeGreyed, _T("To be &greyed"),
_T("This menu item should be initially greyed out"));
menu.AppendSeparator();

View File

@@ -394,8 +394,8 @@ bool MyApp::OnInit()
menuText->AppendSeparator();
menuText->Append(TEXT_MOVE_ENDTEXT, _T("Move cursor to the end of &text"));
menuText->Append(TEXT_MOVE_ENDENTRY, _T("Move cursor to the end of &entry"));
menuText->Append(TEXT_SET_EDITABLE, _T("Toggle &editable state"), _T(""), true);
menuText->Append(TEXT_SET_ENABLED, _T("Toggle e&nabled state"), _T(""), true);
menuText->AppendCheckItem(TEXT_SET_EDITABLE, _T("Toggle &editable state"));
menuText->AppendCheckItem(TEXT_SET_ENABLED, _T("Toggle e&nabled state"));
menuText->Check(TEXT_SET_EDITABLE, true);
menuText->Check(TEXT_SET_ENABLED, true);
menuText->AppendSeparator();
@@ -406,11 +406,11 @@ bool MyApp::OnInit()
menu_bar->Append(menuText, _T("Te&xt"));
wxMenu *menuLog = new wxMenu;
menuLog->Append(TEXT_LOG_KEY, _T("Log &key events"), _T(""), true);
menuLog->Append(TEXT_LOG_CHAR, _T("Log &char events"), _T(""), true);
menuLog->Append(TEXT_LOG_MOUSE, _T("Log &mouse events"), _T(""), true);
menuLog->Append(TEXT_LOG_TEXT, _T("Log &text events"), _T(""), true);
menuLog->Append(TEXT_LOG_FOCUS, _T("Log &focus events"), _T(""), true);
menuLog->AppendCheckItem(TEXT_LOG_KEY, _T("Log &key events"));
menuLog->AppendCheckItem(TEXT_LOG_CHAR, _T("Log &char events"));
menuLog->AppendCheckItem(TEXT_LOG_MOUSE, _T("Log &mouse events"));
menuLog->AppendCheckItem(TEXT_LOG_TEXT, _T("Log &text events"));
menuLog->AppendCheckItem(TEXT_LOG_FOCUS, _T("Log &focus events"));
menuLog->AppendSeparator();
menuLog->Append(TEXT_CLEAR, _T("&Clear the log\tCtrl-C"),
_T("Clear the log window contents"));

View File

@@ -186,20 +186,20 @@ MyFrame::MyFrame(const wxString& title, int x, int y, int w, int h)
file_menu->AppendSeparator();
file_menu->Append(TreeTest_Quit, wxT("E&xit\tAlt-X"));
style_menu->Append(TreeTest_TogButtons, wxT("Toggle &normal buttons"), wxT(""), true);
style_menu->Append(TreeTest_TogTwist, wxT("Toggle &twister buttons"), wxT(""), true);
style_menu->Append(TreeTest_ToggleButtons, wxT("Toggle image &buttons"), wxT(""), true);
style_menu->AppendCheckItem(TreeTest_TogButtons, wxT("Toggle &normal buttons"));
style_menu->AppendCheckItem(TreeTest_TogTwist, wxT("Toggle &twister buttons"));
style_menu->AppendCheckItem(TreeTest_ToggleButtons, wxT("Toggle image &buttons"));
style_menu->AppendSeparator();
style_menu->Append(TreeTest_TogLines, wxT("Toggle &connecting lines"), wxT(""), true);
style_menu->Append(TreeTest_TogRootLines, wxT("Toggle &lines at root"), wxT(""), true);
style_menu->Append(TreeTest_TogHideRoot, wxT("Toggle &hidden root"), wxT(""), true);
style_menu->Append(TreeTest_TogBorder, wxT("Toggle &item border"), wxT(""), true);
style_menu->Append(TreeTest_TogFullHighlight, wxT("Toggle &full row highlight"), wxT(""), true);
style_menu->Append(TreeTest_TogEdit, wxT("Toggle &edit mode"), wxT(""), true);
style_menu->AppendCheckItem(TreeTest_TogLines, wxT("Toggle &connecting lines"));
style_menu->AppendCheckItem(TreeTest_TogRootLines, wxT("Toggle &lines at root"));
style_menu->AppendCheckItem(TreeTest_TogHideRoot, wxT("Toggle &hidden root"));
style_menu->AppendCheckItem(TreeTest_TogBorder, wxT("Toggle &item border"));
style_menu->AppendCheckItem(TreeTest_TogFullHighlight, wxT("Toggle &full row highlight"));
style_menu->AppendCheckItem(TreeTest_TogEdit, wxT("Toggle &edit mode"));
#ifndef NO_MULTIPLE_SELECTION
style_menu->Append(TreeTest_ToggleSel, wxT("Toggle &selection mode"), wxT(""), true);
style_menu->AppendCheckItem(TreeTest_ToggleSel, wxT("Toggle &selection mode"));
#endif // NO_MULTIPLE_SELECTION
style_menu->Append(TreeTest_ToggleImages, wxT("Toggle show ima&ges"), wxT(""), true);
style_menu->AppendCheckItem(TreeTest_ToggleImages, wxT("Toggle show ima&ges"));
style_menu->Append(TreeTest_SetImageSize, wxT("Set image si&ze..."));
style_menu->AppendSeparator();
style_menu->Append(TreeTest_SetFgColour, wxT("Set &foreground colour..."));

View File

@@ -107,7 +107,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString&title, int x, int y, int w, int
wxMenu *file_menu = new wxMenu;
file_menu->Append(VALIDATE_TEST_DIALOG, wxT("&Test"), wxT("Demonstrate validators"));
file_menu->Append(VALIDATE_TOGGLE_BELL, wxT("&Bell on error"), wxT("Toggle bell on error"), true);
file_menu->AppendCheckItem(VALIDATE_TOGGLE_BELL, wxT("&Bell on error"), wxT("Toggle bell on error"));
file_menu->AppendSeparator();
file_menu->Append(wxID_EXIT, wxT("E&xit"));