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::EnableEffects
}\label{wxfontdataenableeffects
}
31 \func{void
}{EnableEffects
}{\param{bool
}{ enable
}}
33 Enables or disables `effects' under MS Windows or generic only. This refers to the
34 controls for manipulating colour, strikeout and underline properties.
36 The default value is true.
38 \membersection{wxFontData::GetAllowSymbols
}\label{wxfontdatagetallowsymbols
}
40 \func{bool
}{GetAllowSymbols
}{\void}
42 Under MS Windows, returns a flag determining whether symbol fonts can be selected. Has no
43 effect on other platforms.
45 The default value is true.
47 \membersection{wxFontData::GetColour
}\label{wxfontdatagetcolour
}
49 \func{wxColour\&
}{GetColour
}{\void}
51 Gets the colour associated with the font dialog.
53 The default value is black.
55 \membersection{wxFontData::GetChosenFont
}\label{wxfontdatagetchosenfont
}
57 \func{wxFont
}{GetChosenFont
}{\void}
59 Gets the font chosen by the user if the user pressed OK (wxFontDialog::ShowModal returned wxID
\_OK).
61 \membersection{wxFontData::GetEnableEffects
}\label{wxfontdatagetenableeffects
}
63 \func{bool
}{GetEnableEffects
}{\void}
65 Determines whether `effects' are enabled under Windows. This refers to the
66 controls for manipulating colour, strikeout and underline properties.
68 The default value is true.
70 \membersection{wxFontData::GetInitialFont
}\label{wxfontdatagetinitialfont
}
72 \func{wxFont
}{GetInitialFont
}{\void}
74 Gets the font that will be initially used by the font dialog. This should have
75 previously been set by the application.
77 \membersection{wxFontData::GetShowHelp
}\label{wxfontdatagetshowhelp
}
79 \func{bool
}{GetShowHelp
}{\void}
81 Returns true if the Help button will be shown (Windows only).
83 The default value is false.
85 \membersection{wxFontData::SetAllowSymbols
}\label{wxfontdatasetallowsymbols
}
87 \func{void
}{SetAllowSymbols
}{\param{bool
}{ allowSymbols
}}
89 Under MS Windows, determines whether symbol fonts can be selected. Has no
90 effect on other platforms.
92 The default value is true.
94 \membersection{wxFontData::SetChosenFont
}\label{wxfontdatasetchosenfont
}
96 \func{void
}{SetChosenFont
}{\param{const wxFont\&
}{font
}}
98 Sets the font that will be returned to the user (for internal use only).
100 \membersection{wxFontData::SetColour
}\label{wxfontdatasetcolour
}
102 \func{void
}{SetColour
}{\param{const wxColour\&
}{ colour
}}
104 Sets the colour that will be used for the font foreground colour.
106 The default colour is black.
108 \membersection{wxFontData::SetInitialFont
}\label{wxfontdatasetinitialfont
}
110 \func{void
}{SetInitialFont
}{\param{const wxFont\&
}{font
}}
112 Sets the font that will be initially used by the font dialog.
114 \membersection{wxFontData::SetRange
}\label{wxfontdatasetrange
}
116 \func{void
}{SetRange
}{\param{int
}{ min
},
\param{int
}{ max
}}
118 Sets the valid range for the font point size (Windows only).
120 The default is
0,
0 (unrestricted range).
122 \membersection{wxFontData::SetShowHelp
}\label{wxfontdatasetshowhelp
}
124 \func{void
}{SetShowHelp
}{\param{bool
}{ showHelp
}}
126 Determines whether the Help button will be displayed in the font dialog (Windows only).
128 The default value is false.
130 \membersection{wxFontData::operator $=$
}\label{wxfontdataassign
}
132 \func{void
}{operator $=$
}{\param{const wxFontData\&
}{ data
}}
134 Assignment operator for the font data.
136 \section{\class{wxFontDialog
}}\label{wxfontdialog
}
138 This class represents the font chooser dialog.
140 \wxheading{Derived from
}
142 \helpref{wxDialog
}{wxdialog
}\\
143 \helpref{wxWindow
}{wxwindow
}\\
144 \helpref{wxEvtHandler
}{wxevthandler
}\\
145 \helpref{wxObject
}{wxobject
}
147 \wxheading{Include files
}
153 \helpref{Overview
}{wxfontdialogoverview
},\\
154 \helpref{wxFontData
}{wxfontdata
},\\
155 \helpref{wxGetFontFromUser
}{wxgetfontfromuser
}
157 \latexignore{\rtfignore{\wxheading{Members
}}}
159 \membersection{wxFontDialog::wxFontDialog
}\label{wxfontdialogctor
}
161 \func{}{wxFontDialog
}{\void}
163 \func{}{wxFontDialog
}{\param{wxWindow*
}{parent
}}
165 \func{}{wxFontDialog
}{\param{wxWindow*
}{parent
},
\param{const wxFontData\&
}{data
}}
167 Constructor. Pass a parent window, and optionally the
168 \helpref{font data
}{wxfontdata
} object to be used to initialize the dialog
169 controls. If the default constructor is used,
170 \helpref{Create()
}{wxfontdialogcreate
} must be called before the dialog can be
173 \membersection{wxFontDialog::Create
}\label{wxfontdialogcreate
}
175 \func{bool
}{Create
}{\param{wxWindow*
}{parent
}}
177 \func{bool
}{Create
}{\param{wxWindow*
}{parent
},
\param{const wxFontData\&
}{data
}}
179 Creates the dialog if it the wxFontDialog object had been initialized using the
180 default constructor. Returns
\true on success and
\false if an error
183 \membersection{wxFontDialog::GetFontData
}\label{wxfontdialoggetfontdata
}
185 \constfunc{const wxFontData\&
}{GetFontData
}{\void}
187 \func{wxFontData\&
}{GetFontData
}{\void}
189 Returns the
\helpref{font data
}{wxfontdata
} associated with the font dialog.
191 \membersection{wxFontDialog::ShowModal
}\label{wxfontdialogshowmodal
}
193 \func{int
}{ShowModal
}{\void}
195 Shows the dialog, returning
{\tt wxID
\_OK} if the user pressed Ok, and
196 {\tt wxID
\_CANCEL} otherwise.
198 If the user cancels the dialog (ShowModal returns
{\tt wxID
\_CANCEL}), no font
199 will be created. If the user presses OK, a new wxFont will be created and
200 stored in the font dialog's wxFontData structure.