X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce15b45fef3d8d62681f496b4e6e343af6d36031..0441868f0826077c1412a9828e5f3e67f32c425d:/include/wx/aui/framemanager.h diff --git a/include/wx/aui/framemanager.h b/include/wx/aui/framemanager.h index 863bc7a7dc..0307c3d4f2 100644 --- a/include/wx/aui/framemanager.h +++ b/include/wx/aui/framemanager.h @@ -57,23 +57,23 @@ enum wxAuiManagerOption enum wxAuiPaneDockArtSetting { - wxAUI_ART_SASH_SIZE = 0, - wxAUI_ART_CAPTION_SIZE = 1, - wxAUI_ART_GRIPPER_SIZE = 2, - wxAUI_ART_PANE_BORDER_SIZE = 3, - wxAUI_ART_PANE_BUTTON_SIZE = 4, - wxAUI_ART_BACKGROUND_COLOUR = 5, - wxAUI_ART_SASH_COLOUR = 6, - wxAUI_ART_ACTIVE_CAPTION_COLOUR = 7, - wxAUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR = 8, - wxAUI_ART_INACTIVE_CAPTION_COLOUR = 9, - wxAUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR = 10, - wxAUI_ART_ACTIVE_CAPTION_TEXT_COLOUR = 11, - wxAUI_ART_INACTIVE_CAPTION_TEXT_COLOUR = 12, - wxAUI_ART_BORDER_COLOUR = 13, - wxAUI_ART_GRIPPER_COLOUR = 14, - wxAUI_ART_CAPTION_FONT = 15, - wxAUI_ART_GRADIENT_TYPE = 16 + wxAUI_DOCKART_SASH_SIZE = 0, + wxAUI_DOCKART_CAPTION_SIZE = 1, + wxAUI_DOCKART_GRIPPER_SIZE = 2, + wxAUI_DOCKART_PANE_BORDER_SIZE = 3, + wxAUI_DOCKART_PANE_BUTTON_SIZE = 4, + wxAUI_DOCKART_BACKGROUND_COLOUR = 5, + wxAUI_DOCKART_SASH_COLOUR = 6, + wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR = 7, + wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR = 8, + wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR = 9, + wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR = 10, + wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR = 11, + wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR = 12, + wxAUI_DOCKART_BORDER_COLOUR = 13, + wxAUI_DOCKART_GRIPPER_COLOUR = 14, + wxAUI_DOCKART_CAPTION_FONT = 15, + wxAUI_DOCKART_GRADIENT_TYPE = 16 }; enum wxAuiPaneDockArtGradients @@ -89,7 +89,8 @@ enum wxAuiPaneButtonState wxAUI_BUTTON_STATE_HOVER = 1 << 1, wxAUI_BUTTON_STATE_PRESSED = 1 << 2, wxAUI_BUTTON_STATE_DISABLED = 1 << 3, - wxAUI_BUTTON_STATE_HIDDEN = 1 << 4 + wxAUI_BUTTON_STATE_HIDDEN = 1 << 4, + wxAUI_BUTTON_STATE_CHECKED = 1 << 5 }; enum wxAuiButtonId @@ -430,6 +431,8 @@ public: void SetManagedWindow(wxWindow* managed_wnd); wxWindow* GetManagedWindow() const; + static wxAuiManager* GetManager(wxWindow* window); + #ifdef SWIG %disownarg( wxAuiDockArt* art_provider ); #endif @@ -472,17 +475,23 @@ public: void Update(); - public: + virtual wxAuiFloatingFrame* CreateFloatingFrame(wxWindow* parent, const wxAuiPaneInfo& p); - wxRect CalculateHintRect(wxWindow* pane_window, - const wxPoint& pt, - const wxPoint& offset); + void StartPaneDrag( + wxWindow* pane_window, + const wxPoint& offset); + + wxRect CalculateHintRect( + wxWindow* pane_window, + const wxPoint& pt, + const wxPoint& offset); - void DrawHintRect(wxWindow* pane_window, - const wxPoint& pt, - const wxPoint& offset); + void DrawHintRect( + wxWindow* pane_window, + const wxPoint& pt, + const wxPoint& offset); virtual void ShowHint(const wxRect& rect); virtual void HideHint(); @@ -566,6 +575,7 @@ protected: void OnLeaveWindow(wxMouseEvent& evt); void OnChildFocus(wxChildFocusEvent& evt); void OnHintFadeTimer(wxTimerEvent& evt); + void OnFindManager(wxAuiManagerEvent& evt); protected: @@ -609,6 +619,7 @@ protected: #ifndef SWIG DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxAuiManager) #endif // SWIG }; @@ -621,6 +632,7 @@ class WXDLLIMPEXP_AUI wxAuiManagerEvent : public wxEvent public: wxAuiManagerEvent(wxEventType type=wxEVT_NULL) : wxEvent(0, type) { + manager = NULL; pane = NULL; button = 0; veto_flag = false; @@ -630,6 +642,7 @@ public: #ifndef SWIG wxAuiManagerEvent(const wxAuiManagerEvent& c) : wxEvent(c) { + manager = c.manager; pane = c.pane; button = c.button; veto_flag = c.veto_flag; @@ -639,13 +652,15 @@ public: #endif wxEvent *Clone() const { return new wxAuiManagerEvent(*this); } + void SetManager(wxAuiManager* mgr) { manager = mgr; } void SetPane(wxAuiPaneInfo* p) { pane = p; } void SetButton(int b) { button = b; } void SetDC(wxDC* pdc) { dc = pdc; } - wxAuiPaneInfo* GetPane() { return pane; } - int GetButton() { return button; } - wxDC* GetDC() { return dc; } + wxAuiManager* GetManager() const { return manager; } + wxAuiPaneInfo* GetPane() const { return pane; } + int GetButton() const { return button; } + wxDC* GetDC() const { return dc; } void Veto(bool veto = true) { veto_flag = veto; } bool GetVeto() const { return veto_flag; } @@ -653,6 +668,7 @@ public: bool CanVeto() const { return canveto_flag && veto_flag; } public: + wxAuiManager* manager; wxAuiPaneInfo* pane; int button; bool veto_flag; @@ -777,6 +793,7 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANEMAXIMIZE, 0) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANERESTORE, 0) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_RENDER, 0) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_FINDMANAGER, 0) END_DECLARE_EVENT_TYPES() typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&); @@ -794,6 +811,8 @@ typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&); wx__DECLARE_EVT0(wxEVT_AUI_PANERESTORE, wxAuiManagerEventHandler(func)) #define EVT_AUI_RENDER(func) \ wx__DECLARE_EVT0(wxEVT_AUI_RENDER, wxAuiManagerEventHandler(func)) +#define EVT_AUI_FINDMANAGER(func) \ + wx__DECLARE_EVT0(wxEVT_AUI_FINDMANAGER, wxAuiManagerEventHandler(func)) #else @@ -802,6 +821,7 @@ typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&); %constant wxEventType wxEVT_AUI_PANEMAXIMIZE; %constant wxEventType wxEVT_AUI_PANERESTORE; %constant wxEventType wxEVT_AUI_RENDER; +%constant wxEventType wxEVT_AUI_FINDMANAGER; %pythoncode { EVT_AUI_PANEBUTTON = wx.PyEventBinder( wxEVT_AUI_PANEBUTTON ) @@ -809,6 +829,7 @@ typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&); EVT_AUI_PANEMAXIMIZE = wx.PyEventBinder( wxEVT_AUI_PANEMAXIMIZE ) EVT_AUI_PANERESTORE = wx.PyEventBinder( wxEVT_AUI_PANERESTORE ) EVT_AUI_RENDER = wx.PyEventBinder( wxEVT_AUI_RENDER ) + EVT_AUI_FINDMANAGER = wx.PyEventBinder( wxEVT_AUI_FINDMANAGER ) } #endif // SWIG