]>
git.saurik.com Git - wxWidgets.git/blob - interface/cmndata.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxFontData class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
13 @ref overview_wxfontdialogoverview "wxFontDialog overview"
15 This class holds a variety of information related to font dialogs.
21 Overview, wxFont, wxFontDialog
23 class wxFontData
: public wxObject
27 Constructor. Initializes @e fontColour to black, @e showHelp to black,
28 @e allowSymbols to @true, @e enableEffects to @true,
29 @e minSize to 0 and @e maxSize to 0.
34 Enables or disables 'effects' under MS Windows or generic only. This refers to
36 controls for manipulating colour, strikeout and underline properties.
38 The default value is @true.
40 void EnableEffects(bool enable
);
43 Under MS Windows, returns a flag determining whether symbol fonts can be
45 effect on other platforms.
47 The default value is @true.
49 bool GetAllowSymbols();
52 Gets the font chosen by the user if the user pressed OK
53 (wxFontDialog::ShowModal returned wxID_OK).
55 wxFont
GetChosenFont();
58 Gets the colour associated with the font dialog.
60 The default value is black.
65 Determines whether 'effects' are enabled under Windows. This refers to the
66 controls for manipulating colour, strikeout and underline properties.
68 The default value is @true.
70 bool GetEnableEffects();
73 Gets the font that will be initially used by the font dialog. This should have
74 previously been set by the application.
76 wxFont
GetInitialFont();
79 Returns @true if the Help button will be shown (Windows only).
81 The default value is @false.
86 Under MS Windows, determines whether symbol fonts can be selected. Has no
87 effect on other platforms.
89 The default value is @true.
91 void SetAllowSymbols(bool allowSymbols
);
94 Sets the font that will be returned to the user (for internal use only).
96 void SetChosenFont(const wxFont
& font
);
99 Sets the colour that will be used for the font foreground colour.
101 The default colour is black.
103 void SetColour(const wxColour
& colour
);
106 Sets the font that will be initially used by the font dialog.
108 void SetInitialFont(const wxFont
& font
);
111 Sets the valid range for the font point size (Windows only).
113 The default is 0, 0 (unrestricted range).
115 void SetRange(int min
, int max
);
118 Determines whether the Help button will be displayed in the font dialog
121 The default value is @false.
123 void SetShowHelp(bool showHelp
);
126 Assignment operator for the font data.
128 void operator =(const wxFontData
& data
);
133 @class wxPageSetupDialogData
136 This class holds a variety of information related to wxPageSetupDialog.
138 It contains a wxPrintData member which is used to hold basic printer
139 configuration data (as opposed to the
140 user-interface configuration settings stored by wxPageSetupDialogData).
146 @ref overview_printingoverview "Printing framework overview", wxPageSetupDialog
148 class wxPageSetupDialogData
: public wxObject
153 Construct an object from a print data object.
155 wxPageSetupDialogData();
156 wxPageSetupDialogData(wxPageSetupDialogData
& data
);
157 wxPageSetupDialogData(wxPrintData
& printData
);
163 ~wxPageSetupDialogData();
166 Enables or disables the 'Help' button (Windows only).
168 void EnableHelp(bool flag
);
171 Enables or disables the margin controls (Windows only).
173 void EnableMargins(bool flag
);
176 Enables or disables the orientation control (Windows only).
178 void EnableOrientation(bool flag
);
181 Enables or disables the paper size control (Windows only).
183 void EnablePaper(bool flag
);
186 Enables or disables the @b Printer button, which invokes a printer setup dialog.
188 void EnablePrinter(bool flag
);
191 Returns @true if the dialog will simply return default printer information (such
193 instead of showing a dialog. Windows only.
195 bool GetDefaultInfo();
198 Returns @true if the page setup dialog will take its minimum margin values from
200 selected printer properties. Windows only.
202 bool GetDefaultMinMargins();
205 Returns @true if the printer setup button is enabled.
207 bool GetEnableHelp();
210 Returns @true if the margin controls are enabled (Windows only).
212 bool GetEnableMargins();
215 Returns @true if the orientation control is enabled (Windows only).
217 bool GetEnableOrientation();
220 Returns @true if the paper size control is enabled (Windows only).
222 bool GetEnablePaper();
225 Returns @true if the printer setup button is enabled.
227 bool GetEnablePrinter();
230 Returns the right (x) and bottom (y) margins in millimetres.
232 wxPoint
GetMarginBottomRight();
235 Returns the left (x) and top (y) margins in millimetres.
237 wxPoint
GetMarginTopLeft();
240 Returns the right (x) and bottom (y) minimum margins the user can enter
241 (Windows only). Units
244 wxPoint
GetMinMarginBottomRight();
247 Returns the left (x) and top (y) minimum margins the user can enter (Windows
251 wxPoint
GetMinMarginTopLeft();
254 Returns the paper id (stored in the internal wxPrintData object).
256 For further information, see wxPrintData::SetPaperId.
258 wxPaperSize
GetPaperId();
261 Returns the paper size in millimetres.
263 wxSize
GetPaperSize();
266 Returns a reference to the @ref overview_wxprintdata "print data" associated
269 wxPrintData
GetPrintData();
272 Returns @true if the print data associated with the dialog data is valid.
273 This can return @false on Windows if the current printer is not set, for example.
274 On all other platforms, it returns @true.
276 #define bool IsOk() /* implementation is private */
279 Pass @true if the dialog will simply return default printer information (such as
281 instead of showing a dialog. Windows only.
283 void SetDefaultInfo(bool flag
);
286 Pass @true if the page setup dialog will take its minimum margin values from the
288 selected printer properties. Windows only. Units are in millimetres
290 void SetDefaultMinMargins(bool flag
);
293 Sets the right (x) and bottom (y) margins in millimetres.
295 void SetMarginBottomRight(const wxPoint
& pt
);
298 Sets the left (x) and top (y) margins in millimetres.
300 void SetMarginTopLeft(const wxPoint
& pt
);
303 Sets the right (x) and bottom (y) minimum margins the user can enter (Windows
307 void SetMinMarginBottomRight(const wxPoint
& pt
);
310 Sets the left (x) and top (y) minimum margins the user can enter (Windows
314 void SetMinMarginTopLeft(const wxPoint
& pt
);
317 Sets the paper size id. For further information, see wxPrintData::SetPaperId.
319 Calling this function overrides the explicit paper dimensions passed in
322 void SetPaperId(wxPaperSize
& id
);
325 Sets the paper size in millimetres. If a corresponding paper id is found, it
327 internal wxPrintData object, otherwise the paper size overrides the paper id.
329 void SetPaperSize(const wxSize
& size
);
332 Sets the @ref overview_wxprintdata "print data" associated with this object.
334 void SetPrintData(const wxPrintData
& printData
);
338 Assigns page setup data to this object.
340 void operator =(const wxPrintData
& data
);
341 void operator =(const wxPageSetupDialogData
& data
);
350 This class holds a variety of information related to colour dialogs.
356 wxColour, wxColourDialog, @ref overview_wxcolourdialogoverview "wxColourDialog
359 class wxColourData
: public wxObject
363 Constructor. Initializes the custom colours to @c wxNullColour,
364 the @e data colour setting
365 to black, and the @e choose full setting to @true.
375 Under Windows, determines whether the Windows colour dialog will display the
377 with custom colour selection controls. Under PalmOS, determines whether colour
379 will display full rgb colour picker or only available palette indexer.
380 Has no meaning under other platforms.
382 The default value is @true.
384 bool GetChooseFull();
387 Gets the current colour associated with the colour dialog.
389 The default colour is black.
391 wxColour
GetColour();
394 Gets the @e ith custom colour associated with the colour dialog. @e i should
395 be an integer between 0 and 15.
397 The default custom colours are invalid colours.
399 wxColour
GetCustomColour(int i
);
402 Under Windows, tells the Windows colour dialog to display the full dialog
403 with custom colour selection controls. Under other platforms, has no effect.
405 The default value is @true.
407 void SetChooseFull(const bool flag
);
410 Sets the default colour for the colour dialog.
412 The default colour is black.
414 void SetColour(const wxColour
& colour
);
417 Sets the @e ith custom colour for the colour dialog. @e i should
418 be an integer between 0 and 15.
420 The default custom colours are invalid colours.
422 void SetCustomColour(int i
, const wxColour
& colour
);
425 Assignment operator for the colour data.
427 void operator =(const wxColourData
& data
);
435 This class holds a variety of information related to printers and
436 printer device contexts. This class is used to create a wxPrinterDC
437 and a wxPostScriptDC. It is also used as a data member of wxPrintDialogData
438 and wxPageSetupDialogData, as part of the mechanism for transferring data
439 between the print dialogs and the application.
445 @ref overview_printingoverview "Printing framework overview", wxPrintDialog,
446 wxPageSetupDialog, wxPrintDialogData, wxPageSetupDialogData, @ref overview_wxprintdialogoverview "wxPrintDialog Overview", wxPrinterDC, wxPostScriptDC
448 class wxPrintData
: public wxObject
456 wxPrintData(const wxPrintData
& data
);
465 Returns the current bin (papersource). By default, the system is left to select
466 the bin (@c wxPRINTBIN_DEFAULT is returned).
468 See SetBin() for the full list of bin values.
473 Returns @true if collation is on.
478 Returns @true if colour printing is on.
483 Returns the duplex mode. One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL,
486 wxDuplexMode
GetDuplex();
489 Returns the number of copies requested by the user.
494 Gets the orientation. This can be wxLANDSCAPE or wxPORTRAIT.
496 int GetOrientation();
499 Returns the paper size id. For more information, see SetPaperId().
501 wxPaperSize
GetPaperId();
504 Returns the printer name. If the printer name is the empty string, it indicates
506 printer should be used.
508 const wxString
GetPrinterName();
511 Returns the current print quality. This can be a positive integer, denoting the
512 number of dots per inch, or
513 one of the following identifiers:
514 On input you should pass one of these identifiers, but on return you may get
515 back a positive integer
516 indicating the current resolution setting.
518 wxPrintQuality
GetQuality();
521 Returns @true if the print data is valid for using in print dialogs.
522 This can return @false on Windows if the current printer is not set, for example.
523 On all other platforms, it returns @true.
525 #define bool IsOk() /* implementation is private */
528 Sets the current bin. Possible values are:
530 void SetBin(wxPrintBin flag
);
533 Sets collation to on or off.
535 void SetCollate(bool flag
);
538 Sets colour printing on or off.
540 void SetColour(bool flag
);
543 Returns the duplex mode. One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL,
546 void SetDuplex(wxDuplexMode mode
);
549 Sets the default number of copies to be printed out.
551 void SetNoCopies(int n
);
554 Sets the orientation. This can be wxLANDSCAPE or wxPORTRAIT.
556 void SetOrientation(int orientation
);
559 Sets the paper id. This indicates the type of paper to be used. For a mapping
561 paper id, paper size and string name, see wxPrintPaperDatabase in @c paper.h
562 (not yet documented).
564 @e paperId can be one of:
566 void SetPaperId(wxPaperSize paperId
);
569 Sets the printer name. This can be the empty string to indicate that the default
570 printer should be used.
572 void SetPrinterName(const wxString
& printerName
);
575 Sets the desired print quality. This can be a positive integer, denoting the
576 number of dots per inch, or
577 one of the following identifiers:
578 On input you should pass one of these identifiers, but on return you may get
579 back a positive integer
580 indicating the current resolution setting.
582 void SetQuality(wxPrintQuality quality
);
586 Assigns print setup data to this object. wxPrintSetupData is deprecated,
587 but retained for backward compatibility.
589 void operator =(const wxPrintData
& data
);
590 void operator =(const wxPrintSetupData
& data
);
596 @class wxPrintDialogData
599 This class holds information related to the visual characteristics of
601 It contains a wxPrintData object with underlying printing settings.
607 @ref overview_printingoverview "Printing framework overview", wxPrintDialog,
608 @ref overview_wxprintdialogoverview "wxPrintDialog Overview"
610 class wxPrintDialogData
: public wxObject
615 Construct an object from a print dialog data object.
618 wxPrintDialogData(wxPrintDialogData
& dialogData
);
619 wxPrintDialogData(wxPrintData
& printData
);
625 ~wxPrintDialogData();
628 Enables or disables the 'Help' button.
630 void EnableHelp(bool flag
);
633 Enables or disables the 'Page numbers' controls.
635 void EnablePageNumbers(bool flag
);
638 Enables or disables the 'Print to file' checkbox.
640 void EnablePrintToFile(bool flag
);
643 Enables or disables the 'Selection' radio button.
645 void EnableSelection(bool flag
);
648 Returns @true if the user requested that all pages be printed.
653 Returns @true if the user requested that the document(s) be collated.
658 Returns the @e from page number, as entered by the user.
663 Returns the @e maximum page number.
668 Returns the @e minimum page number.
673 Returns the number of copies requested by the user.
678 Returns a reference to the internal wxPrintData object.
680 wxPrintData
GetPrintData();
683 Returns @true if the user has selected printing to a file.
685 bool GetPrintToFile();
688 Returns @true if the user requested that the selection be printed (where
690 a concept specific to the application).
695 Returns the @e to page number, as entered by the user.
700 Returns @true if the print data is valid for using in print dialogs.
701 This can return @false on Windows if the current printer is not set, for example.
702 On all other platforms, it returns @true.
704 #define bool IsOk() /* implementation is private */
707 Sets the 'Collate' checkbox to @true or @false.
709 void SetCollate(bool flag
);
712 Sets the @e from page number.
714 void SetFromPage(int page
);
717 Sets the @e maximum page number.
719 void SetMaxPage(int page
);
722 Sets the @e minimum page number.
724 void SetMinPage(int page
);
727 Sets the default number of copies the user has requested to be printed out.
729 void SetNoCopies(int n
);
732 Sets the internal wxPrintData.
734 void SetPrintData(const wxPrintData
& printData
);
737 Sets the 'Print to file' checkbox to @true or @false.
739 void SetPrintToFile(bool flag
);
742 Selects the 'Selection' radio button. The effect of printing the selection
743 depends on how the application
744 implements this command, if at all.
746 void SetSelection(bool flag
);
749 Determines whether the dialog to be shown will be the Print dialog
750 (pass @false) or Print Setup dialog (pass @true).
752 This function has been deprecated since version 2.5.4.
754 void SetSetupDialog(bool flag
);
757 Sets the @e to page number.
759 void SetToPage(int page
);
763 Assigns another print dialog data object to this object.
765 void operator =(const wxPrintData
& data
);
766 void operator =(const wxPrintDialogData
& data
);