# wxToolbook Class Reference
[Book Controls]

`#include </home/work/projects/wx/2.9/wx/interface/wx/toolbook.h>`

Inheritance diagram for wxToolbook:
[legend]

## Detailed Description

wxToolbook is a class similar to wxNotebook but which uses a wxToolBar to show the labels instead of the tabs.

There is no documentation for this class yet but its usage is identical to wxNotebook (except for the features clearly related to tabs only), so please refer to that class documentation for now. You can also use the Notebook Sample to see wxToolbook in action.

## Styles

This class supports the following styles:

- wxTBK_BUTTONBAR:
  Use wxButtonToolBar-based implementation under Mac OS (ignored under other platforms).
- wxTBK_HORZ_LAYOUT:
  Shows the text and the icons alongside, not vertically stacked (only implement under Windows and GTK 2 platforms as it relies on `wxTB_HORZ_LAYOUT` flag support).

The common wxBookCtrl styles described in the wxBookCtrl Overview are also supported.

## Events emitted by this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxBookCtrlEvent& event)

Event macros for events emitted by this class:

- EVT_TOOLBOOK_PAGE_CHANGED(id, func):
  The page selection was changed. Processes a `wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED` event.
- EVT_TOOLBOOK_PAGE_CHANGING(id, func):
  The page selection is about to be changed. Processes a `wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING` event. This event can be vetoed (using wxNotifyEvent::Veto()).

##

Library: wxCore
Category: Book Controls

See also:
  wxBookCtrl Overview, wxBookCtrlBase, wxNotebook, Notebook Sample

## Public Member Functions

wxToolBarBase * | GetToolBar () const
| Returns the wxToolBarBase associated with the control.
| wxToolbook ()
| Constructs a choicebook control.
| wxToolbook (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxEmptyStr)
| Constructs a choicebook control.

List of all members.

## Constructor & Destructor Documentation

wxToolbook::wxToolbook | ( |  | ) |

Constructs a choicebook control.

wxToolbook::wxToolbook | ( | wxWindow * | parent,
|  | wxWindowID | id,
|  | const wxPoint & | pos = `wxDefaultPosition`,
|  | const wxSize & | size = `wxDefaultSize`,
|  | long | style = `0`,
|  | const wxString & | name = `wxEmptyStr` |
| ) |  |  |

Constructs a choicebook control.

## Member Function Documentation

wxToolBarBase* wxToolbook::GetToolBar | ( |  | ) | const

Returns the wxToolBarBase associated with the control.

|  | [ top ]