From: Francesco Montorsi Date: Mon, 24 Mar 2008 18:17:11 +0000 (+0000) Subject: further prototype revisions; rename interface/aui.h to interface/framemanager.h since... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e4f1d811cc5b15a148ae7331c033d1749940cac0?ds=inline further prototype revisions; rename interface/aui.h to interface/framemanager.h since wxAuiManager and wxAuiPaneInfo are declared in the latter (in the real headers) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/interface/aboutdlg.h b/interface/aboutdlg.h index bf7087527d..1688a5a45c 100644 --- a/interface/aboutdlg.h +++ b/interface/aboutdlg.h @@ -196,9 +196,9 @@ public: } @endcode - Please see the @ref page_utils_samples_dialogs for more examples of - using this function and wxAboutDialogInfo for the description of the - information which can be shown in the about dialog. + Please see the @ref page_samples_dialogs for more examples of using this + function and wxAboutDialogInfo for the description of the information which + can be shown in the about dialog. @header{wx/aboutdlg.h} */ @@ -212,7 +212,7 @@ void wxAboutBox(const wxAboutDialogInfo& info); custom controls to it (customizing the native dialog is not currently supported). - See the @ref page_utils_samples_dialogs for an example of about dialog + See the @ref page_samples_dialogs for an example of about dialog customization. @see wxAboutDialogInfo diff --git a/interface/animate.h b/interface/animate.h index 6352f63c6f..861625aec3 100644 --- a/interface/animate.h +++ b/interface/animate.h @@ -103,7 +103,7 @@ public: /** Returns the animation associated with this control. */ - wxAnimation GetAnimation() const; + virtual wxAnimation GetAnimation() const; /** Returns the inactive bitmap shown in this control when the; @@ -114,14 +114,14 @@ public: /** Returns @true if the animation is being played. */ - bool IsPlaying() const; + virtual bool IsPlaying() const; /** Loads the animation from the given file and calls SetAnimation(). See wxAnimation::LoadFile for more info. */ - bool LoadFile(const wxString& file, - wxAnimationType animType = wxANIMATION_TYPE_ANY); + virtual bool LoadFile(const wxString& file, + wxAnimationType animType = wxANIMATION_TYPE_ANY); /** Starts playing the animation. @@ -130,7 +130,7 @@ public: animation has an infinite delay time) and always start from the first frame even if you @ref Stop "stopped" it while some other frame was displayed. */ - bool Play(); + virtual bool Play(); /** Sets the animation to play in this control. @@ -140,7 +140,7 @@ public: animation or the background colour will be shown (see SetInactiveBitmap() for more info). */ - void SetAnimation(const wxAnimation& anim); + virtual void SetAnimation(const wxAnimation& anim); /** Sets the bitmap to show on the control when it's not playing an animation. @@ -163,7 +163,7 @@ public: The control will show the first frame of the animation, a custom static image or the window's background colour as specified by the last SetInactiveBitmap() call. */ - void Stop(); + virtual void Stop(); }; @@ -213,27 +213,27 @@ public: Returns the delay for the i-th frame in milliseconds. If @c -1 is returned the frame is to be displayed forever. */ - int GetDelay(unsigned int i) const; + virtual int GetDelay(unsigned int i) const; /** Returns the i-th frame as a wxImage. */ - wxImage GetFrame(unsigned int i) const; + virtual wxImage GetFrame(unsigned int i) const; /** Returns the number of frames for this animation. */ - unsigned int GetFrameCount() const; + virtual unsigned int GetFrameCount() const; /** Returns the size of the animation. */ - wxSize GetSize() const; + virtual wxSize GetSize() const; /** Returns @true if animation data is present. */ - bool IsOk() const; + virtual bool IsOk() const; /** Loads an animation from the given stream. @@ -248,8 +248,8 @@ public: @returns @true if the operation succeeded, @false otherwise. */ - bool Load(wxInputStream& stream, - wxAnimationType type = wxANIMATION_TYPE_ANY); + virtual bool Load(wxInputStream& stream, + wxAnimationType type = wxANIMATION_TYPE_ANY); /** Loads an animation from a file. @@ -262,8 +262,8 @@ public: @returns @true if the operation succeeded, @false otherwise. */ - bool LoadFile(const wxString& name, - wxAnimationType type = wxANIMATION_TYPE_ANY); + virtual bool LoadFile(const wxString& name, + wxAnimationType type = wxANIMATION_TYPE_ANY); /** Assignment operator, using @ref overview_refcount "reference counting". diff --git a/interface/artprov.h b/interface/artprov.h index eb96e27c7b..a54889c17d 100644 --- a/interface/artprov.h +++ b/interface/artprov.h @@ -55,7 +55,7 @@ Every bitmap and icon bundle are known to wxArtProvider under an unique ID that is used when requesting a resource from it. The ID is represented by wxArtID type and can have one of these predefined values (you can see bitmaps represented by these - constants in the @ref page_utils_samples_artprovider): + constants in the @ref page_samples_artprovider):
@@ -152,7 +152,7 @@ @library{wxcore} @category{misc,data} - @see the @ref page_utils_samples_artprovider for an example of wxArtProvider usage. + @see the @ref page_samples_artprovider for an example of wxArtProvider usage. */ class wxArtProvider : public wxObject { @@ -163,39 +163,6 @@ public: */ virtual ~wxArtProvider(); - /** - Derived art provider classes must override this method to create requested art - resource. Note that returned bitmaps are cached by wxArtProvider and it is - therefore not necessary to optimize CreateBitmap() for speed (e.g. you may - create wxBitmap objects from XPMs here). - - @param id - wxArtID unique identifier of the bitmap. - @param client - wxArtClient identifier of the client (i.e. who is asking for the bitmap). - This only servers as a hint. - @param size - Preferred size of the bitmap. The function may return a bitmap of different - dimensions, it will be automatically rescaled to meet client's request. - - @note - This is not part of wxArtProvider's public API, use wxArtProvider::GetBitmap - or wxArtProvider::GetIconBundle or wxArtProvider::GetIcon to query wxArtProvider - for a resource. - - @see CreateIconBundle() - */ - virtual wxBitmap CreateBitmap(const wxArtID& id, - const wxArtClient& client, - const wxSize& size); - - /** - This method is similar to CreateBitmap() but can be used when a bitmap - (or an icon) exists in several sizes. - */ - wxIconBundle CreateIconBundle(const wxArtID& id, - const wxArtClient& client); - /** Delete the given @a provider. */ @@ -277,5 +244,40 @@ public: deleted, unlike when using Delete(). */ static bool Remove(wxArtProvider* provider); + +protected: + + /** + Derived art provider classes must override this method to create requested art + resource. Note that returned bitmaps are cached by wxArtProvider and it is + therefore not necessary to optimize CreateBitmap() for speed (e.g. you may + create wxBitmap objects from XPMs here). + + @param id + wxArtID unique identifier of the bitmap. + @param client + wxArtClient identifier of the client (i.e. who is asking for the bitmap). + This only servers as a hint. + @param size + Preferred size of the bitmap. The function may return a bitmap of different + dimensions, it will be automatically rescaled to meet client's request. + + @note + This is not part of wxArtProvider's public API, use wxArtProvider::GetBitmap + or wxArtProvider::GetIconBundle or wxArtProvider::GetIcon to query wxArtProvider + for a resource. + + @see CreateIconBundle() + */ + virtual wxBitmap CreateBitmap(const wxArtID& id, + const wxArtClient& client, + const wxSize& size); + + /** + This method is similar to CreateBitmap() but can be used when a bitmap + (or an icon) exists in several sizes. + */ + virtual wxIconBundle CreateIconBundle(const wxArtID& id, + const wxArtClient& client); }; diff --git a/interface/aui/aui.h b/interface/aui/aui.h deleted file mode 100644 index 47c876cec5..0000000000 --- a/interface/aui/aui.h +++ /dev/null @@ -1,769 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: aui/aui.h -// Purpose: interface of wxAuiManager -// Author: wxWidgets team -// RCS-ID: $Id$ -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - - -/** - @todo TOWRITE -*/ -enum wxAuiManagerDock -{ - wxAUI_DOCK_NONE = 0, - wxAUI_DOCK_TOP = 1, - wxAUI_DOCK_RIGHT = 2, - wxAUI_DOCK_BOTTOM = 3, - wxAUI_DOCK_LEFT = 4, - wxAUI_DOCK_CENTER = 5, - wxAUI_DOCK_CENTRE = wxAUI_DOCK_CENTER -}; - - -/** - @todo TOWRITE -*/ -enum wxAuiManagerOption -{ - wxAUI_MGR_ALLOW_FLOATING = 1 << 0, - wxAUI_MGR_ALLOW_ACTIVE_PANE = 1 << 1, - wxAUI_MGR_TRANSPARENT_DRAG = 1 << 2, - wxAUI_MGR_TRANSPARENT_HINT = 1 << 3, - wxAUI_MGR_VENETIAN_BLINDS_HINT = 1 << 4, - wxAUI_MGR_RECTANGLE_HINT = 1 << 5, - wxAUI_MGR_HINT_FADE = 1 << 6, - wxAUI_MGR_NO_VENETIAN_BLINDS_FADE = 1 << 7, - - wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING | - wxAUI_MGR_TRANSPARENT_HINT | - wxAUI_MGR_HINT_FADE | - wxAUI_MGR_NO_VENETIAN_BLINDS_FADE -}; - -/** - @class wxAuiManager - @headerfile aui.h wx/aui/aui.h - - wxAuiManager is the central class of the wxAUI class framework. - See also @ref overview_aui. - - wxAuiManager manages the panes associated with it for a particular wxFrame, - using a pane's wxAuiPaneInfo information to determine each pane's docking - and floating behavior. - - wxAuiManager uses wxWidgets' sizer mechanism to plan the layout of each frame. - It uses a replaceable dock art class to do all drawing, so all drawing is - localized in one area, and may be customized depending on an application's - specific needs. - - wxAuiManager works as follows: the programmer adds panes to the class, - or makes changes to existing pane properties (dock position, floating - state, show state, etc.). To apply these changes, wxAuiManager's - Update() function is called. This batch processing can be used to avoid - flicker, by modifying more than one pane at a time, and then "committing" - all of the changes at once by calling Update(). - - Panes can be added quite easily: - - @code - wxTextCtrl* text1 = new wxTextCtrl(this, -1); - wxTextCtrl* text2 = new wxTextCtrl(this, -1); - m_mgr.AddPane(text1, wxLEFT, wxT("Pane Caption")); - m_mgr.AddPane(text2, wxBOTTOM, wxT("Pane Caption")); - m_mgr.Update(); - @endcode - - Later on, the positions can be modified easily. The following will float - an existing pane in a tool window: - - @code - m_mgr.GetPane(text1).Float(); - @endcode - - - @section wxauimanager_layers Layers, Rows and Directions, Positions - - Inside wxAUI, the docking layout is figured out by checking several pane - parameters. Four of these are important for determining where a pane will end up: - - @li Direction: Each docked pane has a direction, Top, Bottom, Left, Right, or Center. - This is fairly self-explanatory. The pane will be placed in the location specified - by this variable. - @li Position: More than one pane can be placed inside of a dock. Imagine two panes - being docked on the left side of a window. One pane can be placed over another. - In proportionally managed docks, the pane position indicates its sequential position, - starting with zero. So, in our scenario with two panes docked on the left side, - the top pane in the dock would have position 0, and the second one would occupy - position 1. - @li Row: A row can allow for two docks to be placed next to each other. One of the - most common places for this to happen is in the toolbar. Multiple toolbar rows - are allowed, the first row being row 0, and the second row 1. Rows can also be - used on vertically docked panes. - @li Layer: A layer is akin to an onion. Layer 0 is the very center of the managed pane. - Thus, if a pane is in layer 0, it will be closest to the center window (also - sometimes known as the "content window"). Increasing layers "swallow up" all - layers of a lower value. This can look very similar to multiple rows, but is - different because all panes in a lower level yield to panes in higher levels. - The best way to understand layers is by running the wxAUI sample. - - - @library{wxbase} - @category{aui} - - @see wxAuiPaneInfo, wxAuiDockArt -*/ -class wxAuiManager : public wxEvtHandler -{ -public: - /** - Constructor. @a managed_wnd specifies the wxFrame which should be managed. - @a flags specifies options which allow the frame management behavior - to be modified. - */ - wxAuiManager(wxWindow* managed_wnd = NULL, - unsigned int flags = wxAUI_MGR_DEFAULT); - - /** - Dtor. - */ - virtual ~wxAuiManager(); - - //@{ - /** - AddPane() tells the frame manager to start managing a child window. - There are several versions of this function. The first version allows - the full spectrum of pane parameter possibilities. The second version is - used for simpler user interfaces which do not require as much configuration. - The last version allows a drop position to be specified, which will determine - where the pane will be added. - */ - bool AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info); - bool AddPane(wxWindow* window, int direction = wxLEFT, - const wxString& caption = wxEmptyString); - bool AddPane(wxWindow* window, - const wxAuiPaneInfo& pane_info, - const wxPoint& drop_pos); - //@} - - /** - Tells the wxAuiManager to stop managing the pane specified by window. - The window, if in a floated frame, is reparented to the frame managed - by wxAuiManager. - */ - bool DetachPane(wxWindow* window); - - /** - Returns an array of all panes managed by the frame manager. - */ - wxAuiPaneInfoArray GetAllPanes(); - - /** - Returns the current art provider being used. - @see wxAuiDockArt. - */ - wxAuiDockArt* GetArtProvider() const; - - /** - Returns the current dock constraint values. - See SetDockSizeConstraint() for more information. - */ - void GetDockSizeConstraint(double* widthpct, double* heightpct); - - /** - Returns the current manager's flags. - */ - unsigned int GetFlags() const; - - /** - Returns the frame currently being managed by wxAuiManager. - */ - wxWindow* GetManagedWindow() const; - - /** - Calling this method will return the wxAuiManager for a given window. - The @a window parameter should specify any child window or sub-child - window of the frame or window managed by wxAuiManager. - - The @a window parameter need not be managed by the manager itself, nor does it - even need to be a child or sub-child of a managed window. It must however - be inside the window hierarchy underneath the managed window. - */ - static wxAuiManager* GetManager(wxWindow* window); - - //@{ - /** - GetPane() is used to lookup a wxAuiPaneInfo object either by window pointer - or by pane name, which acts as a unique id for a window pane. - - The returned wxAuiPaneInfo object may then be modified to change a pane's - look, state or position. After one or more modifications to wxAuiPaneInfo, - wxAuiManager::Update() should be called to commit the changes to the user - interface. If the lookup failed (meaning the pane could not be found in the - manager), a call to the returned wxAuiPaneInfo's IsOk() method will return @false. - */ - wxAuiPaneInfo GetPane(wxWindow* window); - wxAuiPaneInfo GetPane(const wxString& name); - //@} - - /** - HideHint() hides any docking hint that may be visible. - */ - void HideHint(); - - /** - This method is used to insert either a previously unmanaged pane window - into the frame manager, or to insert a currently managed pane somewhere - else. InsertPane() will push all panes, rows, or docks aside and - insert the window into the position specified by @a insert_location. - - Because @a insert_location can specify either a pane, dock row, or dock - layer, the @a insert_level parameter is used to disambiguate this. - The parameter @a insert_level can take a value of wxAUI_INSERT_PANE, - wxAUI_INSERT_ROW or wxAUI_INSERT_DOCK. - */ - bool InsertPane(wxWindow* window, - const wxAuiPaneInfo& insert_location, - int insert_level = wxAUI_INSERT_PANE); - - /** - LoadPaneInfo() is similar to to LoadPerspective, with the exception that it - only loads information about a single pane. It is used in combination with - SavePaneInfo(). - */ - void LoadPaneInfo(wxString pane_part, wxAuiPaneInfo& pane); - - /** - Loads a saved perspective. If update is @true, wxAuiManager::Update() - is automatically invoked, thus realizing the saved perspective on screen. - */ - bool LoadPerspective(const wxString& perspective, - bool update = true); - - /** - ProcessDockResult() is a protected member of the wxAUI layout manager. - It can be overridden by derived classes to provide custom docking calculations. - */ - bool ProcessDockResult(wxAuiPaneInfo& target, - const wxAuiPaneInfo& new_pos); - - /** - SavePaneInfo() is similar to SavePerspective, with the exception that it only - saves information about a single pane. It is used in combination with - LoadPaneInfo(). - */ - wxString SavePaneInfo(wxAuiPaneInfo& pane); - - /** - Saves the entire user interface layout into an encoded wxString, which - can then be stored by the application (probably using wxConfig). - - When a perspective is restored using LoadPerspective(), the entire user - interface will return to the state it was when the perspective was saved. - */ - wxString SavePerspective(); - - /** - Instructs wxAuiManager to use art provider specified by parameter - @a art_provider for all drawing calls. - This allows plugable look-and-feel features. The previous art provider object, - if any, will be deleted by wxAuiManager. - - @see wxAuiDockArt. - */ - void SetArtProvider(wxAuiDockArt* art_provider); - - /** - When a user creates a new dock by dragging a window into a docked position, - often times the large size of the window will create a dock that is unwieldly - large. wxAuiManager by default limits the size of any new dock to 1/3 of the - window size. For horizontal docks, this would be 1/3 of the window height. - For vertical docks, 1/3 of the width. - - Calling this function will adjust this constraint value. The numbers must be - between 0.0 and 1.0. For instance, calling SetDockSizeContraint with - 0.5, 0.5 will cause new docks to be limited to half of the size of the - entire managed window. - */ - void SetDockSizeConstraint(double widthpct, double heightpct); - - /** - This method is used to specify wxAuiManager's settings flags. @a flags - specifies options which allow the frame management behavior to be modified. - */ - void SetFlags(unsigned int flags); - - /** - Called to specify the frame or window which is to be managed by wxAuiManager. - Frame management is not restricted to just frames. Child windows or custom - controls are also allowed. - */ - void SetManagedWindow(wxWindow* managed_wnd); - - /** - This function is used by controls to explicitly show a hint window at the - specified rectangle. It is rarely called, and is mostly used by controls - implementing custom pane drag/drop behaviour. - The specified rectangle should be in screen coordinates. - */ - void ShowHint(const wxRect& rect); - - /** - Uninitializes the framework and should be called before a managed frame or - window is destroyed. UnInit() is usually called in the managed wxFrame's - destructor. It is necessary to call this function before the managed frame - or window is destroyed, otherwise the manager cannot remove its custom event - handlers from a window. - */ - void UnInit(); - - /** - This method is called after any number of changes are - made to any of the managed panes. Update() must be invoked after - AddPane() or InsertPane() are called in order to "realize" or "commit" - the changes. In addition, any number of changes may be made to - wxAuiPaneInfo structures (retrieved with wxAuiManager::GetPane), but to - realize the changes, Update() must be called. This construction allows - pane flicker to be avoided by updating the whole layout at one time. - */ - void Update(); -}; - - - -/** - @class wxAuiPaneInfo - @headerfile aui.h wx/aui/aui.h - - wxAuiPaneInfo is part of the wxAUI class framework. - See also @ref overview_aui. - - wxAuiPaneInfo specifies all the parameters for a pane. - These parameters specify where the pane is on the screen, whether it is docked - or floating, or hidden. - In addition, these parameters specify the pane's docked position, floating - position, preferred size, minimum size, caption text among many other parameters. - - @library{wxbase} - @category{aui} - - @see wxAuiManager, wxAuiDockArt -*/ -class wxAuiPaneInfo -{ -public: - wxAuiPaneInfo(); - - /** - Copy constructor. - */ - wxAuiPaneInfo(const wxAuiPaneInfo& c); - - //@{ - /** - BestSize() sets the ideal size for the pane. The docking manager will attempt - to use this size as much as possible when docking or floating the pane. - */ - wxAuiPaneInfo BestSize(const wxSize& size); - wxAuiPaneInfo BestSize(int x, int y); - //@} - - /** - Bottom() sets the pane dock position to the bottom side of the frame. This is - the same thing as calling Direction(wxAUI_DOCK_BOTTOM). - */ - wxAuiPaneInfo Bottom(); - - /** - BottomDockable() indicates whether a pane can be docked at the bottom of the - frame. - */ - wxAuiPaneInfo BottomDockable(bool b = true); - - /** - Caption() sets the caption of the pane. - */ - wxAuiPaneInfo Caption(const wxString& c); - - /** - CaptionVisible indicates that a pane caption should be visible. If @false, no - pane caption is drawn. - */ - wxAuiPaneInfo CaptionVisible(bool visible = true); - - //@{ - /** - Center() sets the pane dock position to the left side of the frame. - The centre pane is the space in the middle after all border panes (left, top, - right, bottom) are subtracted from the layout. - This is the same thing as calling Direction(wxAUI_DOCK_CENTRE). - */ - wxAuiPaneInfo Centre(); - wxAuiPaneInfo Center(); - //@} - - //@{ - /** - CentrePane() specifies that the pane should adopt the default center pane - settings. Centre panes usually do not have caption bars. - This function provides an easy way of preparing a pane to be displayed in - the center dock position. - */ - wxAuiPaneInfo CentrePane(); - wxAuiPaneInfo CenterPane(); - //@} - - /** - CloseButton() indicates that a close button should be drawn for the pane. - */ - wxAuiPaneInfo CloseButton(bool visible = true); - - /** - DefaultPane() specifies that the pane should adopt the default pane settings. - */ - wxAuiPaneInfo DefaultPane(); - - /** - DestroyOnClose() indicates whether a pane should be detroyed when it is closed. - Normally a pane is simply hidden when the close button is clicked. - Setting DestroyOnClose to @true will cause the window to be destroyed when - the user clicks the pane's close button. - */ - wxAuiPaneInfo DestroyOnClose(bool b = true); - - /** - Direction() determines the direction of the docked pane. It is functionally the - same as calling Left(), Right(), Top() or Bottom(), except that docking direction - may be specified programmatically via the parameter. - */ - wxAuiPaneInfo Direction(int direction); - - /** - Dock() indicates that a pane should be docked. It is the opposite of Float(). - */ - wxAuiPaneInfo Dock(); - - /** - DockFixed() causes the containing dock to have no resize sash. This is useful - for creating panes that span the entire width or height of a dock, but should - not be resizable in the other direction. - */ - wxAuiPaneInfo DockFixed(bool b = true); - - /** - Dockable() specifies whether a frame can be docked or not. It is the same as - specifying TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b). - */ - wxAuiPaneInfo Dockable(bool b = true); - - /** - Fixed() forces a pane to be fixed size so that it cannot be resized. After - calling Fixed(), IsFixed() will return @true. - */ - wxAuiPaneInfo Fixed(); - - /** - Float() indicates that a pane should be floated. It is the opposite of Dock(). - */ - wxAuiPaneInfo Float(); - - /** - Floatable() sets whether the user will be able to undock a pane and turn it - into a floating window. - */ - wxAuiPaneInfo Floatable(bool b = true); - - //@{ - /** - FloatingPosition() sets the position of the floating pane. - */ - wxAuiPaneInfo FloatingPosition(const wxPoint& pos); - wxAuiPaneInfo FloatingPosition(int x, int y); - //@} - - //@{ - /** - FloatingSize() sets the size of the floating pane. - */ - wxAuiPaneInfo FloatingSize(const wxSize& size); - wxAuiPaneInfo FloatingSize(int x, int y); - //@} - - /** - Gripper() indicates that a gripper should be drawn for the pane. - */ - wxAuiPaneInfo Gripper(bool visible = true); - - /** - GripperTop() indicates that a gripper should be drawn at the top of the pane. - */ - wxAuiPaneInfo GripperTop(bool attop = true); - - /** - HasBorder() returns @true if the pane displays a border. - */ - bool HasBorder() const; - - /** - HasCaption() returns @true if the pane displays a caption. - */ - bool HasCaption() const; - - /** - HasCloseButton() returns @true if the pane displays a button to close the pane. - */ - bool HasCloseButton() const; - - /** - HasFlag() returns @true if the the property specified by flag is active for the - pane. - */ - bool HasFlag(unsigned int flag) const; - - /** - HasGripper() returns @true if the pane displays a gripper. - */ - bool HasGripper() const; - - /** - HasGripper() returns @true if the pane displays a gripper at the top. - */ - bool HasGripperTop() const; - - /** - HasMaximizeButton() returns @true if the pane displays a button to maximize the - pane. - */ - bool HasMaximizeButton() const; - - /** - HasMinimizeButton() returns @true if the pane displays a button to minimize the - pane. - */ - bool HasMinimizeButton() const; - - /** - HasPinButton() returns @true if the pane displays a button to float the pane. - */ - bool HasPinButton() const; - - /** - Hide() indicates that a pane should be hidden. - */ - wxAuiPaneInfo Hide(); - - /** - IsBottomDockable() returns @true if the pane can be docked at the bottom of the - managed frame. - */ - bool IsBottomDockable() const; - - /** - IsDocked() returns @true if the pane is docked. - */ - bool IsDocked() const; - - /** - IsFixed() returns @true if the pane cannot be resized. - */ - bool IsFixed() const; - - /** - IsFloatable() returns @true if the pane can be undocked and displayed as a - floating window. - */ - bool IsFloatable() const; - - /** - IsFloating() returns @true if the pane is floating. - */ - bool IsFloating() const; - - /** - IsLeftDockable() returns @true if the pane can be docked on the left of the - managed frame. - */ - bool IsLeftDockable() const; - - /** - IsMoveable() returns @true if the docked frame can be undocked or moved to - another dock position. - */ - bool IsMovable() const; - - /** - IsOk() returns @true if the wxAuiPaneInfo structure is valid. A pane structure - is valid if it has an associated window. - */ - bool IsOk() const; - - /** - IsResizable() returns @true if the pane can be resized. - */ - bool IsResizable() const; - - /** - IsRightDockable() returns @true if the pane can be docked on the right of the - managed frame. - */ - bool IsRightDockable() const; - - /** - IsShown() returns @true if the pane is currently shown. - */ - bool IsShown() const; - - /** - IsToolbar() returns @true if the pane contains a toolbar. - */ - bool IsToolbar() const; - - /** - IsTopDockable() returns @true if the pane can be docked at the top of the - managed frame. - */ - bool IsTopDockable() const; - - /** - Layer() determines the layer of the docked pane. The dock layer is similar to - an onion, the inner-most layer being layer 0. Each shell moving in the outward - direction has a higher layer number. This allows for more complex docking layout - formation. - */ - wxAuiPaneInfo Layer(int layer); - - /** - Left() sets the pane dock position to the left side of the frame. This is the - same thing as calling Direction(wxAUI_DOCK_LEFT). - */ - wxAuiPaneInfo Left(); - - /** - LeftDockable() indicates whether a pane can be docked on the left of the frame. - */ - wxAuiPaneInfo LeftDockable(bool b = true); - - //@{ - /** - MaxSize() sets the maximum size of the pane. - */ - wxAuiPaneInfo MaxSize(const wxSize& size); - wxAuiPaneInfo MaxSize(int x, int y); - //@} - - /** - MaximizeButton() indicates that a maximize button should be drawn for the pane. - */ - wxAuiPaneInfo MaximizeButton(bool visible = true); - - //@{ - /** - MinSize() sets the minimum size of the pane. Please note that this is only - partially supported as of this writing. - */ - wxAuiPaneInfo MinSize(const wxSize& size); - wxAuiPaneInfo MinSize(int x, int y); - //@} - - /** - MinimizeButton() indicates that a minimize button should be drawn for the pane. - */ - wxAuiPaneInfo MinimizeButton(bool visible = true); - - /** - Movable indicates whether a frame can be moved. - */ - wxAuiPaneInfo Movable(bool b = true); - - /** - Name() sets the name of the pane so it can be referenced in lookup functions. - If a name is not specified by the user, a random name is assigned to the pane - when it is added to the manager. - */ - wxAuiPaneInfo Name(const wxString& n); - - /** - PaneBorder indicates that a border should be drawn for the pane. - */ - wxAuiPaneInfo PaneBorder(bool visible = true); - - /** - PinButton() indicates that a pin button should be drawn for the pane. - */ - wxAuiPaneInfo PinButton(bool visible = true); - - /** - Position() determines the position of the docked pane. - */ - wxAuiPaneInfo Position(int pos); - - /** - Resizable() allows a pane to be resized if the parameter is @true, and forces it - to be a fixed size if the parameter is @false. This is simply an antonym for Fixed(). - */ - wxAuiPaneInfo Resizable(bool resizable = true); - - /** - Right() sets the pane dock position to the right side of the frame. - */ - wxAuiPaneInfo Right(); - - /** - RightDockable() indicates whether a pane can be docked on the right of the - frame. - */ - wxAuiPaneInfo RightDockable(bool b = true); - - /** - Row() determines the row of the docked pane. - */ - wxAuiPaneInfo Row(int row); - - /** - Write the safe parts of a newly loaded PaneInfo structure "source" into "this" - used on loading perspectives etc. - */ - void SafeSet(wxAuiPaneInfo source); - - /** - SetFlag() turns the property given by flag on or off with the option_state - parameter. - */ - wxAuiPaneInfo SetFlag(unsigned int flag, bool option_state); - - /** - Show() indicates that a pane should be shown. - */ - wxAuiPaneInfo Show(bool show = true); - - /** - ToolbarPane() specifies that the pane should adopt the default toolbar pane - settings. - */ - wxAuiPaneInfo ToolbarPane(); - - /** - Top() sets the pane dock position to the top of the frame. - */ - wxAuiPaneInfo Top(); - - /** - TopDockable() indicates whether a pane can be docked at the top of the frame. - */ - wxAuiPaneInfo TopDockable(bool b = true); - - /** - Window() assigns the window pointer that the wxAuiPaneInfo should use. - This normally does not need to be specified, as the window pointer is - automatically assigned to the wxAuiPaneInfo structure as soon as it is added - to the manager. - */ - wxAuiPaneInfo Window(wxWindow* w); - - /** - Makes a copy of the wxAuiPaneInfo object. - */ - wxAuiPaneInfo& operator operator=(const wxAuiPaneInfo& c); -}; - diff --git a/interface/aui/dockart.h b/interface/aui/dockart.h index 5b7b33e90f..6d9918a696 100644 --- a/interface/aui/dockart.h +++ b/interface/aui/dockart.h @@ -81,7 +81,7 @@ enum wxAuiButtonId wxAuiDockArt is the art provider: provides all drawing functionality to the wxAui dock manager. This allows the dock manager to have a plugable look-and-feel. - By default, a wxAuiManager uses an instance of this class called + By default, a wxAuiManager uses an instance of this class called wxAuiDefaultDockArt which provides bitmap art and a colour scheme that is adapted to the major platforms' look. You can either derive from that class to alter its behaviour or write a completely new dock art class. @@ -103,7 +103,7 @@ public: /** Destructor. */ - ~wxAuiDockArt(); + virtual ~wxAuiDockArt(); /** Draws a background. @@ -151,17 +151,11 @@ public: virtual void DrawSash(wxDC& dc, wxWindow* window, int orientation, const wxRect& rect); - - /** - The same as GetColour(). - */ - virtual wxColour GetColor(int id); - /** Get the colour of a certain setting. @a id can be one of the colour values of @b wxAuiPaneDockArtSetting. */ - virtual wxColour GetColour(int id); + virtual wxColour GetColour(int id) = 0; /** Get a font setting. @@ -174,16 +168,11 @@ public: */ virtual int GetMetric(int id); - /** - The same as SetColour(). - */ - virtual void SetColor(int id, const wxColour& color); - /** Set a certain setting with the value @e colour. @a id can be one of the colour values of @b wxAuiPaneDockArtSetting. */ - virtual void SetColour(int id, const wxColor& colour); + virtual void SetColour(int id, const wxColor& colour) = 0; /** Set a font setting. diff --git a/interface/aui/framemanager.h b/interface/aui/framemanager.h new file mode 100644 index 0000000000..47c876cec5 --- /dev/null +++ b/interface/aui/framemanager.h @@ -0,0 +1,769 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: aui/aui.h +// Purpose: interface of wxAuiManager +// Author: wxWidgets team +// RCS-ID: $Id$ +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + + +/** + @todo TOWRITE +*/ +enum wxAuiManagerDock +{ + wxAUI_DOCK_NONE = 0, + wxAUI_DOCK_TOP = 1, + wxAUI_DOCK_RIGHT = 2, + wxAUI_DOCK_BOTTOM = 3, + wxAUI_DOCK_LEFT = 4, + wxAUI_DOCK_CENTER = 5, + wxAUI_DOCK_CENTRE = wxAUI_DOCK_CENTER +}; + + +/** + @todo TOWRITE +*/ +enum wxAuiManagerOption +{ + wxAUI_MGR_ALLOW_FLOATING = 1 << 0, + wxAUI_MGR_ALLOW_ACTIVE_PANE = 1 << 1, + wxAUI_MGR_TRANSPARENT_DRAG = 1 << 2, + wxAUI_MGR_TRANSPARENT_HINT = 1 << 3, + wxAUI_MGR_VENETIAN_BLINDS_HINT = 1 << 4, + wxAUI_MGR_RECTANGLE_HINT = 1 << 5, + wxAUI_MGR_HINT_FADE = 1 << 6, + wxAUI_MGR_NO_VENETIAN_BLINDS_FADE = 1 << 7, + + wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING | + wxAUI_MGR_TRANSPARENT_HINT | + wxAUI_MGR_HINT_FADE | + wxAUI_MGR_NO_VENETIAN_BLINDS_FADE +}; + +/** + @class wxAuiManager + @headerfile aui.h wx/aui/aui.h + + wxAuiManager is the central class of the wxAUI class framework. + See also @ref overview_aui. + + wxAuiManager manages the panes associated with it for a particular wxFrame, + using a pane's wxAuiPaneInfo information to determine each pane's docking + and floating behavior. + + wxAuiManager uses wxWidgets' sizer mechanism to plan the layout of each frame. + It uses a replaceable dock art class to do all drawing, so all drawing is + localized in one area, and may be customized depending on an application's + specific needs. + + wxAuiManager works as follows: the programmer adds panes to the class, + or makes changes to existing pane properties (dock position, floating + state, show state, etc.). To apply these changes, wxAuiManager's + Update() function is called. This batch processing can be used to avoid + flicker, by modifying more than one pane at a time, and then "committing" + all of the changes at once by calling Update(). + + Panes can be added quite easily: + + @code + wxTextCtrl* text1 = new wxTextCtrl(this, -1); + wxTextCtrl* text2 = new wxTextCtrl(this, -1); + m_mgr.AddPane(text1, wxLEFT, wxT("Pane Caption")); + m_mgr.AddPane(text2, wxBOTTOM, wxT("Pane Caption")); + m_mgr.Update(); + @endcode + + Later on, the positions can be modified easily. The following will float + an existing pane in a tool window: + + @code + m_mgr.GetPane(text1).Float(); + @endcode + + + @section wxauimanager_layers Layers, Rows and Directions, Positions + + Inside wxAUI, the docking layout is figured out by checking several pane + parameters. Four of these are important for determining where a pane will end up: + + @li Direction: Each docked pane has a direction, Top, Bottom, Left, Right, or Center. + This is fairly self-explanatory. The pane will be placed in the location specified + by this variable. + @li Position: More than one pane can be placed inside of a dock. Imagine two panes + being docked on the left side of a window. One pane can be placed over another. + In proportionally managed docks, the pane position indicates its sequential position, + starting with zero. So, in our scenario with two panes docked on the left side, + the top pane in the dock would have position 0, and the second one would occupy + position 1. + @li Row: A row can allow for two docks to be placed next to each other. One of the + most common places for this to happen is in the toolbar. Multiple toolbar rows + are allowed, the first row being row 0, and the second row 1. Rows can also be + used on vertically docked panes. + @li Layer: A layer is akin to an onion. Layer 0 is the very center of the managed pane. + Thus, if a pane is in layer 0, it will be closest to the center window (also + sometimes known as the "content window"). Increasing layers "swallow up" all + layers of a lower value. This can look very similar to multiple rows, but is + different because all panes in a lower level yield to panes in higher levels. + The best way to understand layers is by running the wxAUI sample. + + + @library{wxbase} + @category{aui} + + @see wxAuiPaneInfo, wxAuiDockArt +*/ +class wxAuiManager : public wxEvtHandler +{ +public: + /** + Constructor. @a managed_wnd specifies the wxFrame which should be managed. + @a flags specifies options which allow the frame management behavior + to be modified. + */ + wxAuiManager(wxWindow* managed_wnd = NULL, + unsigned int flags = wxAUI_MGR_DEFAULT); + + /** + Dtor. + */ + virtual ~wxAuiManager(); + + //@{ + /** + AddPane() tells the frame manager to start managing a child window. + There are several versions of this function. The first version allows + the full spectrum of pane parameter possibilities. The second version is + used for simpler user interfaces which do not require as much configuration. + The last version allows a drop position to be specified, which will determine + where the pane will be added. + */ + bool AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info); + bool AddPane(wxWindow* window, int direction = wxLEFT, + const wxString& caption = wxEmptyString); + bool AddPane(wxWindow* window, + const wxAuiPaneInfo& pane_info, + const wxPoint& drop_pos); + //@} + + /** + Tells the wxAuiManager to stop managing the pane specified by window. + The window, if in a floated frame, is reparented to the frame managed + by wxAuiManager. + */ + bool DetachPane(wxWindow* window); + + /** + Returns an array of all panes managed by the frame manager. + */ + wxAuiPaneInfoArray GetAllPanes(); + + /** + Returns the current art provider being used. + @see wxAuiDockArt. + */ + wxAuiDockArt* GetArtProvider() const; + + /** + Returns the current dock constraint values. + See SetDockSizeConstraint() for more information. + */ + void GetDockSizeConstraint(double* widthpct, double* heightpct); + + /** + Returns the current manager's flags. + */ + unsigned int GetFlags() const; + + /** + Returns the frame currently being managed by wxAuiManager. + */ + wxWindow* GetManagedWindow() const; + + /** + Calling this method will return the wxAuiManager for a given window. + The @a window parameter should specify any child window or sub-child + window of the frame or window managed by wxAuiManager. + + The @a window parameter need not be managed by the manager itself, nor does it + even need to be a child or sub-child of a managed window. It must however + be inside the window hierarchy underneath the managed window. + */ + static wxAuiManager* GetManager(wxWindow* window); + + //@{ + /** + GetPane() is used to lookup a wxAuiPaneInfo object either by window pointer + or by pane name, which acts as a unique id for a window pane. + + The returned wxAuiPaneInfo object may then be modified to change a pane's + look, state or position. After one or more modifications to wxAuiPaneInfo, + wxAuiManager::Update() should be called to commit the changes to the user + interface. If the lookup failed (meaning the pane could not be found in the + manager), a call to the returned wxAuiPaneInfo's IsOk() method will return @false. + */ + wxAuiPaneInfo GetPane(wxWindow* window); + wxAuiPaneInfo GetPane(const wxString& name); + //@} + + /** + HideHint() hides any docking hint that may be visible. + */ + void HideHint(); + + /** + This method is used to insert either a previously unmanaged pane window + into the frame manager, or to insert a currently managed pane somewhere + else. InsertPane() will push all panes, rows, or docks aside and + insert the window into the position specified by @a insert_location. + + Because @a insert_location can specify either a pane, dock row, or dock + layer, the @a insert_level parameter is used to disambiguate this. + The parameter @a insert_level can take a value of wxAUI_INSERT_PANE, + wxAUI_INSERT_ROW or wxAUI_INSERT_DOCK. + */ + bool InsertPane(wxWindow* window, + const wxAuiPaneInfo& insert_location, + int insert_level = wxAUI_INSERT_PANE); + + /** + LoadPaneInfo() is similar to to LoadPerspective, with the exception that it + only loads information about a single pane. It is used in combination with + SavePaneInfo(). + */ + void LoadPaneInfo(wxString pane_part, wxAuiPaneInfo& pane); + + /** + Loads a saved perspective. If update is @true, wxAuiManager::Update() + is automatically invoked, thus realizing the saved perspective on screen. + */ + bool LoadPerspective(const wxString& perspective, + bool update = true); + + /** + ProcessDockResult() is a protected member of the wxAUI layout manager. + It can be overridden by derived classes to provide custom docking calculations. + */ + bool ProcessDockResult(wxAuiPaneInfo& target, + const wxAuiPaneInfo& new_pos); + + /** + SavePaneInfo() is similar to SavePerspective, with the exception that it only + saves information about a single pane. It is used in combination with + LoadPaneInfo(). + */ + wxString SavePaneInfo(wxAuiPaneInfo& pane); + + /** + Saves the entire user interface layout into an encoded wxString, which + can then be stored by the application (probably using wxConfig). + + When a perspective is restored using LoadPerspective(), the entire user + interface will return to the state it was when the perspective was saved. + */ + wxString SavePerspective(); + + /** + Instructs wxAuiManager to use art provider specified by parameter + @a art_provider for all drawing calls. + This allows plugable look-and-feel features. The previous art provider object, + if any, will be deleted by wxAuiManager. + + @see wxAuiDockArt. + */ + void SetArtProvider(wxAuiDockArt* art_provider); + + /** + When a user creates a new dock by dragging a window into a docked position, + often times the large size of the window will create a dock that is unwieldly + large. wxAuiManager by default limits the size of any new dock to 1/3 of the + window size. For horizontal docks, this would be 1/3 of the window height. + For vertical docks, 1/3 of the width. + + Calling this function will adjust this constraint value. The numbers must be + between 0.0 and 1.0. For instance, calling SetDockSizeContraint with + 0.5, 0.5 will cause new docks to be limited to half of the size of the + entire managed window. + */ + void SetDockSizeConstraint(double widthpct, double heightpct); + + /** + This method is used to specify wxAuiManager's settings flags. @a flags + specifies options which allow the frame management behavior to be modified. + */ + void SetFlags(unsigned int flags); + + /** + Called to specify the frame or window which is to be managed by wxAuiManager. + Frame management is not restricted to just frames. Child windows or custom + controls are also allowed. + */ + void SetManagedWindow(wxWindow* managed_wnd); + + /** + This function is used by controls to explicitly show a hint window at the + specified rectangle. It is rarely called, and is mostly used by controls + implementing custom pane drag/drop behaviour. + The specified rectangle should be in screen coordinates. + */ + void ShowHint(const wxRect& rect); + + /** + Uninitializes the framework and should be called before a managed frame or + window is destroyed. UnInit() is usually called in the managed wxFrame's + destructor. It is necessary to call this function before the managed frame + or window is destroyed, otherwise the manager cannot remove its custom event + handlers from a window. + */ + void UnInit(); + + /** + This method is called after any number of changes are + made to any of the managed panes. Update() must be invoked after + AddPane() or InsertPane() are called in order to "realize" or "commit" + the changes. In addition, any number of changes may be made to + wxAuiPaneInfo structures (retrieved with wxAuiManager::GetPane), but to + realize the changes, Update() must be called. This construction allows + pane flicker to be avoided by updating the whole layout at one time. + */ + void Update(); +}; + + + +/** + @class wxAuiPaneInfo + @headerfile aui.h wx/aui/aui.h + + wxAuiPaneInfo is part of the wxAUI class framework. + See also @ref overview_aui. + + wxAuiPaneInfo specifies all the parameters for a pane. + These parameters specify where the pane is on the screen, whether it is docked + or floating, or hidden. + In addition, these parameters specify the pane's docked position, floating + position, preferred size, minimum size, caption text among many other parameters. + + @library{wxbase} + @category{aui} + + @see wxAuiManager, wxAuiDockArt +*/ +class wxAuiPaneInfo +{ +public: + wxAuiPaneInfo(); + + /** + Copy constructor. + */ + wxAuiPaneInfo(const wxAuiPaneInfo& c); + + //@{ + /** + BestSize() sets the ideal size for the pane. The docking manager will attempt + to use this size as much as possible when docking or floating the pane. + */ + wxAuiPaneInfo BestSize(const wxSize& size); + wxAuiPaneInfo BestSize(int x, int y); + //@} + + /** + Bottom() sets the pane dock position to the bottom side of the frame. This is + the same thing as calling Direction(wxAUI_DOCK_BOTTOM). + */ + wxAuiPaneInfo Bottom(); + + /** + BottomDockable() indicates whether a pane can be docked at the bottom of the + frame. + */ + wxAuiPaneInfo BottomDockable(bool b = true); + + /** + Caption() sets the caption of the pane. + */ + wxAuiPaneInfo Caption(const wxString& c); + + /** + CaptionVisible indicates that a pane caption should be visible. If @false, no + pane caption is drawn. + */ + wxAuiPaneInfo CaptionVisible(bool visible = true); + + //@{ + /** + Center() sets the pane dock position to the left side of the frame. + The centre pane is the space in the middle after all border panes (left, top, + right, bottom) are subtracted from the layout. + This is the same thing as calling Direction(wxAUI_DOCK_CENTRE). + */ + wxAuiPaneInfo Centre(); + wxAuiPaneInfo Center(); + //@} + + //@{ + /** + CentrePane() specifies that the pane should adopt the default center pane + settings. Centre panes usually do not have caption bars. + This function provides an easy way of preparing a pane to be displayed in + the center dock position. + */ + wxAuiPaneInfo CentrePane(); + wxAuiPaneInfo CenterPane(); + //@} + + /** + CloseButton() indicates that a close button should be drawn for the pane. + */ + wxAuiPaneInfo CloseButton(bool visible = true); + + /** + DefaultPane() specifies that the pane should adopt the default pane settings. + */ + wxAuiPaneInfo DefaultPane(); + + /** + DestroyOnClose() indicates whether a pane should be detroyed when it is closed. + Normally a pane is simply hidden when the close button is clicked. + Setting DestroyOnClose to @true will cause the window to be destroyed when + the user clicks the pane's close button. + */ + wxAuiPaneInfo DestroyOnClose(bool b = true); + + /** + Direction() determines the direction of the docked pane. It is functionally the + same as calling Left(), Right(), Top() or Bottom(), except that docking direction + may be specified programmatically via the parameter. + */ + wxAuiPaneInfo Direction(int direction); + + /** + Dock() indicates that a pane should be docked. It is the opposite of Float(). + */ + wxAuiPaneInfo Dock(); + + /** + DockFixed() causes the containing dock to have no resize sash. This is useful + for creating panes that span the entire width or height of a dock, but should + not be resizable in the other direction. + */ + wxAuiPaneInfo DockFixed(bool b = true); + + /** + Dockable() specifies whether a frame can be docked or not. It is the same as + specifying TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b). + */ + wxAuiPaneInfo Dockable(bool b = true); + + /** + Fixed() forces a pane to be fixed size so that it cannot be resized. After + calling Fixed(), IsFixed() will return @true. + */ + wxAuiPaneInfo Fixed(); + + /** + Float() indicates that a pane should be floated. It is the opposite of Dock(). + */ + wxAuiPaneInfo Float(); + + /** + Floatable() sets whether the user will be able to undock a pane and turn it + into a floating window. + */ + wxAuiPaneInfo Floatable(bool b = true); + + //@{ + /** + FloatingPosition() sets the position of the floating pane. + */ + wxAuiPaneInfo FloatingPosition(const wxPoint& pos); + wxAuiPaneInfo FloatingPosition(int x, int y); + //@} + + //@{ + /** + FloatingSize() sets the size of the floating pane. + */ + wxAuiPaneInfo FloatingSize(const wxSize& size); + wxAuiPaneInfo FloatingSize(int x, int y); + //@} + + /** + Gripper() indicates that a gripper should be drawn for the pane. + */ + wxAuiPaneInfo Gripper(bool visible = true); + + /** + GripperTop() indicates that a gripper should be drawn at the top of the pane. + */ + wxAuiPaneInfo GripperTop(bool attop = true); + + /** + HasBorder() returns @true if the pane displays a border. + */ + bool HasBorder() const; + + /** + HasCaption() returns @true if the pane displays a caption. + */ + bool HasCaption() const; + + /** + HasCloseButton() returns @true if the pane displays a button to close the pane. + */ + bool HasCloseButton() const; + + /** + HasFlag() returns @true if the the property specified by flag is active for the + pane. + */ + bool HasFlag(unsigned int flag) const; + + /** + HasGripper() returns @true if the pane displays a gripper. + */ + bool HasGripper() const; + + /** + HasGripper() returns @true if the pane displays a gripper at the top. + */ + bool HasGripperTop() const; + + /** + HasMaximizeButton() returns @true if the pane displays a button to maximize the + pane. + */ + bool HasMaximizeButton() const; + + /** + HasMinimizeButton() returns @true if the pane displays a button to minimize the + pane. + */ + bool HasMinimizeButton() const; + + /** + HasPinButton() returns @true if the pane displays a button to float the pane. + */ + bool HasPinButton() const; + + /** + Hide() indicates that a pane should be hidden. + */ + wxAuiPaneInfo Hide(); + + /** + IsBottomDockable() returns @true if the pane can be docked at the bottom of the + managed frame. + */ + bool IsBottomDockable() const; + + /** + IsDocked() returns @true if the pane is docked. + */ + bool IsDocked() const; + + /** + IsFixed() returns @true if the pane cannot be resized. + */ + bool IsFixed() const; + + /** + IsFloatable() returns @true if the pane can be undocked and displayed as a + floating window. + */ + bool IsFloatable() const; + + /** + IsFloating() returns @true if the pane is floating. + */ + bool IsFloating() const; + + /** + IsLeftDockable() returns @true if the pane can be docked on the left of the + managed frame. + */ + bool IsLeftDockable() const; + + /** + IsMoveable() returns @true if the docked frame can be undocked or moved to + another dock position. + */ + bool IsMovable() const; + + /** + IsOk() returns @true if the wxAuiPaneInfo structure is valid. A pane structure + is valid if it has an associated window. + */ + bool IsOk() const; + + /** + IsResizable() returns @true if the pane can be resized. + */ + bool IsResizable() const; + + /** + IsRightDockable() returns @true if the pane can be docked on the right of the + managed frame. + */ + bool IsRightDockable() const; + + /** + IsShown() returns @true if the pane is currently shown. + */ + bool IsShown() const; + + /** + IsToolbar() returns @true if the pane contains a toolbar. + */ + bool IsToolbar() const; + + /** + IsTopDockable() returns @true if the pane can be docked at the top of the + managed frame. + */ + bool IsTopDockable() const; + + /** + Layer() determines the layer of the docked pane. The dock layer is similar to + an onion, the inner-most layer being layer 0. Each shell moving in the outward + direction has a higher layer number. This allows for more complex docking layout + formation. + */ + wxAuiPaneInfo Layer(int layer); + + /** + Left() sets the pane dock position to the left side of the frame. This is the + same thing as calling Direction(wxAUI_DOCK_LEFT). + */ + wxAuiPaneInfo Left(); + + /** + LeftDockable() indicates whether a pane can be docked on the left of the frame. + */ + wxAuiPaneInfo LeftDockable(bool b = true); + + //@{ + /** + MaxSize() sets the maximum size of the pane. + */ + wxAuiPaneInfo MaxSize(const wxSize& size); + wxAuiPaneInfo MaxSize(int x, int y); + //@} + + /** + MaximizeButton() indicates that a maximize button should be drawn for the pane. + */ + wxAuiPaneInfo MaximizeButton(bool visible = true); + + //@{ + /** + MinSize() sets the minimum size of the pane. Please note that this is only + partially supported as of this writing. + */ + wxAuiPaneInfo MinSize(const wxSize& size); + wxAuiPaneInfo MinSize(int x, int y); + //@} + + /** + MinimizeButton() indicates that a minimize button should be drawn for the pane. + */ + wxAuiPaneInfo MinimizeButton(bool visible = true); + + /** + Movable indicates whether a frame can be moved. + */ + wxAuiPaneInfo Movable(bool b = true); + + /** + Name() sets the name of the pane so it can be referenced in lookup functions. + If a name is not specified by the user, a random name is assigned to the pane + when it is added to the manager. + */ + wxAuiPaneInfo Name(const wxString& n); + + /** + PaneBorder indicates that a border should be drawn for the pane. + */ + wxAuiPaneInfo PaneBorder(bool visible = true); + + /** + PinButton() indicates that a pin button should be drawn for the pane. + */ + wxAuiPaneInfo PinButton(bool visible = true); + + /** + Position() determines the position of the docked pane. + */ + wxAuiPaneInfo Position(int pos); + + /** + Resizable() allows a pane to be resized if the parameter is @true, and forces it + to be a fixed size if the parameter is @false. This is simply an antonym for Fixed(). + */ + wxAuiPaneInfo Resizable(bool resizable = true); + + /** + Right() sets the pane dock position to the right side of the frame. + */ + wxAuiPaneInfo Right(); + + /** + RightDockable() indicates whether a pane can be docked on the right of the + frame. + */ + wxAuiPaneInfo RightDockable(bool b = true); + + /** + Row() determines the row of the docked pane. + */ + wxAuiPaneInfo Row(int row); + + /** + Write the safe parts of a newly loaded PaneInfo structure "source" into "this" + used on loading perspectives etc. + */ + void SafeSet(wxAuiPaneInfo source); + + /** + SetFlag() turns the property given by flag on or off with the option_state + parameter. + */ + wxAuiPaneInfo SetFlag(unsigned int flag, bool option_state); + + /** + Show() indicates that a pane should be shown. + */ + wxAuiPaneInfo Show(bool show = true); + + /** + ToolbarPane() specifies that the pane should adopt the default toolbar pane + settings. + */ + wxAuiPaneInfo ToolbarPane(); + + /** + Top() sets the pane dock position to the top of the frame. + */ + wxAuiPaneInfo Top(); + + /** + TopDockable() indicates whether a pane can be docked at the top of the frame. + */ + wxAuiPaneInfo TopDockable(bool b = true); + + /** + Window() assigns the window pointer that the wxAuiPaneInfo should use. + This normally does not need to be specified, as the window pointer is + automatically assigned to the wxAuiPaneInfo structure as soon as it is added + to the manager. + */ + wxAuiPaneInfo Window(wxWindow* w); + + /** + Makes a copy of the wxAuiPaneInfo object. + */ + wxAuiPaneInfo& operator operator=(const wxAuiPaneInfo& c); +}; +