+ wxEvtHandler* GetEventHandler() const;
+
+ /**
+ This function will generate the appropriate call to Navigate() if the key
+ event is one normally used for keyboard navigation and return @true in this case.
+
+ @return Returns @true if the key pressed was for navigation and was
+ handled, @false otherwise.
+
+ @see Navigate()
+ */
+ bool HandleAsNavigationKey(const wxKeyEvent& event);
+
+ /**
+ Shorthand for:
+ @code
+ GetEventHandler()->SafelyProcessEvent(event);
+ @endcode
+
+ @see ProcessWindowEvent()
+ */
+ bool HandleWindowEvent(wxEvent& event) const;
+
+ /**
+ Convenient wrapper for ProcessEvent().
+
+ This is the same as writing @code GetEventHandler()->ProcessEvent(event);
+ @endcode but more convenient. Notice that ProcessEvent() itself can't
+ be called for wxWindow objects as it ignores the event handlers
+ associated with the window, use this function instead.
+ */
+ bool ProcessWindowEvent(wxEvent& event);
+
+ /**
+ Removes and returns the top-most event handler on the event handler stack.
+
+ E.g. in the case of:
+ @image html overview_events_winstack.png
+ when calling @c W->PopEventHandler(), the event handler @c A will be
+ removed and @c B will be the first handler of the stack.
+
+ Note that it's an error to call this function when no event handlers
+ were pushed on this window (i.e. when the window itself is its only
+ event handler).
+
+ @param deleteHandler
+ If this is @true, the handler will be deleted after it is removed
+ (and the returned value will be @NULL).
+
+ @see @ref overview_events_processing
+ */
+ wxEvtHandler* PopEventHandler(bool deleteHandler = false);
+
+ /**
+ Pushes this event handler onto the event stack for the window.
+
+ An event handler is an object that is capable of processing the events sent
+ to a window. By default, the window is its own event handler, but an application
+ may wish to substitute another, for example to allow central implementation
+ of event-handling for a variety of different window classes.
+
+ wxWindow::PushEventHandler allows an application to set up a @e stack
+ of event handlers, where an event not handled by one event handler is
+ handed to the next one in the chain.
+
+ E.g. if you have two event handlers @c A and @c B and a wxWindow instance
+ @c W and you call:
+ @code
+ W->PushEventHandler(A);
+ W->PushEventHandler(B);
+ @endcode
+ you will end up with the following situation:
+ @image html overview_events_winstack.png
+
+ Note that you can use wxWindow::PopEventHandler to remove the event handler.
+
+ @param handler
+ Specifies the handler to be pushed.
+ It must not be part of a wxEvtHandler chain; an assert will fail
+ if it's not unlinked (see wxEvtHandler::IsUnlinked).
+
+ @see @ref overview_events_processing
+ */
+ void PushEventHandler(wxEvtHandler* handler);
+
+ /**
+ Find the given @a handler in the windows event handler stack and
+ removes (but does not delete) it from the stack.
+
+ See wxEvtHandler::Unlink() for more info.
+
+ @param handler
+ The event handler to remove, must be non-@NULL and
+ must be present in this windows event handlers stack.
+
+ @return Returns @true if it was found and @false otherwise (this also
+ results in an assert failure so this function should
+ only be called when the handler is supposed to be there).
+
+ @see PushEventHandler(), PopEventHandler()
+ */
+ bool RemoveEventHandler(wxEvtHandler* handler);
+
+ /**
+ Sets the event handler for this window.
+
+ Note that if you use this function you may want to use as the "next" handler
+ of @a handler the window itself; in this way when @a handler doesn't process
+ an event, the window itself will have a chance to do it.
+
+ @param handler
+ Specifies the handler to be set. Cannot be @NULL.
+
+ @see @ref overview_events_processing
+ */
+ void SetEventHandler(wxEvtHandler* handler);
+
+ /**
+ wxWindows cannot be used to form event handler chains; this function
+ thus will assert when called.
+
+ Note that instead you can use PushEventHandler() or SetEventHandler() to
+ implement a stack of event handlers to override wxWindow's own
+ event handling mechanism.
+ */
+ virtual void SetNextHandler(wxEvtHandler* handler);
+
+ /**
+ wxWindows cannot be used to form event handler chains; this function
+ thus will assert when called.
+
+ Note that instead you can use PushEventHandler() or SetEventHandler() to
+ implement a stack of event handlers to override wxWindow's own
+ event handling mechanism.
+ */
+ virtual void SetPreviousHandler(wxEvtHandler* handler);
+
+ //@}
+
+
+
+ /**
+ @name Window styles functions
+ */
+ //@{
+
+ /**
+ Returns the extra style bits for the window.
+ */
+ long GetExtraStyle() const;
+
+ /**
+ Gets the window style that was passed to the constructor or Create()
+ method. GetWindowStyle() is another name for the same function.
+ */
+ virtual long GetWindowStyleFlag() const;
+
+ /**
+ See GetWindowStyleFlag() for more info.
+ */
+ long GetWindowStyle() const;
+
+ /**
+ Returns @true if the window has the given @a exFlag bit set in its
+ extra styles.
+
+ @see SetExtraStyle()
+ */
+ bool HasExtraStyle(int exFlag) const;
+
+ /**
+ Returns @true if the window has the given @a flag bit set.
+ */
+ bool HasFlag(int flag) const;
+
+ /**
+ Sets the extra style bits for the window.
+ The currently defined extra style bits are reported in the class
+ description.
+ */
+ virtual void SetExtraStyle(long exStyle);
+
+ /**
+ Sets the style of the window. Please note that some styles cannot be changed
+ after the window creation and that Refresh() might need to be be called
+ after changing the others for the change to take place immediately.
+
+ See @ref overview_windowstyles "Window styles" for more information about flags.
+
+ @see GetWindowStyleFlag()
+ */
+ virtual void SetWindowStyleFlag(long style);
+
+ /**
+ See SetWindowStyleFlag() for more info.
+ */
+ void SetWindowStyle(long style);
+
+ /**
+ Turns the given @a flag on if it's currently turned off and vice versa.
+ This function cannot be used if the value of the flag is 0 (which is often
+ the case for default flags).
+
+ Also, please notice that not all styles can be changed after the control
+ creation.
+
+ @return Returns @true if the style was turned on by this function, @false
+ if it was switched off.
+
+ @see SetWindowStyleFlag(), HasFlag()
+ */
+ bool ToggleWindowStyle(int flag);
+
+ //@}
+
+
+ /**
+ @name Tab order functions
+ */
+ //@{