]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/fontdlg.tex
reSWIGged
[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{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
25 Constructor. Initializes {\it fontColour} to black, {\it showHelp} to black,
26 \rtfsp{\it allowSymbols} to true, {\it enableEffects} to true,
27 \rtfsp{\it minSize} to 0 and {\it maxSize} to 0.
28
29 \membersection{wxFontData::\destruct{wxFontData}}
30
31 \func{}{\destruct{wxFontData}}{\void}
32
33 Destructor.
34
35 \membersection{wxFontData::EnableEffects}
36
37 \func{void}{EnableEffects}{\param{bool}{ enable}}
38
39 Enables or disables `effects' under MS Windows only. This refers to the
40 controls for manipulating colour, strikeout and underline properties.
41
42 The default value is true.
43
44 \membersection{wxFontData::GetAllowSymbols}
45
46 \func{bool}{GetAllowSymbols}{\void}
47
48 Under MS Windows, returns a flag determining whether symbol fonts can be selected. Has no
49 effect on other platforms.
50
51 The default value is true.
52
53 \membersection{wxFontData::GetColour}
54
55 \func{wxColour\&}{GetColour}{\void}
56
57 Gets the colour associated with the font dialog.
58
59 The default value is black.
60
61 \membersection{wxFontData::GetChosenFont}
62
63 \func{wxFont}{GetChosenFont}{\void}
64
65 Gets the font chosen by the user if the user pressed OK (wxFontDialog::ShowModal returned wxID\_OK).
66
67 \membersection{wxFontData::GetEnableEffects}
68
69 \func{bool}{GetEnableEffects}{\void}
70
71 Determines whether `effects' are enabled under Windows. This refers to the
72 controls for manipulating colour, strikeout and underline properties.
73
74 The default value is true.
75
76 \membersection{wxFontData::GetInitialFont}
77
78 \func{wxFont}{GetInitialFont}{\void}
79
80 Gets the font that will be initially used by the font dialog. This should have
81 previously been set by the application.
82
83 \membersection{wxFontData::GetShowHelp}
84
85 \func{bool}{GetShowHelp}{\void}
86
87 Returns true if the Help button will be shown (Windows only).
88
89 The default value is false.
90
91 \membersection{wxFontData::SetAllowSymbols}
92
93 \func{void}{SetAllowSymbols}{\param{bool}{ allowSymbols}}
94
95 Under MS Windows, determines whether symbol fonts can be selected. Has no
96 effect on other platforms.
97
98 The default value is true.
99
100 \membersection{wxFontData::SetChosenFont}
101
102 \func{void}{SetChosenFont}{\param{const wxFont\& }{font}}
103
104 Sets 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
110 Sets the colour that will be used for the font foreground colour.
111
112 The default colour is black.
113
114 \membersection{wxFontData::SetInitialFont}
115
116 \func{void}{SetInitialFont}{\param{const wxFont\&}{font}}
117
118 Sets 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
124 Sets the valid range for the font point size (Windows only).
125
126 The default is 0, 0 (unrestricted range).
127
128 \membersection{wxFontData::SetShowHelp}
129
130 \func{void}{SetShowHelp}{\param{bool}{ showHelp}}
131
132 Determines whether the Help button will be displayed in the font dialog (Windows only).
133
134 The default value is false.
135
136 \membersection{wxFontData::operator $=$}
137
138 \func{void}{operator $=$}{\param{const wxFontData\&}{ data}}
139
140 Assignment operator for the font data.
141
142 \section{\class{wxFontDialog}}\label{wxfontdialog}
143
144 This 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
153 \wxheading{Include files}
154
155 <wx/fontdlg.h>
156
157 \wxheading{See also}
158
159 \helpref{Overview}{wxfontdialogoverview},\\
160 \helpref{wxFontData}{wxfontdata},\\
161 \helpref{wxGetFontFromUser}{wxgetfontfromuser}
162
163 \latexignore{\rtfignore{\wxheading{Members}}}
164
165 \membersection{wxFontDialog::wxFontDialog}
166
167 \func{}{wxFontDialog}{\void}
168
169 \func{}{wxFontDialog}{\param{wxWindow* }{parent}}
170
171 \func{}{wxFontDialog}{\param{wxWindow* }{parent}, \param{const wxFontData\& }{data}}
172
173 Constructor. Pass a parent window, and optionally the
174 \helpref{font data}{wxfontdata} object to be used to initialize the dialog
175 controls. If the default constructor is used,
176 \helpref{Create()}{wxfontdialogcreate} must be called before the dialog can be
177 shown.
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
187 Creates the dialog if it the wxFontDialog object had been initialized using the
188 default constructor. Returns {\tt true} on success and {\tt false} if an error
189 occured.
190
191 \membersection{wxFontDialog::\destruct{wxFontDialog}}
192
193 \func{}{\destruct{wxFontDialog}}{\void}
194
195 Destructor.
196
197 \membersection{wxFontDialog::GetFontData}
198
199 \constfunc{const wxFontData\&}{GetFontData}{\void}
200
201 \func{wxFontData\&}{GetFontData}{\void}
202
203 Returns the \helpref{font data}{wxfontdata} associated with the font dialog.
204
205 \membersection{wxFontDialog::ShowModal}
206
207 \func{int}{ShowModal}{\void}
208
209 Shows the dialog, returning {\tt wxID\_OK} if the user pressed Ok, and
210 {\tt wxID\_CANCEL} otherwise.
211
212 If the user cancels the dialog (ShowModal returns {\tt wxID\_CANCEL}), no font
213 will be created. If the user presses OK, a new wxFont will be created and
214 stored in the font dialog's wxFontData structure.
215