## wxPreviewControlBar

This is the default implementation of the preview control bar, a panel with buttons and a zoom control. You can derive a new class from this and override some or all member functions to change the behaviour and appearance; or you can leave it as it is.

Derived from

wxPanel
wxWindow
wxEvtHandler
wxObject

Include files

<wx/print.h>

See also

wxPreviewFrame, wxPreviewCanvas, wxPrintPreview

Members

wxPreviewControlBar::wxPreviewControlbar
wxPreviewControlBar::~wxPreviewControlBar
wxPreviewControlBar::CreateButtons
wxPreviewControlBar::GetPrintPreview
wxPreviewControlBar::GetZoomControl
wxPreviewControlBar::SetZoomControl

### wxPreviewControlBar::wxPreviewControlbar

wxPreviewControlBar(wxPrintPreview* preview, long buttons, wxWindow* parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "panel")

Constructor.

The buttons parameter may be a combination of the following, using the bitwise 'or' operator.

wxPREVIEW_PRINT | Create a print button.
wxPREVIEW_NEXT | Create a next page button.
wxPREVIEW_PREVIOUS | Create a previous page button.
wxPREVIEW_ZOOM | Create a zoom control.
wxPREVIEW_DEFAULT | Equivalent to a combination of wxPREVIEW_PREVIOUS, wxPREVIEW_NEXT and wxPREVIEW_ZOOM.

### wxPreviewControlBar::~wxPreviewControlBar

~wxPreviewControlBar()

Destructor.

### wxPreviewControlBar::CreateButtons

void CreateButtons()

Creates buttons, according to value of the button style flags.

### wxPreviewControlBar::GetPrintPreview

wxPrintPreview * GetPrintPreview()

Gets the print preview object associated with the control bar.

### wxPreviewControlBar::GetZoomControl

int GetZoomControl()

Gets the current zoom setting in percent.

### wxPreviewControlBar::SetZoomControl

void SetZoomControl(int percent)

Sets the zoom control.