]> git.saurik.com Git - wxWidgets.git/commitdiff
replaced menu calls Append([...], true) with the less cryptic AppendCheckItem
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Sun, 13 Jun 2004 00:02:35 +0000 (00:02 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Sun, 13 Jun 2004 00:02:35 +0000 (00:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/dialogs/dialogs.cpp
samples/dragimag/dragimag.cpp
samples/drawing/drawing.cpp
samples/font/font.cpp
samples/menu/menu.cpp
samples/text/text.cpp
samples/treectrl/treetest.cpp
samples/validate/validate.cpp

index 96f70704d19932c74207f73e664e8025644e0a79..ccda7099f344e95bba020fac4fd5daa5a7a69c11 100644 (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
 
index dba64848960a49a99196b0b935e572ee2b0e83ef..1141186f1a38e071a39452180996defa674b0c80 100644 (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();
index 8e3ae49a16ae6820bff076df226e891962dd28a7..e461b212ee70619198bb7a83082bc4ec315cfbd7 100644 (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!"));
 
index 61eeecb067a7a488e48d3869dcf2e5a61e51c49e..a2d13fa08d3487940b407f599eb1ba9619f8fe76 100644 (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,
index 3665eebae16f837e3473ab5e182d72bc967ed0c6..1f2bbdc0fa3cfcc7d405dbcae5ba86825b1154a3 100644 (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();
index 0d885c38e1222c98160af47ec25658d5d08f128e..1ff95544cef97a22350c002fa58c1955a1b8ef0e 100644 (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"));
index 4b6f7d7ef3a48a7bce230022ec0e583a06cd381c..3fb9a987d33ad28adac763f63dfff8e502067ab1 100644 (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..."));
index 9fba07791b6b40bf2ebc0a8005ccc17753056aed..052d043a521709c6521275071fa49d254de16284 100644 (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"));