]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/fontdata.h
fb46ff14ba797f580d6a28b70802d062d7884d76
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxFontData
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
12 This class holds a variety of information related to font dialogs.
15 @category{cmndlg,data}
17 @see @ref overview_cmndlg_font, wxFont, wxFontDialog
19 class wxFontData
: public wxObject
23 Constructor. Initializes @e fontColour to black, @e showHelp to @false,
24 @e allowSymbols to @true, @e enableEffects to @true, @e minSize to 0
30 Enables or disables "effects" under Windows or generic only. This
31 refers to the controls for manipulating colour, strikeout and underline
34 The default value is @true.
36 void EnableEffects(bool enable
);
39 Under Windows, returns a flag determining whether symbol fonts can be
40 selected. Has no effect on other platforms.
42 The default value is @true.
44 bool GetAllowSymbols() const;
47 Gets the font chosen by the user if the user pressed OK
48 (wxFontDialog::ShowModal() returned wxID_OK).
50 wxFont
GetChosenFont() const;
53 Gets the colour associated with the font dialog.
55 The default value is black.
57 const wxColour
& GetColour() const;
60 Determines whether "effects" are enabled under Windows. This refers to
61 the controls for manipulating colour, strikeout and underline
64 The default value is @true.
66 bool GetEnableEffects() const;
69 Gets the font that will be initially used by the font dialog. This
70 should have previously been set by the application.
72 wxFont
GetInitialFont() const;
75 Returns @true if the Help button will be shown (Windows only).
77 The default value is @false.
79 bool GetShowHelp() const;
82 Under Windows, determines whether symbol fonts can be selected. Has no
83 effect on other platforms.
85 The default value is @true.
87 void SetAllowSymbols(bool allowSymbols
);
90 Sets the font that will be returned to the user (for internal use
93 void SetChosenFont(const wxFont
& font
);
96 Sets the colour that will be used for the font foreground colour.
98 The default colour is black.
100 void SetColour(const wxColour
& colour
);
103 Sets the font that will be initially used by the font dialog.
105 void SetInitialFont(const wxFont
& font
);
108 Sets the valid range for the font point size (Windows only).
110 The default is 0, 0 (unrestricted range).
112 void SetRange(int min
, int max
);
115 Determines whether the Help button will be displayed in the font dialog
118 The default value is @false.
120 void SetShowHelp(bool showHelp
);
123 Assignment operator for the font data.
125 wxFontData
& operator =(const wxFontData
& data
);