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