]> git.saurik.com Git - wxWidgets.git/blame - interface/cmndata.h
add wxShowEvent::IsShown() and wxIconizeEvent::IsIconized() instead of (now deprecate...
[wxWidgets.git] / interface / cmndata.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: cmndata.h
d18d9f60 3// Purpose: interface of common wx*Data classes (font, colour, print)
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxFontData
11 @wxheader{cmndata.h}
7c913512 12
23324ae1 13 This class holds a variety of information related to font dialogs.
7c913512 14
23324ae1 15 @library{wxcore}
d18d9f60 16 @category{cmndlg}
7c913512 17
d18d9f60 18 @see @ref overview_cmndlg_font, wxFont, wxFontDialog
23324ae1
FM
19*/
20class wxFontData : public wxObject
21{
22public:
23 /**
d18d9f60
BP
24 Constructor. Initializes @e fontColour to black, @e showHelp to @false,
25 @e allowSymbols to @true, @e enableEffects to @true, @e minSize to 0
26 and @e maxSize to 0.
23324ae1
FM
27 */
28 wxFontData();
29
30 /**
d18d9f60
BP
31 Enables or disables "effects" under Windows or generic only. This
32 refers to the controls for manipulating colour, strikeout and underline
33 properties.
34
23324ae1
FM
35 The default value is @true.
36 */
37 void EnableEffects(bool enable);
38
39 /**
d18d9f60
BP
40 Under Windows, returns a flag determining whether symbol fonts can be
41 selected. Has no effect on other platforms.
42
23324ae1
FM
43 The default value is @true.
44 */
45 bool GetAllowSymbols();
46
47 /**
48 Gets the font chosen by the user if the user pressed OK
d18d9f60 49 (wxFontDialog::ShowModal() returned wxID_OK).
23324ae1
FM
50 */
51 wxFont GetChosenFont();
52
53 /**
54 Gets the colour associated with the font dialog.
d18d9f60 55
23324ae1
FM
56 The default value is black.
57 */
d18d9f60 58 wxColour& GetColour();
23324ae1
FM
59
60 /**
d18d9f60
BP
61 Determines whether "effects" are enabled under Windows. This refers to
62 the controls for manipulating colour, strikeout and underline
63 properties.
64
23324ae1
FM
65 The default value is @true.
66 */
67 bool GetEnableEffects();
68
69 /**
d18d9f60
BP
70 Gets the font that will be initially used by the font dialog. This
71 should have previously been set by the application.
23324ae1
FM
72 */
73 wxFont GetInitialFont();
74
75 /**
76 Returns @true if the Help button will be shown (Windows only).
d18d9f60 77
23324ae1
FM
78 The default value is @false.
79 */
80 bool GetShowHelp();
81
82 /**
d18d9f60 83 Under Windows, determines whether symbol fonts can be selected. Has no
23324ae1 84 effect on other platforms.
d18d9f60 85
23324ae1
FM
86 The default value is @true.
87 */
88 void SetAllowSymbols(bool allowSymbols);
89
90 /**
d18d9f60
BP
91 Sets the font that will be returned to the user (for internal use
92 only).
23324ae1
FM
93 */
94 void SetChosenFont(const wxFont& font);
95
96 /**
97 Sets the colour that will be used for the font foreground colour.
d18d9f60 98
23324ae1
FM
99 The default colour is black.
100 */
101 void SetColour(const wxColour& colour);
102
103 /**
104 Sets the font that will be initially used by the font dialog.
105 */
106 void SetInitialFont(const wxFont& font);
107
108 /**
109 Sets the valid range for the font point size (Windows only).
d18d9f60 110
23324ae1
FM
111 The default is 0, 0 (unrestricted range).
112 */
113 void SetRange(int min, int max);
114
115 /**
116 Determines whether the Help button will be displayed in the font dialog
117 (Windows only).
d18d9f60 118
23324ae1
FM
119 The default value is @false.
120 */
121 void SetShowHelp(bool showHelp);
122
123 /**
124 Assignment operator for the font data.
125 */
126 void operator =(const wxFontData& data);
127};
128
129
e54c96f1 130
23324ae1
FM
131/**
132 @class wxPageSetupDialogData
133 @wxheader{cmndata.h}
7c913512 134
23324ae1 135 This class holds a variety of information related to wxPageSetupDialog.
7c913512 136
23324ae1 137 It contains a wxPrintData member which is used to hold basic printer
d18d9f60
BP
138 configuration data (as opposed to the user-interface configuration settings
139 stored by wxPageSetupDialogData).
7c913512 140
23324ae1
FM
141 @library{wxcore}
142 @category{printing}
7c913512 143
d18d9f60 144 @see @ref overview_printing, wxPageSetupDialog
23324ae1
FM
145*/
146class wxPageSetupDialogData : public wxObject
147{
148public:
23324ae1 149 /**
d18d9f60 150 Default constructor.
23324ae1
FM
151 */
152 wxPageSetupDialogData();
d18d9f60
BP
153
154 /**
155 Copy constructor.
156 */
7c913512 157 wxPageSetupDialogData(wxPageSetupDialogData& data);
d18d9f60
BP
158
159 /**
160 Construct an object from a print data object.
161 */
7c913512 162 wxPageSetupDialogData(wxPrintData& printData);
23324ae1
FM
163
164 /**
165 Destructor.
166 */
167 ~wxPageSetupDialogData();
168
169 /**
d18d9f60 170 Enables or disables the "Help" button (Windows only).
23324ae1
FM
171 */
172 void EnableHelp(bool flag);
173
174 /**
175 Enables or disables the margin controls (Windows only).
176 */
177 void EnableMargins(bool flag);
178
179 /**
180 Enables or disables the orientation control (Windows only).
181 */
182 void EnableOrientation(bool flag);
183
184 /**
185 Enables or disables the paper size control (Windows only).
186 */
187 void EnablePaper(bool flag);
188
189 /**
d18d9f60
BP
190 Enables or disables the "Printer" button, which invokes a printer setup
191 dialog.
23324ae1
FM
192 */
193 void EnablePrinter(bool flag);
194
195 /**
d18d9f60
BP
196 Returns @true if the dialog will simply return default printer
197 information (such as orientation) instead of showing a dialog (Windows
198 only).
23324ae1 199 */
328f5751 200 bool GetDefaultInfo() const;
23324ae1
FM
201
202 /**
d18d9f60
BP
203 Returns @true if the page setup dialog will take its minimum margin
204 values from the currently selected printer properties (Windows only).
23324ae1 205 */
328f5751 206 bool GetDefaultMinMargins() const;
23324ae1
FM
207
208 /**
209 Returns @true if the printer setup button is enabled.
210 */
328f5751 211 bool GetEnableHelp() const;
23324ae1
FM
212
213 /**
214 Returns @true if the margin controls are enabled (Windows only).
215 */
328f5751 216 bool GetEnableMargins() const;
23324ae1
FM
217
218 /**
219 Returns @true if the orientation control is enabled (Windows only).
220 */
328f5751 221 bool GetEnableOrientation() const;
23324ae1
FM
222
223 /**
224 Returns @true if the paper size control is enabled (Windows only).
225 */
328f5751 226 bool GetEnablePaper() const;
23324ae1
FM
227
228 /**
229 Returns @true if the printer setup button is enabled.
230 */
328f5751 231 bool GetEnablePrinter() const;
23324ae1
FM
232
233 /**
234 Returns the right (x) and bottom (y) margins in millimetres.
235 */
328f5751 236 wxPoint GetMarginBottomRight() const;
23324ae1
FM
237
238 /**
239 Returns the left (x) and top (y) margins in millimetres.
240 */
328f5751 241 wxPoint GetMarginTopLeft() const;
23324ae1
FM
242
243 /**
244 Returns the right (x) and bottom (y) minimum margins the user can enter
d18d9f60 245 (Windows only). Units are in millimetres.
23324ae1 246 */
328f5751 247 wxPoint GetMinMarginBottomRight() const;
23324ae1
FM
248
249 /**
d18d9f60
BP
250 Returns the left (x) and top (y) minimum margins the user can enter
251 (Windows only). Units are in millimetres.
23324ae1 252 */
328f5751 253 wxPoint GetMinMarginTopLeft() const;
23324ae1
FM
254
255 /**
256 Returns the paper id (stored in the internal wxPrintData object).
d18d9f60
BP
257
258 @see wxPrintData::SetPaperId()
23324ae1 259 */
328f5751 260 wxPaperSize GetPaperId() const;
23324ae1
FM
261
262 /**
263 Returns the paper size in millimetres.
264 */
328f5751 265 wxSize GetPaperSize() const;
23324ae1
FM
266
267 /**
d18d9f60 268 Returns a reference to the print data associated with this object.
23324ae1
FM
269 */
270 wxPrintData GetPrintData();
271
272 /**
d18d9f60
BP
273 Returns @true if the print data associated with the dialog data is
274 valid. This can return @false on Windows if the current printer is not
275 set, for example. On all other platforms, it returns @true.
23324ae1 276 */
328f5751 277 bool IsOk() const;
23324ae1
FM
278
279 /**
d18d9f60
BP
280 Pass @true if the dialog will simply return default printer information
281 (such as orientation) instead of showing a dialog (Windows only).
23324ae1
FM
282 */
283 void SetDefaultInfo(bool flag);
284
285 /**
d18d9f60
BP
286 Pass @true if the page setup dialog will take its minimum margin values
287 from the currently selected printer properties (Windows only). Units
288 are in millimetres.
23324ae1
FM
289 */
290 void SetDefaultMinMargins(bool flag);
291
292 /**
293 Sets the right (x) and bottom (y) margins in millimetres.
294 */
295 void SetMarginBottomRight(const wxPoint& pt);
296
297 /**
298 Sets the left (x) and top (y) margins in millimetres.
299 */
300 void SetMarginTopLeft(const wxPoint& pt);
301
302 /**
d18d9f60
BP
303 Sets the right (x) and bottom (y) minimum margins the user can enter
304 (Windows only). Units are in millimetres.
23324ae1
FM
305 */
306 void SetMinMarginBottomRight(const wxPoint& pt);
307
308 /**
d18d9f60
BP
309 Sets the left (x) and top (y) minimum margins the user can enter
310 (Windows only). Units are in millimetres.
23324ae1
FM
311 */
312 void SetMinMarginTopLeft(const wxPoint& pt);
313
314 /**
d18d9f60
BP
315 Sets the paper size id. Calling this function overrides the explicit
316 paper dimensions passed in SetPaperSize().
317
318 @see wxPrintData::SetPaperId()
23324ae1
FM
319 */
320 void SetPaperId(wxPaperSize& id);
321
322 /**
d18d9f60
BP
323 Sets the paper size in millimetres. If a corresponding paper id is
324 found, it will be set in the internal wxPrintData object, otherwise the
325 paper size overrides the paper id.
23324ae1
FM
326 */
327 void SetPaperSize(const wxSize& size);
328
329 /**
d18d9f60 330 Sets the print data associated with this object.
23324ae1
FM
331 */
332 void SetPrintData(const wxPrintData& printData);
333
23324ae1 334 /**
d18d9f60 335 Assigns print data to this object.
23324ae1
FM
336 */
337 void operator =(const wxPrintData& data);
d18d9f60
BP
338
339 /**
340 Assigns page setup data to this object.
341 */
7c913512 342 void operator =(const wxPageSetupDialogData& data);
23324ae1
FM
343};
344
345
e54c96f1 346
23324ae1
FM
347/**
348 @class wxColourData
349 @wxheader{cmndata.h}
7c913512 350
23324ae1 351 This class holds a variety of information related to colour dialogs.
7c913512 352
23324ae1 353 @library{wxcore}
d18d9f60 354 @category{cmndlg}
7c913512 355
d18d9f60 356 @see wxColour, wxColourDialog, @ref overview_cmndlg_colour
23324ae1
FM
357*/
358class wxColourData : public wxObject
359{
360public:
361 /**
d18d9f60
BP
362 Constructor. Initializes the custom colours to @c wxNullColour, the
363 @e data colour setting to black, and the @e choose full setting to
364 @true.
23324ae1
FM
365 */
366 wxColourData();
367
368 /**
369 Destructor.
370 */
371 ~wxColourData();
372
373 /**
d18d9f60
BP
374 Under Windows, determines whether the Windows colour dialog will
375 display the full dialog with custom colour selection controls. Under
376 PalmOS, determines whether colour dialog will display full rgb colour
377 picker or only available palette indexer. Has no meaning under other
378 platforms.
379
23324ae1
FM
380 The default value is @true.
381 */
328f5751 382 bool GetChooseFull() const;
23324ae1
FM
383
384 /**
385 Gets the current colour associated with the colour dialog.
d18d9f60 386
23324ae1
FM
387 The default colour is black.
388 */
d18d9f60 389 wxColour& GetColour() const;
23324ae1
FM
390
391 /**
d18d9f60
BP
392 Returns custom colours associated with the colour dialog.
393
394 @param i
395 An integer between 0 and 15, being any of the 15 custom colours
396 that the user has saved. The default custom colours are invalid
397 colours.
23324ae1 398 */
d18d9f60 399 wxColour& GetCustomColour(int i) const;
23324ae1
FM
400
401 /**
d18d9f60
BP
402 Under Windows, tells the Windows colour dialog to display the full
403 dialog with custom colour selection controls. Under other platforms,
404 has no effect.
405
23324ae1
FM
406 The default value is @true.
407 */
408 void SetChooseFull(const bool flag);
409
410 /**
411 Sets the default colour for the colour dialog.
d18d9f60 412
23324ae1
FM
413 The default colour is black.
414 */
415 void SetColour(const wxColour& colour);
416
417 /**
d18d9f60
BP
418 Sets custom colours for the colour dialog.
419
420 @param i
421 An integer between 0 and 15 for whatever custom colour you want to
422 set. The default custom colours are invalid colours.
23324ae1
FM
423 */
424 void SetCustomColour(int i, const wxColour& colour);
425
426 /**
427 Assignment operator for the colour data.
428 */
429 void operator =(const wxColourData& data);
430};
431
432
e54c96f1 433
d18d9f60
BP
434/**
435 Enumeration of various printer bin sources.
436
437 @see wxPrintData::SetBin()
438*/
439enum wxPrintBin
440{
441 wxPRINTBIN_DEFAULT,
442
443 wxPRINTBIN_ONLYONE,
444 wxPRINTBIN_LOWER,
445 wxPRINTBIN_MIDDLE,
446 wxPRINTBIN_MANUAL,
447 wxPRINTBIN_ENVELOPE,
448 wxPRINTBIN_ENVMANUAL,
449 wxPRINTBIN_AUTO,
450 wxPRINTBIN_TRACTOR,
451 wxPRINTBIN_SMALLFMT,
452 wxPRINTBIN_LARGEFMT,
453 wxPRINTBIN_LARGECAPACITY,
454 wxPRINTBIN_CASSETTE,
455 wxPRINTBIN_FORMSOURCE,
456
457 wxPRINTBIN_USER,
458};
459
23324ae1
FM
460/**
461 @class wxPrintData
462 @wxheader{cmndata.h}
7c913512 463
d18d9f60
BP
464 This class holds a variety of information related to printers and printer
465 device contexts. This class is used to create a wxPrinterDC and a
466 wxPostScriptDC. It is also used as a data member of wxPrintDialogData and
467 wxPageSetupDialogData, as part of the mechanism for transferring data
23324ae1 468 between the print dialogs and the application.
7c913512 469
d18d9f60
BP
470 @remarks
471
472 The following functions are specific to PostScript printing and have not
473 yet been documented:
474
475 @code
476 const wxString& GetPrinterCommand() const ;
477 const wxString& GetPrinterOptions() const ;
478 const wxString& GetPreviewCommand() const ;
479 const wxString& GetFilename() const ;
480 const wxString& GetFontMetricPath() const ;
481 double GetPrinterScaleX() const ;
482 double GetPrinterScaleY() const ;
483 long GetPrinterTranslateX() const ;
484 long GetPrinterTranslateY() const ;
485 // wxPRINT_MODE_PREVIEW, wxPRINT_MODE_FILE, wxPRINT_MODE_PRINTER
486 wxPrintMode GetPrintMode() const ;
487
488 void SetPrinterCommand(const wxString& command) ;
489 void SetPrinterOptions(const wxString& options) ;
490 void SetPreviewCommand(const wxString& command) ;
491 void SetFilename(const wxString& filename) ;
492 void SetFontMetricPath(const wxString& path) ;
493 void SetPrinterScaleX(double x) ;
494 void SetPrinterScaleY(double y) ;
495 void SetPrinterScaling(double x, double y) ;
496 void SetPrinterTranslateX(long x) ;
497 void SetPrinterTranslateY(long y) ;
498 void SetPrinterTranslation(long x, long y) ;
499 void SetPrintMode(wxPrintMode printMode) ;
500 @endcode
501
23324ae1
FM
502 @library{wxcore}
503 @category{printing}
7c913512 504
d18d9f60
BP
505 @see @ref overview_printing, wxPrintDialog, wxPageSetupDialog,
506 wxPrintDialogData, wxPageSetupDialogData, @ref overview_cmndlg_print,
507 wxPrinterDC, wxPostScriptDC
23324ae1
FM
508*/
509class wxPrintData : public wxObject
510{
511public:
23324ae1 512 /**
d18d9f60 513 Default constructor.
23324ae1
FM
514 */
515 wxPrintData();
d18d9f60
BP
516
517 /**
518 Copy constructor.
519 */
7c913512 520 wxPrintData(const wxPrintData& data);
23324ae1
FM
521
522 /**
523 Destructor.
524 */
525 ~wxPrintData();
526
527 /**
d18d9f60
BP
528 Returns the current bin (papersource). By default, the system is left
529 to select the bin (@c wxPRINTBIN_DEFAULT is returned).
530
23324ae1
FM
531 See SetBin() for the full list of bin values.
532 */
328f5751 533 wxPrintBin GetBin() const;
23324ae1
FM
534
535 /**
536 Returns @true if collation is on.
537 */
328f5751 538 bool GetCollate() const;
23324ae1
FM
539
540 /**
541 Returns @true if colour printing is on.
542 */
328f5751 543 bool GetColour() const;
23324ae1
FM
544
545 /**
546 Returns the duplex mode. One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL,
547 wxDUPLEX_VERTICAL.
548 */
328f5751 549 wxDuplexMode GetDuplex() const;
23324ae1
FM
550
551 /**
552 Returns the number of copies requested by the user.
553 */
328f5751 554 int GetNoCopies() const;
23324ae1
FM
555
556 /**
557 Gets the orientation. This can be wxLANDSCAPE or wxPORTRAIT.
558 */
328f5751 559 int GetOrientation() const;
23324ae1
FM
560
561 /**
d18d9f60
BP
562 Returns the paper size id.
563
564 @see SetPaperId()
23324ae1 565 */
328f5751 566 wxPaperSize GetPaperId() const;
23324ae1
FM
567
568 /**
d18d9f60
BP
569 Returns the printer name. If the printer name is the empty string, it
570 indicates that the default printer should be used.
23324ae1 571 */
328f5751 572 const wxString GetPrinterName() const;
23324ae1
FM
573
574 /**
d18d9f60
BP
575 Returns the current print quality. This can be a positive integer,
576 denoting the number of dots per inch, or one of the following
577 identifiers:
3c4f71cc 578
d18d9f60
BP
579 - wxPRINT_QUALITY_HIGH
580 - wxPRINT_QUALITY_MEDIUM
581 - wxPRINT_QUALITY_LOW
582 - wxPRINT_QUALITY_DRAFT
583
584 On input you should pass one of these identifiers, but on return you
585 may get back a positive integer indicating the current resolution
586 setting.
23324ae1 587 */
328f5751 588 wxPrintQuality GetQuality() const;
23324ae1
FM
589
590 /**
591 Returns @true if the print data is valid for using in print dialogs.
d18d9f60
BP
592 This can return @false on Windows if the current printer is not set,
593 for example. On all other platforms, it returns @true.
23324ae1 594 */
328f5751 595 bool IsOk() const;
23324ae1
FM
596
597 /**
d18d9f60 598 Sets the current bin.
23324ae1
FM
599 */
600 void SetBin(wxPrintBin flag);
601
602 /**
603 Sets collation to on or off.
604 */
605 void SetCollate(bool flag);
606
607 /**
608 Sets colour printing on or off.
609 */
610 void SetColour(bool flag);
611
612 /**
613 Returns the duplex mode. One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL,
614 wxDUPLEX_VERTICAL.
615 */
616 void SetDuplex(wxDuplexMode mode);
617
618 /**
619 Sets the default number of copies to be printed out.
620 */
621 void SetNoCopies(int n);
622
623 /**
624 Sets the orientation. This can be wxLANDSCAPE or wxPORTRAIT.
625 */
626 void SetOrientation(int orientation);
627
628 /**
d18d9f60
BP
629 Sets the paper id. This indicates the type of paper to be used. For a
630 mapping between paper id, paper size and string name, see
631 wxPrintPaperDatabase in @c "paper.h" (not yet documented).
23324ae1
FM
632 */
633 void SetPaperId(wxPaperSize paperId);
634
635 /**
d18d9f60
BP
636 Sets the printer name. This can be the empty string to indicate that
637 the default printer should be used.
23324ae1
FM
638 */
639 void SetPrinterName(const wxString& printerName);
640
641 /**
d18d9f60
BP
642 Sets the desired print quality. This can be a positive integer,
643 denoting the number of dots per inch, or one of the following
644 identifiers:
645
646 - wxPRINT_QUALITY_HIGH
647 - wxPRINT_QUALITY_MEDIUM
648 - wxPRINT_QUALITY_LOW
649 - wxPRINT_QUALITY_DRAFT
3c4f71cc 650
d18d9f60
BP
651 On input you should pass one of these identifiers, but on return you
652 may get back a positive integer indicating the current resolution
653 setting.
23324ae1
FM
654 */
655 void SetQuality(wxPrintQuality quality);
656
23324ae1 657 /**
d18d9f60 658 Assigns print data to this object.
23324ae1
FM
659 */
660 void operator =(const wxPrintData& data);
23324ae1
FM
661};
662
663
e54c96f1 664
23324ae1
FM
665/**
666 @class wxPrintDialogData
667 @wxheader{cmndata.h}
7c913512 668
23324ae1 669 This class holds information related to the visual characteristics of
d18d9f60
BP
670 wxPrintDialog. It contains a wxPrintData object with underlying printing
671 settings.
7c913512 672
23324ae1
FM
673 @library{wxcore}
674 @category{printing}
7c913512 675
d18d9f60 676 @see @ref overview_printing, wxPrintDialog, @ref overview_cmndlg_print
23324ae1
FM
677*/
678class wxPrintDialogData : public wxObject
679{
680public:
23324ae1 681 /**
d18d9f60 682 Default constructor.
23324ae1
FM
683 */
684 wxPrintDialogData();
d18d9f60
BP
685
686 /**
687 Copy constructor.
688 */
7c913512 689 wxPrintDialogData(wxPrintDialogData& dialogData);
d18d9f60
BP
690
691 /**
692 Construct an object from a print dialog data object.
693 */
7c913512 694 wxPrintDialogData(wxPrintData& printData);
23324ae1
FM
695
696 /**
697 Destructor.
698 */
699 ~wxPrintDialogData();
700
701 /**
d18d9f60 702 Enables or disables the "Help" button.
23324ae1
FM
703 */
704 void EnableHelp(bool flag);
705
706 /**
d18d9f60 707 Enables or disables the "Page numbers" controls.
23324ae1
FM
708 */
709 void EnablePageNumbers(bool flag);
710
711 /**
d18d9f60 712 Enables or disables the "Print to file" checkbox.
23324ae1
FM
713 */
714 void EnablePrintToFile(bool flag);
715
716 /**
d18d9f60 717 Enables or disables the "Selection" radio button.
23324ae1
FM
718 */
719 void EnableSelection(bool flag);
720
721 /**
722 Returns @true if the user requested that all pages be printed.
723 */
328f5751 724 bool GetAllPages() const;
23324ae1
FM
725
726 /**
727 Returns @true if the user requested that the document(s) be collated.
728 */
328f5751 729 bool GetCollate() const;
23324ae1
FM
730
731 /**
732 Returns the @e from page number, as entered by the user.
733 */
328f5751 734 int GetFromPage() const;
23324ae1
FM
735
736 /**
737 Returns the @e maximum page number.
738 */
328f5751 739 int GetMaxPage() const;
23324ae1
FM
740
741 /**
742 Returns the @e minimum page number.
743 */
328f5751 744 int GetMinPage() const;
23324ae1
FM
745
746 /**
747 Returns the number of copies requested by the user.
748 */
328f5751 749 int GetNoCopies() const;
23324ae1
FM
750
751 /**
752 Returns a reference to the internal wxPrintData object.
753 */
d18d9f60 754 wxPrintData& GetPrintData();
23324ae1
FM
755
756 /**
757 Returns @true if the user has selected printing to a file.
758 */
328f5751 759 bool GetPrintToFile() const;
23324ae1
FM
760
761 /**
d18d9f60
BP
762 Returns @true if the user requested that the selection be printed
763 (where "selection" is a concept specific to the application).
23324ae1 764 */
328f5751 765 bool GetSelection() const;
23324ae1
FM
766
767 /**
d18d9f60 768 Returns the @e "print to" page number, as entered by the user.
23324ae1 769 */
328f5751 770 int GetToPage() const;
23324ae1
FM
771
772 /**
773 Returns @true if the print data is valid for using in print dialogs.
d18d9f60
BP
774 This can return @false on Windows if the current printer is not set,
775 for example. On all other platforms, it returns @true.
23324ae1 776 */
328f5751 777 bool IsOk() const;
23324ae1
FM
778
779 /**
d18d9f60 780 Sets the "Collate" checkbox to @true or @false.
23324ae1
FM
781 */
782 void SetCollate(bool flag);
783
784 /**
785 Sets the @e from page number.
786 */
787 void SetFromPage(int page);
788
789 /**
790 Sets the @e maximum page number.
791 */
792 void SetMaxPage(int page);
793
794 /**
795 Sets the @e minimum page number.
796 */
797 void SetMinPage(int page);
798
799 /**
d18d9f60
BP
800 Sets the default number of copies the user has requested to be printed
801 out.
23324ae1
FM
802 */
803 void SetNoCopies(int n);
804
805 /**
806 Sets the internal wxPrintData.
807 */
808 void SetPrintData(const wxPrintData& printData);
809
810 /**
d18d9f60 811 Sets the "Print to file" checkbox to @true or @false.
23324ae1
FM
812 */
813 void SetPrintToFile(bool flag);
814
815 /**
d18d9f60
BP
816 Selects the "Selection" radio button. The effect of printing the
817 selection depends on how the application implements this command, if at
818 all.
23324ae1
FM
819 */
820 void SetSelection(bool flag);
821
822 /**
d18d9f60
BP
823 @deprecated This function has been deprecated since version 2.5.4.
824
23324ae1
FM
825 Determines whether the dialog to be shown will be the Print dialog
826 (pass @false) or Print Setup dialog (pass @true).
d18d9f60 827
23324ae1
FM
828 */
829 void SetSetupDialog(bool flag);
830
831 /**
d18d9f60 832 Sets the @e "print to" page number.
23324ae1
FM
833 */
834 void SetToPage(int page);
835
23324ae1 836 /**
d18d9f60 837 Assigns print data to this object.
23324ae1
FM
838 */
839 void operator =(const wxPrintData& data);
d18d9f60
BP
840
841 /**
842 Assigns another print dialog data object to this object.
843 */
7c913512 844 void operator =(const wxPrintDialogData& data);
23324ae1 845};
e54c96f1 846