]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/fontdata.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxFontData
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
11 This class holds a variety of information related to font dialogs.
14 @category{cmndlg,data}
16 @see @ref overview_cmndlg_font, wxFont, wxFontDialog
18 class wxFontData
: public wxObject
22 Constructor. Initializes @e fontColour to black, @e showHelp to @false,
23 @e allowSymbols to @true, @e enableEffects to @true, @e minSize to 0
29 Enables or disables "effects" under Windows or generic only. This
30 refers to the controls for manipulating colour, strikeout and underline
33 The default value is @true.
35 void EnableEffects(bool enable
);
38 Under Windows, returns a flag determining whether symbol fonts can be
39 selected. Has no effect on other platforms.
41 The default value is @true.
43 bool GetAllowSymbols() const;
46 Gets the font chosen by the user if the user pressed OK
47 (wxFontDialog::ShowModal() returned wxID_OK).
49 wxFont
GetChosenFont() const;
52 Gets the colour associated with the font dialog.
54 The default value is black.
56 const wxColour
& GetColour() const;
59 Determines whether "effects" are enabled under Windows. This refers to
60 the controls for manipulating colour, strikeout and underline
63 The default value is @true.
65 bool GetEnableEffects() const;
68 Gets the font that will be initially used by the font dialog. This
69 should have previously been set by the application.
71 wxFont
GetInitialFont() const;
74 Returns @true if the Help button will be shown (Windows only).
76 The default value is @false.
78 bool GetShowHelp() const;
81 Under Windows, determines whether symbol fonts can be selected. Has no
82 effect on other platforms.
84 The default value is @true.
86 void SetAllowSymbols(bool allowSymbols
);
89 Sets the font that will be returned to the user (for internal use
92 void SetChosenFont(const wxFont
& font
);
95 Sets the colour that will be used for the font foreground colour.
97 The default colour is black.
99 void SetColour(const wxColour
& colour
);
102 Sets the font that will be initially used by the font dialog.
104 void SetInitialFont(const wxFont
& font
);
107 Sets the valid range for the font point size (Windows only).
109 The default is 0, 0 (unrestricted range).
111 void SetRange(int min
, int max
);
114 Determines whether the Help button will be displayed in the font dialog
117 The default value is @false.
119 void SetShowHelp(bool showHelp
);
122 Assignment operator for the font data.
124 wxFontData
& operator =(const wxFontData
& data
);