added wxUSE_FONTENUM for wxFontEnumerator
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
58
configure
vendored
58
configure
vendored
@@ -1,5 +1,5 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.in Id: configure.in 47597 2007-07-20 18:27:35Z PC .
|
# From configure.in Id: configure.in 47607 2007-07-21 01:42:58Z VZ .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0.
|
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0.
|
||||||
#
|
#
|
||||||
@@ -1700,6 +1700,7 @@ Optional Features:
|
|||||||
--enable-ffile use wxFFile class
|
--enable-ffile use wxFFile class
|
||||||
--enable-file use wxFile class
|
--enable-file use wxFile class
|
||||||
--enable-filesystem use virtual file systems classes
|
--enable-filesystem use virtual file systems classes
|
||||||
|
--enable-fontenum use wxFontEnumerator class
|
||||||
--enable-fontmap use font encodings conversion classes
|
--enable-fontmap use font encodings conversion classes
|
||||||
--enable-fs_archive use virtual archive filesystems
|
--enable-fs_archive use virtual archive filesystems
|
||||||
--enable-fs_inet use virtual HTTP/FTP filesystems
|
--enable-fs_inet use virtual HTTP/FTP filesystems
|
||||||
@@ -7534,6 +7535,61 @@ fi
|
|||||||
echo "${ECHO_T}$result" >&6; }
|
echo "${ECHO_T}$result" >&6; }
|
||||||
|
|
||||||
|
|
||||||
|
enablestring=
|
||||||
|
defaultval=$wxUSE_ALL_FEATURES
|
||||||
|
if test -z "$defaultval"; then
|
||||||
|
if test x"$enablestring" = xdisable; then
|
||||||
|
defaultval=yes
|
||||||
|
else
|
||||||
|
defaultval=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
{ echo "$as_me:$LINENO: checking for --${enablestring:-enable}-fontenum" >&5
|
||||||
|
echo $ECHO_N "checking for --${enablestring:-enable}-fontenum... $ECHO_C" >&6; }
|
||||||
|
no_cache=0
|
||||||
|
# Check whether --enable-fontenum was given.
|
||||||
|
if test "${enable_fontenum+set}" = set; then
|
||||||
|
enableval=$enable_fontenum;
|
||||||
|
if test "$enableval" = yes; then
|
||||||
|
wx_cv_use_fontenum='wxUSE_FONTENUM=yes'
|
||||||
|
else
|
||||||
|
wx_cv_use_fontenum='wxUSE_FONTENUM=no'
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
LINE=`grep "^wxUSE_FONTENUM=" ${wx_arg_cache_file}`
|
||||||
|
if test "x$LINE" != x ; then
|
||||||
|
eval "DEFAULT_$LINE"
|
||||||
|
else
|
||||||
|
no_cache=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
wx_cv_use_fontenum='wxUSE_FONTENUM=${'DEFAULT_wxUSE_FONTENUM":-$defaultval}"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
eval "$wx_cv_use_fontenum"
|
||||||
|
if test "$no_cache" != 1; then
|
||||||
|
echo $wx_cv_use_fontenum >> ${wx_arg_cache_file}.tmp
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x"$enablestring" = xdisable; then
|
||||||
|
if test $wxUSE_FONTENUM = yes; then
|
||||||
|
result=no
|
||||||
|
else
|
||||||
|
result=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
result=$wxUSE_FONTENUM
|
||||||
|
fi
|
||||||
|
|
||||||
|
{ echo "$as_me:$LINENO: result: $result" >&5
|
||||||
|
echo "${ECHO_T}$result" >&6; }
|
||||||
|
|
||||||
|
|
||||||
enablestring=
|
enablestring=
|
||||||
defaultval=$wxUSE_ALL_FEATURES
|
defaultval=$wxUSE_ALL_FEATURES
|
||||||
if test -z "$defaultval"; then
|
if test -z "$defaultval"; then
|
||||||
|
@@ -596,6 +596,7 @@ WX_ARG_FEATURE(exceptions, [ --enable-exceptions build exception-safe li
|
|||||||
WX_ARG_FEATURE(ffile, [ --enable-ffile use wxFFile class], wxUSE_FFILE)
|
WX_ARG_FEATURE(ffile, [ --enable-ffile use wxFFile class], wxUSE_FFILE)
|
||||||
WX_ARG_FEATURE(file, [ --enable-file use wxFile class], wxUSE_FILE)
|
WX_ARG_FEATURE(file, [ --enable-file use wxFile class], wxUSE_FILE)
|
||||||
WX_ARG_FEATURE(filesystem, [ --enable-filesystem use virtual file systems classes], wxUSE_FILESYSTEM)
|
WX_ARG_FEATURE(filesystem, [ --enable-filesystem use virtual file systems classes], wxUSE_FILESYSTEM)
|
||||||
|
WX_ARG_FEATURE(fontenum, [ --enable-fontenum use wxFontEnumerator class], wxUSE_FONTENUM)
|
||||||
WX_ARG_FEATURE(fontmap, [ --enable-fontmap use font encodings conversion classes], wxUSE_FONTMAP)
|
WX_ARG_FEATURE(fontmap, [ --enable-fontmap use font encodings conversion classes], wxUSE_FONTMAP)
|
||||||
WX_ARG_FEATURE(fs_archive, [ --enable-fs_archive use virtual archive filesystems], wxUSE_FS_ARCHIVE)
|
WX_ARG_FEATURE(fs_archive, [ --enable-fs_archive use virtual archive filesystems], wxUSE_FS_ARCHIVE)
|
||||||
WX_ARG_FEATURE(fs_inet, [ --enable-fs_inet use virtual HTTP/FTP filesystems], wxUSE_FS_INET)
|
WX_ARG_FEATURE(fs_inet, [ --enable-fs_inet use virtual HTTP/FTP filesystems], wxUSE_FS_INET)
|
||||||
|
@@ -13,6 +13,10 @@
|
|||||||
#ifndef _WX_FONTENUM_H_
|
#ifndef _WX_FONTENUM_H_
|
||||||
#define _WX_FONTENUM_H_
|
#define _WX_FONTENUM_H_
|
||||||
|
|
||||||
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
#if wxUSE_FONTENUM
|
||||||
|
|
||||||
#include "wx/fontenc.h"
|
#include "wx/fontenc.h"
|
||||||
#include "wx/arrstr.h"
|
#include "wx/arrstr.h"
|
||||||
|
|
||||||
@@ -80,4 +84,6 @@ private:
|
|||||||
DECLARE_NO_COPY_CLASS(wxFontEnumerator)
|
DECLARE_NO_COPY_CLASS(wxFontEnumerator)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // wxUSE_FONTENUM
|
||||||
|
|
||||||
#endif // _WX_FONTENUM_H_
|
#endif // _WX_FONTENUM_H_
|
||||||
|
@@ -492,6 +492,9 @@
|
|||||||
// Joystick support class
|
// Joystick support class
|
||||||
#define wxUSE_JOYSTICK 1
|
#define wxUSE_JOYSTICK 1
|
||||||
|
|
||||||
|
// wxFontEnumerator class
|
||||||
|
#define wxUSE_FONTENUM 1
|
||||||
|
|
||||||
// wxFontMapper class
|
// wxFontMapper class
|
||||||
#define wxUSE_FONTMAP 1
|
#define wxUSE_FONTMAP 1
|
||||||
|
|
||||||
|
@@ -491,6 +491,9 @@
|
|||||||
// Joystick support class
|
// Joystick support class
|
||||||
#define wxUSE_JOYSTICK 1
|
#define wxUSE_JOYSTICK 1
|
||||||
|
|
||||||
|
// wxFontEnumerator class
|
||||||
|
#define wxUSE_FONTENUM 1
|
||||||
|
|
||||||
// wxFontMapper class
|
// wxFontMapper class
|
||||||
#define wxUSE_FONTMAP 1
|
#define wxUSE_FONTMAP 1
|
||||||
|
|
||||||
|
@@ -491,6 +491,9 @@
|
|||||||
// Joystick support class
|
// Joystick support class
|
||||||
#define wxUSE_JOYSTICK 1
|
#define wxUSE_JOYSTICK 1
|
||||||
|
|
||||||
|
// wxFontEnumerator class
|
||||||
|
#define wxUSE_FONTENUM 1
|
||||||
|
|
||||||
// wxFontMapper class
|
// wxFontMapper class
|
||||||
#define wxUSE_FONTMAP 1
|
#define wxUSE_FONTMAP 1
|
||||||
|
|
||||||
|
@@ -491,6 +491,9 @@
|
|||||||
// Joystick support class
|
// Joystick support class
|
||||||
#define wxUSE_JOYSTICK 1
|
#define wxUSE_JOYSTICK 1
|
||||||
|
|
||||||
|
// wxFontEnumerator class
|
||||||
|
#define wxUSE_FONTENUM 1
|
||||||
|
|
||||||
// wxFontMapper class
|
// wxFontMapper class
|
||||||
#define wxUSE_FONTMAP 1
|
#define wxUSE_FONTMAP 1
|
||||||
|
|
||||||
|
@@ -491,6 +491,9 @@
|
|||||||
// Joystick support class
|
// Joystick support class
|
||||||
#define wxUSE_JOYSTICK 1
|
#define wxUSE_JOYSTICK 1
|
||||||
|
|
||||||
|
// wxFontEnumerator class
|
||||||
|
#define wxUSE_FONTENUM 1
|
||||||
|
|
||||||
// wxFontMapper class
|
// wxFontMapper class
|
||||||
#define wxUSE_FONTMAP 1
|
#define wxUSE_FONTMAP 1
|
||||||
|
|
||||||
|
@@ -491,6 +491,9 @@
|
|||||||
// Joystick support class
|
// Joystick support class
|
||||||
#define wxUSE_JOYSTICK 1
|
#define wxUSE_JOYSTICK 1
|
||||||
|
|
||||||
|
// wxFontEnumerator class
|
||||||
|
#define wxUSE_FONTENUM 1
|
||||||
|
|
||||||
// wxFontMapper class
|
// wxFontMapper class
|
||||||
#define wxUSE_FONTMAP 1
|
#define wxUSE_FONTMAP 1
|
||||||
|
|
||||||
|
@@ -487,6 +487,9 @@
|
|||||||
// Joystick support class
|
// Joystick support class
|
||||||
#define wxUSE_JOYSTICK 1
|
#define wxUSE_JOYSTICK 1
|
||||||
|
|
||||||
|
// wxFontEnumerator class
|
||||||
|
#define wxUSE_FONTENUM 1
|
||||||
|
|
||||||
// wxFontMapper class
|
// wxFontMapper class
|
||||||
#define wxUSE_FONTMAP 1
|
#define wxUSE_FONTMAP 1
|
||||||
|
|
||||||
|
@@ -270,6 +270,8 @@
|
|||||||
|
|
||||||
#define wxUSE_JOYSTICK 0
|
#define wxUSE_JOYSTICK 0
|
||||||
|
|
||||||
|
#define wxUSE_FONTENUM 0
|
||||||
|
|
||||||
#define wxUSE_FONTMAP 0
|
#define wxUSE_FONTMAP 0
|
||||||
|
|
||||||
#define wxUSE_MIMETYPE 0
|
#define wxUSE_MIMETYPE 0
|
||||||
|
@@ -390,11 +390,15 @@ wxString wxFontBase::GetWeightString() const
|
|||||||
|
|
||||||
bool wxFontBase::SetFaceName(const wxString& facename)
|
bool wxFontBase::SetFaceName(const wxString& facename)
|
||||||
{
|
{
|
||||||
|
#if wxUSE_FONTENUM
|
||||||
if (!wxFontEnumerator::IsValidFacename(facename))
|
if (!wxFontEnumerator::IsValidFacename(facename))
|
||||||
{
|
{
|
||||||
UnRef(); // make Ok() return false
|
UnRef(); // make Ok() return false
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#else // !wxUSE_FONTENUM
|
||||||
|
wxUnusedVar(facename);
|
||||||
|
#endif // wxUSE_FONTENUM/!wxUSE_FONTENUM
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -407,6 +411,7 @@ bool wxFontBase::SetFaceName(const wxString &facename)
|
|||||||
// Up to now, there are no native implementations of this function:
|
// Up to now, there are no native implementations of this function:
|
||||||
void wxNativeFontInfo::SetFaceName(const wxArrayString& facenames)
|
void wxNativeFontInfo::SetFaceName(const wxArrayString& facenames)
|
||||||
{
|
{
|
||||||
|
#if wxUSE_FONTENUM
|
||||||
for (size_t i=0; i < facenames.GetCount(); i++)
|
for (size_t i=0; i < facenames.GetCount(); i++)
|
||||||
{
|
{
|
||||||
if (wxFontEnumerator::IsValidFacename(facenames[i]))
|
if (wxFontEnumerator::IsValidFacename(facenames[i]))
|
||||||
@@ -420,6 +425,9 @@ void wxNativeFontInfo::SetFaceName(const wxArrayString &facenames)
|
|||||||
wxString validfacename = wxFontEnumerator::GetFacenames().Item(0);
|
wxString validfacename = wxFontEnumerator::GetFacenames().Item(0);
|
||||||
wxLogTrace(wxT("font"), wxT("Falling back to '%s'"), validfacename.c_str());
|
wxLogTrace(wxT("font"), wxT("Falling back to '%s'"), validfacename.c_str());
|
||||||
SetFaceName(validfacename);
|
SetFaceName(validfacename);
|
||||||
|
#else // !wxUSE_FONTENUM
|
||||||
|
SetFaceName(facenames[0]);
|
||||||
|
#endif // wxUSE_FONTENUM/!wxUSE_FONTENUM
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -744,9 +752,15 @@ bool wxNativeFontInfo::FromUserString(const wxString& s)
|
|||||||
// NB: the check on the facename is implemented in wxFontBase::SetFaceName
|
// NB: the check on the facename is implemented in wxFontBase::SetFaceName
|
||||||
// and not in wxNativeFontInfo::SetFaceName thus we need to explicitely
|
// and not in wxNativeFontInfo::SetFaceName thus we need to explicitely
|
||||||
// call here wxFontEnumerator::IsValidFacename
|
// call here wxFontEnumerator::IsValidFacename
|
||||||
if (!wxFontEnumerator::IsValidFacename(face) ||
|
if (
|
||||||
|
#if wxUSE_FONTENUM
|
||||||
|
!wxFontEnumerator::IsValidFacename(face) ||
|
||||||
|
#endif // wxUSE_FONTENUM
|
||||||
!SetFaceName(face) )
|
!SetFaceName(face) )
|
||||||
|
{
|
||||||
SetFaceName(wxNORMAL_FONT->GetFaceName());
|
SetFaceName(wxNORMAL_FONT->GetFaceName());
|
||||||
|
}
|
||||||
|
|
||||||
face.clear();
|
face.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -757,10 +771,15 @@ bool wxNativeFontInfo::FromUserString(const wxString& s)
|
|||||||
// NB: the check on the facename is implemented in wxFontBase::SetFaceName
|
// NB: the check on the facename is implemented in wxFontBase::SetFaceName
|
||||||
// and not in wxNativeFontInfo::SetFaceName thus we need to explicitely
|
// and not in wxNativeFontInfo::SetFaceName thus we need to explicitely
|
||||||
// call here wxFontEnumerator::IsValidFacename
|
// call here wxFontEnumerator::IsValidFacename
|
||||||
if (!wxFontEnumerator::IsValidFacename(face) ||
|
if (
|
||||||
|
#if wxUSE_FONTENUM
|
||||||
|
!wxFontEnumerator::IsValidFacename(face) ||
|
||||||
|
#endif // wxUSE_FONTENUM
|
||||||
!SetFaceName(face) )
|
!SetFaceName(face) )
|
||||||
|
{
|
||||||
SetFaceName(wxNORMAL_FONT->GetFaceName());
|
SetFaceName(wxNORMAL_FONT->GetFaceName());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// set point size to default value if size was not given
|
// set point size to default value if size was not given
|
||||||
if ( !pointsizefound )
|
if ( !pointsizefound )
|
||||||
|
@@ -24,6 +24,8 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_FONTENUM
|
||||||
|
|
||||||
#include "wx/fontenum.h"
|
#include "wx/fontenum.h"
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -129,3 +131,5 @@ bool wxFontEnumerator::EnumerateEncodingsUTF8(const wxString& facename)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif // wxHAS_UTF8_FONTS
|
#endif // wxHAS_UTF8_FONTS
|
||||||
|
|
||||||
|
#endif // wxUSE_FONTENUM
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#if wxUSE_FONTMAP
|
#if wxUSE_FONTENUM
|
||||||
|
|
||||||
#include "wx/fontenum.h"
|
#include "wx/fontenum.h"
|
||||||
|
|
||||||
@@ -111,4 +111,4 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_FONTMAP
|
#endif // wxUSE_FONTENUM
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_FONTMAP
|
#if wxUSE_FONTENUM
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/gdicmn.h"
|
#include "wx/gdicmn.h"
|
||||||
@@ -289,4 +289,4 @@ int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // wxUSE_FONTMAP
|
#endif // wxUSE_FONTENUM
|
||||||
|
@@ -20,6 +20,8 @@
|
|||||||
// for compilers that support precompilation, includes "wx.h".
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#if wxUSE_FONTENUM
|
||||||
|
|
||||||
#include "wx/fontenum.h"
|
#include "wx/fontenum.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
@@ -360,3 +362,5 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // !wxUSE_PANGO
|
#endif // !wxUSE_PANGO
|
||||||
|
|
||||||
|
#endif // wxUSE_FONTENUM
|
||||||
|
Reference in New Issue
Block a user