/** Not yet supported but added for future reference. Single fold forces other panels to close when
they are open, and only opens the current panel. This will allow the open panel to gain the full
size left in the client area */
/** Not yet supported but added for future reference. Single fold forces other panels to close when
they are open, and only opens the current panel. This will allow the open panel to gain the full
size left in the client area */
/** All panels are stacked to the bottom. When they are expanded again they show up at the top */
#define wxFPB_COLLAPSE_TO_BOTTOM 0x0002
/** All panels are stacked to the bottom. When they are expanded again they show up at the top */
#define wxFPB_COLLAPSE_TO_BOTTOM 0x0002
/** Not yet supported, but added for future reference. Single fold plus panels will be stacked at the bottom */
#define wxFPB_EXCLUSIVE_FOLD wxFPB_SINGLE_FOLD | wxFPB_COLLAPSE_TO_BOTTOM
/** Not yet supported, but added for future reference. Single fold plus panels will be stacked at the bottom */
#define wxFPB_EXCLUSIVE_FOLD wxFPB_SINGLE_FOLD | wxFPB_COLLAPSE_TO_BOTTOM
/** \class wxFoldPanel
This class is used to return a reference to the fold panel that is added by wxFoldPanelBar::AddFoldPanel(). Use
wxFoldPanel::IsOk() to check wether the result is ok to be used in further operations. Use wxFoldPanel::GetItem()
/** \class wxFoldPanel
This class is used to return a reference to the fold panel that is added by wxFoldPanelBar::AddFoldPanel(). Use
wxFoldPanel::IsOk() to check wether the result is ok to be used in further operations. Use wxFoldPanel::GetItem()
public:
/** Constructor, usually not directly used by the developer. */
wxFoldPanel(wxFoldPanelItem *item)
public:
/** Constructor, usually not directly used by the developer. */
wxFoldPanel(wxFoldPanelItem *item)
};
/** Copy operator to assign one instance to the other, this is needed because these classes are passed
as instance not by reference. */
virtual void operator=(const wxFoldPanel &item) {
};
/** Copy operator to assign one instance to the other, this is needed because these classes are passed
as instance not by reference. */
virtual void operator=(const wxFoldPanel &item) {
- wxFoldPanel item = _pnl->AddFoldPanel(wxT("Test me"), false);
- _pnl->AddFoldPanelWindow(item, new wxButton(item.GetParent(), wxID_ANY, wxT("Press Me")));
+ wxFoldPanel item = m_pnl->AddFoldPanel(wxT("Test me"), false);
+ m_pnl->AddFoldPanelWindow(item, new wxButton(item.GetParent(), wxID_ANY, wxT("Press Me")));
- wxImageList *_images;
- wxFoldPanelItemArray _panels;
- wxBoxSizer* _panelSizer;
- wxPanel *_foldPanel, *_bottomPanel;
- wxFlexGridSizer* _mainSizer;
- bool _controlCreated;
- wxBitmap *_moreBmp;
- int _extraStyle;
+ wxImageList *m_images;
+ wxFoldPanelItemArray m_panels;
+ wxBoxSizer* m_panelSizer;
+ wxPanel *m_foldPanel, *m_bottomPanel;
+ wxFlexGridSizer* m_mainSizer;
+ bool m_controlCreated;
+ wxBitmap *m_moreBmp;
+ int m_extraStyle;
/** Refreshes all the panels from given pointer down to last one in the list */
void RefreshPanelsFrom(wxFoldPanelItem *item);
/** Refreshes all the panels from given pointer down to last one in the list */
void RefreshPanelsFrom(wxFoldPanelItem *item);
- /** Returns the height of the panels that are expanded and collapsed. This is useful to determine
- quickly what size is used to display, and what is left at the bottom to allign
+ /** Returns the length of the panels that are expanded and collapsed. This is useful to determine
+ quickly what size is used to display, and what is left at the bottom (right) to allign
/** Reposition all the collapsed panels to the bottom. When it is not possible to
allign them to the bottom, stick them behind the visible panels. The Rect holds the
/** Reposition all the collapsed panels to the bottom. When it is not possible to
allign them to the bottom, stick them behind the visible panels. The Rect holds the
- _pnl = new wxFoldPanelBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFPB_DEFAULT_STYLE, wxFPB_COLLAPSE_TO_BOTTOM);
+ m_pnl = new wxFoldPanelBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFPB_DEFAULT_STYLE, wxFPB_COLLAPSE_TO_BOTTOM);
// now add a button to the fold panel. Mind that the button should be made child of the
// wxFoldPanel and not of the main form.
// now add a button to the fold panel. Mind that the button should be made child of the
// wxFoldPanel and not of the main form.
- _pnl->AddFoldPanelWindow(item, new wxButton(item.GetParent(), ID_COLLAPSEME, wxT("Collapse Me")));
+ m_pnl->AddFoldPanelWindow(item, new wxButton(item.GetParent(), ID_COLLAPSEME, wxT("Collapse Me")));
// add a separator between the two controls. This is purely a visual line that can have a certain
// color and also the indents and width alligning like a control.
// add a separator between the two controls. This is purely a visual line that can have a certain
// color and also the indents and width alligning like a control.
// now add a text ctrl. Also very easy. Allign this on width so that when the control gets wider
// the text control also sizes along.
// now add a text ctrl. Also very easy. Allign this on width so that when the control gets wider
// the text control also sizes along.
- _pnl->AddFoldPanelWindow(item, new wxTextCtrl(item.GetParent(), wxID_ANY, wxT("Comment")), wxFPB_ALIGN_WIDTH, wxFPB_DEFAULT_YSPACING, 20);
+ m_pnl->AddFoldPanelWindow(item, new wxTextCtrl(item.GetParent(), wxID_ANY, wxT("Comment")), wxFPB_ALIGN_WIDTH, wxFPB_DEFAULT_SPACING, 20);
\endcode
*/
int AddFoldPanelWindow(const wxFoldPanel &panel, wxWindow *window, int flags = wxFPB_ALIGN_WIDTH,
\endcode
*/
int AddFoldPanelWindow(const wxFoldPanel &panel, wxWindow *window, int flags = wxFPB_ALIGN_WIDTH,
int rightSpacing = wxFPB_DEFAULT_RIGHTSPACING);
/** Adds a seperator line to the current wxFoldPanel. The seperator is a simple line which is drawn and is no
real component. It can be used to seperate groups of controls which belong to eachother. The colour is
adjustable, and it takes the same ySpacing, leftSpacing and rightSpacing as AddFoldPanelWindow(). */
int AddFoldPanelSeperator(const wxFoldPanel &panel, const wxColour &color = wxColour(167,167,167),
int rightSpacing = wxFPB_DEFAULT_RIGHTSPACING);
/** Adds a seperator line to the current wxFoldPanel. The seperator is a simple line which is drawn and is no
real component. It can be used to seperate groups of controls which belong to eachother. The colour is
adjustable, and it takes the same ySpacing, leftSpacing and rightSpacing as AddFoldPanelWindow(). */
int AddFoldPanelSeperator(const wxFoldPanel &panel, const wxColour &color = wxColour(167,167,167),
int rightSpacing = wxFPB_DEFAULT_RIGHTLINESPACING);
/** Returns the number of panels currently present in the wxFoldPanelBar. This is independent if they are
visible or hidden. */
size_t GetCount() const {
int rightSpacing = wxFPB_DEFAULT_RIGHTLINESPACING);
/** Returns the number of panels currently present in the wxFoldPanelBar. This is independent if they are
visible or hidden. */
size_t GetCount() const {
/** Returns the wxFoldPanel reference belonging to the current index. An empty panel is returned when the
index is out of bounds. Use GetCount() to get the amount of panels present. Collapsing and folding the
panel does not change the order in which they are indexed. So it is safe enough to keep a reference
to the panel by number. */
wxFoldPanel Item(size_t i) {
wxCHECK((int)i >= 0 && i < GetCount(), wxFoldPanel(0));
/** Returns the wxFoldPanel reference belonging to the current index. An empty panel is returned when the
index is out of bounds. Use GetCount() to get the amount of panels present. Collapsing and folding the
panel does not change the order in which they are indexed. So it is safe enough to keep a reference
to the panel by number. */
wxFoldPanel Item(size_t i) {
wxCHECK((int)i >= 0 && i < GetCount(), wxFoldPanel(0));
/** Returns the currently used caption style for the wxFoldPanel. It is returned as a wxCaptionBarStyle class.
after modifying it, it can be set again */
wxCaptionBarStyle GetCaptionStyle(wxFoldPanel &fp) const {
/** Returns the currently used caption style for the wxFoldPanel. It is returned as a wxCaptionBarStyle class.
after modifying it, it can be set again */
wxCaptionBarStyle GetCaptionStyle(wxFoldPanel &fp) const {