/////////////////////////////////////////////////////////////////////////////\r
\r
/**\r
+ @page overview_events Events and Event Handling\r
\r
-@page overview_eventhandling Event Handling\r
+ Related classes: wxEvtHandler, wxWindow, wxEvent\r
\r
-Classes: wxEvtHandler, wxWindow, wxEvent\r
-\r
-@li @ref overview_eventhandling_introduction\r
-@li @ref overview_eventhandling_eventtables\r
-@li @ref overview_eventhandling_connect\r
-@li @ref overview_eventhandling_processing\r
-@li @ref overview_eventhandling_propagation\r
-@li @ref overview_eventhandling_virtual\r
-@li @ref overview_eventhandling_prog\r
-@li @ref overview_eventhandling_pluggable\r
-@li @ref overview_eventhandling_winid\r
-@li @ref overview_eventhandling_custom\r
-@li @ref overview_eventhandling_macros\r
+@li @ref overview_events_introduction\r
+@li @ref overview_events_eventhandling\r
+@li @ref overview_events_processing\r
+@li @ref overview_events_custom\r
+@li @ref overview_events_misc\r
\r
\r
<hr>\r
\r
\r
-@section overview_eventhandling_introduction Introduction\r
+@section overview_events_introduction Introduction to Events\r
+\r
+Like with all the other GUI frameworks, the control of flow in wxWidgets\r
+applications is event-based: the program normally performs most of its actions\r
+in response to the events generated by the user. These events can be triggered\r
+by using the input devices (such as keyboard, mouse, joystick) directly or,\r
+more commonly, by a standard control which synthesizes such input events into\r
+higher level events: for example, a wxButton can generate a click event when\r
+the user presses the left mouse button on it and then releases it without\r
+pressing @c Esc in the meanwhile. There are also events which don't directly\r
+correspond to the user actions, such as wxTimerEvent or wxSocketEvent.\r
+\r
+But in all cases wxWidgets represents these events in a uniform way and allows\r
+you to handle them in the same way wherever they originate from. And while the\r
+events are normally generated by wxWidgets itself, you can also do this, which\r
+is especially useful when using custom events (see @ref overview_events_custom).\r
+\r
+To be more precise, each event is described by:\r
+ - <em>Event type</em>: this is simply a value of type wxEventType which\r
+ uniquely identifies the type of the event. For example, clicking on a button,\r
+ selecting an item from a list box and pressing a key on the keyboard all\r
+ generate events with different event types.\r
+ - <em>Event class</em> carried by the event: each event has some information\r
+ associated with it and this data is represented by an object of a class\r
+ derived from wxEvent. Events of different types can use the same event class,\r
+ for example both button click and listbox selection events use wxCommandEvent\r
+ class (as do all the other simple control events), but the key press event\r
+ uses wxKeyEvent as the information associated with it is different.\r
+ - <em>Event source</em>: wxEvent stores the object which generated the event\r
+ and, for windows, its identifier (see @ref overview_events_winid). As it is\r
+ common to have more than one object generating events of the same type (e.g. a\r
+ typical window contains several buttons, all generating the same button click\r
+ event), checking the event source object or its id allows to distinguish\r
+ between them.\r
+\r
+\r
+@section overview_events_eventhandling Event Handling\r
\r
There are two principal ways to handle events in wxWidgets. One of them uses\r
<em>event table</em> macros and allows you to define the connection between events\r
\r
But before you make this choice, let us discuss these two ways in more\r
detail. In the next section we provide a short introduction to handling the\r
-events using the event tables. Please see @ref overview_eventhandling_connect\r
+events using the event tables. Please see @ref overview_events_connect\r
for the discussion of Connect().\r
\r
-@section overview_eventhandling_eventtables Event Handling with Event Tables\r
+@subsection overview_events_eventtables Event Handling with Event Tables\r
\r
To use an <em>event table</em> you must first decide in which class you wish to\r
handle the events. The only requirement imposed by wxWidgets is that this class\r
events.\r
\r
\r
-@section overview_eventhandling_connect Dynamic Event Handling\r
+@subsection overview_events_connect Dynamic Event Handling\r
\r
As with the event tables, decide in which class you intend to\r
handle the events first and, as before, this class must derive from\r
in simple situations where this extra flexibility is not needed.\r
\r
\r
-@section overview_eventhandling_processing How Events are Processed\r
+@section overview_events_processing How Events are Processed\r
\r
The previous sections explain how to define event handlers but don't address\r
the question of how exactly wxWidgets finds the handler to call for the\r
The event is passed to the next event handler, if any, in the event handler\r
chain, i.e., the steps (1) to (4) are done for it. This chain can be formed\r
using wxEvtHandler::SetNextHandler():\r
- @image html overview_eventhandling_chain.png\r
+ @image html overview_events_chain.png\r
(referring to the image, if @c A->ProcessEvent is called and it doesn't handle\r
the event, @c B->ProcessEvent will be called and so on...).\r
In the case of wxWindow you can build a stack (implemented using wxEvtHandler\r
double-linked list) using wxWindow::PushEventHandler():\r
- @image html overview_eventhandling_winstack.png\r
+ @image html overview_events_winstack.png\r
(referring to the image, if @c W->ProcessEvent is called, it immediately calls\r
@c A->ProcessEvent; if nor @c A nor @c B handle the event, then the wxWindow\r
itself is used - i.e. the dynamically connected event handlers and static\r
document or document manager classes\r
\r
\r
-@section overview_eventhandling_propagation How Events Propagate Upwards\r
+@subsection overview_events_propagation How Events Propagate Upwards\r
\r
-As mentioned in the previous section, the events of the classes deriving from\r
-wxCommandEvent are propagated by default to the parent window if they are not\r
-processed in this window itself. But although by default only the command\r
-events are propagated like this, other events can be propagated as well because\r
-the event handling code uses wxEvent::ShouldPropagate() to check whether an\r
-event should be propagated. It is also possible to propagate the event only a\r
-limited number of times and not until it is processed (or a top level parent\r
-window is reached).\r
+As mentioned above, the events of the classes deriving from wxCommandEvent are\r
+propagated by default to the parent window if they are not processed in this\r
+window itself. But although by default only the command events are propagated\r
+like this, other events can be propagated as well because the event handling\r
+code uses wxEvent::ShouldPropagate() to check whether an event should be\r
+propagated. It is also possible to propagate the event only a limited number of\r
+times and not until it is processed (or a top level parent window is reached).\r
\r
Finally, there is another additional complication (which, in fact, simplifies\r
life of wxWidgets programmers significantly): when propagating the command\r
all events (or any selection of them) to the parent window.\r
\r
\r
-@section overview_eventhandling_virtual Event Handlers vs Virtual Methods\r
-\r
-It may be noted that wxWidgets' event processing system implements something\r
-close to virtual methods in normal C++ in spirit: both of these mechanisms\r
-allow you to alter the behaviour of the base class by defining the event handling\r
-functions in the derived classes.\r
-\r
-There is however an important difference between the two mechanisms when you\r
-want to invoke the default behaviour, as implemented by the base class, from a\r
-derived class handler. With the virtual functions, you need to call the base\r
-class function directly and you can do it either in the beginning of the\r
-derived class handler function (to post-process the event) or at its end (to\r
-pre-process the event). With the event handlers, you only have the option of\r
-pre-processing the events and in order to still let the default behaviour\r
-happen you must call wxEvent::Skip() and @em not call the base class event\r
-handler directly. In fact, the event handler probably doesn't even exist in the\r
-base class as the default behaviour is often implemented in platform-specific\r
-code by the underlying toolkit or OS itself. But even if it does exist at\r
-wxWidgets level, it should never be called directly as the event handlers are\r
-not part of wxWidgets API and should never be called directly.\r
-\r
-Finally, please notice that the event handlers themselves shouldn't be virtual.\r
-They should always be non-virtual and usually private (as there is no need to\r
-make them public) methods of a wxEvtHandler-derived class.\r
-\r
-\r
-@section overview_eventhandling_prog User Generated Events vs Programmatically Generated Events\r
-\r
-While generically wxEvents can be generated both by user\r
-actions (e.g., resize of a wxWindow) and by calls to functions\r
-(e.g., wxWindow::SetSize), wxWidgets controls normally send wxCommandEvent-derived\r
-events only for the user-generated events. The only @b exceptions to this rule are:\r
+@section overview_events_custom Custom Event Summary\r
\r
-@li wxNotebook::AddPage: No event-free alternatives\r
-@li wxNotebook::AdvanceSelection: No event-free alternatives\r
-@li wxNotebook::DeletePage: No event-free alternatives\r
-@li wxNotebook::SetSelection: Use wxNotebook::ChangeSelection instead, as\r
- wxNotebook::SetSelection is deprecated\r
-@li wxTreeCtrl::Delete: No event-free alternatives\r
-@li wxTreeCtrl::DeleteAllItems: No event-free alternatives\r
-@li wxTreeCtrl::EditLabel: No event-free alternatives\r
-@li All wxTextCtrl methods\r
-\r
-wxTextCtrl::ChangeValue can be used instead of wxTextCtrl::SetValue but the other\r
-functions, such as wxTextCtrl::Replace or wxTextCtrl::WriteText don't have event-free\r
-equivalents.\r
-\r
-\r
-\r
-@section overview_eventhandling_pluggable Pluggable Event Handlers\r
-\r
-In fact, you don't have to derive a new class from a window class\r
-if you don't want to. You can derive a new class from wxEvtHandler instead,\r
-defining the appropriate event table, and then call wxWindow::SetEventHandler\r
-(or, preferably, wxWindow::PushEventHandler) to make this\r
-event handler the object that responds to events. This way, you can avoid\r
-a lot of class derivation, and use instances of the same event handler class (but different\r
-objects as the same event handler object shouldn't be used more than once) to\r
-handle events from instances of different widget classes.\r
-\r
-If you ever have to call a window's event handler\r
-manually, use the GetEventHandler function to retrieve the window's event handler and use that\r
-to call the member function. By default, GetEventHandler returns a pointer to the window itself\r
-unless an application has redirected event handling using SetEventHandler or PushEventHandler.\r
-\r
-One use of PushEventHandler is to temporarily or permanently change the\r
-behaviour of the GUI. For example, you might want to invoke a dialog editor\r
-in your application that changes aspects of dialog boxes. You can\r
-grab all the input for an existing dialog box, and edit it 'in situ',\r
-before restoring its behaviour to normal. So even if the application\r
-has derived new classes to customize behaviour, your utility can indulge\r
-in a spot of body-snatching. It could be a useful technique for on-line\r
-tutorials, too, where you take a user through a serious of steps and\r
-don't want them to diverge from the lesson. Here, you can examine the events\r
-coming from buttons and windows, and if acceptable, pass them through to\r
-the original event handler. Use PushEventHandler/PopEventHandler\r
-to form a chain of event handlers, where each handler processes a different\r
-range of events independently from the other handlers.\r
-\r
-\r
-\r
-@section overview_eventhandling_winid Window Identifiers\r
-\r
-Window identifiers are integers, and are used to\r
-uniquely determine window identity in the event system (though you can use it\r
-for other purposes). In fact, identifiers do not need to be unique\r
-across your entire application as long they are unique within the\r
-particular context you're interested in, such as a frame and its children. You\r
-may use the @c wxID_OK identifier, for example, on any number of dialogs\r
-as long as you don't have several within the same dialog.\r
-\r
-If you pass @c wxID_ANY to a window constructor, an identifier will be\r
-generated for you automatically by wxWidgets. This is useful when you don't\r
-care about the exact identifier either because you're not going to process the\r
-events from the control being created or because you process the events\r
-from all controls in one place (in which case you should specify @c wxID_ANY\r
-in the event table or wxEvtHandler::Connect call\r
-as well). The automatically generated identifiers are always negative and so\r
-will never conflict with the user-specified identifiers which must be always\r
-positive.\r
-\r
-See @ref page_stdevtid for the list of standard identifiers available.\r
-You can use wxID_HIGHEST to determine the number above which it is safe to\r
-define your own identifiers. Or, you can use identifiers below wxID_LOWEST.\r
-Finally, you can allocate identifiers dynamically using wxNewId() function too.\r
-If you use wxNewId() consistently in your application, you can be sure that\r
-your identifiers don't conflict accidentally.\r
-\r
-\r
-@section overview_eventhandling_custom Custom Event Summary\r
-\r
-@subsection overview_eventhandling_custom_general General approach\r
+@subsection overview_events_custom_general General approach\r
\r
Since version 2.2.x of wxWidgets, each event type is identified by an ID\r
given to the event type @e at runtime that makes it possible to add\r
defining and working with the custom event types.\r
\r
\r
-@subsection overview_eventhandling_custom_existing Using Existing Event Classes\r
+@subsection overview_events_custom_existing Using Existing Event Classes\r
\r
If you just want to use a wxCommandEvent with a new event type, use\r
one of the generic event table macros listed below, without having to define a\r
@endcode\r
\r
\r
-@subsection overview_eventhandling_custom_generic Generic Event Table Macros\r
+@subsection overview_events_custom_generic Generic Event Table Macros\r
\r
@beginTable\r
@row2col{EVT_CUSTOM(event\, id\, func),\r
@endTable\r
\r
\r
-@subsection overview_eventhandling_custom_ownclass Defining Your Own Event Class\r
+@subsection overview_events_custom_ownclass Defining Your Own Event Class\r
\r
Under certain circumstances, you must define your own event\r
class e.g., for sending more complex data from one place to another. Apart\r
@endcode\r
\r
\r
-@section overview_eventhandling_macros Event Handling Summary\r
+@section overview_events_misc Miscellaneous Notes\r
+\r
+@subsection overview_events_virtual Event Handlers vs Virtual Methods\r
+\r
+It may be noted that wxWidgets' event processing system implements something\r
+close to virtual methods in normal C++ in spirit: both of these mechanisms\r
+allow you to alter the behaviour of the base class by defining the event handling\r
+functions in the derived classes.\r
+\r
+There is however an important difference between the two mechanisms when you\r
+want to invoke the default behaviour, as implemented by the base class, from a\r
+derived class handler. With the virtual functions, you need to call the base\r
+class function directly and you can do it either in the beginning of the\r
+derived class handler function (to post-process the event) or at its end (to\r
+pre-process the event). With the event handlers, you only have the option of\r
+pre-processing the events and in order to still let the default behaviour\r
+happen you must call wxEvent::Skip() and @em not call the base class event\r
+handler directly. In fact, the event handler probably doesn't even exist in the\r
+base class as the default behaviour is often implemented in platform-specific\r
+code by the underlying toolkit or OS itself. But even if it does exist at\r
+wxWidgets level, it should never be called directly as the event handlers are\r
+not part of wxWidgets API and should never be called directly.\r
+\r
+Finally, please notice that the event handlers themselves shouldn't be virtual.\r
+They should always be non-virtual and usually private (as there is no need to\r
+make them public) methods of a wxEvtHandler-derived class.\r
+\r
+\r
+@subsection overview_events_prog User Generated Events vs Programmatically Generated Events\r
+\r
+While generically wxEvents can be generated both by user\r
+actions (e.g., resize of a wxWindow) and by calls to functions\r
+(e.g., wxWindow::SetSize), wxWidgets controls normally send wxCommandEvent-derived\r
+events only for the user-generated events. The only @b exceptions to this rule are:\r
+\r
+@li wxNotebook::AddPage: No event-free alternatives\r
+@li wxNotebook::AdvanceSelection: No event-free alternatives\r
+@li wxNotebook::DeletePage: No event-free alternatives\r
+@li wxNotebook::SetSelection: Use wxNotebook::ChangeSelection instead, as\r
+ wxNotebook::SetSelection is deprecated\r
+@li wxTreeCtrl::Delete: No event-free alternatives\r
+@li wxTreeCtrl::DeleteAllItems: No event-free alternatives\r
+@li wxTreeCtrl::EditLabel: No event-free alternatives\r
+@li All wxTextCtrl methods\r
+\r
+wxTextCtrl::ChangeValue can be used instead of wxTextCtrl::SetValue but the other\r
+functions, such as wxTextCtrl::Replace or wxTextCtrl::WriteText don't have event-free\r
+equivalents.\r
+\r
+\r
+\r
+@subsection overview_events_pluggable Pluggable Event Handlers\r
+\r
+<em>TODO: Probably deprecated, Connect() provides a better way to do this</em>\r
+\r
+In fact, you don't have to derive a new class from a window class\r
+if you don't want to. You can derive a new class from wxEvtHandler instead,\r
+defining the appropriate event table, and then call wxWindow::SetEventHandler\r
+(or, preferably, wxWindow::PushEventHandler) to make this\r
+event handler the object that responds to events. This way, you can avoid\r
+a lot of class derivation, and use instances of the same event handler class (but different\r
+objects as the same event handler object shouldn't be used more than once) to\r
+handle events from instances of different widget classes.\r
+\r
+If you ever have to call a window's event handler\r
+manually, use the GetEventHandler function to retrieve the window's event handler and use that\r
+to call the member function. By default, GetEventHandler returns a pointer to the window itself\r
+unless an application has redirected event handling using SetEventHandler or PushEventHandler.\r
+\r
+One use of PushEventHandler is to temporarily or permanently change the\r
+behaviour of the GUI. For example, you might want to invoke a dialog editor\r
+in your application that changes aspects of dialog boxes. You can\r
+grab all the input for an existing dialog box, and edit it 'in situ',\r
+before restoring its behaviour to normal. So even if the application\r
+has derived new classes to customize behaviour, your utility can indulge\r
+in a spot of body-snatching. It could be a useful technique for on-line\r
+tutorials, too, where you take a user through a serious of steps and\r
+don't want them to diverge from the lesson. Here, you can examine the events\r
+coming from buttons and windows, and if acceptable, pass them through to\r
+the original event handler. Use PushEventHandler/PopEventHandler\r
+to form a chain of event handlers, where each handler processes a different\r
+range of events independently from the other handlers.\r
+\r
+\r
+\r
+@subsection overview_events_winid Window Identifiers\r
+\r
+Window identifiers are integers, and are used to\r
+uniquely determine window identity in the event system (though you can use it\r
+for other purposes). In fact, identifiers do not need to be unique\r
+across your entire application as long they are unique within the\r
+particular context you're interested in, such as a frame and its children. You\r
+may use the @c wxID_OK identifier, for example, on any number of dialogs\r
+as long as you don't have several within the same dialog.\r
+\r
+If you pass @c wxID_ANY to a window constructor, an identifier will be\r
+generated for you automatically by wxWidgets. This is useful when you don't\r
+care about the exact identifier either because you're not going to process the\r
+events from the control being created or because you process the events\r
+from all controls in one place (in which case you should specify @c wxID_ANY\r
+in the event table or wxEvtHandler::Connect call\r
+as well). The automatically generated identifiers are always negative and so\r
+will never conflict with the user-specified identifiers which must be always\r
+positive.\r
+\r
+See @ref page_stdevtid for the list of standard identifiers available.\r
+You can use wxID_HIGHEST to determine the number above which it is safe to\r
+define your own identifiers. Or, you can use identifiers below wxID_LOWEST.\r
+Finally, you can allocate identifiers dynamically using wxNewId() function too.\r
+If you use wxNewId() consistently in your application, you can be sure that\r
+your identifiers don't conflict accidentally.\r
+\r
+\r
+@subsection overview_events_macros Event Handling Summary\r
\r
For the full list of event classes, please see the\r
@ref group_class_events "event classes group page".\r
\r
\r
-@todo For all controls, state clearly when calling a member function results in\r
- an event being generated and when it doesn't (possibly updating also the\r
- 'Events generated by the user versus programmatically-generated events'\r
- paragraph of the 'Event Handling Overview' with the list of the functions\r
- that break the rule).\r
-\r
*/\r
\r
wxEvent used to be a multipurpose event object, and is an abstract base class
for other event classes (see below).
- For more information about events, see the @ref overview_eventhandling overview.
+ For more information about events, see the @ref overview_events overview.
@beginWxPerlOnly
In wxPerl custom event classes should be derived from
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling, wxEvtHandler
+ @see @ref overview_events_processing, wxEvtHandler
*/
class wxEventBlocker : public wxEvtHandler
{
@library{wxbase}
@category{events}
- @see @ref overview_eventhandling
+ @see @ref overview_events_processing
*/
class wxEvtHandler : public wxObject
{
Do make sure to specify the correct @a eventSink when connecting to an
event of a different object.
- See @ref overview_eventhandling_connect for more detailed explanation
+ See @ref overview_events_connect for more detailed explanation
of this function and the @ref page_samples_event sample for usage
examples.
The event handler to be set as the next handler.
Cannot be @NULL.
- @see @ref overview_eventhandling_processing
+ @see @ref overview_events_processing
*/
virtual void SetNextHandler(wxEvtHandler* handler);
The event handler to be set as the previous handler.
Cannot be @NULL.
- @see @ref overview_eventhandling_processing
+ @see @ref overview_events_processing
*/
virtual void SetPreviousHandler(wxEvtHandler* handler);
@library{wxcore}
@category{events}
- @see wxScrollEvent, @ref overview_eventhandling
+ @see wxScrollEvent, @ref overview_events
*/
class wxScrollWinEvent : public wxEvent
{
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling
+ @see @ref overview_events
*/
class wxSysColourChangedEvent : public wxEvent
{
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling, wxWindowDestroyEvent
+ @see @ref overview_events, wxWindowDestroyEvent
*/
class wxWindowCreateEvent : public wxCommandEvent
{
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling
+ @see @ref overview_events
*/
class wxPaintEvent : public wxEvent
{
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling, wxTopLevelWindow::Maximize,
+ @see @ref overview_events, wxTopLevelWindow::Maximize,
wxTopLevelWindow::IsMaximized
*/
class wxMaximizeEvent : public wxEvent
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling
+ @see @ref overview_events
*/
class wxUpdateUIEvent : public wxCommandEvent
{
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling
+ @see @ref overview_events
*/
class wxDropFilesEvent : public wxEvent
{
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling, wxApp::IsActive
+ @see @ref overview_events, wxApp::IsActive
*/
class wxActivateEvent : public wxEvent
{
@library{wxcore}
@category{events}
- @see wxCommandEvent, @ref overview_eventhandling
+ @see wxCommandEvent, @ref overview_events
*/
class wxContextMenuEvent : public wxCommandEvent
{
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling
+ @see @ref overview_events
*/
class wxEraseEvent : public wxEvent
{
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling
+ @see @ref overview_events
*/
class wxFocusEvent : public wxEvent
{
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling
+ @see @ref overview_events
*/
class wxChildFocusEvent : public wxCommandEvent
{
@library{wxcore}
@category{events}
- @see wxMouseCaptureChangedEvent, @ref overview_eventhandling,
+ @see wxMouseCaptureChangedEvent, @ref overview_events,
wxWindow::CaptureMouse, wxWindow::ReleaseMouse, wxWindow::GetCapture
*/
class wxMouseCaptureLostEvent : public wxEvent
@library{wxcore}
@category{events}
- @see wxContextHelp, wxDialog, @ref overview_eventhandling
+ @see wxContextHelp, wxDialog, @ref overview_events
*/
class wxHelpEvent : public wxCommandEvent
{
@library{wxcore}
@category{events}
- @see wxScrollBar, wxSlider, wxSpinButton, wxScrollWinEvent, @ref overview_eventhandling
+ @see wxScrollBar, wxSlider, wxSpinButton, wxScrollWinEvent, @ref overview_events
*/
class wxScrollEvent : public wxCommandEvent
{
@library{wxbase}
@category{events}
- @see @ref overview_eventhandling, wxUpdateUIEvent, wxWindow::OnInternalIdle
+ @see @ref overview_events, wxUpdateUIEvent, wxWindow::OnInternalIdle
*/
class wxIdleEvent : public wxEvent
{
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling
+ @see @ref overview_events
*/
class wxInitDialogEvent : public wxEvent
{
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling, wxWindowCreateEvent
+ @see @ref overview_events, wxWindowCreateEvent
*/
class wxWindowDestroyEvent : public wxCommandEvent
{
@library{wxcore}
@category{events}
- @see wxMouseCaptureLostEvent, @ref overview_eventhandling,
+ @see wxMouseCaptureLostEvent, @ref overview_events,
wxWindow::CaptureMouse, wxWindow::ReleaseMouse, wxWindow::GetCapture
*/
class wxMouseCaptureChangedEvent : public wxEvent
@library{wxcore}
@category{events}
- @see wxCommandEvent, @ref overview_eventhandling
+ @see wxCommandEvent, @ref overview_events
*/
class wxMenuEvent : public wxEvent
{
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling, wxWindow::Show,
+ @see @ref overview_events, wxWindow::Show,
wxWindow::IsShown
*/
@library{wxcore}
@category{events}
- @see @ref overview_eventhandling, wxTopLevelWindow::Iconize,
+ @see @ref overview_events, wxTopLevelWindow::Iconize,
wxTopLevelWindow::IsIconized
*/
class wxIconizeEvent : public wxEvent
@library{wxcore}
@category{events}
- @see wxPoint, @ref overview_eventhandling
+ @see wxPoint, @ref overview_events
*/
class wxMoveEvent : public wxEvent
{
@library{wxcore}
@category{events}
- @see wxSize, @ref overview_eventhandling
+ @see wxSize, @ref overview_events
*/
class wxSizeEvent : public wxEvent
{
//@{
/**
- A special event type usually used to indicate that some wxEvent has yet
- no type assigned.
-*/
-wxEventType wxEVT_NULL;
+ A value uniquely identifying the type of the event.
+
+ The values of this type should only be created using wxNewEventType().
-/**
- Each wxEvent-derived class has an @e event-type associated.
See the macro DEFINE_EVENT_TYPE() for more info.
- @see @ref overview_eventhandling_custom
+ @see @ref overview_events_introduction
*/
typedef int wxEventType;
+/**
+ A special event type usually used to indicate that some wxEvent has yet
+ no type assigned.
+*/
+wxEventType wxEVT_NULL;
+
/**
Initializes a new event type using wxNewEventType().
*/
and the END_EVENT_TABLE() macros, plus some additional @c EVT_xxx macro
to capture events.
- @see @ref overview_eventhandling_eventtables
+ @see @ref overview_events_eventtables
*/
#define DECLARE_EVENT_TABLE()
Use END_EVENT_TABLE() to terminate the event-declaration block.
- @see @ref overview_eventhandling_eventtables
+ @see @ref overview_events_eventtables
*/
#define BEGIN_EVENT_TABLE(theClass, baseClass)
Use BEGIN_EVENT_TABLE() to start the event-declaration block.
- @see @ref overview_eventhandling_eventtables
+ @see @ref overview_events_eventtables
*/
#define END_EVENT_TABLE()