]> git.saurik.com Git - wxWidgets.git/blame_incremental - interface/wx/fontdata.h
Add test for absence of events from wxSpinCtrlDouble ctor.
[wxWidgets.git] / interface / wx / fontdata.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: fontdata.h
3// Purpose: interface of wxFontData
4// Author: wxWidgets team
5// Licence: wxWindows licence
6/////////////////////////////////////////////////////////////////////////////
7
8/**
9 @class wxFontData
10
11 This class holds a variety of information related to font dialogs.
12
13 @library{wxcore}
14 @category{cmndlg,data}
15
16 @see @ref overview_cmndlg_font, wxFont, wxFontDialog
17*/
18class wxFontData : public wxObject
19{
20public:
21 /**
22 Constructor. Initializes @e fontColour to black, @e showHelp to @false,
23 @e allowSymbols to @true, @e enableEffects to @true, @e minSize to 0
24 and @e maxSize to 0.
25 */
26 wxFontData();
27
28 /**
29 Enables or disables "effects" under Windows or generic only. This
30 refers to the controls for manipulating colour, strikeout and underline
31 properties.
32
33 The default value is @true.
34 */
35 void EnableEffects(bool enable);
36
37 /**
38 Under Windows, returns a flag determining whether symbol fonts can be
39 selected. Has no effect on other platforms.
40
41 The default value is @true.
42 */
43 bool GetAllowSymbols() const;
44
45 /**
46 Gets the font chosen by the user if the user pressed OK
47 (wxFontDialog::ShowModal() returned wxID_OK).
48 */
49 wxFont GetChosenFont() const;
50
51 /**
52 Gets the colour associated with the font dialog.
53
54 The default value is black.
55 */
56 const wxColour& GetColour() const;
57
58 /**
59 Determines whether "effects" are enabled under Windows. This refers to
60 the controls for manipulating colour, strikeout and underline
61 properties.
62
63 The default value is @true.
64 */
65 bool GetEnableEffects() const;
66
67 /**
68 Gets the font that will be initially used by the font dialog. This
69 should have previously been set by the application.
70 */
71 wxFont GetInitialFont() const;
72
73 /**
74 Returns @true if the Help button will be shown (Windows only).
75
76 The default value is @false.
77 */
78 bool GetShowHelp() const;
79
80 /**
81 Under Windows, determines whether symbol fonts can be selected. Has no
82 effect on other platforms.
83
84 The default value is @true.
85 */
86 void SetAllowSymbols(bool allowSymbols);
87
88 /**
89 Sets the font that will be returned to the user (for internal use
90 only).
91 */
92 void SetChosenFont(const wxFont& font);
93
94 /**
95 Sets the colour that will be used for the font foreground colour.
96
97 The default colour is black.
98 */
99 void SetColour(const wxColour& colour);
100
101 /**
102 Sets the font that will be initially used by the font dialog.
103 */
104 void SetInitialFont(const wxFont& font);
105
106 /**
107 Sets the valid range for the font point size (Windows only).
108
109 The default is 0, 0 (unrestricted range).
110 */
111 void SetRange(int min, int max);
112
113 /**
114 Determines whether the Help button will be displayed in the font dialog
115 (Windows only).
116
117 The default value is @false.
118 */
119 void SetShowHelp(bool showHelp);
120
121 /**
122 Assignment operator for the font data.
123 */
124 wxFontData& operator =(const wxFontData& data);
125};