Search documentation of wx

# wxPreviewControlBar (wx v2.4.3.1)

View Source

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.

See:

- `wxPreviewFrame`

- `wxPreviewCanvas`

- `wxPrintPreview`

This class is derived, and can use functions, from:

- `wxPanel`

- `wxWindow`

- `wxEvtHandler`

wxWidgets docs: wxPreviewControlBar

# Summary

## Types

wxPreviewControlBar()

## Functions

createButtons(This)

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

destroy(This)

Destroys the object

getPrintPreview(This)

Gets the print preview object associated with the control bar.

getZoomControl(This)

Gets the current zoom setting in percent.

new(Preview, Buttons, Parent)

Equivalent to `new(Preview, Buttons, Parent, [])`.

new/4

Constructor.

setZoomControl(This, Percent)

Sets the zoom control.

# Types

# wxPreviewControlBar()

    -type wxPreviewControlBar() :: wx:wx_object().

# Functions

# createButtons(This)

    -spec createButtons(This) -> ok when This :: wxPreviewControlBar().

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

# destroy(This)

    -spec destroy(This :: wxPreviewControlBar()) -> ok.

Destroys the object

# getPrintPreview(This)

    -spec getPrintPreview(This) -> wxPrintPreview:wxPrintPreview() when This :: wxPreviewControlBar().

Gets the print preview object associated with the control bar.

# getZoomControl(This)

    -spec getZoomControl(This) -> integer() when This :: wxPreviewControlBar().

Gets the current zoom setting in percent.

# new(Preview, Buttons, Parent)

    -spec new(Preview, Buttons, Parent) -> wxPreviewControlBar()
                 when
                     Preview :: wxPrintPreview:wxPrintPreview(),
                     Buttons :: integer(),
                     Parent :: wxWindow:wxWindow().

Equivalent to `new(Preview, Buttons, Parent, [])`.

# new/4

    -spec new(Preview, Buttons, Parent, [Option]) -> wxPreviewControlBar()
                 when
                     Preview :: wxPrintPreview:wxPrintPreview(),
                     Buttons :: integer(),
                     Parent :: wxWindow:wxWindow(),
                     Option ::
                         {pos, {X :: integer(), Y :: integer()}} |
                         {size, {W :: integer(), H :: integer()}} |
                         {style, integer()}.

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`.

# setZoomControl(This, Percent)

    -spec setZoomControl(This, Percent) -> ok when This :: wxPreviewControlBar(), Percent :: integer().

Sets the zoom control.