X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d9ced90bcfeb99917c91f604385082cc83d07308..97d13342cc2ac77e21c38115cc6ebecac930f92a:/interface/wx/window.h diff --git a/interface/wx/window.h b/interface/wx/window.h index d2fe5d73a4..6eb30c66bb 100644 --- a/interface/wx/window.h +++ b/interface/wx/window.h @@ -151,16 +151,17 @@ enum wxWindowVariant @beginExtraStyleTable @style{wxWS_EX_VALIDATE_RECURSIVELY} - By default, Validate/TransferDataTo/FromWindow() only work on - direct children of the window (compatible behaviour). Set this flag - to make them recursively descend into all subwindows. + By default, wxWindow::Validate(), wxWindow::TransferDataTo() and + wxWindow::TransferDataFromWindow() only work on + direct children of the window (compatible behaviour). + Set this flag to make them recursively descend into all subwindows. @style{wxWS_EX_BLOCK_EVENTS} wxCommandEvents and the objects of the derived classes are forwarded to the parent window and so on recursively by default. Using this flag for the given window allows to block this propagation at this window, i.e. prevent the events from being propagated further upwards. Dialogs have this flag on by default - for the reasons explained in the @ref overview_eventhandling "Event Handling Overview". + for the reasons explained in the @ref overview_events. @style{wxWS_EX_TRANSIENT} Don't use this window as an implicit parent for the other windows: this must be used with transient windows as otherwise there is the @@ -169,23 +170,76 @@ enum wxWindowVariant @style{wxWS_EX_CONTEXTHELP} Under Windows, puts a query button on the caption. When pressed, Windows will go into a context-sensitive help mode and wxWidgets - will send a wxEVT_HELP event if the user clicked on an application window. + will send a @c wxEVT_HELP event if the user clicked on an application window. This style cannot be used (because of the underlying native behaviour) together with @c wxMAXIMIZE_BOX or @c wxMINIMIZE_BOX, so these two styles are automatically turned off if this one is used. @style{wxWS_EX_PROCESS_IDLE} This window should always process idle events, even if the mode set - by wxIdleEvent::SetMode is wxIDLE_PROCESS_SPECIFIED. + by wxIdleEvent::SetMode is @c wxIDLE_PROCESS_SPECIFIED. @style{wxWS_EX_PROCESS_UI_UPDATES} This window should always process UI update events, even if the - mode set by wxUpdateUIEvent::SetMode is wxUPDATE_UI_PROCESS_SPECIFIED. + mode set by wxUpdateUIEvent::SetMode is @c wxUPDATE_UI_PROCESS_SPECIFIED. @endExtraStyleTable + @beginEventEmissionTable + @event{EVT_ACTIVATE(id, func)} + Process a @c wxEVT_ACTIVATE event. See wxActivateEvent. + @event{EVT_CHILD_FOCUS(func)} + Process a @c wxEVT_CHILD_FOCUS event. See wxChildFocusEvent. + @event{EVT_CONTEXT_MENU(func)} + A right click (or other context menu command depending on platform) has been detected. + See wxContextMenuEvent. + @event{EVT_HELP(id, func)} + Process a @c wxEVT_HELP event. See wxHelpEvent. + @event{EVT_HELP_RANGE(id1, id2, func)} + Process a @c wxEVT_HELP event for a range of ids. See wxHelpEvent. + @event{EVT_DROP_FILES(func)} + Process a @c wxEVT_DROP_FILES event. See wxDropFilesEvent. + @event{EVT_ERASE_BACKGROUND(func)} + Process a @c wxEVT_ERASE_BACKGROUND event. See wxEraseEvent. + @event{EVT_SET_FOCUS(func)} + Process a @c wxEVT_SET_FOCUS event. See wxFocusEvent. + @event{EVT_KILL_FOCUS(func)} + Process a @c wxEVT_KILL_FOCUS event. See wxFocusEvent. + @event{EVT_IDLE(func)} + Process a @c wxEVT_IDLE event. See wxIdleEvent. + @event{EVT_JOY_*(func)} + Processes joystick events. See wxJoystickEvent. + @event{EVT_KEY_DOWN(func)} + Process a @c wxEVT_KEY_DOWN event (any key has been pressed). + See wxKeyEvent. + @event{EVT_KEY_UP(func)} + Process a @c wxEVT_KEY_UP event (any key has been released). + @event{EVT_CHAR(func)} + Process a @c wxEVT_CHAR event. + See wxKeyEvent. + @event{EVT_MOUSE_CAPTURE_LOST(func)} + Process a @c wxEVT_MOUSE_CAPTURE_LOST event. See wxMouseCaptureLostEvent. + @event{EVT_MOUSE_CAPTURE_CHANGED(func)} + Process a @c wxEVT_MOUSE_CAPTURE_CHANGED event. See wxMouseCaptureChangedEvent. + @event{EVT_MOUSE_*(func)} + See wxMouseEvent. + @event{EVT_PAINT(func)} + Process a @c wxEVT_PAINT event. See wxPaintEvent. + @event{EVT_POWER_*(func)} + The system power state changed. See wxPowerEvent. + @event{EVT_SCROLLWIN_*(func)} + Process scroll events. See wxScrollWinEvent. + @event{EVT_SET_CURSOR(func)} + Process a @c wxEVT_SET_CURSOR event. See wxSetCursorEvent. + @event{EVT_SHOW(func)} + Process a @c wxEVT_SHOW event. See wxShowEvent. + @event{EVT_SIZE(func)} + Process a @c wxEVT_SIZE event. See wxSizeEvent. + @event{EVT_SYS_COLOUR_CHANGED(func)} + Process a @c wxEVT_SYS_COLOUR_CHANGED event. See wxSysColourChangedEvent. + @endEventTable + @library{wxcore} @category{miscwnd} - @see @ref overview_eventhandling "Event handling overview", - @ref overview_windowsizing "Window sizing overview" + @see @ref overview_events, @ref overview_windowsizing */ class wxWindow : public wxEvtHandler { @@ -1701,7 +1755,7 @@ public: Removes and returns the top-most event handler on the event handler stack. E.g. in the case of: - @image html overview_eventhandling_winstack.png + @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. @@ -1713,7 +1767,7 @@ public: If this is @true, the handler will be deleted after it is removed (and the returned value will be @NULL). - @see @ref overview_eventhandling_processing + @see @ref overview_events_processing */ wxEvtHandler* PopEventHandler(bool deleteHandler = false); @@ -1736,7 +1790,7 @@ public: W->PushEventHandler(B); @endcode you will end up with the following situation: - @image html overview_eventhandling_winstack.png + @image html overview_events_winstack.png Note that you can use wxWindow::PopEventHandler to remove the event handler. @@ -1745,13 +1799,15 @@ public: It must not be part of a wxEvtHandler chain; an assert will fail if it's not unlinked (see wxEvtHandler::IsUnlinked). - @see @ref overview_eventhandling_processing + @see @ref overview_events_processing */ void PushEventHandler(wxEvtHandler* handler); /** - Find the given @a handler in the windows event handler stack and unlinks - (but not delete) it. See wxEvtHandler::Unlink() for more info. + 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 @@ -1775,7 +1831,7 @@ public: @param handler Specifies the handler to be set. Cannot be @NULL. - @see @ref overview_eventhandling_processing + @see @ref overview_events_processing */ void SetEventHandler(wxEvtHandler* handler); @@ -2326,6 +2382,12 @@ public: */ virtual wxString GetLabel() const; + /** + Returns the layout direction for this window, + Note that @c wxLayout_Default is returned if layout direction is not supported. + */ + virtual wxLayoutDirection GetLayoutDirection() const; + /** Returns the window's name. @@ -2364,6 +2426,11 @@ public: */ virtual void SetLabel(const wxString& label); + /** + Sets the layout direction for this window. + */ + virtual void SetLayoutDirection(wxLayoutDirection dir); + /** Sets the window's name. @@ -2384,7 +2451,6 @@ public: */ void SetWindowVariant(wxWindowVariant variant); - /** Gets the accelerator table for this window. See wxAcceleratorTable. */