wxWidgets supplies the standard identifiers listed in Table 3-1. Use the standard identifiers wherever possible: some systems can use the information to provide standard graphics (such as the OK and Cancel buttons on GTK+) or default behavior (such as responding to the Escape key by emulating a wxID_CANCEL event). On Mac OS X, wxID_ABOUT, wxID_PREFERENCES and wxID_EXIT menu items are interpreted specially and transferred to the application menu. Some wxWidgets components, such as wxTextCtrl, know how to handle menu items or buttons with identifiers such as wxID_COPY, wxID_PASTE, wxID_UNDO.
Table 3-1. Standard Window Identifiers | |
Identifier Name | Description |
wxID_ANY | This may be passed to a window constructor as an identifier, and wxWidgets will generate an appropriate identifier |
wxID_LOWEST | The lowest standard identifier value (4999) |
wxID_HIGHEST | The highest standard identifier value (5999) |
wxID_OPEN | File open |
wxID_CLOSE | Window close |
wxID_NEW | New window, file or document |
wxID_SAVE | File save |
wxID_SAVEAS | File save as (prompts for a save dialog) |
wxID_REVERT | Revert (revert to file on disk) |
wxID_EXIT | Exit application |
wxID_UNDO | Undo the last operation |
wxID_REDO | Redo the last undo |
wxID_HELP | General help (for example, for dialog Help buttons) |
wxID_PRINT | |
wxID_PRINT_SETUP | Print setup dialog |
wxID_PREVIEW | Print preview |
wxID_ABOUT | Show a dialog describing the application |
wxID_HELP_CONTENTS | Show the help contents |
wxID_HELP_COMMANDS | Show the application commands |
wxID_HELP_PROCEDURES | Show the application procedures |
wxID_HELP_CONTEXT | Unused |
wxID_CUT | Cut |
wxID_COPY | Copy |
wxID_PASTE | Paste |
wxID_CLEAR | Clear |
wxID_FIND | Find |
wxID_DUPLICATE | Duplicate |
wxID_SELECTALL | Select all |
wxID_DELETE | Delete (cut without copying) |
wxID_REPLACE | Replace |
wxID_REPLACE_ALL | Replace all |
wxID_PROPERTIES | Show properties for the selection |
wxID_VIEW_DETAILS | View details in a list control |
wxID_VIEW_LARGEICONS | View as large icons in a list control |
wxID_VIEW_SMALLICONS | View as small icons in a list control |
wxID_VIEW_LIST | View as a list in a list control |
wxID_VIEW_SORTDATE | Sort by date |
wxID_VIEW_SORTNAME | Sort by name |
wxID_VIEW_SORTSIZE | Sort by size |
wxID_VIEW_SORTTYPE | Sort by type |
wxID_FILE1 to wxID_FILE9 | View recent file |
wxID_OK | Confirms dialog selections |
wxID_CANCEL | Vetoes dialog selections |
wxID_APPLY | Applies selections to data |
wxID_YES | Identifier for a Yes button |
wxID_NO | Identifier for a No button |
wxID_STATIC | Identifier for static text or bitmap control |
wxID_FORWARD | Navigate forward |
wxID_BACKWARD | Navigate backward |
wxID_DEFAULT | Restore default settings |
wxID_MORE | View more settings |
wxID_SETUP | View a setup dialog |
wxID_RESET | Reset settings |
wxID_CONTEXT_HELP | Show context-sensitive help |
wxID_YESTOALL | Reply yes to all prompts |
wxID_NOTOALL | Reply no to all prompts |
wxID_ABORT | Abort the current operation |
wxID_RETRY | Retry the operation |
wxID_IGNORE | Ignore an error condition |
wxID_UP | Navigate up |
wxID_DOWN | Navigate down |
wxID_HOME | Navigate home |
wxID_REFRESH | Refresh |
wxID_STOP | Stop the current operation |
wxID_INDEX | Show an index |
wxID_BOLD | Highlight in bold |
wxID_ITALIC | Highlight in italic |
wxID_JUSTIFY_CENTER | Center |
wxID_JUSTIFY_FILL | Format |
wxID_JUSTIFY_RIGHT | Right align |
wxID_JUSTIFY_LEFT | Left align |
wxID_UNDERLINE | Underline |
wxID_INDENT | Indent |
wxID_UNINDENT | Unindent |
wxID_ZOOM_100 | Zoom to 100% |
wxID_ZOOM_FIT | Fit to page |
wxID_ZOOM_IN | Zoom in |
wxID_ZOOM_OUT | Zoom out |
wxID_UNDELETE | Undelete |
wxID_REVERT_TO_SAVED | Revert to saved state |
You can use wxID_HIGHEST to determine the number above which it is safe to define your own identifiers, or you can use identifiers below wxID_LOWEST.