added wxFontMapper::Get/Set
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -434,7 +434,7 @@ destructor)
|
||||
|
||||
\membersection{wxConfigBase::Get}\label{wxconfigbaseget}
|
||||
|
||||
\func{wxConfigBase *}{Get}{\param{bool }{CreateOnDemand = TRUE}}
|
||||
\func{static wxConfigBase *}{Get}{\param{bool }{CreateOnDemand = TRUE}}
|
||||
|
||||
Get the current config object. If there is no current object and
|
||||
{\it CreateOnDemand} is TRUE, creates one
|
||||
@@ -684,7 +684,7 @@ exists.
|
||||
|
||||
\membersection{wxConfigBase::Set}\label{wxconfigbaseset}
|
||||
|
||||
\func{wxConfigBase *}{Set}{\param{wxConfigBase *}{pConfig}}
|
||||
\func{static wxConfigBase *}{Set}{\param{wxConfigBase *}{pConfig}}
|
||||
|
||||
Sets the config object as the current one, returns the pointer to the previous
|
||||
current object (both the parameter and returned value may be NULL)
|
||||
|
@@ -23,10 +23,6 @@ and "interactive" is FALSE or user denied to choose any replacement),
|
||||
the class queries \helpref{wxEncodingConverter}{wxencodingconverter}
|
||||
for "equivalent" encodings (e.g. iso8859-2 and cp1250) and tries them.
|
||||
|
||||
\wxheading{Global variables}
|
||||
|
||||
{\tt wxFontMapper *wxTheFontMapper} is defined.
|
||||
|
||||
\wxheading{Using wxFontMapper in conjunction with wxEncodingConverter}
|
||||
|
||||
If you need to display text in encoding which is not available at
|
||||
@@ -39,11 +35,11 @@ and convert the text to this encoding
|
||||
Following code snippet demonstrates it:
|
||||
|
||||
\begin{verbatim}
|
||||
if (!wxTheFontMapper->IsEncodingAvailable(enc, facename))
|
||||
if (!wxFontMapper::Get()->IsEncodingAvailable(enc, facename))
|
||||
{
|
||||
wxFontEncoding alternative;
|
||||
if (wxTheFontMapper->GetAltForEncoding(enc, &alternative,
|
||||
facename, FALSE))
|
||||
if (wxFontMapper::Get()->GetAltForEncoding(enc, &alternative,
|
||||
facename, FALSE))
|
||||
{
|
||||
wxEncodingConverter encconv;
|
||||
if (!encconv.Init(enc, alternative))
|
||||
@@ -79,12 +75,28 @@ No base class
|
||||
|
||||
Default ctor.
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
The preferred way of creating a wxFontMapper instance is to call
|
||||
\helpref{wxFontMapper::Get}{wxfontmapperget}.
|
||||
|
||||
\membersection{wxFontMapper::\destruct{wxFontMapper}}\label{wxfontmapperdtor}
|
||||
|
||||
\func{}{\destruct{wxFontMapper}}{\void}
|
||||
|
||||
Virtual dtor for a base class.
|
||||
|
||||
\membersection{wxFontMapper::Get}\label{wxfontmapperget}
|
||||
|
||||
\func{static wxFontMapper *}{Get}{\void}
|
||||
|
||||
Get the current font mapper object. If there is no current object, creates
|
||||
one.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFontMapper::Set}{wxfontmapperset}
|
||||
|
||||
\membersection{wxFontMapper::GetAltForEncoding}\label{wxfontmappergetaltforencoding}
|
||||
|
||||
\func{bool}{GetAltForEncoding}{\param{wxFontEncoding }{encoding}, \param{wxNativeEncodingInfo* }{info}, \param{const wxString\& }{facename = wxEmptyString}, \param{bool }{interactive = TRUE}}
|
||||
@@ -139,6 +151,18 @@ The parent window for modal dialogs.
|
||||
|
||||
The title for the dialogs (note that default is quite reasonable).
|
||||
|
||||
\membersection{wxFontMapper::Set}\label{wxfontmapperset}
|
||||
|
||||
\func{static wxFontMapper *}{Set}{\param{wxFontMapper *}{mapper}}
|
||||
|
||||
Set the current font mapper object and return previous one (may be NULL).
|
||||
This method is only useful if you want to plug-in an alternative font mapper
|
||||
into wxWindows.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFontMapper::Get}{wxfontmapperget}
|
||||
|
||||
\membersection{wxFontMapper::SetConfig}\label{wxfontmappersetconfig}
|
||||
|
||||
\func{void}{SetConfig}{\param{wxConfigBase* }{config}}
|
||||
|
@@ -94,7 +94,7 @@ You can use \helpref{wxEncodingConverter}{wxencodingconverter} and
|
||||
\helpref{wxFontMapper}{wxfontmapper} to display text:
|
||||
|
||||
\begin{verbatim}
|
||||
if (!wxTheFontMapper->IsEncodingAvailable(enc, facename))
|
||||
if (!wxFontMapper::Get()->IsEncodingAvailable(enc, facename))
|
||||
{
|
||||
wxFontEncoding alternative;
|
||||
if (wxTheFontMapper->GetAltForEncoding(enc, &alternative,
|
||||
|
Reference in New Issue
Block a user