2002-01-14 11:40:44 -05:00
\section { \class { wxPageSetupDialog} } \label { wxpagesetupdialog}
This class represents the page setup common dialog. The page setup dialog is standard from
Windows 95 on, replacing the print setup dialog (which is retained in Windows and wxWindows
for backward compatibility). On Windows 95 and NT 4.0 and above, the page setup dialog is
native to the windowing system, otherwise it is emulated.
The page setup dialog contains controls for paper size (A4, A5 etc.), orientation (landscape
or portrait), and controls for setting left, top, right and bottom margin sizes in millimetres.
When the dialog has been closed, you need to query the \helpref { wxPageSetupDialogData} { wxpagesetupdialogdata} object
associated with the dialog.
Note that the OK and Cancel buttons do not destroy the dialog; this must be done by the
application.
\wxheading { Derived from}
\helpref { wxDialog} { wxdialog} \\
\helpref { wxWindow} { wxwindow} \\
\helpref { wxEvtHandler} { wxevthandler} \\
\helpref { wxObject} { wxobject}
\wxheading { Include files}
<wx/printdlg.h>
\wxheading { See also}
\helpref { wxPrintDialog} { wxprintdialog} , \helpref { wxPageSetupDialogData} { wxpagesetupdialogdata}
\latexignore { \rtfignore { \wxheading { Members} } }
\membersection { wxPageSetupDialog::wxPageSetupDialog}
\func { } { wxPageSetupDialog} { \param { wxWindow* } { parent} , \param { wxPageSetupDialogData* } { data = NULL} }
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.
\membersection { wxPageSetupDialog::\destruct { wxPageSetupDialog} }
\func { } { \destruct { wxPageSetupDialog} } { \void }
Destructor.
\membersection { wxPageSetupDialog::GetPageSetupData} \label { wxpagesetupdialoggetpagesetupdata}
\func { wxPageSetupDialogData\& } { GetPageSetupData} { \void }
Returns the \helpref { page setup data} { wxpagesetupdialogdata} associated with the dialog.
2002-05-08 15:00:43 -04:00
\membersection { wxPageSetupDialog::Ok} \label { wxpagesetupdialogok}
\constfunc { bool} { Ok} { \void }
Returns TRUE if the print data associated with the dialog data is valid.
This can return FALSE on Windows if the current printer is not set, for example.
On all other platforms, it returns TRUE.
2002-01-14 11:40:44 -05:00
\membersection { wxPageSetupDialog::ShowModal} \label { wxpagesetupdialogshowmodal}
\func { int} { ShowModal} { \void }
Shows the dialog, returning wxID\_ OK if the user pressed OK, and wxID\_ CANCEL
otherwise.
1999-03-25 18:06:01 -05:00
\section { \class { wxPageSetupDialogData} } \label { wxpagesetupdialogdata}
1998-05-20 10:25:30 -04:00
This class holds a variety of information related to \helpref { wxPageSetupDialog} { wxpagesetupdialog} .
1999-03-25 18:06:01 -05:00
It contains a \helpref { wxPrintData} { wxprintdata} member which is used to hold basic printer configuration data (as opposed to the
user-interface configuration settings stored by wxPageSetupDialogData).
1998-05-20 10:25:30 -04:00
\wxheading { Derived from}
\helpref { wxObject} { wxobject}
1999-02-15 15:41:29 -05:00
\wxheading { Include files}
<wx/cmndata.h>
1998-05-20 10:25:30 -04:00
\wxheading { See also}
\helpref { wxPageSetupDialog} { wxpagesetupdialog}
\latexignore { \rtfignore { \wxheading { Members} } }
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::wxPageSetupDialogData}
\func { } { wxPageSetupDialogData} { \void }
Default constructor.
\func { } { wxPageSetupDialogData} { \param { wxPageSetupDialogData\& } { data} }
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Copy constructor.
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\func { } { wxPrintDialogData} { \param { wxPrintData\& } { printData} }
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Construct an object from a print dialog data object.
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::\destruct { wxPageSetupDialogData} }
\func { } { \destruct { wxPageSetupDialogData} } { \void }
1998-05-20 10:25:30 -04:00
Destructor.
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::EnableHelp} \label { wxpagesetupdialogdataenablehelp}
1998-05-20 10:25:30 -04:00
\func { void} { EnableHelp} { \param { bool } { flag} }
Enables or disables the `Help' button (Windows only).
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::EnableMargins} \label { wxpagesetupdialogdataenablemargins}
1998-05-20 10:25:30 -04:00
\func { void} { EnableMargins} { \param { bool } { flag} }
Enables or disables the margin controls (Windows only).
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::EnableOrientation} \label { wxpagesetupdialogdataenableorientation}
1998-05-20 10:25:30 -04:00
\func { void} { EnableOrientation} { \param { bool } { flag} }
Enables or disables the orientation control (Windows only).
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::EnablePaper} \label { wxpagesetupdialogdataenablepaper}
1998-05-20 10:25:30 -04:00
\func { void} { EnablePaper} { \param { bool } { flag} }
Enables or disables the paper size control (Windows only).
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::EnablePrinter} \label { wxpagesetupdialogdataenableprinter}
1998-05-20 10:25:30 -04:00
\func { void} { EnablePrinter} { \param { bool } { flag} }
Enables or disables the { \bf Printer} button, which invokes a printer setup dialog.
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::GetDefaultMinMargins} \label { wxpagesetupdialogdatagetdefaultminmargins}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\constfunc { bool} { GetDefaultMinMargins} { \void }
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Returns TRUE if the page setup dialog will take its minimum margin values from the currently
selected printer properties. Windows only.
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::GetEnableMargins} \label { wxpagesetupdialogdatagetenablemargins}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\constfunc { bool} { GetEnableMargins} { \void }
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Returns TRUE if the margin controls are enabled (Windows only).
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::GetEnableOrientation} \label { wxpagesetupdialogdatagetenableorientation}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\constfunc { bool} { GetEnableOrientation} { \void }
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Returns TRUE if the orientation control is enabled (Windows only).
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::GetEnablePaper} \label { wxpagesetupdialogdatagetenablepaper}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\constfunc { bool} { GetEnablePaper} { \void }
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Returns TRUE if the paper size control is enabled (Windows only).
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::GetEnablePrinter} \label { wxpagesetupdialogdatagetenableprinter}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\constfunc { bool} { GetEnablePrinter} { \void }
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Returns TRUE if the printer setup button is enabled.
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::GetEnableHelp} \label { wxpagesetupdialogdatagetenablehelp}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\constfunc { bool} { GetEnableHelp} { \void }
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Returns TRUE if the printer setup button is enabled.
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::GetDefaultInfo} \label { wxpagesetupdialogdatagetdefaultinfo}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\constfunc { bool} { GetDefaultInfo} { \void }
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Returns TRUE if the dialog will simply return default printer information (such as orientation)
instead of showing a dialog. Windows only.
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::GetMarginTopLeft} \label { wxpagesetupdialogdatagetmargintopleft}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\constfunc { wxPoint} { GetMarginTopLeft} { \void }
1998-05-20 10:25:30 -04:00
1999-10-08 06:21:14 -04:00
Returns the left (x) and top (y) margins in millimetres.
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::GetMarginBottomRight} \label { wxpagesetupdialogdatagetmarginbottomright}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\constfunc { wxPoint} { GetMarginBottomRight} { \void }
1998-05-20 10:25:30 -04:00
1999-10-08 06:21:14 -04:00
Returns the right (x) and bottom (y) margins in millimetres.
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::GetMinMarginTopLeft} \label { wxpagesetupdialogdatagetminmargintopleft}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\constfunc { wxPoint} { GetMinMarginTopLeft} { \void }
1998-05-20 10:25:30 -04:00
1999-10-08 06:21:14 -04:00
Returns the left (x) and top (y) minimum margins the user can enter (Windows only). Units
are in millimetres
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::GetMinMarginBottomRight} \label { wxpagesetupdialogdatagetminmarginbottomright}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\constfunc { wxPoint} { GetMinMarginBottomRight} { \void }
1998-05-20 10:25:30 -04:00
1999-10-08 06:21:14 -04:00
Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units
are in millimetres
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::GetPaperId} \label { wxpagesetupdialogdatagetpaperid}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\constfunc { wxPaperSize} { GetPaperId} { \void }
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Returns the paper id (stored in the internal wxPrintData object).
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
For further information, see \helpref { wxPrintData::SetPaperId} { wxprintdatasetpaperid} .
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::GetPaperSize} \label { wxpagesetupdialogdatagetpapersize}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\constfunc { wxSize} { GetPaperSize} { \void }
Returns the paper size in millimetres.
\membersection { wxPageSetupDialogData::GetPrintData} \label { wxpagesetupdialogdatagetprintdata}
\func { wxPrintData\& } { GetPrintData} { \void }
Returns a reference to the \helpref { print data} { wxprintdata} associated with this object.
2002-05-08 15:00:43 -04:00
\membersection { wxPageSetupDialogData::Ok} \label { wxpagesetupdialogdataok}
\constfunc { bool} { Ok} { \void }
Returns TRUE if the print data associated with the dialog data is valid.
This can return FALSE on Windows if the current printer is not set, for example.
On all other platforms, it returns TRUE.
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::SetDefaultInfo} \label { wxpagesetupdialogdatasetdefaultinfo}
\func { void} { SetDefaultInfo} { \param { bool} { flag} }
Pass TRUE if the dialog will simply return default printer information (such as orientation)
1998-05-20 10:25:30 -04:00
instead of showing a dialog. Windows only.
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::SetDefaultMinMargins} \label { wxpagesetupdialogdatasetdefaultminmargins}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\func { void} { SetDefaultMinMargins} { \param { bool} { flag} }
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Pass TRUE if the page setup dialog will take its minimum margin values from the currently
1999-10-08 06:21:14 -04:00
selected printer properties. Windows only. Units are in millimetres
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::SetMarginTopLeft} \label { wxpagesetupdialogdatasetmargintopleft}
1998-05-20 10:25:30 -04:00
\func { void} { GetMarginTopLeft} { \param { const wxPoint\& } { pt} }
1999-10-08 06:21:14 -04:00
Sets the left (x) and top (y) margins in millimetres.
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::SetMarginBottomRight} \label { wxpagesetupdialogdatasetmarginbottomright}
1998-05-20 10:25:30 -04:00
\func { void} { SetMarginBottomRight} { \param { const wxPoint\& } { pt} }
1999-10-08 06:21:14 -04:00
Sets the right (x) and bottom (y) margins in millimetres.
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::SetMinMarginTopLeft} \label { wxpagesetupdialogdatasetminmargintopleft}
1998-05-20 10:25:30 -04:00
\func { void} { SetMinMarginTopLeft} { \param { const wxPoint\& } { pt} }
1999-10-08 06:21:14 -04:00
Sets the left (x) and top (y) minimum margins the user can enter (Windows only). Units are
in millimetres.
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::SetMinMarginBottomRight} \label { wxpagesetupdialogdatasetminmarginbottomright}
1998-05-20 10:25:30 -04:00
\func { void} { SetMinMarginBottomRight} { \param { const wxPoint\& } { pt} }
1999-10-08 06:21:14 -04:00
Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units are
in millimetres.
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::SetPaperId} \label { wxpagesetupdialogdatasetpaperid}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\func { void} { SetPaperId} { \param { wxPaperSize\& } { id} }
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Sets the paper size id. For further information, see \helpref { wxPrintData::SetPaperId} { wxprintdatasetpaperid} .
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Calling this function overrides the explicit paper dimensions passed in \helpref { wxPageSetupDialogData::SetPaperSize} { wxpagesetupdialogdatasetpapersize} .
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::SetPaperSize} \label { wxpagesetupdialogdatasetpapersize}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\func { void} { SetPaperSize} { \param { const wxSize\& } { size} }
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
Sets the paper size in millimetres. If a corresponding paper id is found, it will be set in the
internal wxPrintData object, otherwise the paper size overrides the paper id.
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\membersection { wxPageSetupDialogData::SetPrintData} \label { wxpagesetupdialogdatasetprintdata}
1998-05-20 10:25:30 -04:00
1999-03-25 18:06:01 -05:00
\func { void} { SetPrintData} { \param { const wxPrintData\& } { printData} }
Sets the \helpref { print data} { wxprintdata} associated with this object.
\membersection { wxPageSetupDialogData::operator $ = $ } \label { wxpagesetupdialogdataassign}
\func { void} { operator $ = $ } { \param { const wxPrintData\& } { data} }
Assigns print data to this object.
\func { void} { operator $ = $ } { \param { const wxPageSetupDialogData\& } { data} }
Assigns page setup data to this object.
1998-05-20 10:25:30 -04:00