that it didn't handle the event in which case the search continues.
-# Static events table of the handlers bound using event table
macros is searched for this event handler. If this fails, the base
- class event table table is tried, and so on until no more tables
+ class event table is tried, and so on until no more tables
exist or an appropriate function was found. If a handler is found,
the same logic as in the previous step applies.
-# The search is applied down the entire chain of event handlers (usually the
more flexible as it also allows you to use ordinary functions and
arbitrary functors as event handlers. It is also less restrictive then
Connect() because you can use an arbitrary method as an event handler,
- where as Connect() requires a wxEvtHandler derived handler.
+ whereas Connect() requires a wxEvtHandler derived handler.
See @ref overview_events_bind for more detailed explanation
of this function and the @ref page_samples_event sample for usage
Notice that currently no translation is done for the presses of @c [, @c
\\, @c ], @c ^ and @c _ keys which might be mapped to ASCII values from 27
to 31.
+ Since version 2.9.2, the enum values @c WXK_CONTROL_A - @c WXK_CONTROL_Z
+ can be used instead of the non-descriptive constant values 1-26.
Finally, modifier keys only generate key events but no char events at all.
The modifiers keys are @c WXK_SHIFT, @c WXK_CONTROL, @c WXK_ALT and various
Process a @c wxEVT_KEY_UP event (any key has been released).
@event{EVT_CHAR(func)}
Process a @c wxEVT_CHAR event.
+ @event{EVT_CHAR_HOOK(func)}
+ Process a @c wxEVT_CHAR_HOOK event which is sent to the active
+ wxTopLevelWindow (i.e. the one containing the currently focused window)
+ or wxApp global object if there is no active window before any other
+ keyboard events are generated giving the parent window the opportunity
+ to intercept all the keyboard entry. If the event is handled, i.e. the
+ handler doesn't call wxEvent::Skip(), no further keyboard events are
+ generated. Notice that this event is not generated when the mouse is
+ captured as it is considered that the window which has the capture
+ should receive all the keyboard events too without allowing its parent
+ wxTopLevelWindow to interfere with their processing. Also please note
+ that currently this event is not generated by wxOSX/Cocoa port.
@endEventTable
@see wxKeyboardState
*/
wxWindowCreateEvent(wxWindow* win = NULL);
- /// Retutn the window being created.
+ /// Return the window being created.
wxWindow *GetWindow() const;
};
not sent when the window is restored to its original size after it had been
maximized, only a normal wxSizeEvent is generated in this case.
+ Currently this event is only generated in wxMSW, wxGTK, wxOSX/Cocoa and wxOS2
+ ports so portable programs should only rely on receiving @c wxEVT_SIZE and
+ not necessarily this event when the window is maximized.
+
@beginEventTable{wxMaximizeEvent}
@event{EVT_MAXIMIZE(func)}
Process a @c wxEVT_MAXIMIZE event.
For the menu events, this method indicates if the menu item just has become
checked or unchecked (and thus only makes sense for checkable menu items).
- Notice that this method can not be used with wxCheckListBox currently.
+ Notice that this method cannot be used with wxCheckListBox currently.
*/
bool IsChecked() const;
child if it loses it now and regains later.
Notice that child window is the direct child of the window receiving event.
- Use wxWindow::FindFocus() to retreive the window which is actually getting focus.
+ Use wxWindow::FindFocus() to retrieve the window which is actually getting focus.
@beginEventTable{wxChildFocusEvent}
@event{EVT_CHILD_FOCUS(func)}
/**
@class wxMouseCaptureLostEvent
- An mouse capture lost event is sent to a window that obtained mouse capture,
- which was subsequently loss due to "external" event, for example when a dialog
- box is shown or if another application captures the mouse.
+ A mouse capture lost event is sent to a window that had obtained mouse capture,
+ which was subsequently lost due to an "external" event (for example, when a dialog
+ box is shown or if another application captures the mouse).
- If this happens, this event is sent to all windows that are on capture stack
+ If this happens, this event is sent to all windows that are on the capture stack
(i.e. called CaptureMouse, but didn't call ReleaseMouse yet). The event is
not sent if the capture changes because of a call to CaptureMouse or
ReleaseMouse.
/**
@class wxThreadEvent
- This class adds some simple functionalities to wxCommandEvent coinceived
- for inter-threads communications.
+ This class adds some simple functionality to wxEvent to facilitate
+ inter-thread communication.
- This event is not natively emitted by any control/class: this is just
- an helper class for the user.
+ This event is not natively emitted by any control/class: it is just
+ a helper class for the user.
Its most important feature is the GetEventCategory() implementation which
- allows thread events to @b NOT be processed by wxEventLoopBase::YieldFor calls
+ allows thread events @b NOT to be processed by wxEventLoopBase::YieldFor calls
(unless the @c wxEVT_CATEGORY_THREAD is specified - which is never in wx code).
@library{wxcore}
@category{events,threading}
@see @ref overview_thread, wxEventLoopBase::YieldFor
+
+ @since 2.9.0
*/
-class wxThreadEvent : public wxCommandEvent
+class wxThreadEvent : public wxEvent
{
public:
/**
Constructor.
*/
- wxThreadEvent(wxEventType eventType = wxEVT_COMMAND_THREAD, int id = wxID_ANY);
+ wxThreadEvent(wxEventType eventType = wxEVT_THREAD, int id = wxID_ANY);
/**
Clones this event making sure that all internal members which use
*/
template<typename T>
T GetPayload() const;
+
+ /**
+ Returns extra information integer value.
+ */
+ long GetExtraLong() const;
+
+ /**
+ Returns stored integer value.
+ */
+ int GetInt() const;
+
+ /**
+ Returns stored string value.
+ */
+ wxString GetString() const;
+
+
+ /**
+ Sets the extra information value.
+ */
+ void SetExtraLong(long extraLong);
+
+ /**
+ Sets the integer value.
+ */
+ void SetInt(int intCommand);
+
+ /**
+ Sets the string value.
+ */
+ void SetString(const wxString& string);
};
*/
wxWindowDestroyEvent(wxWindow* win = NULL);
- /// Retutn the window being destroyed.
+ /// Return the window being destroyed.
wxWindow *GetWindow() const;
};
This event is mainly used by wxWidgets implementations.
A wxNavigationKeyEvent handler is automatically provided by wxWidgets
- when you make a class into a control container with the macro
- WX_DECLARE_CONTROL_CONTAINER.
+ when you enable keyboard navigation inside a window by inheriting it from
+ wxNavigationEnabled<>.
@beginEventTable{wxNavigationKeyEvent}
@event{EVT_NAVIGATION_KEY(func)}
Notice that the event is not triggered when the application is iconized
(minimized) or restored under wxMSW.
- Currently only wxMSW, wxGTK and wxOS2 generate such events.
-
@onlyfor{wxmsw,wxgtk,wxos2}
@beginEventTable{wxShowEvent}
wxEventType wxEVT_COMMAND_TOOL_ENTER;
wxEventType wxEVT_COMMAND_COMBOBOX_DROPDOWN;
wxEventType wxEVT_COMMAND_COMBOBOX_CLOSEUP;
-wxEventType wxEVT_COMMAND_THREAD;
+wxEventType wxEVT_THREAD;
wxEventType wxEVT_LEFT_DOWN;
wxEventType wxEVT_LEFT_UP;
wxEventType wxEVT_MIDDLE_DOWN;