]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/upduievt.tex
Motif and other mods
[wxWidgets.git] / docs / latex / wx / upduievt.tex
CommitLineData
a660d684
KB
1\section{\class{wxUpdateUIEvent}}\label{wxupdateuievent}
2
3This class is used for pseudo-events which are called by wxWindows
4to 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
13To process a menu event, use these event handler macros to direct input to member
14functions 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
23Without update UI events, an application has to work hard to check/uncheck, enable/disable,
24and set the text for elements such as menu items and toolbar buttons.
25The code for doing this has to be mixed up with the code that is invoked when
26an action is invoked for a menu item or button.
27
28With update UI events, you define an event handler to look at the state of
29the application and change UI elements accordingly. wxWindows will call your
30member functions in idle time, so you don't have to worry where to call this code.
31In addition to being a clearer and more declarative method, it also means you
32don't have to worry whether you're updating a toolbar or menubar identifier.
33The same handler can update a menu item and toolbar button, if the identifier is the same.
34
35Instead of directly manipulating the menu or button, you call functions in the event
36object, such as \helpref{wxUpdateUIEvent::Check}{wxupdateuieventcheck}. wxWindows
37will 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
49Constructor.
50
51\membersection{wxUpdateUIEvent::m\_checked}
52
53\member{bool}{m\_checked}
54
55TRUE if the element should be checked, FALSE otherwise.
56
57\membersection{wxUpdateUIEvent::m\_enabled}
58
59\member{bool}{m\_checked}
60
61TRUE if the element should be enabled, FALSE otherwise.
62
63\membersection{wxUpdateUIEvent::m\_setChecked}
64
65\member{bool}{m\_setChecked}
66
67TRUE if the application has set the {\bf m\_checked} member.
68
69\membersection{wxUpdateUIEvent::m\_setEnabled}
70
71\member{bool}{m\_setEnabled}
72
73TRUE if the application has set the {\bf m\_enabled} member.
74
75\membersection{wxUpdateUIEvent::m\_setText}
76
77\member{bool}{m\_setText}
78
79TRUE if the application has set the {\bf m\_text} member.
80
81\membersection{wxUpdateUIEvent::m\_text}
82
83\member{wxString}{m\_text}
84
85Holds the text with which the the application wishes to
86update the UI element.
87
88\membersection{wxUpdateUIEvent::Check}\label{wxupdateuieventcheck}
89
90\func{void}{Check}{\param{bool}{ check}}
91
92Check or uncheck the UI element.
93
94\membersection{wxUpdateUIEvent::Enable}\label{wxupdateuieventenable}
95
96\func{void}{Enable}{\param{bool}{ enable}}
97
98Enable or disable the UI element.
99
100\membersection{wxUpdateUIEvent::GetChecked}\label{wxupdateuieventgetchecked}
101
102\constfunc{bool}{GetChecked}{\void}
103
104Returns TRUE if the UI element should be checked.
105
106\membersection{wxUpdateUIEvent::GetEnabled}\label{wxupdateuieventgetenabled}
107
108\constfunc{bool}{GetEnabled}{\void}
109
110Returns TRUE if the UI element should be enabled.
111
112\membersection{wxUpdateUIEvent::GetSetChecked}\label{wxupdateuieventgetsetchecked}
113
114\constfunc{bool}{GetSetChecked}{\void}
115
116Returns 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
122Returns 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
128Returns 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
134Returns 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
140Sets the text for this UI element.
141