]> git.saurik.com Git - wxWidgets.git/blame - interface/control.h
Mention wxDataViewTreeCtrl in wxTreeCtrl
[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}
7c913512 20
e54c96f1 21 @see wxValidator
23324ae1
FM
22*/
23class wxControl : public wxWindow
24{
25public:
26 /**
bd0812fe
BP
27 Simulates the effect of the user issuing a command to the item.
28
29 @see wxCommandEvent
23324ae1
FM
30 */
31 void Command(wxCommandEvent& event);
32
33 /**
34 Returns the control's text.
bd0812fe
BP
35
36 @note The returned string contains mnemonics ("&" characters) if it has
37 any, use GetLabelText() if they are undesired.
23324ae1 38 */
328f5751 39 wxString GetLabel() const;
23324ae1 40
23324ae1 41 /**
bd0812fe 42 Returns the control's label without mnemonics.
23324ae1
FM
43 */
44 const wxString GetLabelText();
bd0812fe
BP
45
46 /**
47 Returns the given @a label string without mnemonics.
48 */
49 static wxString GetLabelText(const wxString& label);
23324ae1
FM
50
51 /**
52 Sets the item's text.
bd0812fe
BP
53
54 Any "&" characters in the @a label are special and indicate that the
55 following character is a mnemonic for this control and can be used to
56 activate it from the keyboard (typically by using @e Alt key in
57 combination with it). To insert a literal ampersand character, you need
58 to double it, i.e. use "&&".
23324ae1
FM
59 */
60 void SetLabel(const wxString& label);
61};
e54c96f1 62