projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ensure that dialog gripper is always positioned below the other children, even if...
[wxWidgets.git]
/
src
/
mgl
/
fontenum.cpp
diff --git
a/src/mgl/fontenum.cpp
b/src/mgl/fontenum.cpp
index e7130181d508dc66734032dcc68f09d0e069afc7..5659d4b64332401378fe574d08a4217f1d5cf70e 100644
(file)
--- a/
src/mgl/fontenum.cpp
+++ b/
src/mgl/fontenum.cpp
@@
-1,12
+1,19
@@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: src/
unix
/fontenum.cpp
+// Name: src/
mgl
/fontenum.cpp
// Purpose: wxFontEnumerator class for MGL
// Author: Vaclav Slavik
// RCS-ID: $Id$
// Purpose: wxFontEnumerator class for MGL
// Author: Vaclav Slavik
// RCS-ID: $Id$
-// Copyright: (c) 2001
Vaclav Slavik
+// Copyright: (c) 2001
-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
// ============================================================================
// declarations
// ============================================================================
// ============================================================================
// declarations
// ============================================================================
@@
-15,17
+22,17
@@
// headers
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
- #pragma implementation "fontenum.h"
-#endif
+#include "wx/fontenum.h"
-#include "wx/defs.h"
-#include "wx/dynarray.h"
-#include "wx/string.h"
-#include "wx/utils.h"
+#ifndef WX_PRECOMP
+ #include "wx/dynarray.h"
+ #include "wx/string.h"
+ #include "wx/utils.h"
+#endif
-#include "wx/
fontenum
.h"
+#include "wx/
encinfo
.h"
#include "wx/fontutil.h"
#include "wx/fontutil.h"
+#include "wx/private/fontmgr.h"
#include <mgraph.h>
#include <mgraph.h>
@@
-41,25
+48,25
@@
bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
bool fixedWidthOnly)
{
bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
bool fixedWidthOnly)
{
- bool found =
FALSE
;
-
wxMGLFontFamilyList *list = wxTheFontsManager->GetFamilyList
();
- wx
MGLFontFamily
List::Node *node;
- wx
MGLFontFamily
*f = NULL;
+ bool found =
false
;
+
const wxFontBundleList& list = wxFontsManager::Get()->GetBundles
();
+ wx
FontBundle
List::Node *node;
+ wx
FontBundle
*f = NULL;
wxNativeEncodingInfo info;
if ( encoding != wxFONTENCODING_SYSTEM )
wxGetNativeFontEncoding(encoding, &info);
wxNativeEncodingInfo info;
if ( encoding != wxFONTENCODING_SYSTEM )
wxGetNativeFontEncoding(encoding, &info);
-
- for (node = list
->
GetFirst(); node; node = node->GetNext())
+
+ for (node = list
.
GetFirst(); node; node = node->GetNext())
{
f = node->GetData();
info.facename = f->GetName();
{
f = node->GetData();
info.facename = f->GetName();
- if ( (!fixedWidthOnly || f->
GetInfo()->isFixed
) &&
+ if ( (!fixedWidthOnly || f->
IsFixed()
) &&
(encoding == wxFONTENCODING_SYSTEM || wxTestFontEncoding(info)) )
{
(encoding == wxFONTENCODING_SYSTEM || wxTestFontEncoding(info)) )
{
- found =
TRUE
;
+ found =
true
;
if ( !OnFacename(f->GetName()) )
if ( !OnFacename(f->GetName()) )
- return
TRUE
;
+ return
true
;
}
}
}
}
@@
-68,7
+75,7
@@
bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
{
bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
{
- static wxFontEncoding encodings[] =
+ static wxFontEncoding encodings[] =
{
wxFONTENCODING_ISO8859_1,
wxFONTENCODING_ISO8859_2,
{
wxFONTENCODING_ISO8859_1,
wxFONTENCODING_ISO8859_2,
@@
-94,11
+101,11
@@
bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
wxFONTENCODING_CP1256,
wxFONTENCODING_CP1257,
wxFONTENCODING_KOI8,
wxFONTENCODING_CP1256,
wxFONTENCODING_CP1257,
wxFONTENCODING_KOI8,
-
+
wxFONTENCODING_SYSTEM
};
wxFONTENCODING_SYSTEM
};
-
- static const char *encodingNames[] =
+
+ static const char *encodingNames[] =
{
"iso88590-1",
"iso88590-2",
{
"iso88590-1",
"iso88590-2",
@@
-124,18
+131,18
@@
bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
"koi-8",
NULL
};
"koi-8",
NULL
};
-
+
wxNativeEncodingInfo info;
info.facename = family;
wxNativeEncodingInfo info;
info.facename = family;
-
+
for (size_t i = 0; encodings[i] != wxFONTENCODING_SYSTEM; i++)
{
if ( !wxGetNativeFontEncoding(encodings[i], &info) ||
for (size_t i = 0; encodings[i] != wxFONTENCODING_SYSTEM; i++)
{
if ( !wxGetNativeFontEncoding(encodings[i], &info) ||
- !wxTestFontEncoding(info) )
+ !wxTestFontEncoding(info) )
continue;
if ( !OnFontEncoding(family, encodingNames[i]) )
break;
}
continue;
if ( !OnFontEncoding(family, encodingNames[i]) )
break;
}
- return
TRUE
;
+ return
true
;
}
}