]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/fontdlg.tex
wxHSCROLL works in GTK2, changed description to indicate no effect only on wxGTK1
[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
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
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
f0e8a2d0 29\membersection{wxFontData::\destruct{wxFontData}}\label{wxfontdatadtor}
a660d684
KB
30
31\func{}{\destruct{wxFontData}}{\void}
32
33Destructor.
34
f0e8a2d0 35\membersection{wxFontData::EnableEffects}\label{wxfontdataenableeffects}
a660d684
KB
36
37\func{void}{EnableEffects}{\param{bool}{ enable}}
38
9b621a7f 39Enables or disables `effects' under MS Windows or generic only. This refers to the
a660d684
KB
40controls for manipulating colour, strikeout and underline properties.
41
cc81d32f 42The default value is true.
a660d684 43
f0e8a2d0 44\membersection{wxFontData::GetAllowSymbols}\label{wxfontdatagetallowsymbols}
a660d684
KB
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 52
f0e8a2d0 53\membersection{wxFontData::GetColour}\label{wxfontdatagetcolour}
a660d684
KB
54
55\func{wxColour\&}{GetColour}{\void}
56
57Gets the colour associated with the font dialog.
58
59The default value is black.
60
f0e8a2d0 61\membersection{wxFontData::GetChosenFont}\label{wxfontdatagetchosenfont}
a660d684
KB
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 66
f0e8a2d0 67\membersection{wxFontData::GetEnableEffects}\label{wxfontdatagetenableeffects}
a660d684
KB
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 75
f0e8a2d0 76\membersection{wxFontData::GetInitialFont}\label{wxfontdatagetinitialfont}
a660d684
KB
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
f0e8a2d0 83\membersection{wxFontData::GetShowHelp}\label{wxfontdatagetshowhelp}
a660d684
KB
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 90
f0e8a2d0 91\membersection{wxFontData::SetAllowSymbols}\label{wxfontdatasetallowsymbols}
a660d684
KB
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 99
f0e8a2d0 100\membersection{wxFontData::SetChosenFont}\label{wxfontdatasetchosenfont}
a660d684
KB
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
f0e8a2d0 106\membersection{wxFontData::SetColour}\label{wxfontdatasetcolour}
a660d684
KB
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
f0e8a2d0 114\membersection{wxFontData::SetInitialFont}\label{wxfontdatasetinitialfont}
a660d684
KB
115
116\func{void}{SetInitialFont}{\param{const wxFont\&}{font}}
117
118Sets the font that will be initially used by the font dialog.
119
f0e8a2d0 120\membersection{wxFontData::SetRange}\label{wxfontdatasetrange}
a660d684
KB
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
f0e8a2d0 128\membersection{wxFontData::SetShowHelp}\label{wxfontdatasetshowhelp}
a660d684
KB
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 135
f0e8a2d0 136\membersection{wxFontData::operator $=$}\label{wxfontdataassign}
a660d684
KB
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
f0e8a2d0 165\membersection{wxFontDialog::wxFontDialog}\label{wxfontdialogctor}
a660d684 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 190
f0e8a2d0 191\membersection{wxFontDialog::\destruct{wxFontDialog}}\label{wxfontdialogdtor}
a660d684
KB
192
193\func{}{\destruct{wxFontDialog}}{\void}
194
195Destructor.
196
f0e8a2d0 197\membersection{wxFontDialog::GetFontData}\label{wxfontdialoggetfontdata}
a660d684 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
f0e8a2d0 205\membersection{wxFontDialog::ShowModal}\label{wxfontdialogshowmodal}
a660d684
KB
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