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