projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rework the GTK WebKit backend history to remove the need for the map between wxWebHis...
[wxWidgets.git]
/
src
/
os2
/
fontenum.cpp
diff --git
a/src/os2/fontenum.cpp
b/src/os2/fontenum.cpp
index b74beb093930ada3a1e5316b52f3fda0183c62c5..fdb1f4af112f65411f7841fa77224c222d66913a 100644
(file)
--- a/
src/os2/fontenum.cpp
+++ b/
src/os2/fontenum.cpp
@@
-1,5
+1,5
@@
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
-// Name:
msw
/fontenum.cpp
+// Name:
src/os2
/fontenum.cpp
// Purpose: wxFontEnumerator class for Windows
// Author: Julian Smart
// Modified by: David Webster to add support for font encodings
// Purpose: wxFontEnumerator class for Windows
// Author: Julian Smart
// Modified by: David Webster to add support for font encodings
@@
-20,12
+20,16
@@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_FONTMAP
+
+#include "wx/fontenum.h"
+
#ifndef WX_PRECOMP
#ifndef WX_PRECOMP
- #include "wx/font.h"
+
#include "wx/font.h"
#endif
#endif
-#include "wx/fontenum.h"
#include "wx/fontmap.h"
#include "wx/fontmap.h"
+#include "wx/encinfo.h"
#include "wx/os2/private.h"
#include "wx/os2/private.h"
@@
-59,7
+63,7
@@
private:
// if not empty, enum only the fonts with this facename
wxString m_facename;
// if not empty, enum only the fonts with this facename
wxString m_facename;
- // if
TRUE
, enum only fixed fonts
+ // if
true
, enum only fixed fonts
bool m_fixedOnly;
};
bool m_fixedOnly;
};
@@
-93,7
+97,7
@@
bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding)
wxNativeEncodingInfo info;
if ( !wxGetNativeFontEncoding(encoding, &info) )
{
wxNativeEncodingInfo info;
if ( !wxGetNativeFontEncoding(encoding, &info) )
{
- if ( !wx
TheFontMapper
->GetAltForEncoding(encoding, &info) )
+ if ( !wx
FontMapper::Get()
->GetAltForEncoding(encoding, &info) )
{
// no such encodings at all
return FALSE;
{
// no such encodings at all
return FALSE;
@@
-102,7
+106,7
@@
bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding)
m_charset = info.charset;
m_facename = info.facename;
m_charset = info.charset;
m_facename = info.facename;
- return
TRUE
;
+ return
true
;
}
#define wxFONTENUMPROC FONTENUMPROC
}
#define wxFONTENUMPROC FONTENUMPROC
@@
-116,7
+120,7
@@
void wxFontEnumeratorHelper::DoEnumerate()
#ifdef __WIN32__
LOGFONT lf;
lf.lfCharSet = m_charset;
#ifdef __WIN32__
LOGFONT lf;
lf.lfCharSet = m_charset;
- wxStr
n
cpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName));
+ wxStr
l
cpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName));
lf.lfPitchAndFamily = 0;
::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc,
(LPARAM)this, 0) ;
lf.lfPitchAndFamily = 0;
::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc,
(LPARAM)this, 0) ;
@@
-146,7
+150,7
@@
bool wxFontEnumeratorHelper::OnFont(/*const LPLOGFONT lf,
if ( tm->tmPitchAndFamily & TMPF_FIXED_PITCH )
{
// not a fixed pitch font
if ( tm->tmPitchAndFamily & TMPF_FIXED_PITCH )
{
// not a fixed pitch font
- return
TRUE
;
+ return
true
;
}
}
}
}
@@
-155,13
+159,13
@@
bool wxFontEnumeratorHelper::OnFont(/*const LPLOGFONT lf,
// check that we have the right encoding
if ( lf->lfCharSet != m_charset )
{
// check that we have the right encoding
if ( lf->lfCharSet != m_charset )
{
- return
TRUE
;
+ return
true
;
}
}
return m_fontEnum->OnFacename(lf->lfFaceName);
*/
}
}
return m_fontEnum->OnFacename(lf->lfFaceName);
*/
- return
TRUE
;
+ return
true
;
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
@@
-180,14
+184,14
@@
bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
}
// else: no such fonts, unknown encoding
}
// else: no such fonts, unknown encoding
- return
TRUE
;
+ return
true
;
}
}
-bool wxFontEnumerator::EnumerateEncodings(const wxString&
family
)
+bool wxFontEnumerator::EnumerateEncodings(const wxString&
WXUNUSED(family)
)
{
wxFAIL_MSG(wxT("TODO"));
{
wxFAIL_MSG(wxT("TODO"));
- return
TRUE
;
+ return
true
;
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
@@
-212,3
+216,4
@@
int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm,
}
*/
}
*/
+#endif // wxUSE_FONTMAP