projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Respun configure for richtext library
[wxWidgets.git]
/
src
/
mgl
/
font.cpp
diff --git
a/src/mgl/font.cpp
b/src/mgl/font.cpp
index 06d972feeeba94d652d1636b6f04712f97fb2176..1b9410516b98e21f9cc65a809478869ff7770f7f 100644
(file)
--- a/
src/mgl/font.cpp
+++ b/
src/mgl/font.cpp
@@
-1,5
+1,5
@@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: font.cpp
+// Name:
src/mgl/
font.cpp
// Author: Vaclav Slavik
// Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Author: Vaclav Slavik
// Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
@@
-14,10
+14,6
@@
// headers
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "font.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
@@
-26,13
+22,17
@@
#endif
#include "wx/font.h"
#endif
#include "wx/font.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+ #include "wx/utils.h"
+ #include "wx/settings.h"
+ #include "wx/cmndata.h"
+ #include "wx/gdicmn.h"
+#endif
+
#include "wx/fontutil.h"
#include "wx/fontutil.h"
-#include "wx/cmndata.h"
-#include "wx/utils.h"
-#include "wx/log.h"
-#include "wx/gdicmn.h"
#include "wx/tokenzr.h"
#include "wx/tokenzr.h"
-#include "wx/settings.h"
#include "wx/mgl/private.h"
// ----------------------------------------------------------------------------
#include "wx/mgl/private.h"
// ----------------------------------------------------------------------------
@@
-46,7
+46,7
@@
public:
int family = wxDEFAULT,
int style = wxDEFAULT,
int weight = wxDEFAULT,
int family = wxDEFAULT,
int style = wxDEFAULT,
int weight = wxDEFAULT,
- bool underlined =
FALSE
,
+ bool underlined =
false
,
const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
wxFontRefData(const wxFontRefData& data);
const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
wxFontRefData(const wxFontRefData& data);
@@
-121,7
+121,7
@@
void wxFontRefData::Init(int pointSize,
m_encoding = encoding;
m_library = NULL;
m_encoding = encoding;
m_library = NULL;
- m_valid =
FALSE
;
+ m_valid =
false
;
}
wxFontRefData::wxFontRefData(const wxFontRefData& data)
}
wxFontRefData::wxFontRefData(const wxFontRefData& data)
@@
-174,7
+174,7
@@
bool wxFont::Create(int pointSize,
{
m_refData = new wxFontRefData(pointSize, family, style, weight,
underlined, face, encoding);
{
m_refData = new wxFontRefData(pointSize, family, style, weight,
underlined, face, encoding);
- return
TRUE
;
+ return
true
;
}
struct font_t *wxFont::GetMGLfont_t(float scale, bool antialiased)
}
struct font_t *wxFont::GetMGLfont_t(float scale, bool antialiased)
@@
-188,7
+188,7
@@
struct font_t *wxFont::GetMGLfont_t(float scale, bool antialiased)
old->DecRef();
}
old->DecRef();
}
- wxMGLFontInstance *instance =
+ wxMGLFontInstance *instance =
M_FONTDATA->m_library->GetFontInstance(this, scale, antialiased);
return instance->GetMGLfont_t();
M_FONTDATA->m_library->GetFontInstance(this, scale, antialiased);
return instance->GetMGLfont_t();
@@
-218,7
+218,7
@@
int wxFont::GetPointSize() const
wxString wxFont::GetFaceName() const
{
wxString wxFont::GetFaceName() const
{
- wxCHECK_MSG( Ok(), wx
T("")
, wxT("invalid font") );
+ wxCHECK_MSG( Ok(), wx
EmptyString
, wxT("invalid font") );
return M_FONTDATA->m_faceName;
}
return M_FONTDATA->m_faceName;
}
@@
-246,7
+246,7
@@
int wxFont::GetWeight() const
bool wxFont::GetUnderlined() const
{
bool wxFont::GetUnderlined() const
{
- wxCHECK_MSG( Ok(),
FALSE
, wxT("invalid font") );
+ wxCHECK_MSG( Ok(),
false
, wxT("invalid font") );
return M_FONTDATA->m_underlined;
}
return M_FONTDATA->m_underlined;
}
@@
-261,7
+261,7
@@
wxFontEncoding wxFont::GetEncoding() const
bool wxFont::IsFixedWidth() const
{
bool wxFont::IsFixedWidth() const
{
- wxCHECK_MSG( Ok(),
FALSE
, wxT("invalid font") );
+ wxCHECK_MSG( Ok(),
false
, wxT("invalid font") );
return (bool)(M_FONTDATA->m_library->GetFamily()->GetInfo()->isFixed);
}
return (bool)(M_FONTDATA->m_library->GetFamily()->GetInfo()->isFixed);
}
@@
-284,7
+284,7
@@
void wxFont::SetPointSize(int pointSize)
AllocExclusive();
M_FONTDATA->m_pointSize = pointSize;
AllocExclusive();
M_FONTDATA->m_pointSize = pointSize;
- M_FONTDATA->m_valid =
FALSE
;
+ M_FONTDATA->m_valid =
false
;
}
void wxFont::SetFamily(int family)
}
void wxFont::SetFamily(int family)
@@
-292,7
+292,7
@@
void wxFont::SetFamily(int family)
AllocExclusive();
M_FONTDATA->m_family = family;
AllocExclusive();
M_FONTDATA->m_family = family;
- M_FONTDATA->m_valid =
FALSE
;
+ M_FONTDATA->m_valid =
false
;
}
void wxFont::SetStyle(int style)
}
void wxFont::SetStyle(int style)
@@
-300,7
+300,7
@@
void wxFont::SetStyle(int style)
AllocExclusive();
M_FONTDATA->m_style = style;
AllocExclusive();
M_FONTDATA->m_style = style;
- M_FONTDATA->m_valid =
FALSE
;
+ M_FONTDATA->m_valid =
false
;
}
void wxFont::SetWeight(int weight)
}
void wxFont::SetWeight(int weight)
@@
-308,15
+308,17
@@
void wxFont::SetWeight(int weight)
AllocExclusive();
M_FONTDATA->m_weight = weight;
AllocExclusive();
M_FONTDATA->m_weight = weight;
- M_FONTDATA->m_valid =
FALSE
;
+ M_FONTDATA->m_valid =
false
;
}
}
-
void
wxFont::SetFaceName(const wxString& faceName)
+
bool
wxFont::SetFaceName(const wxString& faceName)
{
AllocExclusive();
M_FONTDATA->m_faceName = faceName;
{
AllocExclusive();
M_FONTDATA->m_faceName = faceName;
- M_FONTDATA->m_valid = FALSE;
+ M_FONTDATA->m_valid = false;
+
+ return wxFontBase::SetFaceName(faceName);
}
void wxFont::SetUnderlined(bool underlined)
}
void wxFont::SetUnderlined(bool underlined)
@@
-331,5
+333,5
@@
void wxFont::SetEncoding(wxFontEncoding encoding)
AllocExclusive();
M_FONTDATA->m_encoding = encoding;
AllocExclusive();
M_FONTDATA->m_encoding = encoding;
- M_FONTDATA->m_valid =
FALSE
;
+ M_FONTDATA->m_valid =
false
;
}
}