X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/50acee04cdaf2fec9f3fa4cd0035ff2d9ed7d53a..2388d9b331a37bbab59db42e06bc8a05380fb813:/include/wx/aui/framemanager.h diff --git a/include/wx/aui/framemanager.h b/include/wx/aui/framemanager.h index f1f5016377..a2edc97c4a 100644 --- a/include/wx/aui/framemanager.h +++ b/include/wx/aui/framemanager.h @@ -1,10 +1,10 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: framemanager.h +// Name: wx/aui/framemanager.h // Purpose: wxaui: wx advanced user interface - docking window manager // Author: Benjamin I. Williams // Modified by: // Created: 2005-05-17 -// RCS-ID: +// RCS-ID: $Id$ // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// @@ -20,7 +20,13 @@ #if wxUSE_AUI -enum WXDLLIMPEXP_AUI wxFrameManagerDock +#include "wx/dynarray.h" +#include "wx/gdicmn.h" +#include "wx/window.h" +#include "wx/timer.h" +#include "wx/sizer.h" + +enum wxFrameManagerDock { wxAUI_DOCK_NONE = 0, wxAUI_DOCK_TOP = 1, @@ -31,7 +37,7 @@ enum WXDLLIMPEXP_AUI wxFrameManagerDock wxAUI_DOCK_CENTRE = wxAUI_DOCK_CENTER }; -enum WXDLLIMPEXP_AUI wxFrameManagerOption +enum wxFrameManagerOption { wxAUI_MGR_ALLOW_FLOATING = 1 << 0, wxAUI_MGR_ALLOW_ACTIVE_PANE = 1 << 1, @@ -44,7 +50,7 @@ enum WXDLLIMPEXP_AUI wxFrameManagerOption wxAUI_MGR_TRANSPARENT_HINT_FADE }; -enum WXDLLIMPEXP_AUI wxPaneDockArtSetting +enum wxPaneDockArtSetting { wxAUI_ART_SASH_SIZE = 0, wxAUI_ART_CAPTION_SIZE = 1, @@ -65,21 +71,21 @@ enum WXDLLIMPEXP_AUI wxPaneDockArtSetting wxAUI_ART_GRADIENT_TYPE = 16 }; -enum WXDLLIMPEXP_AUI wxPaneDockArtGradients +enum wxPaneDockArtGradients { wxAUI_GRADIENT_NONE = 0, wxAUI_GRADIENT_VERTICAL = 1, wxAUI_GRADIENT_HORIZONTAL = 2 }; -enum WXDLLIMPEXP_AUI wxPaneButtonState +enum wxPaneButtonState { wxAUI_BUTTON_STATE_NORMAL = 0, wxAUI_BUTTON_STATE_HOVER = 1, wxAUI_BUTTON_STATE_PRESSED = 2 }; -enum WXDLLIMPEXP_AUI wxPaneInsertLevel +enum wxPaneInsertLevel { wxAUI_INSERT_PANE = 0, wxAUI_INSERT_ROW = 1, @@ -96,10 +102,10 @@ class wxDockInfo; class wxDockArt; class wxFrameManagerEvent; -WX_DECLARE_OBJARRAY(wxDockInfo, wxDockInfoArray); -WX_DECLARE_OBJARRAY(wxDockUIPart, wxDockUIPartArray); -WX_DECLARE_OBJARRAY(wxPaneButton, wxPaneButtonArray); -WX_DECLARE_OBJARRAY(wxPaneInfo, wxPaneInfoArray); +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); @@ -128,7 +134,7 @@ public: min_size = wxDefaultSize; max_size = wxDefaultSize; dock_proportion = 0; - + DefaultPane(); } @@ -196,7 +202,7 @@ public: bool HasMinimizeButton() const { return HasFlag(buttonMinimize); } bool HasPinButton() const { return HasFlag(buttonPin); } bool HasGripperTop() const { return HasFlag(optionGripperTop); } - + wxPaneInfo& Window(wxWindow* w) { window = w; return *this; } wxPaneInfo& Name(const wxString& n) { name = n; return *this; } wxPaneInfo& Caption(const wxString& c) { caption = c; return *this; } @@ -230,7 +236,7 @@ public: wxPaneInfo& PaneBorder(bool visible = true) { return SetFlag(optionPaneBorder, visible); } wxPaneInfo& Gripper(bool visible = true) { return SetFlag(optionGripper, visible); } wxPaneInfo& GripperTop(bool attop = true) { return SetFlag(optionGripperTop, attop); } - wxPaneInfo& CloseButton(bool visible = true) { return SetFlag(buttonClose, visible); } + wxPaneInfo& CloseButton(bool visible = true) { return SetFlag(buttonClose, visible); } wxPaneInfo& MaximizeButton(bool visible = true) { return SetFlag(buttonMaximize, visible); } wxPaneInfo& MinimizeButton(bool visible = true) { return SetFlag(buttonMinimize, visible); } wxPaneInfo& PinButton(bool visible = true) { return SetFlag(buttonPin, visible); } @@ -238,7 +244,7 @@ public: wxPaneInfo& TopDockable(bool b = true) { return SetFlag(optionTopDockable, b); } wxPaneInfo& BottomDockable(bool b = true) { return SetFlag(optionBottomDockable, b); } wxPaneInfo& LeftDockable(bool b = true) { return SetFlag(optionLeftDockable, b); } - wxPaneInfo& RightDockable(bool b = true) { return SetFlag(optionRightDockable, b); } + wxPaneInfo& RightDockable(bool b = true) { return SetFlag(optionRightDockable, b); } wxPaneInfo& Floatable(bool b = true) { return SetFlag(optionFloatable, b); } wxPaneInfo& Movable(bool b = true) { return SetFlag(optionMovable, b); } wxPaneInfo& Dockable(bool b = true) @@ -254,14 +260,14 @@ public: optionCaption | optionPaneBorder | buttonClose; return *this; } - + wxPaneInfo& CentrePane() { return CenterPane(); } wxPaneInfo& CenterPane() { state = 0; return Center().PaneBorder().Resizable(); } - + wxPaneInfo& ToolbarPane() { DefaultPane(); @@ -280,7 +286,7 @@ public: state &= ~flag; return *this; } - + bool HasFlag(unsigned int flag) const { return (state & flag) ? true:false; @@ -305,7 +311,7 @@ public: optionDestroyOnClose = 1 << 12, optionToolbar = 1 << 13, optionActive = 1 << 14, - optionGripperTop = 1 << 15, + optionGripperTop = 1 << 15, buttonClose = 1 << 24, buttonMaximize = 1 << 25, @@ -357,13 +363,13 @@ public: unsigned int flags = wxAUI_MGR_DEFAULT); virtual ~wxFrameManager(); void UnInit(); - + void SetFlags(unsigned int flags); unsigned int GetFlags() const; - + void SetFrame(wxFrame* frame); wxFrame* GetFrame() const; - + void SetArtProvider(wxDockArt* art_provider); wxDockArt* GetArtProvider() const; @@ -373,22 +379,22 @@ public: bool AddPane(wxWindow* window, const wxPaneInfo& pane_info); - + bool AddPane(wxWindow* window, int direction = wxLEFT, const wxString& caption = wxEmptyString); - + bool InsertPane(wxWindow* window, const wxPaneInfo& pane_info, int insert_level = wxAUI_INSERT_PANE); - + bool DetachPane(wxWindow* window); wxString SavePerspective(); - + bool LoadPerspective(const wxString& perspective, bool update = true); - + void Update(); private: @@ -494,7 +500,7 @@ private: 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) - + DECLARE_EVENT_TABLE() }; @@ -608,7 +614,7 @@ public: typePaneSizer, typeBackground, typePaneBorder, - typePaneButton, + typePaneButton }; int type; // ui part type (see enum above) @@ -638,7 +644,7 @@ public: // spectrum of events will be implemented in the next incremental version BEGIN_DECLARE_EVENT_TYPES() - DECLARE_EVENT_TYPE(wxEVT_AUI_PANEBUTTON, 0) + DECLARE_EVENT_TYPE(wxEVT_AUI_PANEBUTTON, 0) END_DECLARE_EVENT_TYPES() typedef void (wxEvtHandler::*wxFrameManagerEventFunction)(wxFrameManagerEvent&);