the static box itself.
- wxMouseState::{Left,Middle,Right}Down() were renamed to XXXIsDown() for
consistency with wxMouseEvent and the old names were deprecated.
+- wxFont::SetNoAntiAliasing() was deprecated, it never really worked in most
+ ports and was always marked as "experimental" API. It will be replaced with
+ wxDC-level anti-aliasing control in the future.
Major new features in this release
wxDECLARE_COMMON_FONT_METHODS();
- // Unofficial API, don't use
- virtual void SetNoAntiAliasing(bool no = true);
- virtual bool GetNoAntiAliasing() const;
-
// implementation from now on:
wxIDirectFBFontPtr GetDirectFBFont(bool antialiased) const;
wxString GetStyleString() const;
wxString GetWeightString() const;
- // Unofficial API, don't use
- virtual void SetNoAntiAliasing( bool WXUNUSED(no) = true ) { }
- virtual bool GetNoAntiAliasing() const { return false; }
-
// the default encoding is used for creating all fonts with default
// encoding parameter
static wxFontEncoding GetDefaultEncoding() { return ms_encodingDefault; }
static void SetDefaultEncoding(wxFontEncoding encoding);
+ // this doesn't do anything and is kept for compatibility only
+#ifdef WXWIN_COMPATIBILITY_2_8
+ wxDEPRECATED_INLINE(void SetNoAntiAliasing(bool no = true), wxUnusedVar(no););
+ wxDEPRECATED_INLINE(bool GetNoAntiAliasing() const, return false;)
+#endif // WXWIN_COMPATIBILITY_2_8
+
protected:
// the function called by both overloads of SetNativeFontInfo()
virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info);
wxDECLARE_COMMON_FONT_METHODS();
- virtual void SetNoAntiAliasing( bool no = true );
- virtual bool GetNoAntiAliasing() const ;
-
// implementation from now on
void Unshare();
wxDECLARE_COMMON_FONT_METHODS();
- virtual void SetNoAntiAliasing( bool no = true );
- virtual bool GetNoAntiAliasing() const ;
-
// implementation from now on
void Unshare();
wxDECLARE_COMMON_FONT_METHODS();
- // Unofficial API, don't use
- virtual void SetNoAntiAliasing(bool no = true);
- virtual bool GetNoAntiAliasing() const;
-
struct font_t *GetMGLfont_t(float scale, bool antialiased);
protected:
virtual bool RealizeResource();
- // Unofficial API, don't use
- virtual void SetNoAntiAliasing( bool noAA = TRUE ) ;
- virtual bool GetNoAntiAliasing() const ;
-
// Mac-specific, risks to change, don't use in portable code
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
void SetUnderlined(bool underlined);
void SetEncoding(wxFontEncoding encoding);
- // Unofficial API, don't use
- void SetNoAntiAliasing(bool no);
- bool GetNoAntiAliasing() const { return m_noAA; }
-
private:
void EnsureValidFont();
wxNativeFontInfo m_info;
- bool m_noAA;
wxFontFace *m_fontFace;
wxFontBundle *m_fontBundle;
wxDECLARE_COMMON_FONT_METHODS();
- virtual void SetNoAntiAliasing( bool no = TRUE );
- virtual bool GetNoAntiAliasing() const ;
-
// Implementation
#if wxUSE_PANGO
if ( f.IsOk() )
f.SetPointSize( /*LogicalToDeviceYRel*/(font.GetPointSize()));
m_graphicContext->SetFont( f, m_textForegroundColour );
-#if defined(__WXGTK__) || defined(__WXOSX__)
- if ( m_font.IsOk() && m_font.GetNoAntiAliasing() )
- {
- m_graphicContext->SetAntialiasMode(wxANTIALIAS_NONE);
- }
-#endif
}
}
m_info.underlined = underlined;
m_info.encoding = encoding;
- m_noAA = false;
-
m_fontFace = NULL;
m_fontBundle = NULL;
m_fontValid = false;
wxFontMgrFontRefData::wxFontMgrFontRefData(const wxFontMgrFontRefData& data)
{
m_info = data.m_info;
- m_noAA = data.m_noAA;
m_fontFace = data.m_fontFace;
m_fontBundle = data.m_fontBundle;
{
wxConstCast(this, wxFontMgrFontRefData)->EnsureValidFont();
return m_fontFace->GetFontInstance(m_info.pointSize * scale,
- antialiased && !m_noAA);
+ antialiased);
}
void wxFontMgrFontRefData::SetPointSize(int pointSize)
m_fontValid = false;
}
-void wxFontMgrFontRefData::SetNoAntiAliasing(bool no)
-{
- m_noAA = no;
-}
-
-
void wxFontMgrFontRefData::EnsureValidFont()
{
if ( !m_fontValid )
return M_FONTDATA->GetNativeFontInfo();
}
-bool wxFont::GetNoAntiAliasing() const
-{
- wxCHECK_MSG( Ok(), false, wxT("invalid font") );
-
- return M_FONTDATA->GetNoAntiAliasing();
-}
-
// ----------------------------------------------------------------------------
// change font attributes
// ----------------------------------------------------------------------------
M_FONTDATA->SetEncoding(encoding);
}
-void wxFont::SetNoAntiAliasing(bool no)
-{
- AllocExclusive();
- M_FONTDATA->SetNoAntiAliasing(no);
-}
bool SetFaceName(const wxString& facename);
void SetEncoding(wxFontEncoding encoding);
- void SetNoAntiAliasing( bool no = true ) { m_noAA = no; }
- bool GetNoAntiAliasing() const { return m_noAA; }
-
// and this one also modifies all the other font data fields
void SetNativeFontInfo(const wxNativeFontInfo& info);
private:
bool m_underlined;
- bool m_noAA; // No anti-aliasing
// The native font info: basically a PangoFontDescription
wxNativeFontInfo m_nativeFontInfo;
family = wxFONTFAMILY_SWISS;
m_underlined = underlined;
- m_noAA = false;
// Create native font info
m_nativeFontInfo.description = pango_font_description_new();
void wxFontRefData::InitFromNative()
{
- m_noAA = false;
-
// Get native info
PangoFontDescription *desc = m_nativeFontInfo.description;
: wxGDIRefData()
{
m_underlined = data.m_underlined;
- m_noAA = data.m_noAA;
// Forces a copy of the internal data. wxNativeFontInfo should probably
// have a copy ctor and assignment operator to fix this properly but that
// Pango always uses UTF8... see also SetEncoding()
}
-bool wxFont::GetNoAntiAliasing() const
-{
- wxCHECK_MSG( IsOk(), false, wxT("invalid font") );
-
- return M_FONTDATA->m_noAA;
-}
-
const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
{
wxCHECK_MSG( IsOk(), NULL, wxT("invalid font") );
M_FONTDATA->SetNativeFontInfo( info );
}
-void wxFont::SetNoAntiAliasing( bool no )
-{
- AllocExclusive();
-
- M_FONTDATA->SetNoAntiAliasing( no );
-}
-
wxGDIRefData* wxFont::CreateGDIRefData() const
{
return new wxFontRefData;
bool SetFaceName(const wxString& facename);
void SetEncoding(wxFontEncoding encoding);
- void SetNoAntiAliasing( bool no = true ) { m_noAA = no; }
- bool GetNoAntiAliasing() const { return m_noAA; }
-
// and this one also modifies all the other font data fields
void SetNativeFontInfo(const wxNativeFontInfo& info);
bool m_underlined;
wxString m_faceName;
wxFontEncoding m_encoding; // Unused under GTK 2.0
- bool m_noAA; // No anti-aliasing
// The native font info, basicly an XFLD under GTK 1.2 and
// the pango font description under GTK 2.0.
m_underlined = underlined;
m_encoding = encoding;
-
- m_noAA = false;
}
void wxFontRefData::InitFromNative()
{
- m_noAA = false;
-
// get the font parameters from the XLFD
// -------------------------------------
m_faceName = data.m_faceName;
m_encoding = data.m_encoding;
- m_noAA = data.m_noAA;
-
// Forces a copy of the internal data. wxNativeFontInfo should probably
// have a copy ctor and assignment operator to fix this properly but that
// would break binary compatibility...
return M_FONTDATA->m_encoding;
}
-bool wxFont::GetNoAntiAliasing() const
-{
- wxCHECK_MSG( Ok(), wxFONTENCODING_DEFAULT, wxT("invalid font") );
-
- return M_FONTDATA->m_noAA;
-}
-
const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
{
wxCHECK_MSG( Ok(), NULL, wxT("invalid font") );
M_FONTDATA->SetNativeFontInfo( info );
}
-void wxFont::SetNoAntiAliasing( bool no )
-{
- Unshare();
-
- M_FONTDATA->SetNoAntiAliasing( no );
-}
-
// ----------------------------------------------------------------------------
// get internal representation of font
// ----------------------------------------------------------------------------
return M_FONTDATA->GetNativeFontInfo();
}
-bool wxFont::GetNoAntiAliasing() const
-{
- wxCHECK_MSG( Ok(), false, wxT("invalid font") );
-
- return M_FONTDATA->GetNoAntiAliasing();
-}
-
// ----------------------------------------------------------------------------
// change font attributes
// ----------------------------------------------------------------------------
M_FONTDATA->SetEncoding(encoding);
}
-void wxFont::SetNoAntiAliasing(bool no)
-{
- AllocExclusive();
- M_FONTDATA->SetNoAntiAliasing(no);
-}
virtual ~wxFontRefData();
- void SetNoAntiAliasing( bool no = true ) { m_noAA = no; }
-
- bool GetNoAntiAliasing() const { return m_noAA; }
-
void SetPointSize( int size )
{
if( GetPointSize() != size )
#if wxOSX_USE_CORE_TEXT
// void Init( CTFontRef font );
#endif
- bool m_noAA; // No anti-aliasing
public:
bool m_fontValid;
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
{
Init();
m_info = data.m_info;
- m_noAA = data.m_noAA;
m_fontValid = data.m_fontValid;
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
m_macThemeFontID = data.m_macThemeFontID;
void wxFontRefData::Init()
{
- m_noAA = false;
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
m_macThemeFontID = kThemeCurrentPortFont ;
#endif
M_FONTDATA->SetUnderlined( underlined );
}
-void wxFont::SetNoAntiAliasing( bool no )
-{
- AllocExclusive();
-
- M_FONTDATA->SetNoAntiAliasing( no );
-}
-
// ----------------------------------------------------------------------------
// accessors
// ----------------------------------------------------------------------------
return M_FONTDATA->GetEncoding() ;
}
-bool wxFont::GetNoAntiAliasing() const
-{
- wxCHECK_MSG( M_FONTDATA != NULL , false, wxT("invalid font") );
-
- return M_FONTDATA->GetNoAntiAliasing();
-}
-
#if wxOSX_USE_ATSU_TEXT && wxOSX_USE_CARBON
short wxFont::MacGetFontNum() const
void Font::Create(const char *faceName, int characterSet,
int size, bool bold, bool italic,
- bool extraFontFlag) {
+ bool WXUNUSED(extraFontFlag)) {
Release();
// The minus one is done because since Scintilla uses SC_SHARSET_DEFAULT
false,
stc2wx(faceName),
encoding);
- font->SetNoAntiAliasing(!extraFontFlag);
id = font;
}
bool SetFaceName(const wxString& facename);
void SetEncoding(wxFontEncoding encoding);
- void SetNoAntiAliasing( bool no = true ) { m_noAA = no; }
- bool GetNoAntiAliasing() const { return m_noAA; }
-
// and this one also modifies all the other font data fields
void SetNativeFontInfo(const wxNativeFontInfo& info);
bool m_underlined;
wxString m_faceName;
wxFontEncoding m_encoding; // Unused in Unicode mode
- bool m_noAA; // No anti-aliasing
wxNativeFontInfo m_nativeFontInfo;
void wxFontRefData::InitFromNative()
{
- m_noAA = false;
-
#if wxUSE_UNICODE
// Get native info
PangoFontDescription *desc = m_nativeFontInfo.description;
m_faceName = data.m_faceName;
m_encoding = data.m_encoding;
- m_noAA = data.m_noAA;
-
m_nativeFontInfo = data.m_nativeFontInfo;
}
return M_FONTDATA->m_encoding;
}
-bool wxFont::GetNoAntiAliasing() const
-{
- wxCHECK_MSG( Ok(), wxFONTENCODING_DEFAULT, wxT("invalid font") );
-
- return M_FONTDATA->m_noAA;
-}
-
const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
{
wxCHECK_MSG( Ok(), NULL, wxT("invalid font") );
M_FONTDATA->SetNativeFontInfo( info );
}
-void wxFont::SetNoAntiAliasing( bool no )
-{
- Unshare();
-
- M_FONTDATA->SetNoAntiAliasing( no );
-}
-
-#if wxUSE_UNICODE
-#else
+#if !wxUSE_UNICODE
// ----------------------------------------------------------------------------
// X11 implementation
return (f ? f->m_fontStruct : (WXFontStructPtr) 0);
}
-#endif
+#endif // !wxUSE_UNICODE