1 \section{\class{wxUpdateUIEvent
}}\label{wxupdateuievent
}
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.
6 \wxheading{Derived from
}
8 \helpref{wxEvent
}{wxevent
}\\
9 \helpref{wxObject
}{wxobject
}
11 \wxheading{Event table macros
}
13 To process an update event, use these event handler macros to direct input to member
14 functions that take a wxUpdateUIEvent argument.
17 \begin{twocollist
}\itemsep=
0pt
18 \twocolitem{{\bf EVT
\_UPDATE\_UI(id, func)
}}{Process a wxEVT
\_UPDATE\_UI event.
}
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.
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.
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.
39 These events will work for popup menus as well as menubars. Just before a menu is popped
40 up,
\helpref{wxMenu::UpdateUI
}{wxmenuupdateui
} is called to process any UI events for
41 the window that owns the menu.
45 \helpref{Event handling overview
}{eventhandlingoverview
}
47 \latexignore{\rtfignore{\wxheading{Members
}}}
49 \membersection{wxUpdateUIEvent::wxUpdateUIEvent
}
51 \func{}{wxUpdateUIEvent
}{\param{wxWindowID
}{commandId =
0}}
55 \membersection{wxUpdateUIEvent::m
\_checked}
57 \member{bool
}{m
\_checked}
59 TRUE if the element should be checked, FALSE otherwise.
61 \membersection{wxUpdateUIEvent::m
\_enabled}
63 \member{bool
}{m
\_checked}
65 TRUE if the element should be enabled, FALSE otherwise.
67 \membersection{wxUpdateUIEvent::m
\_setChecked}
69 \member{bool
}{m
\_setChecked}
71 TRUE if the application has set the
{\bf m
\_checked} member.
73 \membersection{wxUpdateUIEvent::m
\_setEnabled}
75 \member{bool
}{m
\_setEnabled}
77 TRUE if the application has set the
{\bf m
\_enabled} member.
79 \membersection{wxUpdateUIEvent::m
\_setText}
81 \member{bool
}{m
\_setText}
83 TRUE if the application has set the
{\bf m
\_text} member.
85 \membersection{wxUpdateUIEvent::m
\_text}
87 \member{wxString
}{m
\_text}
89 Holds the text with which the the application wishes to
90 update the UI element.
92 \membersection{wxUpdateUIEvent::Check
}\label{wxupdateuieventcheck
}
94 \func{void
}{Check
}{\param{bool
}{ check
}}
96 Check or uncheck the UI element.
98 \membersection{wxUpdateUIEvent::Enable
}\label{wxupdateuieventenable
}
100 \func{void
}{Enable
}{\param{bool
}{ enable
}}
102 Enable or disable the UI element.
104 \membersection{wxUpdateUIEvent::GetChecked
}\label{wxupdateuieventgetchecked
}
106 \constfunc{bool
}{GetChecked
}{\void}
108 Returns TRUE if the UI element should be checked.
110 \membersection{wxUpdateUIEvent::GetEnabled
}\label{wxupdateuieventgetenabled
}
112 \constfunc{bool
}{GetEnabled
}{\void}
114 Returns TRUE if the UI element should be enabled.
116 \membersection{wxUpdateUIEvent::GetSetChecked
}\label{wxupdateuieventgetsetchecked
}
118 \constfunc{bool
}{GetSetChecked
}{\void}
120 Returns TRUE if the application has called
{\bf SetChecked
}. For wxWindows internal use only.
122 \membersection{wxUpdateUIEvent::GetSetEnabled
}\label{wxupdateuieventgetsetenabled
}
124 \constfunc{bool
}{GetSetEnabled
}{\void}
126 Returns TRUE if the application has called
{\bf SetEnabled
}. For wxWindows internal use only.
128 \membersection{wxUpdateUIEvent::GetSetText
}\label{wxupdateuieventgetsettext
}
130 \constfunc{bool
}{GetSetText
}{\void}
132 Returns TRUE if the application has called
{\bf SetText
}. For wxWindows internal use only.
134 \membersection{wxUpdateUIEvent::GetText
}\label{wxupdateuieventgettext
}
136 \constfunc{wxString
}{GetText
}{\void}
138 Returns the text that should be set for the UI element.
140 \membersection{wxUpdateUIEvent::SetText
}\label{wxupdateuieventsettext
}
142 \func{void
}{SetText
}{\param{const wxString\&
}{ text
}}
144 Sets the text for this UI element.