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{wxCore
}{librarieslist
}
21 \helpref{Overview
}{wxfontdialogoverview
},
\helpref{wxFont
}{wxfont
},
\helpref{wxFontDialog
}{wxfontdialog
}
23 \latexignore{\rtfignore{\wxheading{Members
}}}
25 \membersection{wxFontData::wxFontData
}\label{wxfontdatactor
}
27 \func{}{wxFontData
}{\void}
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.
33 \membersection{wxFontData::EnableEffects
}\label{wxfontdataenableeffects
}
35 \func{void
}{EnableEffects
}{\param{bool
}{ enable
}}
37 Enables or disables `effects' under MS Windows or generic only. This refers to the
38 controls for manipulating colour, strikeout and underline properties.
40 The default value is true.
42 \membersection{wxFontData::GetAllowSymbols
}\label{wxfontdatagetallowsymbols
}
44 \func{bool
}{GetAllowSymbols
}{\void}
46 Under MS Windows, returns a flag determining whether symbol fonts can be selected. Has no
47 effect on other platforms.
49 The default value is true.
51 \membersection{wxFontData::GetColour
}\label{wxfontdatagetcolour
}
53 \func{wxColour\&
}{GetColour
}{\void}
55 Gets the colour associated with the font dialog.
57 The default value is black.
59 \membersection{wxFontData::GetChosenFont
}\label{wxfontdatagetchosenfont
}
61 \func{wxFont
}{GetChosenFont
}{\void}
63 Gets the font chosen by the user if the user pressed OK (wxFontDialog::ShowModal returned wxID
\_OK).
65 \membersection{wxFontData::GetEnableEffects
}\label{wxfontdatagetenableeffects
}
67 \func{bool
}{GetEnableEffects
}{\void}
69 Determines whether `effects' are enabled under Windows. This refers to the
70 controls for manipulating colour, strikeout and underline properties.
72 The default value is true.
74 \membersection{wxFontData::GetInitialFont
}\label{wxfontdatagetinitialfont
}
76 \func{wxFont
}{GetInitialFont
}{\void}
78 Gets the font that will be initially used by the font dialog. This should have
79 previously been set by the application.
81 \membersection{wxFontData::GetShowHelp
}\label{wxfontdatagetshowhelp
}
83 \func{bool
}{GetShowHelp
}{\void}
85 Returns true if the Help button will be shown (Windows only).
87 The default value is false.
89 \membersection{wxFontData::SetAllowSymbols
}\label{wxfontdatasetallowsymbols
}
91 \func{void
}{SetAllowSymbols
}{\param{bool
}{ allowSymbols
}}
93 Under MS Windows, determines whether symbol fonts can be selected. Has no
94 effect on other platforms.
96 The default value is true.
98 \membersection{wxFontData::SetChosenFont
}\label{wxfontdatasetchosenfont
}
100 \func{void
}{SetChosenFont
}{\param{const wxFont\&
}{font
}}
102 Sets the font that will be returned to the user (for internal use only).
104 \membersection{wxFontData::SetColour
}\label{wxfontdatasetcolour
}
106 \func{void
}{SetColour
}{\param{const wxColour\&
}{ colour
}}
108 Sets the colour that will be used for the font foreground colour.
110 The default colour is black.
112 \membersection{wxFontData::SetInitialFont
}\label{wxfontdatasetinitialfont
}
114 \func{void
}{SetInitialFont
}{\param{const wxFont\&
}{font
}}
116 Sets the font that will be initially used by the font dialog.
118 \membersection{wxFontData::SetRange
}\label{wxfontdatasetrange
}
120 \func{void
}{SetRange
}{\param{int
}{ min
},
\param{int
}{ max
}}
122 Sets the valid range for the font point size (Windows only).
124 The default is
0,
0 (unrestricted range).
126 \membersection{wxFontData::SetShowHelp
}\label{wxfontdatasetshowhelp
}
128 \func{void
}{SetShowHelp
}{\param{bool
}{ showHelp
}}
130 Determines whether the Help button will be displayed in the font dialog (Windows only).
132 The default value is false.
134 \membersection{wxFontData::operator $=$
}\label{wxfontdataassign
}
136 \func{void
}{operator $=$
}{\param{const wxFontData\&
}{ data
}}
138 Assignment operator for the font data.
140 \section{\class{wxFontDialog
}}\label{wxfontdialog
}
142 This class represents the font chooser dialog.
144 \wxheading{Derived from
}
146 \helpref{wxDialog
}{wxdialog
}\\
147 \helpref{wxTopLevelWindow
}{wxtoplevelwindow
}\\
148 \helpref{wxWindow
}{wxwindow
}\\
149 \helpref{wxEvtHandler
}{wxevthandler
}\\
150 \helpref{wxObject
}{wxobject
}
152 \wxheading{Include files
}
158 \helpref{wxCore
}{librarieslist
}
162 \helpref{Overview
}{wxfontdialogoverview
},\\
163 \helpref{wxFontData
}{wxfontdata
},\\
164 \helpref{wxGetFontFromUser
}{wxgetfontfromuser
}
166 \latexignore{\rtfignore{\wxheading{Members
}}}
168 \membersection{wxFontDialog::wxFontDialog
}\label{wxfontdialogctor
}
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
}{\param{wxWindow*
}{parent
}}
186 \func{bool
}{Create
}{\param{wxWindow*
}{parent
},
\param{const wxFontData\&
}{data
}}
188 Creates the dialog if it the wxFontDialog object had been initialized using the
189 default constructor. Returns
\true on success and
\false if an error
192 \membersection{wxFontDialog::GetFontData
}\label{wxfontdialoggetfontdata
}
194 \constfunc{const wxFontData\&
}{GetFontData
}{\void}
196 \func{wxFontData\&
}{GetFontData
}{\void}
198 Returns the
\helpref{font data
}{wxfontdata
} associated with the font dialog.
200 \membersection{wxFontDialog::ShowModal
}\label{wxfontdialogshowmodal
}
202 \func{int
}{ShowModal
}{\void}
204 Shows the dialog, returning
{\tt wxID
\_OK} if the user pressed Ok, and
205 {\tt wxID
\_CANCEL} otherwise.
207 If the user cancels the dialog (ShowModal returns
{\tt wxID
\_CANCEL}), no font
208 will be created. If the user presses OK, a new wxFont will be created and
209 stored in the font dialog's wxFontData structure.