1 \section{\class{wxFontData
}}\label{wxfontdata
}
3 \overview{wxFontDialog overview
}{wxfontdialogoverview
}
5 This class holds a variety of information related to font dialogs.
7 \wxheading{Derived from
}
9 \helpref{wxObject
}{wxobject
}
11 \wxheading{Include files
}
17 \helpref{Overview
}{wxfontdialogoverview
},
\helpref{wxFontDialog
}{wxfontdialog
}
19 \latexignore{\rtfignore{\wxheading{Members
}}}
21 \membersection{wxFontData::wxFontData
}
23 \func{}{wxFontData
}{\void}
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.
29 \membersection{wxFontData::
\destruct{wxFontData
}}
31 \func{}{\destruct{wxFontData
}}{\void}
35 \membersection{wxFontData::EnableEffects
}
37 \func{void
}{EnableEffects
}{\param{bool
}{ enable
}}
39 Enables or disables `effects' under MS Windows only. This refers to the
40 controls for manipulating colour, strikeout and underline properties.
42 The default value is TRUE.
44 \membersection{wxFontData::GetAllowSymbols
}
46 \func{bool
}{GetAllowSymbols
}{\void}
48 Under MS Windows, returns a flag determining whether symbol fonts can be selected. Has no
49 effect on other platforms.
51 The default value is TRUE.
53 \membersection{wxFontData::GetColour
}
55 \func{wxColour\&
}{GetColour
}{\void}
57 Gets the colour associated with the font dialog.
59 The default value is black.
61 \membersection{wxFontData::GetChosenFont
}
63 \func{wxFont
}{GetChosenFont
}{\void}
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.
70 \membersection{wxFontData::GetEnableEffects
}
72 \func{bool
}{GetEnableEffects
}{\void}
74 Determines whether `effects' are enabled under Windows. This refers to the
75 controls for manipulating colour, strikeout and underline properties.
77 The default value is TRUE.
79 \membersection{wxFontData::GetInitialFont
}
81 \func{wxFont
}{GetInitialFont
}{\void}
83 Gets the font that will be initially used by the font dialog. This should have
84 previously been set by the application.
86 \membersection{wxFontData::GetShowHelp
}
88 \func{bool
}{GetShowHelp
}{\void}
90 Returns TRUE if the Help button will be shown (Windows only).
92 The default value is FALSE.
94 \membersection{wxFontData::SetAllowSymbols
}
96 \func{void
}{SetAllowSymbols
}{\param{bool
}{ allowSymbols
}}
98 Under MS Windows, determines whether symbol fonts can be selected. Has no
99 effect on other platforms.
101 The default value is TRUE.
103 \membersection{wxFontData::SetChosenFont
}
105 \func{void
}{SetChosenFont
}{\param{const wxFont\&
}{font
}}
107 Sets the font that will be returned to the user (for internal use only).
109 \membersection{wxFontData::SetColour
}
111 \func{void
}{SetColour
}{\param{const wxColour\&
}{ colour
}}
113 Sets the colour that will be used for the font foreground colour.
115 The default colour is black.
117 \membersection{wxFontData::SetInitialFont
}
119 \func{void
}{SetInitialFont
}{\param{const wxFont\&
}{font
}}
121 Sets the font that will be initially used by the font dialog.
123 \membersection{wxFontData::SetRange
}
125 \func{void
}{SetRange
}{\param{int
}{ min
},
\param{int
}{ max
}}
127 Sets the valid range for the font point size (Windows only).
129 The default is
0,
0 (unrestricted range).
131 \membersection{wxFontData::SetShowHelp
}
133 \func{void
}{SetShowHelp
}{\param{bool
}{ showHelp
}}
135 Determines whether the Help button will be displayed in the font dialog (Windows only).
137 The default value is FALSE.
139 \membersection{wxFontData::operator $=$
}
141 \func{void
}{operator $=$
}{\param{const wxFontData\&
}{ data
}}
143 Assingment operator for the font data.
145 \section{\class{wxFontDialog
}}\label{wxfontdialog
}
147 This class represents the font chooser dialog.
149 \wxheading{Derived from
}
151 \helpref{wxDialog
}{wxdialog
}\\
152 \helpref{wxWindow
}{wxwindow
}\\
153 \helpref{wxEvtHandler
}{wxevthandler
}\\
154 \helpref{wxObject
}{wxobject
}
156 \wxheading{Include files
}
162 \helpref{Overview
}{wxfontdialogoverview
},\\
163 \helpref{wxFontData
}{wxfontdata
},\\
164 \helpref{wxGetFontFromUser
}{wxgetfontfromuser
}
166 \latexignore{\rtfignore{\wxheading{Members
}}}
168 \membersection{wxFontDialog::wxFontDialog
}
170 \func{}{wxFontDialog
}{\void}
172 \func{}{wxFontDialog
}{\param{wxWindow*
}{parent
}}
174 \func{}{wxFontDialog
}{\param{wxWindow*
}{parent
},
\param{const wxFontData\&
}{data
}}
176 Constructor. Pass a parent window, and optionally the
177 \helpref{font data
}{wxfontdata
} object to be used to initialize the dialog
178 controls. If the default constructor is used,
179 \helpref{Create()
}{wxfontdialogcreate
} must be called before the dialog can be
182 \membersection{wxFontDialog::Create
}\label{wxfontdialogcreate
}
184 \func{bool
}{Create
}{\void}
186 \func{bool
}{Create
}{\param{wxWindow*
}{parent
}}
188 \func{bool
}{Create
}{\param{wxWindow*
}{parent
},
\param{const wxFontData\&
}{data
}}
190 Creates the dialog if it the wxFontDialog object had been initialized using the
191 default constructor. Returns
{\tt TRUE
} on success and
{\tt FALSE
} if an error
194 \membersection{wxFontDialog::
\destruct{wxFontDialog
}}
196 \func{}{\destruct{wxFontDialog
}}{\void}
200 \membersection{wxFontDialog::GetFontData
}
202 \constfunc{const wxFontData\&
}{GetFontData
}{\void}
204 \func{wxFontData\&
}{GetFontData
}{\void}
206 Returns the
\helpref{font data
}{wxfontdata
} associated with the font dialog.
208 \membersection{wxFontDialog::ShowModal
}
210 \func{int
}{ShowModal
}{\void}
212 Shows the dialog, returning
{\tt wxID
\_OK} if the user pressed Ok, and
213 {\tt wxID
\_CANCEL} otherwise.
215 If the user cancels the dialog (ShowModal returns
{\tt wxID
\_CANCEL}), no font
216 will be created. If the user presses OK, a new wxFont will be created and
217 stored in the font dialog's wxFontData structure.