2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: choicebk.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxChoicebook
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
2010-07-13 09:29:13 -04:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2012-06-20 13:10:23 -04:00
|
|
|
|
|
|
|
// wxChoicebook flags
|
|
|
|
#define wxCHB_DEFAULT wxBK_DEFAULT
|
|
|
|
#define wxCHB_TOP wxBK_TOP
|
|
|
|
#define wxCHB_BOTTOM wxBK_BOTTOM
|
|
|
|
#define wxCHB_LEFT wxBK_LEFT
|
|
|
|
#define wxCHB_RIGHT wxBK_RIGHT
|
|
|
|
#define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK
|
|
|
|
|
2013-04-25 06:11:03 -04:00
|
|
|
wxEventType wxEVT_CHOICEBOOK_PAGE_CHANGED;
|
|
|
|
wxEventType wxEVT_CHOICEBOOK_PAGE_CHANGING;
|
2012-06-20 13:10:23 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxChoicebook
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-05 05:12:23 -04:00
|
|
|
wxChoicebook is a class similar to wxNotebook, but uses a wxChoice control
|
|
|
|
to show the labels instead of the tabs.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-10-13 06:27:19 -04:00
|
|
|
For usage documentation of this class, please refer to the base abstract class
|
|
|
|
wxBookCtrl. You can also use the @ref page_samples_notebook to see wxChoicebook in
|
|
|
|
action.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-05 05:12:23 -04:00
|
|
|
wxChoicebook allows the use of wxBookCtrlBase::GetControlSizer(), allowing
|
|
|
|
a program to add other controls next to the choice control. This is
|
|
|
|
particularly useful when screen space is restricted, as it often is when
|
|
|
|
wxChoicebook is being employed.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@beginStyleTable
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxCHB_DEFAULT}
|
2008-03-08 08:52:38 -05:00
|
|
|
Choose the default location for the labels depending on the current
|
2015-09-28 18:59:32 -04:00
|
|
|
platform (but currently it's the same everywhere, namely wxCHB_TOP).
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxCHB_TOP}
|
2008-03-08 08:52:38 -05:00
|
|
|
Place labels above the page area.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxCHB_LEFT}
|
2008-03-08 08:52:38 -05:00
|
|
|
Place labels on the left side.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxCHB_RIGHT}
|
2008-03-08 08:52:38 -05:00
|
|
|
Place labels on the right side.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxCHB_BOTTOM}
|
2008-03-08 08:52:38 -05:00
|
|
|
Place labels below the page area.
|
|
|
|
@endStyleTable
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2009-02-18 12:58:51 -05:00
|
|
|
@beginEventEmissionTable{wxBookCtrlEvent}
|
2008-04-06 10:43:04 -04:00
|
|
|
@event{EVT_CHOICEBOOK_PAGE_CHANGED(id, func)}
|
2008-10-13 06:27:19 -04:00
|
|
|
The page selection was changed.
|
2013-04-25 06:11:03 -04:00
|
|
|
Processes a @c wxEVT_CHOICEBOOK_PAGE_CHANGED event.
|
2008-04-06 10:43:04 -04:00
|
|
|
@event{EVT_CHOICEBOOK_PAGE_CHANGING(id, func)}
|
2008-10-13 06:27:19 -04:00
|
|
|
The page selection is about to be changed.
|
2013-04-25 06:11:03 -04:00
|
|
|
Processes a @c wxEVT_CHOICEBOOK_PAGE_CHANGING event.
|
2008-10-13 06:27:19 -04:00
|
|
|
This event can be vetoed (using wxNotifyEvent::Veto()).
|
2008-04-05 05:12:23 -04:00
|
|
|
@endEventTable
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
2009-02-20 06:34:52 -05:00
|
|
|
@category{bookctrl}
|
2012-11-03 14:32:50 -04:00
|
|
|
@appearance{choicebook}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-05 05:12:23 -04:00
|
|
|
@see @ref overview_bookctrl, wxNotebook, @ref page_samples_notebook
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-04-05 05:12:23 -04:00
|
|
|
class wxChoicebook : public wxBookCtrlBase
|
2008-03-08 08:52:38 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
//@{
|
|
|
|
/**
|
|
|
|
Constructs a choicebook control.
|
|
|
|
*/
|
|
|
|
wxChoicebook();
|
2008-03-08 09:43:31 -05:00
|
|
|
wxChoicebook(wxWindow* parent, wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
2012-02-11 13:36:41 -05:00
|
|
|
const wxString& name = wxEmptyString);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
2008-04-05 05:12:23 -04:00
|
|
|
|
2012-06-20 13:10:23 -04:00
|
|
|
/**
|
|
|
|
Create the choicebook control that has already been constructed with
|
|
|
|
the default constructor.
|
|
|
|
*/
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxEmptyString);
|
|
|
|
|
2019-01-30 11:28:08 -05:00
|
|
|
|
2008-04-05 05:12:23 -04:00
|
|
|
/**
|
|
|
|
Returns the wxChoice associated with the control.
|
|
|
|
*/
|
|
|
|
wxChoice * GetChoiceCtrl() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|