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{wxFont
}{wxfont
},
\helpref{wxFontDialog
}{wxfontdialog
}
19 \latexignore{\rtfignore{\wxheading{Members
}}}
21 \membersection{wxFontData::wxFontData
}\label{wxfontdatactor
}
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
}}\label{wxfontdatadtor
}
31 \func{}{\destruct{wxFontData
}}{\void}
35 \membersection{wxFontData::EnableEffects
}\label{wxfontdataenableeffects
}
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
}\label{wxfontdatagetallowsymbols
}
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
}\label{wxfontdatagetcolour
}
55 \func{wxColour\&
}{GetColour
}{\void}
57 Gets the colour associated with the font dialog.
59 The default value is black.
61 \membersection{wxFontData::GetChosenFont
}\label{wxfontdatagetchosenfont
}
63 \func{wxFont
}{GetChosenFont
}{\void}
65 Gets the font chosen by the user if the user pressed OK (wxFontDialog::ShowModal returned wxID
\_OK).
67 \membersection{wxFontData::GetEnableEffects
}\label{wxfontdatagetenableeffects
}
69 \func{bool
}{GetEnableEffects
}{\void}
71 Determines whether `effects' are enabled under Windows. This refers to the
72 controls for manipulating colour, strikeout and underline properties.
74 The default value is true.
76 \membersection{wxFontData::GetInitialFont
}\label{wxfontdatagetinitialfont
}
78 \func{wxFont
}{GetInitialFont
}{\void}
80 Gets the font that will be initially used by the font dialog. This should have
81 previously been set by the application.
83 \membersection{wxFontData::GetShowHelp
}\label{wxfontdatagetshowhelp
}
85 \func{bool
}{GetShowHelp
}{\void}
87 Returns true if the Help button will be shown (Windows only).
89 The default value is false.
91 \membersection{wxFontData::SetAllowSymbols
}\label{wxfontdatasetallowsymbols
}
93 \func{void
}{SetAllowSymbols
}{\param{bool
}{ allowSymbols
}}
95 Under MS Windows, determines whether symbol fonts can be selected. Has no
96 effect on other platforms.
98 The default value is true.
100 \membersection{wxFontData::SetChosenFont
}\label{wxfontdatasetchosenfont
}
102 \func{void
}{SetChosenFont
}{\param{const wxFont\&
}{font
}}
104 Sets the font that will be returned to the user (for internal use only).
106 \membersection{wxFontData::SetColour
}\label{wxfontdatasetcolour
}
108 \func{void
}{SetColour
}{\param{const wxColour\&
}{ colour
}}
110 Sets the colour that will be used for the font foreground colour.
112 The default colour is black.
114 \membersection{wxFontData::SetInitialFont
}\label{wxfontdatasetinitialfont
}
116 \func{void
}{SetInitialFont
}{\param{const wxFont\&
}{font
}}
118 Sets the font that will be initially used by the font dialog.
120 \membersection{wxFontData::SetRange
}\label{wxfontdatasetrange
}
122 \func{void
}{SetRange
}{\param{int
}{ min
},
\param{int
}{ max
}}
124 Sets the valid range for the font point size (Windows only).
126 The default is
0,
0 (unrestricted range).
128 \membersection{wxFontData::SetShowHelp
}\label{wxfontdatasetshowhelp
}
130 \func{void
}{SetShowHelp
}{\param{bool
}{ showHelp
}}
132 Determines whether the Help button will be displayed in the font dialog (Windows only).
134 The default value is false.
136 \membersection{wxFontData::operator $=$
}\label{wxfontdataassign
}
138 \func{void
}{operator $=$
}{\param{const wxFontData\&
}{ data
}}
140 Assignment operator for the font data.
142 \section{\class{wxFontDialog
}}\label{wxfontdialog
}
144 This class represents the font chooser dialog.
146 \wxheading{Derived from
}
148 \helpref{wxDialog
}{wxdialog
}\\
149 \helpref{wxWindow
}{wxwindow
}\\
150 \helpref{wxEvtHandler
}{wxevthandler
}\\
151 \helpref{wxObject
}{wxobject
}
153 \wxheading{Include files
}
159 \helpref{Overview
}{wxfontdialogoverview
},\\
160 \helpref{wxFontData
}{wxfontdata
},\\
161 \helpref{wxGetFontFromUser
}{wxgetfontfromuser
}
163 \latexignore{\rtfignore{\wxheading{Members
}}}
165 \membersection{wxFontDialog::wxFontDialog
}\label{wxfontdialogctor
}
167 \func{}{wxFontDialog
}{\void}
169 \func{}{wxFontDialog
}{\param{wxWindow*
}{parent
}}
171 \func{}{wxFontDialog
}{\param{wxWindow*
}{parent
},
\param{const wxFontData\&
}{data
}}
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
179 \membersection{wxFontDialog::Create
}\label{wxfontdialogcreate
}
181 \func{bool
}{Create
}{\void}
183 \func{bool
}{Create
}{\param{wxWindow*
}{parent
}}
185 \func{bool
}{Create
}{\param{wxWindow*
}{parent
},
\param{const wxFontData\&
}{data
}}
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
191 \membersection{wxFontDialog::
\destruct{wxFontDialog
}}\label{wxfontdialogdtor
}
193 \func{}{\destruct{wxFontDialog
}}{\void}
197 \membersection{wxFontDialog::GetFontData
}\label{wxfontdialoggetfontdata
}
199 \constfunc{const wxFontData\&
}{GetFontData
}{\void}
201 \func{wxFontData\&
}{GetFontData
}{\void}
203 Returns the
\helpref{font data
}{wxfontdata
} associated with the font dialog.
205 \membersection{wxFontDialog::ShowModal
}\label{wxfontdialogshowmodal
}
207 \func{int
}{ShowModal
}{\void}
209 Shows the dialog, returning
{\tt wxID
\_OK} if the user pressed Ok, and
210 {\tt wxID
\_CANCEL} otherwise.
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.