]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/upduievt.tex
Various; wxRadioButton::GetValue corrected
[wxWidgets.git] / docs / latex / wx / upduievt.tex
1 \section{\class{wxUpdateUIEvent}}\label{wxupdateuievent}
2
3 This class is used for pseudo-events which are called by wxWindows
4 to give an application the chance to update various user interface elements.
5
6 \wxheading{Derived from}
7
8 \helpref{wxEvent}{wxevent}\\
9 \helpref{wxObject}{wxobject}
10
11 \wxheading{Event table macros}
12
13 To process a menu event, use these event handler macros to direct input to member
14 functions that take a wxUpdateUIEvent argument.
15
16 \twocolwidtha{7cm}
17 \begin{twocollist}\itemsep=0pt
18 \twocolitem{{\bf EVT\_UPDATE\_UI(id, func)}}{Process a wxEVT\_UPDATE\_UI event.}
19 \end{twocollist}%
20
21 \wxheading{Remarks}
22
23 Without update UI events, an application has to work hard to check/uncheck, enable/disable,
24 and set the text for elements such as menu items and toolbar buttons.
25 The code for doing this has to be mixed up with the code that is invoked when
26 an action is invoked for a menu item or button.
27
28 With update UI events, you define an event handler to look at the state of
29 the application and change UI elements accordingly. wxWindows will call your
30 member functions in idle time, so you don't have to worry where to call this code.
31 In addition to being a clearer and more declarative method, it also means you
32 don't have to worry whether you're updating a toolbar or menubar identifier.
33 The same handler can update a menu item and toolbar button, if the identifier is the same.
34
35 Instead of directly manipulating the menu or button, you call functions in the event
36 object, such as \helpref{wxUpdateUIEvent::Check}{wxupdateuieventcheck}. wxWindows
37 will determine whether such a call has been made, and which UI element to update.
38
39 \wxheading{See also}
40
41 \helpref{Event handling overview}{eventhandlingoverview}
42
43 \latexignore{\rtfignore{\wxheading{Members}}}
44
45 \membersection{wxUpdateUIEvent::wxUpdateUIEvent}
46
47 \func{}{wxUpdateUIEvent}{\param{wxWindowID }{commandId = 0}}
48
49 Constructor.
50
51 \membersection{wxUpdateUIEvent::m\_checked}
52
53 \member{bool}{m\_checked}
54
55 TRUE if the element should be checked, FALSE otherwise.
56
57 \membersection{wxUpdateUIEvent::m\_enabled}
58
59 \member{bool}{m\_checked}
60
61 TRUE if the element should be enabled, FALSE otherwise.
62
63 \membersection{wxUpdateUIEvent::m\_setChecked}
64
65 \member{bool}{m\_setChecked}
66
67 TRUE if the application has set the {\bf m\_checked} member.
68
69 \membersection{wxUpdateUIEvent::m\_setEnabled}
70
71 \member{bool}{m\_setEnabled}
72
73 TRUE if the application has set the {\bf m\_enabled} member.
74
75 \membersection{wxUpdateUIEvent::m\_setText}
76
77 \member{bool}{m\_setText}
78
79 TRUE if the application has set the {\bf m\_text} member.
80
81 \membersection{wxUpdateUIEvent::m\_text}
82
83 \member{wxString}{m\_text}
84
85 Holds the text with which the the application wishes to
86 update the UI element.
87
88 \membersection{wxUpdateUIEvent::Check}\label{wxupdateuieventcheck}
89
90 \func{void}{Check}{\param{bool}{ check}}
91
92 Check or uncheck the UI element.
93
94 \membersection{wxUpdateUIEvent::Enable}\label{wxupdateuieventenable}
95
96 \func{void}{Enable}{\param{bool}{ enable}}
97
98 Enable or disable the UI element.
99
100 \membersection{wxUpdateUIEvent::GetChecked}\label{wxupdateuieventgetchecked}
101
102 \constfunc{bool}{GetChecked}{\void}
103
104 Returns TRUE if the UI element should be checked.
105
106 \membersection{wxUpdateUIEvent::GetEnabled}\label{wxupdateuieventgetenabled}
107
108 \constfunc{bool}{GetEnabled}{\void}
109
110 Returns TRUE if the UI element should be enabled.
111
112 \membersection{wxUpdateUIEvent::GetSetChecked}\label{wxupdateuieventgetsetchecked}
113
114 \constfunc{bool}{GetSetChecked}{\void}
115
116 Returns TRUE if the application has called {\bf SetChecked}. For wxWindows internal use only.
117
118 \membersection{wxUpdateUIEvent::GetSetEnabled}\label{wxupdateuieventgetsetenabled}
119
120 \constfunc{bool}{GetSetEnabled}{\void}
121
122 Returns TRUE if the application has called {\bf SetEnabled}. For wxWindows internal use only.
123
124 \membersection{wxUpdateUIEvent::GetSetText}\label{wxupdateuieventgetsettext}
125
126 \constfunc{bool}{GetSetText}{\void}
127
128 Returns TRUE if the application has called {\bf SetText}. For wxWindows internal use only.
129
130 \membersection{wxUpdateUIEvent::GetText}\label{wxupdateuieventgettext}
131
132 \constfunc{wxString}{GetText}{\void}
133
134 Returns the text that should be set for the UI element.
135
136 \membersection{wxUpdateUIEvent::SetText}\label{wxupdateuieventsettext}
137
138 \func{void}{SetText}{\param{const wxString\&}{ text}}
139
140 Sets the text for this UI element.
141