Use standard ids

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2005-06-02 12:04:48 +00:00
parent 140954fd9c
commit 91b073576e
19 changed files with 45 additions and 46 deletions

View File

@@ -368,9 +368,9 @@ IMPLEMENT_APP(MyApp)
enum enum
{ {
CONTROLS_QUIT = 100, CONTROLS_QUIT = wxID_EXIT,
CONTROLS_TEXT, CONTROLS_ABOUT = wxID_ABOUT,
CONTROLS_ABOUT, CONTROLS_TEXT = 100,
CONTROLS_CLEAR_LOG, CONTROLS_CLEAR_LOG,
// tooltip menu // tooltip menu

View File

@@ -26,9 +26,9 @@ enum DialogModes {mView,mCreate,mEdit,mSearch};
#if wxUSE_GRID #if wxUSE_GRID
#define FILE_DBGRID_TABLE 130 #define FILE_DBGRID_TABLE 130
#endif #endif
#define FILE_EXIT 199 #define FILE_EXIT wxID_EXIT
#define EDIT_PARAMETERS 200 #define EDIT_PARAMETERS 200
#define HELP_ABOUT 300 #define HELP_ABOUT wxID_ABOUT
// this seems to be missing, Robert Roebling (?) // this seems to be missing, Robert Roebling (?)
#ifndef MAX_PATH #ifndef MAX_PATH

View File

@@ -59,7 +59,7 @@ public:
extern MyFrame *GetMainFrame(void); extern MyFrame *GetMainFrame(void);
#define DOCVIEW_CUT 1 #define DOCVIEW_CUT 1
#define DOCVIEW_ABOUT 2 #define DOCVIEW_ABOUT wxID_ABOUT
extern bool singleWindowMode; extern bool singleWindowMode;

View File

@@ -58,7 +58,7 @@ DECLARE_EVENT_TABLE()
extern MyFrame *GetMainFrame(void); extern MyFrame *GetMainFrame(void);
#define DOCVIEW_CUT 1 #define DOCVIEW_CUT 1
#define DOCVIEW_ABOUT 2 #define DOCVIEW_ABOUT wxID_ABOUT
extern bool singleWindowMode; extern bool singleWindowMode;

View File

@@ -46,9 +46,9 @@ class MyFrame: public wxFrame
}; };
// ID for the menu commands // ID for the menu commands
#define DYNAMIC_QUIT 1 #define DYNAMIC_QUIT wxID_EXIT
#define DYNAMIC_TEXT 101 #define DYNAMIC_TEXT 101
#define DYNAMIC_ABOUT 102 #define DYNAMIC_ABOUT wxID_ABOUT
// Create a new application object // Create a new application object
IMPLEMENT_APP (MyApp) IMPLEMENT_APP (MyApp)

View File

@@ -99,7 +99,7 @@ BEGIN_EVENT_TABLE( GridFrame, wxFrame )
EVT_MENU( ID_SET_CELL_FG_COLOUR, GridFrame::SetCellFgColour ) EVT_MENU( ID_SET_CELL_FG_COLOUR, GridFrame::SetCellFgColour )
EVT_MENU( ID_SET_CELL_BG_COLOUR, GridFrame::SetCellBgColour ) 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( wxID_EXIT, GridFrame::OnQuit )
EVT_MENU( ID_VTABLE, GridFrame::OnVTable) EVT_MENU( ID_VTABLE, GridFrame::OnVTable)
EVT_MENU( ID_BUGS_TABLE, GridFrame::OnBugsTable) EVT_MENU( ID_BUGS_TABLE, GridFrame::OnBugsTable)
@@ -215,7 +215,7 @@ GridFrame::GridFrame()
wxMenu *helpMenu = new wxMenu; wxMenu *helpMenu = new wxMenu;
helpMenu->Append( ID_ABOUT, _T("&About wxGrid demo") ); helpMenu->Append( wxID_ABOUT, _T("&About wxGrid demo") );
wxMenuBar *menuBar = new wxMenuBar; wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append( fileMenu, _T("&File") ); menuBar->Append( fileMenu, _T("&File") );

View File

@@ -133,7 +133,6 @@ public:
ID_SELCOLS, ID_SELCOLS,
ID_SET_CELL_FG_COLOUR, ID_SET_CELL_FG_COLOUR,
ID_SET_CELL_BG_COLOUR, ID_SET_CELL_BG_COLOUR,
ID_ABOUT,
ID_VTABLE, ID_VTABLE,
ID_BUGS_TABLE, ID_BUGS_TABLE,
ID_SMALL_GRID, ID_SMALL_GRID,

View File

@@ -898,10 +898,10 @@ void MyCanvas::CreateAntiAliasedBitmap()
enum enum
{ {
ID_QUIT = 108, ID_QUIT = wxID_EXIT,
ID_ABOUT, ID_ABOUT = wxID_ABOUT,
ID_NEW, ID_NEW = 100,
ID_SHOWRAW ID_SHOWRAW = 101
}; };
IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame ) IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame )

View File

@@ -84,10 +84,10 @@ private:
// controls and menu constants // controls and menu constants
enum enum
{ {
LAYOUT_QUIT = 100, LAYOUT_QUIT = wxID_EXIT,
LAYOUT_ABOUT, LAYOUT_ABOUT = wxID_ABOUT,
LAYOUT_TEST_SIZER, LAYOUT_TEST_SIZER = 101,
LAYOUT_TEST_NB_SIZER, LAYOUT_TEST_NB_SIZER = 102,
LAYOUT_TEST_GB_SIZER LAYOUT_TEST_GB_SIZE = 103
}; };

View File

@@ -79,12 +79,12 @@ public:
// menu items ids // menu items ids
enum enum
{ {
MDI_QUIT = 100, MDI_QUIT = wxID_EXIT,
MDI_NEW_WINDOW, MDI_NEW_WINDOW = 101,
MDI_REFRESH, MDI_REFRESH,
MDI_CHANGE_TITLE, MDI_CHANGE_TITLE,
MDI_CHANGE_POSITION, MDI_CHANGE_POSITION,
MDI_CHANGE_SIZE, MDI_CHANGE_SIZE,
MDI_CHILD_QUIT, MDI_CHILD_QUIT,
MDI_ABOUT MDI_ABOUT = wxID_ABOUT
}; };

View File

@@ -63,11 +63,11 @@ class MyChild: public wxMDIChildFrame
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
#define SASHTEST_QUIT 1 #define SASHTEST_QUIT wxID_EXIT
#define SASHTEST_NEW_WINDOW 2 #define SASHTEST_NEW_WINDOW 2
#define SASHTEST_REFRESH 3 #define SASHTEST_REFRESH 3
#define SASHTEST_CHILD_QUIT 4 #define SASHTEST_CHILD_QUIT 4
#define SASHTEST_ABOUT 5 #define SASHTEST_ABOUT wxID_ABOUT
#define SASHTEST_TOGGLE_WINDOW 6 #define SASHTEST_TOGGLE_WINDOW 6
#define ID_WINDOW_TOP 100 #define ID_WINDOW_TOP 100

View File

@@ -475,10 +475,10 @@ void MyAutoScrollWindow::OnResizeClick( wxCommandEvent &WXUNUSED( event ) )
// MyFrame // MyFrame
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
const long ID_QUIT = wxNewId(); const long ID_QUIT = wxID_EXIT;
const long ID_ABOUT = wxNewId(); const long ID_ABOUT = wxID_ABOUT;
const long ID_DELETE_ALL = wxNewId(); const long ID_DELETE_ALL = 100;
const long ID_INSERT_NEW = wxNewId(); const long ID_INSERT_NEW = 101;
IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame ) IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame )

View File

@@ -374,9 +374,9 @@ void MyCanvas::ScrollWindow( int dx, int dy, const wxRect *rect )
// MyFrame // MyFrame
const int ID_QUIT = 108; const int ID_QUIT = wxID_EXIT;
const int ID_FULL = 109; const int ID_FULL = 109;
const int ID_ABOUT = 110; const int ID_ABOUT = wxID_ABOUT;
IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame ) IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame )

View File

@@ -112,9 +112,9 @@ private:
enum enum
{ {
// menu items // menu items
CLIENT_QUIT = 1000, CLIENT_QUIT = wxID_EXIT,
CLIENT_ABOUT, CLIENT_ABOUT = wxID_ABOUT,
CLIENT_OPEN, CLIENT_OPEN = 100,
CLIENT_TEST1, CLIENT_TEST1,
CLIENT_TEST2, CLIENT_TEST2,
CLIENT_TEST3, CLIENT_TEST3,

View File

@@ -96,11 +96,11 @@ private:
enum enum
{ {
// menu items // menu items
SERVER_QUIT = 1000, SERVER_QUIT = wxID_EXIT,
SERVER_ABOUT, SERVER_ABOUT = wxID_ABOUT,
// id for sockets // id for sockets
SERVER_ID, SERVER_ID = 100,
SOCKET_ID SOCKET_ID
}; };

View File

@@ -328,9 +328,9 @@ IMPLEMENT_APP(MyApp)
enum enum
{ {
TEXT_QUIT = 100, TEXT_QUIT = wxID_EXIT,
TEXT_ABOUT, TEXT_ABOUT = wxID_ABOUT,
TEXT_LOAD, TEXT_LOAD = 101,
TEXT_SAVE, TEXT_SAVE,
TEXT_CLEAR, TEXT_CLEAR,
TEXT_RICH_TEXT_TEST, TEXT_RICH_TEXT_TEST,

View File

@@ -134,7 +134,8 @@ private:
// ID for the menu commands // ID for the menu commands
enum enum
{ {
THREAD_QUIT = 1, THREAD_QUIT = wxID_EXIT,
THREAD_ABOUT = wxID_ABOUT,
THREAD_TEXT = 101, THREAD_TEXT = 101,
THREAD_CLEAR, THREAD_CLEAR,
THREAD_START_THREAD = 201, THREAD_START_THREAD = 201,
@@ -148,7 +149,6 @@ enum
THREAD_EXEC_THREAD, THREAD_EXEC_THREAD,
THREAD_SHOWCPUS, THREAD_SHOWCPUS,
THREAD_ABOUT,
WORKER_EVENT // this one gets sent from the worker thread WORKER_EVENT // this one gets sent from the worker thread
}; };

View File

@@ -70,9 +70,9 @@ enum
{ {
TYPES_QUIT = wxID_EXIT, TYPES_QUIT = wxID_EXIT,
TYPES_TEXT = 101, TYPES_TEXT = 101,
TYPES_ABOUT, TYPES_ABOUT = wxID_ABOUT,
TYPES_DATE, TYPES_DATE = 102,
TYPES_TIME, TYPES_TIME,
TYPES_VARIANT, TYPES_VARIANT,
TYPES_BYTEORDER, TYPES_BYTEORDER,

View File

@@ -174,7 +174,7 @@ END_EVENT_TABLE()
enum enum
{ {
// menu items // menu items
VScroll_Quit = 1, VScroll_Quit = wxID_EXIT,
// it is important for the id corresponding to the "About" command to have // 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 // this standard value as otherwise it won't be handled properly under Mac