]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: accel.h | |
3 | // Purpose: documentation for wxAcceleratorEntry class | |
4 | // Author: wxWidgets team | |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | /** | |
10 | @class wxAcceleratorEntry | |
11 | @wxheader{accel.h} | |
12 | ||
13 | An object used by an application wishing to create an @ref | |
14 | overview_wxacceleratortable "accelerator table". | |
15 | ||
16 | @library{wxcore} | |
17 | @category{FIXME} | |
18 | ||
19 | @seealso | |
20 | wxAcceleratorTable, wxWindow::SetAcceleratorTable | |
21 | */ | |
22 | class wxAcceleratorEntry | |
23 | { | |
24 | public: | |
25 | //@{ | |
26 | /** | |
27 | Constructor. | |
28 | ||
29 | @param flags | |
30 | One of wxACCEL_ALT, wxACCEL_SHIFT, wxACCEL_CTRL and wxACCEL_NORMAL. Indicates | |
31 | which modifier key is held down. | |
32 | ||
33 | @param keyCode | |
34 | The keycode to be detected. See Keycodes for a full list of keycodes. | |
35 | ||
36 | @param cmd | |
37 | The menu or control command identifier. | |
38 | */ | |
39 | wxAcceleratorEntry(); | |
40 | wxAcceleratorEntry(int flags, int keyCode, int cmd); | |
41 | //@} | |
42 | ||
43 | /** | |
44 | Returns the command identifier for the accelerator table entry. | |
45 | */ | |
46 | int GetCommand(); | |
47 | ||
48 | /** | |
49 | Returns the flags for the accelerator table entry. | |
50 | */ | |
51 | int GetFlags(); | |
52 | ||
53 | /** | |
54 | Returns the keycode for the accelerator table entry. | |
55 | */ | |
56 | int GetKeyCode(); | |
57 | ||
58 | /** | |
59 | Sets the accelerator entry parameters. | |
60 | ||
61 | @param flags | |
62 | One of wxACCEL_ALT, wxACCEL_SHIFT, wxACCEL_CTRL and wxACCEL_NORMAL. Indicates | |
63 | which modifier key is held down. | |
64 | ||
65 | @param keyCode | |
66 | The keycode to be detected. See Keycodes for a full list of keycodes. | |
67 | ||
68 | @param cmd | |
69 | The menu or control command identifier. | |
70 | */ | |
71 | #define void Set(int flags, int keyCode, int cmd) /* implementation is private */ | |
72 | }; | |
73 | ||
74 | ||
75 | /** | |
76 | @class wxAcceleratorTable | |
77 | @wxheader{accel.h} | |
78 | ||
79 | An accelerator table allows the application to specify a table of keyboard | |
80 | shortcuts for | |
81 | menus or other commands. On Windows and Mac OS X, menu or button commands are | |
82 | supported; on GTK, | |
83 | only menu commands are supported. | |
84 | ||
85 | The object @b wxNullAcceleratorTable is defined to be a table with no data, and | |
86 | is the | |
87 | initial accelerator table for a window. | |
88 | ||
89 | @library{wxcore} | |
90 | @category{misc} | |
91 | ||
92 | @stdobjects | |
93 | Objects: | |
94 | wxNullAcceleratorTable | |
95 | ||
96 | @seealso | |
97 | wxAcceleratorEntry, wxWindow::SetAcceleratorTable | |
98 | */ | |
99 | class wxAcceleratorTable : public wxObject | |
100 | { | |
101 | public: | |
102 | //@{ | |
103 | /** | |
104 | Loads the accelerator table from a Windows resource (Windows only). | |
105 | ||
106 | @param n | |
107 | Number of accelerator entries. | |
108 | ||
109 | @param entries | |
110 | The array of entries. | |
111 | ||
112 | @param resource | |
113 | Name of a Windows accelerator. | |
114 | */ | |
115 | wxAcceleratorTable(); | |
116 | wxAcceleratorTable(const wxAcceleratorTable& bitmap); | |
117 | wxAcceleratorTable(int n, wxAcceleratorEntry entries[]); | |
118 | wxAcceleratorTable(const wxString& resource); | |
119 | //@} | |
120 | ||
121 | /** | |
122 | Destroys the wxAcceleratorTable object. | |
123 | See @ref overview_refcountdestruct "reference-counted object destruction" for | |
124 | more info. | |
125 | */ | |
126 | ~wxAcceleratorTable(); | |
127 | ||
128 | /** | |
129 | Returns @true if the accelerator table is valid. | |
130 | */ | |
131 | #define bool IsOk() /* implementation is private */ | |
132 | ||
133 | /** | |
134 | Assignment operator, using @ref overview_trefcount "reference counting". | |
135 | ||
136 | @param accel | |
137 | Accelerator table to assign. | |
138 | */ | |
139 | wxAcceleratorTable operator =(const wxAcceleratorTable& accel); | |
140 | }; |