wxWidgets/include/wx/fmappriv.h
Vadim Zeitlin 3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00

74 lines
2.1 KiB
C++

///////////////////////////////////////////////////////////////////////////////
// Name: wx/fmappriv.h
// Purpose: private wxFontMapper stuff, not to be used by the library users
// Author: Vadim Zeitlin
// Modified by:
// Created: 21.06.2003 (extracted from common/fontmap.cpp)
// Copyright: (c) 1999-2003 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FMAPPRIV_H_
#define _WX_FMAPPRIV_H_
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// a special pseudo encoding which means "don't ask me about this charset
// any more" -- we need it to avoid driving the user crazy with asking him
// time after time about the same charset which he [presumably] doesn't
// have the fonts for
enum { wxFONTENCODING_UNKNOWN = -2 };
// the config paths we use
#if wxUSE_CONFIG
#define FONTMAPPER_ROOT_PATH wxT("/wxWindows/FontMapper")
#define FONTMAPPER_CHARSET_PATH wxT("Charsets")
#define FONTMAPPER_CHARSET_ALIAS_PATH wxT("Aliases")
#endif // wxUSE_CONFIG
// ----------------------------------------------------------------------------
// wxFontMapperPathChanger: change the config path during our lifetime
// ----------------------------------------------------------------------------
#if wxUSE_CONFIG && wxUSE_FILECONFIG
class wxFontMapperPathChanger
{
public:
wxFontMapperPathChanger(wxFontMapperBase *fontMapper, const wxString& path)
{
m_fontMapper = fontMapper;
m_ok = m_fontMapper->ChangePath(path, &m_pathOld);
}
bool IsOk() const { return m_ok; }
~wxFontMapperPathChanger()
{
if ( IsOk() )
m_fontMapper->RestorePath(m_pathOld);
}
private:
// the fontmapper object we're working with
wxFontMapperBase *m_fontMapper;
// the old path to be restored if m_ok
wxString m_pathOld;
// have we changed the path successfully?
bool m_ok;
wxDECLARE_NO_COPY_CLASS(wxFontMapperPathChanger);
};
#endif // wxUSE_CONFIG
#endif // _WX_FMAPPRIV_H_