X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23324ae1c7938ba904770fc456d3c07764b9c5e9..231b9591aac1d6a507aa1ecfeb5f57e720003391:/interface/collpane.h diff --git a/interface/collpane.h b/interface/collpane.h index 332007884b..89a6e74e79 100644 --- a/interface/collpane.h +++ b/interface/collpane.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: collpane.h -// Purpose: documentation for wxCollapsiblePaneEvent class +// Purpose: interface of wxCollapsiblePaneEvent // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -9,15 +9,14 @@ /** @class wxCollapsiblePaneEvent @wxheader{collpane.h} - + This event class is used for the events generated by wxCollapsiblePane. - + @library{wxcore} @category{FIXME} - - @seealso - wxCollapsiblePane + + @see wxCollapsiblePane */ class wxCollapsiblePaneEvent : public wxCommandEvent { @@ -25,36 +24,37 @@ public: /** The constructor is not normally used by the user code. */ - wxCollapsiblePaneEvent(wxObject * generator, int id, + wxCollapsiblePaneEvent(wxObject* generator, int id, bool collapsed); /** Returns @true if the pane has been collapsed. */ - bool GetCollapsed(); + bool GetCollapsed() const; /** - Sets this as a collapsed pane event (if @e collapsed is @true) or as an + Sets this as a collapsed pane event (if @a collapsed is @true) or as an expanded - pane event (if @e collapsed is @false). + pane event (if @a collapsed is @false). */ void SetCollapsed(bool collapsed); }; + /** @class wxCollapsiblePane @wxheader{collpane.h} - + A collapsible pane is a container with an embedded button-like control which can be used by the user to collapse or expand the pane's contents. - + Once constructed you should use the wxCollapsiblePane::GetPane function to access the pane and add your controls inside it (i.e. use the wxCollapsiblePane::GetPane's returned pointer as parent for the controls which must go in the pane, NOT the wxCollapsiblePane itself!). - + Note that because of its nature of control which can dynamically (and drastically) change its size at run-time under user-input, when putting wxCollapsiblePane @@ -65,17 +65,17 @@ public: would automatically get resized each time the user expands or collapse the pane window resulting usually in a weird, flickering effect. - + Usage sample: - + @code wxCollapsiblePane *collpane = new wxCollapsiblePane(this, wxID_ANY, wxT("Details:")); - + // add the pane with a zero proportion value to the 'sz' sizer which contains it sz-Add(collpane, 0, wxGROW|wxALL, 5); - + // now add a test label in the collapsible pane using a sizer to layout it: wxWindow *win = collpane-GetPane(); wxSizer *paneSz = new wxBoxSizer(wxVERTICAL); @@ -84,20 +84,19 @@ public: win-SetSizer(paneSz); paneSz-SetSizeHints(win); @endcode - + It is only available if @c wxUSE_COLLPANE is set to 1 (the default). - + @beginStyleTable @style{wxCP_DEFAULT_STYLE}: The default style: 0. @endStyleTable - + @library{wxcore} @category{ctrl} @appearance{collapsiblepane.png} - - @seealso - wxPanel, wxCollapsiblePaneEvent + + @see wxPanel, wxCollapsiblePaneEvent */ class wxCollapsiblePane : public wxControl { @@ -106,7 +105,7 @@ public: Initializes the object and calls Create() with all the parameters. */ - wxCollapsiblePane(wxWindow * parent, wxWindowID id, + wxCollapsiblePane(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -117,38 +116,31 @@ public: /** Collapses or expands the pane window. */ - void Collapse(bool collapse = @true); + void Collapse(bool collapse = true); /** - @param parent - Parent window, must not be non-@NULL. - - @param id - The identifier for the control. - - @param label - The initial label shown in the button which allows the user to expand or + @param parent + Parent window, must not be non-@NULL. + @param id + The identifier for the control. + @param label + The initial label shown in the button which allows the user to expand or collapse the pane window. - - @param pos - Initial position. - - @param size - Initial size. - - @param style - The window style, see wxCP_* flags. - - @param validator - Validator which can be used for additional date checks. - - @param name - Control name. - + @param pos + Initial position. + @param size + Initial size. + @param style + The window style, see wxCP_* flags. + @param validator + Validator which can be used for additional date checks. + @param name + Control name. + @returns @true if the control was successfully created or @false if - creation failed. + creation failed. */ - bool Create(wxWindow * parent, wxWindowID id, + bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -165,15 +157,16 @@ public: Returns a pointer to the pane window. Add controls to the returned wxWindow to make them collapsible. */ - wxWindow * GetPane(); + wxWindow* GetPane() const; /** Returns @true if the pane window is currently hidden. */ - bool IsCollapsed(); + bool IsCollapsed() const; /** Returns @true if the pane window is currently shown. */ - bool IsExpanded(); + bool IsExpanded() const; }; +