the chain until the event is processed or the chain is exhausted.
This function is called from ProcessEvent() and, in turn, calls
- TryThis() for each handler in turn. It is not virtual and so cannot be
+ TryBefore() and TryAfter(). It is not virtual and so cannot be
overridden but can, and should, be called to forward an event to
another handler instead of ProcessEvent() which would result in a
duplicate call to TryAfter(), e.g. resulting in all unprocessed events
*/
virtual bool TryBefore(wxEvent& event);
- /**
- Try to process the event in this event handler.
-
- This method is called from ProcessEventLocally() and thus, indirectly,
- from ProcessEvent(), please see the detailed description of the event
- processing logic there.
-
- It is currently @em not virtual and so may not be overridden.
-
- @since 2.9.1
-
- @param event
- Event to process.
- @return
- @true if this object itself defines a handler for this event and
- the handler didn't skip the event.
- */
- bool TryThis(wxEvent& event);
-
/**
Method called by ProcessEvent() as last resort.
+enum
+{
+ wxJOYSTICK1,
+ wxJOYSTICK2
+};
+
+// Which button is down?
+enum
+{
+ wxJOY_BUTTON_ANY = -1,
+ wxJOY_BUTTON1 = 1,
+ wxJOY_BUTTON2 = 2,
+ wxJOY_BUTTON3 = 4,
+ wxJOY_BUTTON4 = 8
+};
+
+
/**
@class wxJoystickEvent
/**
Returns the x, y position of the joystick event.
+
+ These coordinates are valid for all the events except wxEVT_JOY_ZMOVE.
*/
wxPoint GetPosition() const;
/**
Returns the z position of the joystick event.
+
+ This method can only be used for wxEVT_JOY_ZMOVE events.
*/
int GetZPosition() const;
(and especially the first one) increase the system load and so should be avoided
if possible.
- By default, idle events are sent to all windows (and also wxApp, as usual).
- If this is causing a significant overhead in your application, you can call
- wxIdleEvent::SetMode with the value wxIDLE_PROCESS_SPECIFIED, and set the
- wxWS_EX_PROCESS_IDLE extra window style for every window which should receive
- idle events.
+ By default, idle events are sent to all windows, including even the hidden
+ ones because they may be shown if some condition is met from their @c
+ wxEVT_IDLE (or related @c wxEVT_UPDATE_UI) handler. The children of hidden
+ windows do not receive idle events however as they can't change their state
+ in any way noticeable by the user. Finally, the global wxApp object also
+ receives these events, as usual, so it can be used for any global idle time
+ processing.
+
+ If sending idle events to all windows is causing a significant overhead in
+ your application, you can call wxIdleEvent::SetMode with the value
+ wxIDLE_PROCESS_SPECIFIED, and set the wxWS_EX_PROCESS_IDLE extra window
+ style for every window which should receive idle events, all the other ones
+ will not receive them in this case.
@beginEventTable{wxIdleEvent}
@event{EVT_IDLE(func)}
wxMenuEvent(wxEventType type = wxEVT_NULL, int id = 0, wxMenu* menu = NULL);
/**
- Returns the menu which is being opened or closed. This method should only be
- used with the @c OPEN and @c CLOSE events and even for them the
- returned pointer may be @NULL in some ports.
+ Returns the menu which is being opened or closed.
+
+ This method can only be used with the @c OPEN and @c CLOSE events.
+
+ The returned value is never @NULL in the ports implementing this
+ function, which currently includes all the major ones.
*/
wxMenu* GetMenu() const;
@event{EVT_MOVE_START(func)}
Process a @c wxEVT_MOVE_START event, which is generated when the user starts
to move or size a window. wxMSW only.
+ @event{EVT_MOVING(func)}
+ Process a @c wxEVT_MOVING event, which is generated while the user is
+ moving the window. wxMSW only.
@event{EVT_MOVE_END(func)}
Process a @c wxEVT_MOVE_END event, which is generated when the user stops
moving or sizing a window. wxMSW only.