From 91b073576e8fd216c71acacf5c1495e1a56dd39f Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 2 Jun 2005 12:04:48 +0000 Subject: [PATCH] Use standard ids git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/controls/controls.cpp | 6 +++--- samples/db/dbtest.h | 4 ++-- samples/docview/docview.h | 2 +- samples/docvwmdi/docview.h | 2 +- samples/dynamic/dynamic.cpp | 4 ++-- samples/grid/griddemo.cpp | 4 ++-- samples/grid/griddemo.h | 1 - samples/image/image.cpp | 8 ++++---- samples/layout/layout.h | 10 +++++----- samples/mdi/mdi.h | 6 +++--- samples/sashtest/sashtest.h | 4 ++-- samples/scroll/scroll.cpp | 8 ++++---- samples/scrollsub/scrollsub.cpp | 4 ++-- samples/sockets/client.cpp | 6 +++--- samples/sockets/server.cpp | 6 +++--- samples/text/text.cpp | 6 +++--- samples/thread/thread.cpp | 4 ++-- samples/typetest/typetest.h | 4 ++-- samples/vscroll/vstest.cpp | 2 +- 19 files changed, 45 insertions(+), 46 deletions(-) diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index bee92ff91b..0cd2b4f593 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -368,9 +368,9 @@ IMPLEMENT_APP(MyApp) enum { - CONTROLS_QUIT = 100, - CONTROLS_TEXT, - CONTROLS_ABOUT, + CONTROLS_QUIT = wxID_EXIT, + CONTROLS_ABOUT = wxID_ABOUT, + CONTROLS_TEXT = 100, CONTROLS_CLEAR_LOG, // tooltip menu diff --git a/samples/db/dbtest.h b/samples/db/dbtest.h index bdb9c310a3..72d0e5b7e4 100644 --- a/samples/db/dbtest.h +++ b/samples/db/dbtest.h @@ -26,9 +26,9 @@ enum DialogModes {mView,mCreate,mEdit,mSearch}; #if wxUSE_GRID #define FILE_DBGRID_TABLE 130 #endif -#define FILE_EXIT 199 +#define FILE_EXIT wxID_EXIT #define EDIT_PARAMETERS 200 -#define HELP_ABOUT 300 +#define HELP_ABOUT wxID_ABOUT // this seems to be missing, Robert Roebling (?) #ifndef MAX_PATH diff --git a/samples/docview/docview.h b/samples/docview/docview.h index 08289db1bc..7b93ae186f 100644 --- a/samples/docview/docview.h +++ b/samples/docview/docview.h @@ -59,7 +59,7 @@ public: extern MyFrame *GetMainFrame(void); #define DOCVIEW_CUT 1 -#define DOCVIEW_ABOUT 2 +#define DOCVIEW_ABOUT wxID_ABOUT extern bool singleWindowMode; diff --git a/samples/docvwmdi/docview.h b/samples/docvwmdi/docview.h index ce603abd72..96eaeb90b8 100644 --- a/samples/docvwmdi/docview.h +++ b/samples/docvwmdi/docview.h @@ -58,7 +58,7 @@ DECLARE_EVENT_TABLE() extern MyFrame *GetMainFrame(void); #define DOCVIEW_CUT 1 -#define DOCVIEW_ABOUT 2 +#define DOCVIEW_ABOUT wxID_ABOUT extern bool singleWindowMode; diff --git a/samples/dynamic/dynamic.cpp b/samples/dynamic/dynamic.cpp index 6e803e0eba..f94ca57e44 100644 --- a/samples/dynamic/dynamic.cpp +++ b/samples/dynamic/dynamic.cpp @@ -46,9 +46,9 @@ class MyFrame: public wxFrame }; // ID for the menu commands -#define DYNAMIC_QUIT 1 +#define DYNAMIC_QUIT wxID_EXIT #define DYNAMIC_TEXT 101 -#define DYNAMIC_ABOUT 102 +#define DYNAMIC_ABOUT wxID_ABOUT // Create a new application object IMPLEMENT_APP (MyApp) diff --git a/samples/grid/griddemo.cpp b/samples/grid/griddemo.cpp index af1a576dae..772583b100 100644 --- a/samples/grid/griddemo.cpp +++ b/samples/grid/griddemo.cpp @@ -99,7 +99,7 @@ BEGIN_EVENT_TABLE( GridFrame, wxFrame ) EVT_MENU( ID_SET_CELL_FG_COLOUR, GridFrame::SetCellFgColour ) EVT_MENU( ID_SET_CELL_BG_COLOUR, GridFrame::SetCellBgColour ) - EVT_MENU( ID_ABOUT, GridFrame::About ) + EVT_MENU( wxID_ABOUT, GridFrame::About ) EVT_MENU( wxID_EXIT, GridFrame::OnQuit ) EVT_MENU( ID_VTABLE, GridFrame::OnVTable) EVT_MENU( ID_BUGS_TABLE, GridFrame::OnBugsTable) @@ -215,7 +215,7 @@ GridFrame::GridFrame() wxMenu *helpMenu = new wxMenu; - helpMenu->Append( ID_ABOUT, _T("&About wxGrid demo") ); + helpMenu->Append( wxID_ABOUT, _T("&About wxGrid demo") ); wxMenuBar *menuBar = new wxMenuBar; menuBar->Append( fileMenu, _T("&File") ); diff --git a/samples/grid/griddemo.h b/samples/grid/griddemo.h index ec95d19e1d..f2ff5c4af0 100644 --- a/samples/grid/griddemo.h +++ b/samples/grid/griddemo.h @@ -133,7 +133,6 @@ public: ID_SELCOLS, ID_SET_CELL_FG_COLOUR, ID_SET_CELL_BG_COLOUR, - ID_ABOUT, ID_VTABLE, ID_BUGS_TABLE, ID_SMALL_GRID, diff --git a/samples/image/image.cpp b/samples/image/image.cpp index ee7ad0de60..a0f10192d2 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -898,10 +898,10 @@ void MyCanvas::CreateAntiAliasedBitmap() enum { - ID_QUIT = 108, - ID_ABOUT, - ID_NEW, - ID_SHOWRAW + ID_QUIT = wxID_EXIT, + ID_ABOUT = wxID_ABOUT, + ID_NEW = 100, + ID_SHOWRAW = 101 }; IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame ) diff --git a/samples/layout/layout.h b/samples/layout/layout.h index 9b91dbd74e..fd95dc0ab4 100644 --- a/samples/layout/layout.h +++ b/samples/layout/layout.h @@ -84,10 +84,10 @@ private: // controls and menu constants enum { - LAYOUT_QUIT = 100, - LAYOUT_ABOUT, - LAYOUT_TEST_SIZER, - LAYOUT_TEST_NB_SIZER, - LAYOUT_TEST_GB_SIZER + LAYOUT_QUIT = wxID_EXIT, + LAYOUT_ABOUT = wxID_ABOUT, + LAYOUT_TEST_SIZER = 101, + LAYOUT_TEST_NB_SIZER = 102, + LAYOUT_TEST_GB_SIZE = 103 }; diff --git a/samples/mdi/mdi.h b/samples/mdi/mdi.h index 796f40bbd0..d0d6c422e1 100644 --- a/samples/mdi/mdi.h +++ b/samples/mdi/mdi.h @@ -79,12 +79,12 @@ public: // menu items ids enum { - MDI_QUIT = 100, - MDI_NEW_WINDOW, + MDI_QUIT = wxID_EXIT, + MDI_NEW_WINDOW = 101, MDI_REFRESH, MDI_CHANGE_TITLE, MDI_CHANGE_POSITION, MDI_CHANGE_SIZE, MDI_CHILD_QUIT, - MDI_ABOUT + MDI_ABOUT = wxID_ABOUT }; diff --git a/samples/sashtest/sashtest.h b/samples/sashtest/sashtest.h index 11c644f8a9..c67bb0c1a6 100644 --- a/samples/sashtest/sashtest.h +++ b/samples/sashtest/sashtest.h @@ -63,11 +63,11 @@ class MyChild: public wxMDIChildFrame DECLARE_EVENT_TABLE() }; -#define SASHTEST_QUIT 1 +#define SASHTEST_QUIT wxID_EXIT #define SASHTEST_NEW_WINDOW 2 #define SASHTEST_REFRESH 3 #define SASHTEST_CHILD_QUIT 4 -#define SASHTEST_ABOUT 5 +#define SASHTEST_ABOUT wxID_ABOUT #define SASHTEST_TOGGLE_WINDOW 6 #define ID_WINDOW_TOP 100 diff --git a/samples/scroll/scroll.cpp b/samples/scroll/scroll.cpp index 90f11e1c79..bf5327cd11 100644 --- a/samples/scroll/scroll.cpp +++ b/samples/scroll/scroll.cpp @@ -475,10 +475,10 @@ void MyAutoScrollWindow::OnResizeClick( wxCommandEvent &WXUNUSED( event ) ) // MyFrame // ---------------------------------------------------------------------------- -const long ID_QUIT = wxNewId(); -const long ID_ABOUT = wxNewId(); -const long ID_DELETE_ALL = wxNewId(); -const long ID_INSERT_NEW = wxNewId(); +const long ID_QUIT = wxID_EXIT; +const long ID_ABOUT = wxID_ABOUT; +const long ID_DELETE_ALL = 100; +const long ID_INSERT_NEW = 101; IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame ) diff --git a/samples/scrollsub/scrollsub.cpp b/samples/scrollsub/scrollsub.cpp index 71e4ba8b01..f8620259de 100644 --- a/samples/scrollsub/scrollsub.cpp +++ b/samples/scrollsub/scrollsub.cpp @@ -374,9 +374,9 @@ void MyCanvas::ScrollWindow( int dx, int dy, const wxRect *rect ) // MyFrame -const int ID_QUIT = 108; +const int ID_QUIT = wxID_EXIT; const int ID_FULL = 109; -const int ID_ABOUT = 110; +const int ID_ABOUT = wxID_ABOUT; IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame ) diff --git a/samples/sockets/client.cpp b/samples/sockets/client.cpp index 7e47be6c17..6acab6716f 100644 --- a/samples/sockets/client.cpp +++ b/samples/sockets/client.cpp @@ -112,9 +112,9 @@ private: enum { // menu items - CLIENT_QUIT = 1000, - CLIENT_ABOUT, - CLIENT_OPEN, + CLIENT_QUIT = wxID_EXIT, + CLIENT_ABOUT = wxID_ABOUT, + CLIENT_OPEN = 100, CLIENT_TEST1, CLIENT_TEST2, CLIENT_TEST3, diff --git a/samples/sockets/server.cpp b/samples/sockets/server.cpp index fab500e48d..548ad955b6 100644 --- a/samples/sockets/server.cpp +++ b/samples/sockets/server.cpp @@ -96,11 +96,11 @@ private: enum { // menu items - SERVER_QUIT = 1000, - SERVER_ABOUT, + SERVER_QUIT = wxID_EXIT, + SERVER_ABOUT = wxID_ABOUT, // id for sockets - SERVER_ID, + SERVER_ID = 100, SOCKET_ID }; diff --git a/samples/text/text.cpp b/samples/text/text.cpp index 9229c801ec..cb7961eeea 100644 --- a/samples/text/text.cpp +++ b/samples/text/text.cpp @@ -328,9 +328,9 @@ IMPLEMENT_APP(MyApp) enum { - TEXT_QUIT = 100, - TEXT_ABOUT, - TEXT_LOAD, + TEXT_QUIT = wxID_EXIT, + TEXT_ABOUT = wxID_ABOUT, + TEXT_LOAD = 101, TEXT_SAVE, TEXT_CLEAR, TEXT_RICH_TEXT_TEST, diff --git a/samples/thread/thread.cpp b/samples/thread/thread.cpp index 64a0f91bc4..248b3dee44 100644 --- a/samples/thread/thread.cpp +++ b/samples/thread/thread.cpp @@ -134,7 +134,8 @@ private: // ID for the menu commands enum { - THREAD_QUIT = 1, + THREAD_QUIT = wxID_EXIT, + THREAD_ABOUT = wxID_ABOUT, THREAD_TEXT = 101, THREAD_CLEAR, THREAD_START_THREAD = 201, @@ -148,7 +149,6 @@ enum THREAD_EXEC_THREAD, THREAD_SHOWCPUS, - THREAD_ABOUT, WORKER_EVENT // this one gets sent from the worker thread }; diff --git a/samples/typetest/typetest.h b/samples/typetest/typetest.h index f5bab25a77..5abcc3a784 100644 --- a/samples/typetest/typetest.h +++ b/samples/typetest/typetest.h @@ -70,9 +70,9 @@ enum { TYPES_QUIT = wxID_EXIT, TYPES_TEXT = 101, - TYPES_ABOUT, + TYPES_ABOUT = wxID_ABOUT, - TYPES_DATE, + TYPES_DATE = 102, TYPES_TIME, TYPES_VARIANT, TYPES_BYTEORDER, diff --git a/samples/vscroll/vstest.cpp b/samples/vscroll/vstest.cpp index e838e00063..cddf8b9c6b 100644 --- a/samples/vscroll/vstest.cpp +++ b/samples/vscroll/vstest.cpp @@ -174,7 +174,7 @@ END_EVENT_TABLE() enum { // menu items - VScroll_Quit = 1, + VScroll_Quit = wxID_EXIT, // it is important for the id corresponding to the "About" command to have // this standard value as otherwise it won't be handled properly under Mac -- 2.45.2