X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/673727f39c427ed1a36924748b2459a8a56a4bef..a69aabc360d54a93e355fab72c6513c75aaa7337:/include/wx/aui/framemanager.h?ds=inline diff --git a/include/wx/aui/framemanager.h b/include/wx/aui/framemanager.h index 7931b602ac..65a3dc7d7e 100644 --- a/include/wx/aui/framemanager.h +++ b/include/wx/aui/framemanager.h @@ -44,10 +44,16 @@ enum wxFrameManagerOption wxAUI_MGR_TRANSPARENT_DRAG = 1 << 2, wxAUI_MGR_TRANSPARENT_HINT = 1 << 3, wxAUI_MGR_TRANSPARENT_HINT_FADE = 1 << 4, + // The venetian blind effect is ONLY used when the wxAUI_MGR_TRANSPARENT_HINT has been used, but + // at runtime we determine we cannot use transparency (because, for instance, the OS does not support it). + // setting this flag drops back in such circumstances (only) to the behaviour without wxAUI_MGR_TRANSPARENT_HINT + wxAUI_MGR_DISABLE_VENETIAN_BLINDS = 1 << 5, + wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE = 1 << 6, wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING | wxAUI_MGR_TRANSPARENT_HINT | - wxAUI_MGR_TRANSPARENT_HINT_FADE + wxAUI_MGR_TRANSPARENT_HINT_FADE | + wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE }; enum wxPaneDockArtSetting @@ -107,8 +113,8 @@ WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDockInfo, wxDockInfoArray, WXDLLIMPEXP_AUI); WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDockUIPart, wxDockUIPartArray, WXDLLIMPEXP_AUI); WX_DECLARE_USER_EXPORTED_OBJARRAY(wxPaneButton, wxPaneButtonArray, WXDLLIMPEXP_AUI); WX_DECLARE_USER_EXPORTED_OBJARRAY(wxPaneInfo, wxPaneInfoArray, WXDLLIMPEXP_AUI); -WX_DEFINE_ARRAY_PTR(wxPaneInfo*, wxPaneInfoPtrArray); -WX_DEFINE_ARRAY_PTR(wxDockInfo*, wxDockInfoPtrArray); +WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxPaneInfo*, wxPaneInfoPtrArray, class WXDLLIMPEXP_AUI); +WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxDockInfo*, wxDockInfoPtrArray, class WXDLLIMPEXP_AUI); #endif // SWIG extern WXDLLIMPEXP_AUI wxDockInfo wxNullDockInfo; @@ -185,7 +191,20 @@ public: return *this; } #endif // SWIG - + + // Write the safe parts of a newly loaded PaneInfo structure "source" into "this" + // used on loading perspectives etc. + void SafeSet(wxPaneInfo source) + { + // note source is not passed by reference so we can overwrite, to keep the + // unsafe bits of "dest" + source.window = window; + source.frame = frame; + source.buttons = buttons; + // now assign + *this = source; + } + bool IsOk() const { return (window != NULL) ? true : false; } bool IsFixed() const { return !HasFlag(optionResizable); } bool IsResizable() const { return HasFlag(optionResizable); } @@ -340,7 +359,7 @@ public: wxString caption; // caption displayed on the window wxWindow* window; // window that is in this pane - wxWindow* frame; // floating frame window that holds the pane + wxFrame* frame; // floating frame window that holds the pane unsigned int state; // a combination of wxPaneState values int dock_direction; // dock direction (top, bottom, left, right, center) @@ -371,7 +390,7 @@ friend class wxFloatingPane; public: - wxFrameManager(wxFrame* frame = NULL, + wxFrameManager(wxWindow* managed_wnd = NULL, unsigned int flags = wxAUI_MGR_DEFAULT); virtual ~wxFrameManager(); void UnInit(); @@ -379,8 +398,8 @@ public: void SetFlags(unsigned int flags); unsigned int GetFlags() const; - void SetFrame(wxWindow* frame); - wxWindow* GetFrame() const; + void SetManagedWindow(wxWindow* managed_wnd); + wxWindow* GetManagedWindow() const; #ifdef SWIG %disownarg( wxDockArt* art_provider ); @@ -394,6 +413,10 @@ public: bool AddPane(wxWindow* window, const wxPaneInfo& pane_info); + + bool AddPane(wxWindow* window, + const wxPaneInfo& pane_info, + const wxPoint& drop_pos); bool AddPane(wxWindow* window, int direction = wxLEFT, @@ -405,6 +428,9 @@ public: bool DetachPane(wxWindow* window); + wxString SavePaneInfo(wxPaneInfo& pane); + void LoadPaneInfo(wxString pane_part, wxPaneInfo &pane); + wxString SavePerspective(); bool LoadPerspective(const wxString& perspective, @@ -412,12 +438,27 @@ public: void Update(); -protected: + +public: void DrawHintRect(wxWindow* pane_window, const wxPoint& pt, const wxPoint& offset); + virtual void ShowHint(const wxRect& rect); + virtual void HideHint(); +public: + + // deprecated -- please use SetManagedWindow() and + // and GetManagedWindow() instead + + wxDEPRECATED( void SetFrame(wxFrame* frame) ); + wxDEPRECATED( wxFrame* GetFrame() const ); + +protected: + + + void DoFrameLayout(); void LayoutAddPane(wxSizer* container, @@ -436,6 +477,9 @@ protected: wxDockUIPartArray& uiparts, bool spacer_only = false); + virtual bool ProcessDockResult(wxPaneInfo& target, + const wxPaneInfo& new_pos); + bool DoDrop(wxDockInfoArray& docks, wxPaneInfoArray& panes, wxPaneInfo& drop, @@ -448,8 +492,8 @@ protected: wxDockUIPart* GetPanePart(wxWindow* pane); int GetDockPixelOffset(wxPaneInfo& test); void OnFloatingPaneMoveStart(wxWindow* window); - void OnFloatingPaneMoving(wxWindow* window); - void OnFloatingPaneMoved(wxWindow* window); + void OnFloatingPaneMoving(wxWindow* window, wxDirection dir ); + void OnFloatingPaneMoved(wxWindow* window, wxDirection dir); void OnFloatingPaneActivated(wxWindow* window); void OnFloatingPaneClosed(wxWindow* window, wxCloseEvent& evt); void OnFloatingPaneResized(wxWindow* window, const wxSize& size); @@ -461,8 +505,7 @@ protected: void GetPanePositionsAndSizes(wxDockInfo& dock, wxArrayInt& positions, wxArrayInt& sizes); - virtual void ShowHint(const wxRect& rect); - virtual void HideHint(); + public: @@ -516,9 +559,10 @@ protected: wxRect m_last_hint; // last hint rectangle wxPoint m_last_mouse_move; // last mouse move position (see OnMotion) - wxWindow* m_hint_wnd; // transparent hint window (for now, only msw) - wxTimer m_hint_fadetimer; // transparent fade timer (for now, only msw) - int m_hint_fadeamt; // transparent fade amount (for now, only msw) + wxFrame* m_hint_wnd; // transparent hint window, if supported by platform + wxTimer m_hint_fadetimer; // transparent fade timer + wxByte m_hint_fadeamt; // transparent fade amount + wxByte m_hint_fademax; // maximum value of hint fade #ifndef SWIG DECLARE_EVENT_TABLE()