]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/printdlg.h
Added 'Delimiter' attribute for wxArrayStringProperty. Moved static ArrayStringToStri...
[wxWidgets.git] / interface / wx / printdlg.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: printdlg.h
e54c96f1 3// Purpose: interface of wxPrintDialog
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxPrintDialog
7c913512 11
23324ae1 12 This class represents the print and print setup common dialogs.
b1b95a65
FM
13 You may obtain a wxPrinterDC device context from a successfully dismissed
14 print dialog.
7c913512 15
23324ae1
FM
16 @library{wxcore}
17 @category{printing}
7c913512 18
b1b95a65 19 @see @ref overview_printing, @ref overview_cmndlg_print
23324ae1
FM
20*/
21class wxPrintDialog : public wxDialog
22{
23public:
24 /**
b1b95a65
FM
25 Constructor.
26
27 Pass a parent window, and optionally a pointer to a block of print
23324ae1 28 data, which will be copied to the print dialog's print data.
3c4f71cc 29
4cc4bfaf 30 @see wxPrintDialogData
23324ae1 31 */
4cc4bfaf 32 wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL);
23324ae1
FM
33
34 /**
b1b95a65
FM
35 Destructor.
36
37 If GetPrintDC() has not been called, the device context obtained by
38 the dialog (if any) will be deleted.
23324ae1 39 */
adaaa686 40 virtual ~wxPrintDialog();
23324ae1
FM
41
42 /**
43 Returns the device context created by the print dialog, if any.
b1b95a65 44
23324ae1
FM
45 When this function has been called, the ownership of the device context
46 is transferred to the application, so it must then be deleted
47 explicitly.
48 */
adaaa686 49 virtual wxDC* GetPrintDC();
23324ae1
FM
50
51 /**
b1b95a65
FM
52 Returns the @ref overview_printing_printdata "print dialog data" associated
53 with the print dialog.
23324ae1 54 */
43c48e1e 55 virtual wxPrintDialogData& GetPrintDialogData();
23324ae1
FM
56
57 /**
b1b95a65
FM
58 Shows the dialog, returning @c wxID_OK if the user pressed OK, and @c
59 wxID_CANCEL otherwise.
60
61 After this function is called, a device context may be retrievable using
62 GetPrintDC().
23324ae1 63 */
adaaa686 64 virtual int ShowModal();
23324ae1
FM
65};
66
67
e54c96f1 68
23324ae1
FM
69/**
70 @class wxPageSetupDialog
7c913512 71
947c91da 72 This class represents the page setup common dialog.
7c913512 73
947c91da
VZ
74 The page setup dialog contains controls for paper size (letter, A4, A5 etc.),
75 orientation (landscape or portrait), and, only under Windows currently,
76 controls for setting left, top, right and bottom margin sizes in millimetres.
7c913512 77
947c91da
VZ
78 The exact appearance of this dialog varies among the platforms as a native
79 dialog is used when available (currently the case for all major platforms).
7c913512 80
b1b95a65
FM
81 When the dialog has been closed, you need to query the wxPageSetupDialogData
82 object associated with the dialog.
7c913512 83
23324ae1
FM
84 Note that the OK and Cancel buttons do not destroy the dialog; this must be done
85 by the application.
7c913512 86
23324ae1
FM
87 @library{wxcore}
88 @category{printing}
7c913512 89
bb69632a 90 @see @ref overview_printing, wxPrintDialog, wxPageSetupDialogData
23324ae1
FM
91*/
92class wxPageSetupDialog : public wxDialog
93{
94public:
95 /**
b1b95a65
FM
96 Constructor.
97
98 Pass a parent window, and optionally a pointer to a block of page
99 setup data, which will be copied to the print dialog's internal data.
23324ae1 100 */
b1b95a65 101 wxPageSetupDialog(wxWindow* parent, wxPageSetupDialogData* data = NULL);
23324ae1
FM
102
103 /**
104 Destructor.
105 */
adaaa686 106 virtual ~wxPageSetupDialog();
23324ae1
FM
107
108 /**
b1b95a65 109 Returns the wxPageSetupDialogData object associated with the dialog.
23324ae1 110 */
b1b95a65 111 wxPageSetupDialogData& GetPageSetupData();
23324ae1
FM
112
113 /**
b1b95a65
FM
114 Shows the dialog, returning @c wxID_OK if the user pressed OK, and
115 @c wxID_CANCEL otherwise.
23324ae1 116 */
4ccf0566 117 int ShowModal();
23324ae1 118};
e54c96f1 119