Search documentation of wx

# View Source wxPreviewFrame (wx v2.4.2)

Functions for wxPreviewFrame class

This class provides the default method of managing the print preview interface. Member functions may be overridden to replace functionality, or the class may be used without derivation.

See: `wxPreviewCanvas`, `wxPreviewControlBar`, `wxPrintPreview`

This class is derived (and can use functions) from: `wxFrame` `wxTopLevelWindow` `wxWindow` `wxEvtHandler`

wxWidgets docs: wxPreviewFrame

# Summary

## Types

wxPreviewFrame()

## Functions

createCanvas(This)

Creates a `wxPreviewCanvas`.

createControlBar(This)

Creates a `wxPreviewControlBar`.

destroy(This)

Destructor.

initialize(This)

Initializes the frame elements and prepares for showing it.

new(Preview, Parent)
new/3

Constructor.

onCloseWindow(This, Event)

Enables any disabled frames in the application, and deletes the print preview object, implicitly deleting any printout objects associated with the print preview object.

# Types

Link to this type

# wxPreviewFrame()

View Source

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

# Functions

Link to this function

# createCanvas(This)

View Source

    -spec createCanvas(This) -> ok when This :: wxPreviewFrame().

Creates a `wxPreviewCanvas`.

Override this function to allow a user-defined preview canvas object to be created.

Link to this function

# createControlBar(This)

View Source

    -spec createControlBar(This) -> ok when This :: wxPreviewFrame().

Creates a `wxPreviewControlBar`.

Override this function to allow a user-defined preview control bar object to be created.

Link to this function

# destroy(This)

View Source

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

Destructor.

Link to this function

# initialize(This)

View Source

    -spec initialize(This) -> ok when This :: wxPreviewFrame().

Initializes the frame elements and prepares for showing it.

Calling this method is equivalent to calling `InitializeWithModality()` (not implemented in wx) with wxPreviewFrame_AppModal argument, please see its documentation for more details.

Please notice that this function is virtual mostly for backwards compatibility only, there is no real need to override it as it's never called by wxWidgets itself.

Link to this function

# new(Preview, Parent)

View Source

    -spec new(Preview, Parent) -> wxPreviewFrame()
                 when Preview :: wxPrintPreview:wxPrintPreview(), Parent :: wxWindow:wxWindow().

Link to this function

# new/3

View Source

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

Constructor.

Pass a print preview object plus other normal frame arguments. The print preview object will be destroyed by the frame when it closes.

Link to this function

# onCloseWindow(This, Event)

View Source

    -spec onCloseWindow(This, Event) -> ok
                           when This :: wxPreviewFrame(), Event :: wxCloseEvent:wxCloseEvent().

Enables any disabled frames in the application, and deletes the print preview object, implicitly deleting any printout objects associated with the print preview object.