Version: 3.1.0
wxPageSetupDialogData Class Reference

#include <wx/cmndata.h>

+ Inheritance diagram for wxPageSetupDialogData:

Detailed Description

This class holds a variety of information related to wxPageSetupDialog.

It contains a wxPrintData member which is used to hold basic printer configuration data (as opposed to the user-interface configuration settings stored by wxPageSetupDialogData).

Library:  wxCore
Category:  Printing Framework, Data Structures
See Also
Printing Framework Overview, wxPageSetupDialog

Public Member Functions

 wxPageSetupDialogData ()
 Default constructor.
 
 wxPageSetupDialogData (const wxPageSetupDialogData &data)
 Copy constructor.
 
 wxPageSetupDialogData (const wxPrintData &printData)
 Construct an object from a print data object.
 
virtual ~wxPageSetupDialogData ()
 Destructor.
 
void EnableHelp (bool flag)
 Enables or disables the "Help" button (Windows only).
 
void EnableMargins (bool flag)
 Enables or disables the margin controls (Windows only).
 
void EnableOrientation (bool flag)
 Enables or disables the orientation control (Windows only).
 
void EnablePaper (bool flag)
 Enables or disables the paper size control (Windows only).
 
void EnablePrinter (bool flag)
 Enables or disables the "Printer" button, which invokes a printer setup dialog.
 
bool GetDefaultInfo () const
 Returns true if the dialog will simply return default printer information (such as orientation) instead of showing a dialog (Windows only).
 
bool GetDefaultMinMargins () const
 Returns true if the page setup dialog will take its minimum margin values from the currently selected printer properties (Windows only).
 
bool GetEnableHelp () const
 Returns true if the printer setup button is enabled.
 
bool GetEnableMargins () const
 Returns true if the margin controls are enabled (Windows only).
 
bool GetEnableOrientation () const
 Returns true if the orientation control is enabled (Windows only).
 
bool GetEnablePaper () const
 Returns true if the paper size control is enabled (Windows only).
 
bool GetEnablePrinter () const
 Returns true if the printer setup button is enabled.
 
wxPoint GetMarginBottomRight () const
 Returns the right (x) and bottom (y) margins in millimetres.
 
wxPoint GetMarginTopLeft () const
 Returns the left (x) and top (y) margins in millimetres.
 
wxPoint GetMinMarginBottomRight () const
 Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only).
 
wxPoint GetMinMarginTopLeft () const
 Returns the left (x) and top (y) minimum margins the user can enter (Windows only).
 
wxPaperSize GetPaperId () const
 Returns the paper id (stored in the internal wxPrintData object).
 
wxSize GetPaperSize () const
 Returns the paper size in millimetres.
 
wxPrintDataGetPrintData ()
 Returns a reference to the print data associated with this object.
 
const wxPrintDataGetPrintData () const
 
bool IsOk () const
 Returns true if the print data associated with the dialog data is valid.
 
void SetDefaultInfo (bool flag)
 Pass true if the dialog will simply return default printer information (such as orientation) instead of showing a dialog (Windows only).
 
void SetDefaultMinMargins (bool flag)
 Pass true if the page setup dialog will take its minimum margin values from the currently selected printer properties (Windows only).
 
void SetMarginBottomRight (const wxPoint &pt)
 Sets the right (x) and bottom (y) margins in millimetres.
 
void SetMarginTopLeft (const wxPoint &pt)
 Sets the left (x) and top (y) margins in millimetres.
 
void SetMinMarginBottomRight (const wxPoint &pt)
 Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only).
 
void SetMinMarginTopLeft (const wxPoint &pt)
 Sets the left (x) and top (y) minimum margins the user can enter (Windows only).
 
void SetPaperId (wxPaperSize id)
 Sets the paper size id.
 
void SetPaperSize (const wxSize &size)
 Sets the paper size in millimetres.
 
void SetPrintData (const wxPrintData &printData)
 Sets the print data associated with this object.
 
wxPageSetupDialogDataoperator= (const wxPrintData &data)
 Assigns print data to this object.
 
wxPageSetupDialogDataoperator= (const wxPageSetupDialogData &data)
 Assigns page setup data to this object.
 
- Public Member Functions inherited from wxObject
 wxObject ()
 Default ctor; initializes to NULL the internal reference data.
 
 wxObject (const wxObject &other)
 Copy ctor.
 
virtual ~wxObject ()
 Destructor.
 
virtual wxClassInfoGetClassInfo () const
 This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar).
 
wxObjectRefDataGetRefData () const
 Returns the wxObject::m_refData pointer, i.e. the data referenced by this object.
 
bool IsKindOf (const wxClassInfo *info) const
 Determines whether this class is a subclass of (or the same class as) the given class.
 
bool IsSameAs (const wxObject &obj) const
 Returns true if this object has the same data pointer as obj.
 
void Ref (const wxObject &clone)
 Makes this object refer to the data in clone.
 
void SetRefData (wxObjectRefData *data)
 Sets the wxObject::m_refData pointer.
 
void UnRef ()
 Decrements the reference count in the associated data, and if it is zero, deletes the data.
 
void UnShare ()
 This is the same of AllocExclusive() but this method is public.
 
void operator delete (void *buf)
 The delete operator is defined for debugging versions of the library only, when the identifier WXDEBUG is defined.
 
void * operator new (size_t size, const wxString &filename=NULL, int lineNum=0)
 The new operator is defined for debugging versions of the library only, when the identifier WXDEBUG is defined.
 

Additional Inherited Members

- Protected Member Functions inherited from wxObject
void AllocExclusive ()
 Ensure that this object's data is not shared with any other object.
 
virtual wxObjectRefDataCreateRefData () const
 Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it.
 
virtual wxObjectRefDataCloneRefData (const wxObjectRefData *data) const
 Creates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data.
 
- Protected Attributes inherited from wxObject
wxObjectRefDatam_refData
 Pointer to an object which is the object's reference-counted data.
 

Constructor & Destructor Documentation

wxPageSetupDialogData::wxPageSetupDialogData ( )

Default constructor.

wxPageSetupDialogData::wxPageSetupDialogData ( const wxPageSetupDialogData data)

Copy constructor.

wxPageSetupDialogData::wxPageSetupDialogData ( const wxPrintData printData)

Construct an object from a print data object.

virtual wxPageSetupDialogData::~wxPageSetupDialogData ( )
virtual

Destructor.

Member Function Documentation

void wxPageSetupDialogData::EnableHelp ( bool  flag)

Enables or disables the "Help" button (Windows only).

void wxPageSetupDialogData::EnableMargins ( bool  flag)

Enables or disables the margin controls (Windows only).

void wxPageSetupDialogData::EnableOrientation ( bool  flag)

Enables or disables the orientation control (Windows only).

void wxPageSetupDialogData::EnablePaper ( bool  flag)

Enables or disables the paper size control (Windows only).

void wxPageSetupDialogData::EnablePrinter ( bool  flag)

Enables or disables the "Printer" button, which invokes a printer setup dialog.

bool wxPageSetupDialogData::GetDefaultInfo ( ) const

Returns true if the dialog will simply return default printer information (such as orientation) instead of showing a dialog (Windows only).

bool wxPageSetupDialogData::GetDefaultMinMargins ( ) const

Returns true if the page setup dialog will take its minimum margin values from the currently selected printer properties (Windows only).

bool wxPageSetupDialogData::GetEnableHelp ( ) const

Returns true if the printer setup button is enabled.

bool wxPageSetupDialogData::GetEnableMargins ( ) const

Returns true if the margin controls are enabled (Windows only).

bool wxPageSetupDialogData::GetEnableOrientation ( ) const

Returns true if the orientation control is enabled (Windows only).

bool wxPageSetupDialogData::GetEnablePaper ( ) const

Returns true if the paper size control is enabled (Windows only).

bool wxPageSetupDialogData::GetEnablePrinter ( ) const

Returns true if the printer setup button is enabled.

wxPoint wxPageSetupDialogData::GetMarginBottomRight ( ) const

Returns the right (x) and bottom (y) margins in millimetres.

wxPoint wxPageSetupDialogData::GetMarginTopLeft ( ) const

Returns the left (x) and top (y) margins in millimetres.

wxPoint wxPageSetupDialogData::GetMinMarginBottomRight ( ) const

Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only).

Units are in millimetres.

wxPoint wxPageSetupDialogData::GetMinMarginTopLeft ( ) const

Returns the left (x) and top (y) minimum margins the user can enter (Windows only).

Units are in millimetres.

wxPaperSize wxPageSetupDialogData::GetPaperId ( ) const

Returns the paper id (stored in the internal wxPrintData object).

See Also
wxPrintData::SetPaperId()
wxSize wxPageSetupDialogData::GetPaperSize ( ) const

Returns the paper size in millimetres.

wxPrintData& wxPageSetupDialogData::GetPrintData ( )

Returns a reference to the print data associated with this object.

const wxPrintData& wxPageSetupDialogData::GetPrintData ( ) const
bool wxPageSetupDialogData::IsOk ( ) const

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.

wxPageSetupDialogData& wxPageSetupDialogData::operator= ( const wxPrintData data)

Assigns print data to this object.

wxPageSetupDialogData& wxPageSetupDialogData::operator= ( const wxPageSetupDialogData data)

Assigns page setup data to this object.

void wxPageSetupDialogData::SetDefaultInfo ( bool  flag)

Pass true if the dialog will simply return default printer information (such as orientation) instead of showing a dialog (Windows only).

void wxPageSetupDialogData::SetDefaultMinMargins ( bool  flag)

Pass true if the page setup dialog will take its minimum margin values from the currently selected printer properties (Windows only).

Units are in millimetres.

void wxPageSetupDialogData::SetMarginBottomRight ( const wxPoint pt)

Sets the right (x) and bottom (y) margins in millimetres.

void wxPageSetupDialogData::SetMarginTopLeft ( const wxPoint pt)

Sets the left (x) and top (y) margins in millimetres.

void wxPageSetupDialogData::SetMinMarginBottomRight ( const wxPoint pt)

Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only).

Units are in millimetres.

void wxPageSetupDialogData::SetMinMarginTopLeft ( const wxPoint pt)

Sets the left (x) and top (y) minimum margins the user can enter (Windows only).

Units are in millimetres.

void wxPageSetupDialogData::SetPaperId ( wxPaperSize  id)

Sets the paper size id.

Calling this function overrides the explicit paper dimensions passed in SetPaperSize().

See Also
wxPrintData::SetPaperId()
void wxPageSetupDialogData::SetPaperSize ( const wxSize size)

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.

void wxPageSetupDialogData::SetPrintData ( const wxPrintData printData)

Sets the print data associated with this object.