]>
Commit | Line | Data |
---|---|---|
a660d684 KB |
1 | \section{\class{wxFontData}}\label{wxfontdata} |
2 | ||
3 | \overview{wxFontDialog overview}{wxfontdialogoverview} | |
4 | ||
5 | This class holds a variety of information related to font dialogs. | |
6 | ||
7 | \wxheading{Derived from} | |
8 | ||
9 | \helpref{wxObject}{wxobject} | |
10 | ||
954b8ae6 JS |
11 | \wxheading{Include files} |
12 | ||
13 | <wx/cmndata.h> | |
14 | ||
a660d684 KB |
15 | \wxheading{See also} |
16 | ||
6ea3ac58 | 17 | \helpref{Overview}{wxfontdialogoverview}, \helpref{wxFont}{wxfont}, \helpref{wxFontDialog}{wxfontdialog} |
a660d684 KB |
18 | |
19 | \latexignore{\rtfignore{\wxheading{Members}}} | |
20 | ||
f0e8a2d0 | 21 | \membersection{wxFontData::wxFontData}\label{wxfontdatactor} |
a660d684 KB |
22 | |
23 | \func{}{wxFontData}{\void} | |
24 | ||
25 | Constructor. Initializes {\it fontColour} to black, {\it showHelp} to black, | |
cc81d32f | 26 | \rtfsp{\it allowSymbols} to true, {\it enableEffects} to true, |
a660d684 KB |
27 | \rtfsp{\it minSize} to 0 and {\it maxSize} to 0. |
28 | ||
f0e8a2d0 | 29 | \membersection{wxFontData::EnableEffects}\label{wxfontdataenableeffects} |
a660d684 KB |
30 | |
31 | \func{void}{EnableEffects}{\param{bool}{ enable}} | |
32 | ||
9b621a7f | 33 | Enables or disables `effects' under MS Windows or generic only. This refers to the |
a660d684 KB |
34 | controls for manipulating colour, strikeout and underline properties. |
35 | ||
cc81d32f | 36 | The default value is true. |
a660d684 | 37 | |
f0e8a2d0 | 38 | \membersection{wxFontData::GetAllowSymbols}\label{wxfontdatagetallowsymbols} |
a660d684 KB |
39 | |
40 | \func{bool}{GetAllowSymbols}{\void} | |
41 | ||
42 | Under MS Windows, returns a flag determining whether symbol fonts can be selected. Has no | |
43 | effect on other platforms. | |
44 | ||
cc81d32f | 45 | The default value is true. |
a660d684 | 46 | |
f0e8a2d0 | 47 | \membersection{wxFontData::GetColour}\label{wxfontdatagetcolour} |
a660d684 KB |
48 | |
49 | \func{wxColour\&}{GetColour}{\void} | |
50 | ||
51 | Gets the colour associated with the font dialog. | |
52 | ||
53 | The default value is black. | |
54 | ||
f0e8a2d0 | 55 | \membersection{wxFontData::GetChosenFont}\label{wxfontdatagetchosenfont} |
a660d684 KB |
56 | |
57 | \func{wxFont}{GetChosenFont}{\void} | |
58 | ||
04bf08b7 | 59 | Gets the font chosen by the user if the user pressed OK (wxFontDialog::ShowModal returned wxID\_OK). |
a660d684 | 60 | |
f0e8a2d0 | 61 | \membersection{wxFontData::GetEnableEffects}\label{wxfontdatagetenableeffects} |
a660d684 KB |
62 | |
63 | \func{bool}{GetEnableEffects}{\void} | |
64 | ||
65 | Determines whether `effects' are enabled under Windows. This refers to the | |
66 | controls for manipulating colour, strikeout and underline properties. | |
67 | ||
cc81d32f | 68 | The default value is true. |
a660d684 | 69 | |
f0e8a2d0 | 70 | \membersection{wxFontData::GetInitialFont}\label{wxfontdatagetinitialfont} |
a660d684 KB |
71 | |
72 | \func{wxFont}{GetInitialFont}{\void} | |
73 | ||
74 | Gets the font that will be initially used by the font dialog. This should have | |
75 | previously been set by the application. | |
76 | ||
f0e8a2d0 | 77 | \membersection{wxFontData::GetShowHelp}\label{wxfontdatagetshowhelp} |
a660d684 KB |
78 | |
79 | \func{bool}{GetShowHelp}{\void} | |
80 | ||
cc81d32f | 81 | Returns true if the Help button will be shown (Windows only). |
a660d684 | 82 | |
cc81d32f | 83 | The default value is false. |
a660d684 | 84 | |
f0e8a2d0 | 85 | \membersection{wxFontData::SetAllowSymbols}\label{wxfontdatasetallowsymbols} |
a660d684 KB |
86 | |
87 | \func{void}{SetAllowSymbols}{\param{bool}{ allowSymbols}} | |
88 | ||
89 | Under MS Windows, determines whether symbol fonts can be selected. Has no | |
90 | effect on other platforms. | |
91 | ||
cc81d32f | 92 | The default value is true. |
a660d684 | 93 | |
f0e8a2d0 | 94 | \membersection{wxFontData::SetChosenFont}\label{wxfontdatasetchosenfont} |
a660d684 KB |
95 | |
96 | \func{void}{SetChosenFont}{\param{const wxFont\& }{font}} | |
97 | ||
98 | Sets the font that will be returned to the user (for internal use only). | |
99 | ||
f0e8a2d0 | 100 | \membersection{wxFontData::SetColour}\label{wxfontdatasetcolour} |
a660d684 KB |
101 | |
102 | \func{void}{SetColour}{\param{const wxColour\&}{ colour}} | |
103 | ||
104 | Sets the colour that will be used for the font foreground colour. | |
105 | ||
106 | The default colour is black. | |
107 | ||
f0e8a2d0 | 108 | \membersection{wxFontData::SetInitialFont}\label{wxfontdatasetinitialfont} |
a660d684 KB |
109 | |
110 | \func{void}{SetInitialFont}{\param{const wxFont\&}{font}} | |
111 | ||
112 | Sets the font that will be initially used by the font dialog. | |
113 | ||
f0e8a2d0 | 114 | \membersection{wxFontData::SetRange}\label{wxfontdatasetrange} |
a660d684 KB |
115 | |
116 | \func{void}{SetRange}{\param{int}{ min}, \param{int}{ max}} | |
117 | ||
118 | Sets the valid range for the font point size (Windows only). | |
119 | ||
120 | The default is 0, 0 (unrestricted range). | |
121 | ||
f0e8a2d0 | 122 | \membersection{wxFontData::SetShowHelp}\label{wxfontdatasetshowhelp} |
a660d684 KB |
123 | |
124 | \func{void}{SetShowHelp}{\param{bool}{ showHelp}} | |
125 | ||
126 | Determines whether the Help button will be displayed in the font dialog (Windows only). | |
127 | ||
cc81d32f | 128 | The default value is false. |
a660d684 | 129 | |
f0e8a2d0 | 130 | \membersection{wxFontData::operator $=$}\label{wxfontdataassign} |
a660d684 KB |
131 | |
132 | \func{void}{operator $=$}{\param{const wxFontData\&}{ data}} | |
133 | ||
2edb0bde | 134 | Assignment operator for the font data. |
a660d684 KB |
135 | |
136 | \section{\class{wxFontDialog}}\label{wxfontdialog} | |
137 | ||
138 | This class represents the font chooser dialog. | |
139 | ||
140 | \wxheading{Derived from} | |
141 | ||
142 | \helpref{wxDialog}{wxdialog}\\ | |
143 | \helpref{wxWindow}{wxwindow}\\ | |
144 | \helpref{wxEvtHandler}{wxevthandler}\\ | |
145 | \helpref{wxObject}{wxobject} | |
146 | ||
954b8ae6 JS |
147 | \wxheading{Include files} |
148 | ||
149 | <wx/fontdlg.h> | |
150 | ||
a660d684 KB |
151 | \wxheading{See also} |
152 | ||
d741c583 VZ |
153 | \helpref{Overview}{wxfontdialogoverview},\\ |
154 | \helpref{wxFontData}{wxfontdata},\\ | |
155 | \helpref{wxGetFontFromUser}{wxgetfontfromuser} | |
a660d684 KB |
156 | |
157 | \latexignore{\rtfignore{\wxheading{Members}}} | |
158 | ||
f0e8a2d0 | 159 | \membersection{wxFontDialog::wxFontDialog}\label{wxfontdialogctor} |
a660d684 | 160 | |
dbc65e27 | 161 | \func{}{wxFontDialog}{\void} |
a660d684 | 162 | |
dbc65e27 VZ |
163 | \func{}{wxFontDialog}{\param{wxWindow* }{parent}} |
164 | ||
165 | \func{}{wxFontDialog}{\param{wxWindow* }{parent}, \param{const wxFontData\& }{data}} | |
166 | ||
167 | Constructor. Pass a parent window, and optionally the | |
168 | \helpref{font data}{wxfontdata} object to be used to initialize the dialog | |
169 | controls. If the default constructor is used, | |
170 | \helpref{Create()}{wxfontdialogcreate} must be called before the dialog can be | |
171 | shown. | |
172 | ||
173 | \membersection{wxFontDialog::Create}\label{wxfontdialogcreate} | |
174 | ||
dbc65e27 VZ |
175 | \func{bool}{Create}{\param{wxWindow* }{parent}} |
176 | ||
177 | \func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxFontData\& }{data}} | |
178 | ||
179 | Creates the dialog if it the wxFontDialog object had been initialized using the | |
43e8916f MW |
180 | default constructor. Returns \true on success and \false if an error |
181 | occurred. | |
a660d684 | 182 | |
f0e8a2d0 | 183 | \membersection{wxFontDialog::GetFontData}\label{wxfontdialoggetfontdata} |
a660d684 | 184 | |
dbc65e27 VZ |
185 | \constfunc{const wxFontData\&}{GetFontData}{\void} |
186 | ||
a660d684 KB |
187 | \func{wxFontData\&}{GetFontData}{\void} |
188 | ||
189 | Returns the \helpref{font data}{wxfontdata} associated with the font dialog. | |
190 | ||
f0e8a2d0 | 191 | \membersection{wxFontDialog::ShowModal}\label{wxfontdialogshowmodal} |
a660d684 KB |
192 | |
193 | \func{int}{ShowModal}{\void} | |
194 | ||
dbc65e27 VZ |
195 | Shows the dialog, returning {\tt wxID\_OK} if the user pressed Ok, and |
196 | {\tt wxID\_CANCEL} otherwise. | |
a660d684 | 197 | |
dbc65e27 VZ |
198 | If the user cancels the dialog (ShowModal returns {\tt wxID\_CANCEL}), no font |
199 | will be created. If the user presses OK, a new wxFont will be created and | |
200 | stored in the font dialog's wxFontData structure. | |
a660d684 | 201 |