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