]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/fontdlg.tex
define NO_GCC_PRAGMA in wx-config output on Darwin
[wxWidgets.git] / docs / latex / wx / fontdlg.tex
CommitLineData
a660d684
KB
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
954b8ae6
JS
11\wxheading{Include files}
12
13<wx/cmndata.h>
14
a660d684
KB
15\wxheading{See also}
16
17\helpref{Overview}{wxfontdialogoverview}, \helpref{wxFontDialog}{wxfontdialog}
18
19\latexignore{\rtfignore{\wxheading{Members}}}
20
21\membersection{wxFontData::wxFontData}
22
23\func{}{wxFontData}{\void}
24
25Constructor. 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
29\membersection{wxFontData::\destruct{wxFontData}}
30
31\func{}{\destruct{wxFontData}}{\void}
32
33Destructor.
34
35\membersection{wxFontData::EnableEffects}
36
37\func{void}{EnableEffects}{\param{bool}{ enable}}
38
39Enables or disables `effects' under MS Windows only. This refers to the
40controls for manipulating colour, strikeout and underline properties.
41
cc81d32f 42The default value is true.
a660d684
KB
43
44\membersection{wxFontData::GetAllowSymbols}
45
46\func{bool}{GetAllowSymbols}{\void}
47
48Under MS Windows, returns a flag determining whether symbol fonts can be selected. Has no
49effect on other platforms.
50
cc81d32f 51The default value is true.
a660d684
KB
52
53\membersection{wxFontData::GetColour}
54
55\func{wxColour\&}{GetColour}{\void}
56
57Gets the colour associated with the font dialog.
58
59The default value is black.
60
61\membersection{wxFontData::GetChosenFont}
62
63\func{wxFont}{GetChosenFont}{\void}
64
cc81d32f 65Gets the font chosen by the user. If the user pressed OK (wxFontDialog::Show returned true), this returns
a660d684 66a new font which is now `owned' by the application, and should be deleted
cc81d32f 67if not required. If the user pressed Cancel (wxFontDialog::Show returned false) or
a660d684
KB
68the colour dialog has not been invoked yet, this will return NULL.
69
70\membersection{wxFontData::GetEnableEffects}
71
72\func{bool}{GetEnableEffects}{\void}
73
74Determines whether `effects' are enabled under Windows. This refers to the
75controls for manipulating colour, strikeout and underline properties.
76
cc81d32f 77The default value is true.
a660d684
KB
78
79\membersection{wxFontData::GetInitialFont}
80
81\func{wxFont}{GetInitialFont}{\void}
82
83Gets the font that will be initially used by the font dialog. This should have
84previously been set by the application.
85
86\membersection{wxFontData::GetShowHelp}
87
88\func{bool}{GetShowHelp}{\void}
89
cc81d32f 90Returns true if the Help button will be shown (Windows only).
a660d684 91
cc81d32f 92The default value is false.
a660d684
KB
93
94\membersection{wxFontData::SetAllowSymbols}
95
96\func{void}{SetAllowSymbols}{\param{bool}{ allowSymbols}}
97
98Under MS Windows, determines whether symbol fonts can be selected. Has no
99effect on other platforms.
100
cc81d32f 101The default value is true.
a660d684
KB
102
103\membersection{wxFontData::SetChosenFont}
104
105\func{void}{SetChosenFont}{\param{const wxFont\& }{font}}
106
107Sets the font that will be returned to the user (for internal use only).
108
109\membersection{wxFontData::SetColour}
110
111\func{void}{SetColour}{\param{const wxColour\&}{ colour}}
112
113Sets the colour that will be used for the font foreground colour.
114
115The default colour is black.
116
117\membersection{wxFontData::SetInitialFont}
118
119\func{void}{SetInitialFont}{\param{const wxFont\&}{font}}
120
121Sets the font that will be initially used by the font dialog.
122
123\membersection{wxFontData::SetRange}
124
125\func{void}{SetRange}{\param{int}{ min}, \param{int}{ max}}
126
127Sets the valid range for the font point size (Windows only).
128
129The default is 0, 0 (unrestricted range).
130
131\membersection{wxFontData::SetShowHelp}
132
133\func{void}{SetShowHelp}{\param{bool}{ showHelp}}
134
135Determines whether the Help button will be displayed in the font dialog (Windows only).
136
cc81d32f 137The default value is false.
a660d684
KB
138
139\membersection{wxFontData::operator $=$}
140
141\func{void}{operator $=$}{\param{const wxFontData\&}{ data}}
142
2edb0bde 143Assignment operator for the font data.
a660d684
KB
144
145\section{\class{wxFontDialog}}\label{wxfontdialog}
146
147This class represents the font chooser dialog.
148
149\wxheading{Derived from}
150
151\helpref{wxDialog}{wxdialog}\\
152\helpref{wxWindow}{wxwindow}\\
153\helpref{wxEvtHandler}{wxevthandler}\\
154\helpref{wxObject}{wxobject}
155
954b8ae6
JS
156\wxheading{Include files}
157
158<wx/fontdlg.h>
159
a660d684
KB
160\wxheading{See also}
161
d741c583
VZ
162\helpref{Overview}{wxfontdialogoverview},\\
163\helpref{wxFontData}{wxfontdata},\\
164\helpref{wxGetFontFromUser}{wxgetfontfromuser}
a660d684
KB
165
166\latexignore{\rtfignore{\wxheading{Members}}}
167
168\membersection{wxFontDialog::wxFontDialog}
169
dbc65e27 170\func{}{wxFontDialog}{\void}
a660d684 171
dbc65e27
VZ
172\func{}{wxFontDialog}{\param{wxWindow* }{parent}}
173
174\func{}{wxFontDialog}{\param{wxWindow* }{parent}, \param{const wxFontData\& }{data}}
175
176Constructor. Pass a parent window, and optionally the
177\helpref{font data}{wxfontdata} object to be used to initialize the dialog
178controls. If the default constructor is used,
179\helpref{Create()}{wxfontdialogcreate} must be called before the dialog can be
180shown.
181
182\membersection{wxFontDialog::Create}\label{wxfontdialogcreate}
183
184\func{bool}{Create}{\void}
185
186\func{bool}{Create}{\param{wxWindow* }{parent}}
187
188\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxFontData\& }{data}}
189
190Creates the dialog if it the wxFontDialog object had been initialized using the
cc81d32f 191default constructor. Returns {\tt true} on success and {\tt false} if an error
dbc65e27 192occured.
a660d684
KB
193
194\membersection{wxFontDialog::\destruct{wxFontDialog}}
195
196\func{}{\destruct{wxFontDialog}}{\void}
197
198Destructor.
199
200\membersection{wxFontDialog::GetFontData}
201
dbc65e27
VZ
202\constfunc{const wxFontData\&}{GetFontData}{\void}
203
a660d684
KB
204\func{wxFontData\&}{GetFontData}{\void}
205
206Returns the \helpref{font data}{wxfontdata} associated with the font dialog.
207
208\membersection{wxFontDialog::ShowModal}
209
210\func{int}{ShowModal}{\void}
211
dbc65e27
VZ
212Shows the dialog, returning {\tt wxID\_OK} if the user pressed Ok, and
213{\tt wxID\_CANCEL} otherwise.
a660d684 214
dbc65e27
VZ
215If the user cancels the dialog (ShowModal returns {\tt wxID\_CANCEL}), no font
216will be created. If the user presses OK, a new wxFont will be created and
217stored in the font dialog's wxFontData structure.
a660d684 218