Contents Up Previous Next

wxPreviewFrame

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.

Derived from

wxFrame
wxWindow
wxEvtHandler
wxObject

Include files

<wx/print.h>

See also

wxPreviewCanvas, wxPreviewControlBar, wxPrintPreview

Members

wxPreviewFrame::wxPreviewFrame
wxPreviewFrame::~wxPreviewFrame
wxPreviewFrame::CreateControlBar
wxPreviewFrame::CreateCanvas
wxPreviewFrame::Initialize
wxPreviewFrame::OnCloseWindow


wxPreviewFrame::wxPreviewFrame

wxPreviewFrame(wxPrintPreview* preview, wxWindow* parent, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame")

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


wxPreviewFrame::~wxPreviewFrame

~wxPreviewFrame()

Destructor.


wxPreviewFrame::CreateControlBar

void CreateControlBar()

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


wxPreviewFrame::CreateCanvas

void CreateCanvas()

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


wxPreviewFrame::Initialize

void Initialize()

Creates the preview canvas and control bar, and calls wxWindow::MakeModal(true) to disable other top-level windows in the application.

This function should be called by the application prior to showing the frame.


wxPreviewFrame::OnCloseWindow

void OnCloseWindow(wxCloseEvent& event)

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