2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: printdlg.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxPrintDialog
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
2010-07-13 09:29:13 -04:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxPrintDialog
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
This class represents the print and print setup common dialogs.
|
2008-04-10 17:16:38 -04:00
|
|
|
You may obtain a wxPrinterDC device context from a successfully dismissed
|
|
|
|
print dialog.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{printing}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-10 17:16:38 -04:00
|
|
|
@see @ref overview_printing, @ref overview_cmndlg_print
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2012-04-20 20:07:31 -04:00
|
|
|
class wxPrintDialog : public wxObject
|
2008-03-08 08:52:38 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
2008-04-10 17:16:38 -04:00
|
|
|
Constructor.
|
|
|
|
|
|
|
|
Pass a parent window, and optionally a pointer to a block of print
|
2008-03-08 08:52:38 -05:00
|
|
|
data, which will be copied to the print dialog's print data.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see wxPrintDialogData
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 08:33:59 -04:00
|
|
|
wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL);
|
2012-04-20 20:07:31 -04:00
|
|
|
wxPrintDialog(wxWindow *parent, wxPrintData* data);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-04-10 17:16:38 -04:00
|
|
|
Destructor.
|
|
|
|
|
|
|
|
If GetPrintDC() has not been called, the device context obtained by
|
|
|
|
the dialog (if any) will be deleted.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual ~wxPrintDialog();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the device context created by the print dialog, if any.
|
2008-04-10 17:16:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
When this function has been called, the ownership of the device context
|
|
|
|
is transferred to the application, so it must then be deleted
|
|
|
|
explicitly.
|
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual wxDC* GetPrintDC();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-04-10 17:16:38 -04:00
|
|
|
Returns the @ref overview_printing_printdata "print dialog data" associated
|
|
|
|
with the print dialog.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-28 11:36:26 -04:00
|
|
|
virtual wxPrintDialogData& GetPrintDialogData();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
2012-04-20 20:07:31 -04:00
|
|
|
/**
|
|
|
|
Returns the @ref overview_printing_printdata "print data" associated
|
|
|
|
with the print dialog.
|
|
|
|
*/
|
|
|
|
virtual wxPrintData& GetPrintData();
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
2008-04-10 17:16:38 -04:00
|
|
|
Shows the dialog, returning @c wxID_OK if the user pressed OK, and @c
|
|
|
|
wxID_CANCEL otherwise.
|
|
|
|
|
|
|
|
After this function is called, a device context may be retrievable using
|
|
|
|
GetPrintDC().
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual int ShowModal();
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxPageSetupDialog
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2010-03-20 09:18:28 -04:00
|
|
|
This class represents the page setup common dialog.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2010-03-20 09:18:28 -04:00
|
|
|
The page setup dialog contains controls for paper size (letter, A4, A5 etc.),
|
|
|
|
orientation (landscape or portrait), and, only under Windows currently,
|
|
|
|
controls for setting left, top, right and bottom margin sizes in millimetres.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2010-03-20 09:18:28 -04:00
|
|
|
The exact appearance of this dialog varies among the platforms as a native
|
|
|
|
dialog is used when available (currently the case for all major platforms).
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-10 17:16:38 -04:00
|
|
|
When the dialog has been closed, you need to query the wxPageSetupDialogData
|
|
|
|
object associated with the dialog.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
Note that the OK and Cancel buttons do not destroy the dialog; this must be done
|
|
|
|
by the application.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{printing}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-11-21 19:21:10 -05:00
|
|
|
@see @ref overview_printing, wxPrintDialog, wxPageSetupDialogData
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2012-04-20 20:07:31 -04:00
|
|
|
class wxPageSetupDialog : public wxObject
|
2008-03-08 08:52:38 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
2008-04-10 17:16:38 -04:00
|
|
|
Constructor.
|
|
|
|
|
|
|
|
Pass a parent window, and optionally a pointer to a block of page
|
|
|
|
setup data, which will be copied to the print dialog's internal data.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-04-10 17:16:38 -04:00
|
|
|
wxPageSetupDialog(wxWindow* parent, wxPageSetupDialogData* data = NULL);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Destructor.
|
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual ~wxPageSetupDialog();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-04-10 17:16:38 -04:00
|
|
|
Returns the wxPageSetupDialogData object associated with the dialog.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-04-10 17:16:38 -04:00
|
|
|
wxPageSetupDialogData& GetPageSetupData();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-04-10 17:16:38 -04:00
|
|
|
Shows the dialog, returning @c wxID_OK if the user pressed OK, and
|
|
|
|
@c wxID_CANCEL otherwise.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-11-15 06:37:43 -05:00
|
|
|
int ShowModal();
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|