]> git.saurik.com Git - wxWidgets.git/blame - interface/control.h
use wxWANTS_CHARS to allow arrows to work inside the control
[wxWidgets.git] / interface / control.h
CommitLineData
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
11 @wxheader{control.h}
7c913512 12
cdbcf4c2 13 This is the base class for a control or "widget".
7c913512 14
23324ae1
FM
15 A control is generally a small window which processes user input and/or
16 displays one or more item of data.
7c913512 17
23324ae1
FM
18 @library{wxcore}
19 @category{ctrl}
20 @appearance{control.png}
7c913512 21
e54c96f1 22 @see wxValidator
23324ae1
FM
23*/
24class wxControl : public wxWindow
25{
26public:
27 /**
28 Simulates the effect of the user issuing a command to the item. See
29 wxCommandEvent.
30 */
31 void Command(wxCommandEvent& event);
32
33 /**
34 Returns the control's text.
23324ae1
FM
35 Note that the returned string contains the mnemonics (@c characters) if
36 any, use GetLabelText() if they are
37 undesired.
38 */
328f5751 39 wxString GetLabel() const;
23324ae1
FM
40
41 //@{
42 /**
4cc4bfaf 43 Returns the control's label, or the given @a label string for the static
23324ae1
FM
44 version, without the mnemonics characters.
45 */
46 const wxString GetLabelText();
328f5751 47 const static wxString GetLabelText(const wxString& label);
23324ae1
FM
48 //@}
49
50 /**
51 Sets the item's text.
4cc4bfaf 52 The @c characters in the @a label are special and indicate that the
23324ae1
FM
53 following character is a mnemonic for this control and can be used to activate
54 it from the keyboard (typically by using @e Alt key in combination with
7c913512 55 it). To insert a literal ampersand character, you need to double it, i.e. use
23324ae1
FM
56 @c "".
57 */
58 void SetLabel(const wxString& label);
59};
e54c96f1 60