// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PRNTBASEH__
#define _WX_PRNTBASEH__
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PRNTBASEH__
#define _WX_PRNTBASEH__
public:
wxPreviewCanvas(wxPrintPreviewBase *preview,
wxWindow *parent,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
public:
wxPreviewCanvas(wxPrintPreviewBase *preview,
wxWindow *parent,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
~wxPreviewFrame();
void OnCloseWindow(wxCloseEvent& event);
virtual void Initialize();
virtual void CreateCanvas();
virtual void CreateControlBar();
~wxPreviewFrame();
void OnCloseWindow(wxCloseEvent& event);
virtual void Initialize();
virtual void CreateCanvas();
virtual void CreateControlBar();
#define wxID_PREVIEW_PREVIOUS 3
#define wxID_PREVIEW_PRINT 4
#define wxID_PREVIEW_ZOOM 5
#define wxID_PREVIEW_PREVIOUS 3
#define wxID_PREVIEW_PRINT 4
#define wxID_PREVIEW_ZOOM 5
wxWindow *parent,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
wxWindow *parent,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
void OnNextButton(wxCommandEvent & WXUNUSED(event)) { OnNext(); }
void OnPreviousButton(wxCommandEvent & WXUNUSED(event)) { OnPrevious(); }
void OnNextButton(wxCommandEvent & WXUNUSED(event)) { OnNext(); }
void OnPreviousButton(wxCommandEvent & WXUNUSED(event)) { OnPrevious(); }
- void OnChar(wxKeyEvent &event);
+ void OnFirstButton(wxCommandEvent & WXUNUSED(event)) { OnFirst(); }
+ void OnLastButton(wxCommandEvent & WXUNUSED(event)) { OnLast(); }
+ void OnGotoButton(wxCommandEvent & WXUNUSED(event)) { OnGoto(); }
wxPrintout *GetPrintoutForPrinting() const { return m_printPrintout; };
void SetFrame(wxFrame *frame) { m_previewFrame = frame; };
wxPrintout *GetPrintoutForPrinting() const { return m_printPrintout; };
void SetFrame(wxFrame *frame) { m_previewFrame = frame; };
- virtual bool DrawBlankPage(wxWindow *canvas, wxDC& dc);
+ virtual bool DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc);
+
+ // Adjusts the scrollbars for the current scale
+ virtual void AdjustScrollbars(wxPreviewCanvas *canvas);
// This is called by wxPrintPreview to render a page into a wxMemoryDC.
virtual bool RenderPage(int pageNum);
// This is called by wxPrintPreview to render a page into a wxMemoryDC.
virtual bool RenderPage(int pageNum);
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
: wxDialog(parent, -1, title, pos, size, style, name)
{
}
: wxDialog(parent, -1, title, pos, size, style, name)
{
}