]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/fontdlg.tex
Added Word template for formatting wxWindows manual
[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::Show returned TRUE), this returns
66 a new font which is now `owned' by the application, and should be deleted
67 if not required. If the user pressed Cancel (wxFontDialog::Show returned FALSE) or
68 the colour dialog has not been invoked yet, this will return NULL.
69
70 \membersection{wxFontData::GetEnableEffects}
71
72 \func{bool}{GetEnableEffects}{\void}
73
74 Determines whether `effects' are enabled under Windows. This refers to the
75 controls for manipulating colour, strikeout and underline properties.
76
77 The default value is TRUE.
78
79 \membersection{wxFontData::GetInitialFont}
80
81 \func{wxFont}{GetInitialFont}{\void}
82
83 Gets the font that will be initially used by the font dialog. This should have
84 previously been set by the application.
85
86 \membersection{wxFontData::GetShowHelp}
87
88 \func{bool}{GetShowHelp}{\void}
89
90 Returns TRUE if the Help button will be shown (Windows only).
91
92 The default value is FALSE.
93
94 \membersection{wxFontData::SetAllowSymbols}
95
96 \func{void}{SetAllowSymbols}{\param{bool}{ allowSymbols}}
97
98 Under MS Windows, determines whether symbol fonts can be selected. Has no
99 effect on other platforms.
100
101 The default value is TRUE.
102
103 \membersection{wxFontData::SetChosenFont}
104
105 \func{void}{SetChosenFont}{\param{const wxFont\& }{font}}
106
107 Sets the font that will be returned to the user (for internal use only).
108
109 \membersection{wxFontData::SetColour}
110
111 \func{void}{SetColour}{\param{const wxColour\&}{ colour}}
112
113 Sets the colour that will be used for the font foreground colour.
114
115 The default colour is black.
116
117 \membersection{wxFontData::SetInitialFont}
118
119 \func{void}{SetInitialFont}{\param{const wxFont\&}{font}}
120
121 Sets the font that will be initially used by the font dialog.
122
123 \membersection{wxFontData::SetRange}
124
125 \func{void}{SetRange}{\param{int}{ min}, \param{int}{ max}}
126
127 Sets the valid range for the font point size (Windows only).
128
129 The default is 0, 0 (unrestricted range).
130
131 \membersection{wxFontData::SetShowHelp}
132
133 \func{void}{SetShowHelp}{\param{bool}{ showHelp}}
134
135 Determines whether the Help button will be displayed in the font dialog (Windows only).
136
137 The default value is FALSE.
138
139 \membersection{wxFontData::operator $=$}
140
141 \func{void}{operator $=$}{\param{const wxFontData\&}{ data}}
142
143 Assingment operator for the font data.
144
145 \section{\class{wxFontDialog}}\label{wxfontdialog}
146
147 This class represents the font chooser dialog.
148
149 \wxheading{Derived from}
150
151 \helpref{wxDialog}{wxdialog}\\
152 \helpref{wxWindow}{wxwindow}\\
153 \helpref{wxEvtHandler}{wxevthandler}\\
154 \helpref{wxObject}{wxobject}
155
156 \wxheading{Include files}
157
158 <wx/fontdlg.h>
159
160 \wxheading{See also}
161
162 \helpref{Overview}{wxfontdialogoverview}, \helpref{wxFontData}{wxfontdata}
163
164 \latexignore{\rtfignore{\wxheading{Members}}}
165
166 \membersection{wxFontDialog::wxFontDialog}
167
168 \func{}{wxFontDialog}{\param{wxWindow* }{parent}, \param{wxFontData* }{data = NULL}}
169
170 Constructor. Pass a parent window, and optionally a pointer to a block of font
171 data, which will be copied to the font dialog's font data.
172
173 \membersection{wxFontDialog::\destruct{wxFontDialog}}
174
175 \func{}{\destruct{wxFontDialog}}{\void}
176
177 Destructor.
178
179 \membersection{wxFontDialog::GetFontData}
180
181 \func{wxFontData\&}{GetFontData}{\void}
182
183 Returns the \helpref{font data}{wxfontdata} associated with the font dialog.
184
185 \membersection{wxFontDialog::ShowModal}
186
187 \func{int}{ShowModal}{\void}
188
189 Shows the dialog, returning wxID\_OK if the user pressed Ok, and wxID\_CANCEL
190 otherwise.
191
192 If the user cancels the dialog (ShowModal returns wxID\_CANCEL), no font will be
193 created. If the user presses OK (ShowModal returns wxID\_OK), a new wxFont will
194 be created and stored in the font dialog's wxFontData structure.
195