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