]>
Commit | Line | Data |
---|---|---|
1 | \section{Standard event identifiers}\label{stdevtid} | |
2 | ||
3 | wxWidgets defines a special identifier value {\tt wxID\_ANY} which is used in | |
4 | the following two situations: | |
5 | ||
6 | \begin{itemize} | |
7 | \item when creating a new window you may specify {\tt wxID\_ANY} to let | |
8 | wxWidgets assign an unused identifier to it automatically | |
9 | \item when installing an event handler using either the event table | |
10 | macros or \helpref{wxEvtHandler::Connect}{wxevthandlerconnect}, | |
11 | you may use it to indicate that you want to handle the events | |
12 | coming from any control, regardless of its identifier | |
13 | \end{itemize} | |
14 | ||
15 | Another standard special identifier value is {\tt wxID\_NONE}: this is a value | |
16 | which is not matched by any other id. | |
17 | ||
18 | wxWidgets also defines a few standard command identifiers which may be used by | |
19 | the user code and also are sometimes used by wxWidgets itself. These reserved | |
20 | identifiers are all in the range between {\tt wxID\_LOWEST} and | |
21 | {\tt wxID\_HIGHEST} and, accordingly, the user code should avoid defining its | |
22 | own constants in this range. | |
23 | ||
24 | \begin{verbatim} | |
25 | wxID_LOWEST = 4999, | |
26 | ||
27 | wxID_OPEN, | |
28 | wxID_CLOSE, | |
29 | wxID_NEW, | |
30 | wxID_SAVE, | |
31 | wxID_SAVEAS, | |
32 | wxID_REVERT, | |
33 | wxID_EXIT, | |
34 | wxID_UNDO, | |
35 | wxID_REDO, | |
36 | wxID_HELP, | |
37 | wxID_PRINT, | |
38 | wxID_PRINT_SETUP, | |
39 | wxID_PAGE_SETUP, | |
40 | wxID_PREVIEW, | |
41 | wxID_ABOUT, | |
42 | wxID_HELP_CONTENTS, | |
43 | wxID_HELP_INDEX, | |
44 | wxID_HELP_SEARCH, | |
45 | wxID_HELP_COMMANDS, | |
46 | wxID_HELP_PROCEDURES, | |
47 | wxID_HELP_CONTEXT, | |
48 | wxID_CLOSE_ALL, | |
49 | ||
50 | wxID_CUT = 5030, | |
51 | wxID_COPY, | |
52 | wxID_PASTE, | |
53 | wxID_CLEAR, | |
54 | wxID_FIND, | |
55 | wxID_DUPLICATE, | |
56 | wxID_SELECTALL, | |
57 | wxID_DELETE, | |
58 | wxID_REPLACE, | |
59 | wxID_REPLACE_ALL, | |
60 | wxID_PROPERTIES, | |
61 | ||
62 | wxID_VIEW_DETAILS, | |
63 | wxID_VIEW_LARGEICONS, | |
64 | wxID_VIEW_SMALLICONS, | |
65 | wxID_VIEW_LIST, | |
66 | wxID_VIEW_SORTDATE, | |
67 | wxID_VIEW_SORTNAME, | |
68 | wxID_VIEW_SORTSIZE, | |
69 | wxID_VIEW_SORTTYPE, | |
70 | ||
71 | wxID_FILE1 = 5050, | |
72 | wxID_FILE2, | |
73 | wxID_FILE3, | |
74 | wxID_FILE4, | |
75 | wxID_FILE5, | |
76 | wxID_FILE6, | |
77 | wxID_FILE7, | |
78 | wxID_FILE8, | |
79 | wxID_FILE9, | |
80 | ||
81 | // Standard button IDs | |
82 | wxID_OK = 5100, | |
83 | wxID_CANCEL, | |
84 | wxID_APPLY, | |
85 | wxID_YES, | |
86 | wxID_NO, | |
87 | wxID_STATIC, | |
88 | wxID_FORWARD, | |
89 | wxID_BACKWARD, | |
90 | wxID_DEFAULT, | |
91 | wxID_MORE, | |
92 | wxID_SETUP, | |
93 | wxID_RESET, | |
94 | wxID_CONTEXT_HELP, | |
95 | wxID_YESTOALL, | |
96 | wxID_NOTOALL, | |
97 | wxID_ABORT, | |
98 | wxID_RETRY, | |
99 | wxID_IGNORE, | |
100 | ||
101 | wxID_UP, | |
102 | wxID_DOWN, | |
103 | wxID_HOME, | |
104 | wxID_REFRESH, | |
105 | wxID_STOP, | |
106 | wxID_INDEX, | |
107 | ||
108 | wxID_BOLD, | |
109 | wxID_ITALIC, | |
110 | wxID_JUSTIFY_CENTER, | |
111 | wxID_JUSTIFY_FILL, | |
112 | wxID_JUSTIFY_RIGHT, | |
113 | wxID_JUSTIFY_LEFT, | |
114 | wxID_UNDERLINE, | |
115 | wxID_INDENT, | |
116 | wxID_UNINDENT, | |
117 | wxID_ZOOM_100, | |
118 | wxID_ZOOM_FIT, | |
119 | wxID_ZOOM_IN, | |
120 | wxID_ZOOM_OUT, | |
121 | wxID_UNDELETE, | |
122 | wxID_REVERT_TO_SAVED, | |
123 | ||
124 | // System menu IDs (used by wxUniv): | |
125 | wxID_SYSTEM_MENU = 5200, | |
126 | wxID_CLOSE_FRAME, | |
127 | wxID_MOVE_FRAME, | |
128 | wxID_RESIZE_FRAME, | |
129 | wxID_MAXIMIZE_FRAME, | |
130 | wxID_ICONIZE_FRAME, | |
131 | wxID_RESTORE_FRAME, | |
132 | ||
133 | // IDs used by generic file dialog (13 consecutive starting from this value) | |
134 | wxID_FILEDLGG = 5900, | |
135 | ||
136 | wxID_HIGHEST = 5999 | |
137 | \end{verbatim} | |
138 |