]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/printdlg.h
   1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     interface of wxPrintDialog 
   4 // Author:      wxWidgets team 
   6 // Licence:     wxWindows license 
   7 ///////////////////////////////////////////////////////////////////////////// 
  12     This class represents the print and print setup common dialogs. 
  13     You may obtain a wxPrinterDC device context from a successfully dismissed 
  19     @see @ref overview_printing, @ref overview_cmndlg_print 
  21 class wxPrintDialog 
: public wxDialog
 
  27         Pass a parent window, and optionally a pointer to a block of print 
  28         data, which will be copied to the print dialog's print data. 
  30         @see wxPrintDialogData 
  32     wxPrintDialog(wxWindow
* parent
, wxPrintDialogData
* data 
= NULL
); 
  37         If GetPrintDC() has not been called, the device context obtained by 
  38         the dialog (if any) will be deleted. 
  40     virtual ~wxPrintDialog(); 
  43         Returns the device context created by the print dialog, if any. 
  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 
  49     virtual wxDC
* GetPrintDC(); 
  52         Returns the @ref overview_printing_printdata "print dialog data" associated 
  53         with the print dialog. 
  55     virtual wxPrintDialogData
& GetPrintDialogData(); 
  58         Shows the dialog, returning @c wxID_OK if the user pressed OK, and @c 
  59         wxID_CANCEL otherwise. 
  61         After this function is called, a device context may be retrievable using 
  64     virtual int ShowModal(); 
  70     @class wxPageSetupDialog 
  72     This class represents the page setup common dialog. In MSW, the page setup 
  73     dialog is standard from Windows 95 on, replacing the print setup dialog (which 
  74     is retained in Windows and wxWidgets for backward compatibility). 
  75     On Windows 95 and NT 4.0 and above, the page setup dialog is native to the windowing 
  76     system, otherwise it is emulated. 
  78     The page setup dialog contains controls for paper size (A4, A5 etc.), 
  79     orientation (landscape or portrait), and controls for setting left, top, right 
  80     and bottom margin sizes in millimetres. 
  82     On Macintosh, the native page setup dialog is used, which lets you select paper 
  83     size and orientation but it does not let you change the page margins. 
  85     On other platforms, a generic dialog is used. 
  87     When the dialog has been closed, you need to query the wxPageSetupDialogData 
  88     object associated with the dialog. 
  90     Note that the OK and Cancel buttons do not destroy the dialog; this must be done 
  96     @see @ref overview_printing, wxPrintDialog, wxPageSetupDialogData 
  98 class wxPageSetupDialog 
: public wxDialog
 
 104         Pass a parent window, and optionally a pointer to a block of page 
 105         setup data, which will be copied to the print dialog's internal data. 
 107     wxPageSetupDialog(wxWindow
* parent
, wxPageSetupDialogData
* data 
= NULL
); 
 112     virtual ~wxPageSetupDialog(); 
 115         Returns the wxPageSetupDialogData object associated with the dialog. 
 117     wxPageSetupDialogData
& GetPageSetupData(); 
 120         Shows the dialog, returning @c wxID_OK if the user pressed OK, and 
 121         @c wxID_CANCEL otherwise.