// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+enum wxPrinterError
+{
+ wxPRINTER_NO_ERROR = 0,
+ wxPRINTER_CANCELLED,
+ wxPRINTER_ERROR
+};
+
+#define wxPREVIEW_PRINT 1
+#define wxPREVIEW_PREVIOUS 2
+#define wxPREVIEW_NEXT 4
+#define wxPREVIEW_ZOOM 8
+#define wxPREVIEW_FIRST 16
+#define wxPREVIEW_LAST 32
+#define wxPREVIEW_GOTO 64
+
+#define wxPREVIEW_DEFAULT (wxPREVIEW_PREVIOUS|wxPREVIEW_NEXT|wxPREVIEW_ZOOM\
+ |wxPREVIEW_FIRST|wxPREVIEW_GOTO|wxPREVIEW_LAST)
+
+// Ids for controls
+#define wxID_PREVIEW_CLOSE 1
+#define wxID_PREVIEW_NEXT 2
+#define wxID_PREVIEW_PREVIOUS 3
+#define wxID_PREVIEW_PRINT 4
+#define wxID_PREVIEW_ZOOM 5
+#define wxID_PREVIEW_FIRST 6
+#define wxID_PREVIEW_LAST 7
+#define wxID_PREVIEW_GOTO 8
+#define wxID_PREVIEW_ZOOM_IN 9
+#define wxID_PREVIEW_ZOOM_OUT 10
+
+
/**
@class wxPreviewControlBar
the preview frame so that the user can print directly from the preview interface.
@remarks
- Do not explicitly delete the printout objects once this destructor has been
- called, since they will be deleted in the wxPrintPreview constructor.
+ Do not explicitly delete the printout objects once this constructor has been
+ called, since they will be deleted in the wxPrintPreview destructor.
The same does not apply to the @a data argument.
Use IsOk() to check whether the wxPrintPreview object was created correctly.
wxPrintPreview(wxPrintout* printout,
wxPrintout* printoutForPrinting = NULL,
wxPrintDialogData* data = NULL);
+ wxPrintPreview(wxPrintout* printout,
+ wxPrintout* printoutForPrinting,
+ wxPrintData* data);
/**
Destructor.
Deletes both print preview objects, so do not destroy these objects
in your application.
*/
- ~wxPrinter();
+ ~wxPrintPreview();
/**
Gets the preview window used for displaying the print preview image.
Or you can just use the FitThisSizeToXXX() and MapScreenSizeToXXX routines below,
which do most of the scaling calculations for you.
- @beginWxPythonOnly
- This method returns the output-only parameters as a tuple.
- @endWxPythonOnly
-
@beginWxPerlOnly
In wxPerl this method takes no arguments and returns a
2-element list (w, h).
If you are doing your own scaling, remember to multiply this by a scaling
factor to take the preview DC size into account.
- @beginWxPythonOnly
- This method returns the output-only parameters as a tuple.
- @endWxPythonOnly
-
@beginWxPerlOnly
In wxPerl this method takes no arguments and returns a
2-element list (w, h).
@a minPage must be greater than zero and @a maxPage must be greater
than @a minPage.
-
- @beginWxPythonOnly
- When this method is implemented in a derived Python class, it should be designed
- to take no parameters (other than the self reference) and to return a tuple of
- four integers.
- @endWxPythonOnly
*/
virtual void GetPageInfo(int* minPage, int* maxPage, int* pageFrom,
int* pageTo);
/**
Returns the size of the printer page in millimetres.
- @beginWxPythonOnly
- This method returns the output-only parameters as a tuple.
- @endWxPythonOnly
-
@beginWxPerlOnly
In wxPerl this method takes no arguments and returns a
2-element list (w, h).
previewing, a memory device context is used, which uses a bitmap size reflecting
the current preview zoom. The application must take this discrepancy into
account if previewing is to be supported.
-
- @beginWxPythonOnly
- This method returns the output-only parameters as a tuple.
- @endWxPythonOnly
-
- @beginWxPerlOnly
- In wxPerl this method takes no arguments and returns a
- 2-element list (w, h).
- @endWxPerlOnly
*/
void GetPageSizePixels(int* w, int* h) const;
@remarks
The base OnBeginDocument() must be called (and the return value
checked) from within the overridden function, since it calls wxDC::StartDoc().
-
- @beginWxPythonOnly
- If this method is overridden in a Python class then the base class version can
- be called by using the method <tt>base_OnBeginDocument(startPage, endPage)</tt>.
- @endWxPythonOnly
*/
virtual bool OnBeginDocument(int startPage, int endPage);