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