]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: control.h | |
e54c96f1 | 3 | // Purpose: interface of wxControl |
23324ae1 FM |
4 | // Author: wxWidgets team |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | /** | |
10 | @class wxControl | |
7c913512 | 11 | |
cdbcf4c2 | 12 | This is the base class for a control or "widget". |
7c913512 | 13 | |
23324ae1 FM |
14 | A control is generally a small window which processes user input and/or |
15 | displays one or more item of data. | |
7c913512 | 16 | |
23324ae1 FM |
17 | @library{wxcore} |
18 | @category{ctrl} | |
7c913512 | 19 | |
e54c96f1 | 20 | @see wxValidator |
23324ae1 FM |
21 | */ |
22 | class wxControl : public wxWindow | |
23 | { | |
24 | public: | |
25 | /** | |
bd0812fe BP |
26 | Simulates the effect of the user issuing a command to the item. |
27 | ||
28 | @see wxCommandEvent | |
23324ae1 FM |
29 | */ |
30 | void Command(wxCommandEvent& event); | |
31 | ||
32 | /** | |
33 | Returns the control's text. | |
bd0812fe BP |
34 | |
35 | @note The returned string contains mnemonics ("&" characters) if it has | |
36 | any, use GetLabelText() if they are undesired. | |
23324ae1 | 37 | */ |
328f5751 | 38 | wxString GetLabel() const; |
23324ae1 | 39 | |
23324ae1 | 40 | /** |
bd0812fe | 41 | Returns the control's label without mnemonics. |
23324ae1 FM |
42 | */ |
43 | const wxString GetLabelText(); | |
bd0812fe BP |
44 | |
45 | /** | |
46 | Returns the given @a label string without mnemonics. | |
47 | */ | |
48 | static wxString GetLabelText(const wxString& label); | |
23324ae1 FM |
49 | |
50 | /** | |
51 | Sets the item's text. | |
bd0812fe BP |
52 | |
53 | Any "&" characters in the @a label are special and indicate that the | |
54 | following character is a mnemonic for this control and can be used to | |
55 | activate it from the keyboard (typically by using @e Alt key in | |
56 | combination with it). To insert a literal ampersand character, you need | |
57 | to double it, i.e. use "&&". | |
23324ae1 FM |
58 | */ |
59 | void SetLabel(const wxString& label); | |
60 | }; | |
e54c96f1 | 61 |