Update wxFont in wxQt after recent base class interface changes
Trivially implement the new wxFont::{Set,Get}{FractionalPointSize, NumericWeight}() methods in terms of the corresponding wxNativeFontInfo methods.
This commit is contained in:
@@ -50,20 +50,20 @@ public:
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
||||
|
||||
// accessors: get the font characteristics
|
||||
virtual int GetPointSize() const;
|
||||
virtual float GetFractionalPointSize() const wxOVERRIDE;
|
||||
virtual wxFontStyle GetStyle() const;
|
||||
virtual wxFontWeight GetWeight() const;
|
||||
virtual int GetNumericWeight() const wxOVERRIDE;
|
||||
virtual bool GetUnderlined() const;
|
||||
virtual wxString GetFaceName() const;
|
||||
virtual wxFontEncoding GetEncoding() const;
|
||||
virtual const wxNativeFontInfo *GetNativeFontInfo() const;
|
||||
|
||||
// change the font characteristics
|
||||
virtual void SetPointSize( int pointSize );
|
||||
virtual void SetFractionalPointSize(float pointSize) wxOVERRIDE;
|
||||
virtual void SetFamily( wxFontFamily family );
|
||||
virtual void SetStyle( wxFontStyle style );
|
||||
virtual void SetNumericWeight(int weight) wxOVERRIDE;
|
||||
virtual bool SetFaceName(const wxString& facename);
|
||||
virtual void SetWeight( wxFontWeight weight );
|
||||
virtual void SetUnderlined( bool underlined );
|
||||
virtual void SetEncoding(wxFontEncoding encoding);
|
||||
|
||||
|
@@ -203,9 +203,9 @@ bool wxFont::Create(wxSize size, wxFontFamily family, wxFontStyle style,
|
||||
return true;
|
||||
}
|
||||
|
||||
int wxFont::GetPointSize() const
|
||||
float wxFont::GetFractionalPointSize() const
|
||||
{
|
||||
return M_FONTDATA.GetPointSize();
|
||||
return M_FONTDATA.GetFractionalPointSize();
|
||||
}
|
||||
|
||||
wxFontStyle wxFont::GetStyle() const
|
||||
@@ -213,9 +213,9 @@ wxFontStyle wxFont::GetStyle() const
|
||||
return M_FONTDATA.GetStyle();
|
||||
}
|
||||
|
||||
wxFontWeight wxFont::GetWeight() const
|
||||
int wxFont::GetNumericWeight() const
|
||||
{
|
||||
return M_FONTDATA.GetWeight();
|
||||
return M_FONTDATA.GetNumericWeight();
|
||||
}
|
||||
|
||||
bool wxFont::GetUnderlined() const
|
||||
@@ -238,11 +238,11 @@ const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
|
||||
return &M_FONTDATA;
|
||||
}
|
||||
|
||||
void wxFont::SetPointSize( int pointSize )
|
||||
void wxFont::SetFractionalPointSize(float pointSize)
|
||||
{
|
||||
AllocExclusive();
|
||||
|
||||
M_FONTDATA.SetPointSize(pointSize);
|
||||
M_FONTDATA.SetFractionalPointSize(pointSize);
|
||||
}
|
||||
|
||||
bool wxFont::SetFaceName(const wxString& facename)
|
||||
@@ -266,11 +266,11 @@ void wxFont::SetStyle( wxFontStyle style )
|
||||
M_FONTDATA.SetStyle(style);
|
||||
}
|
||||
|
||||
void wxFont::SetWeight( wxFontWeight weight )
|
||||
void wxFont::SetNumericWeight(int weight)
|
||||
{
|
||||
AllocExclusive();
|
||||
|
||||
M_FONTDATA.SetWeight(weight);
|
||||
M_FONTDATA.SetNumericWeight(weight);
|
||||
}
|
||||
|
||||
void wxFont::SetUnderlined( bool underlined )
|
||||
|
Reference in New Issue
Block a user