Added FontFromPixelSize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -240,6 +240,7 @@ public:
|
|||||||
|
|
||||||
// accessors and modifiers for the font elements
|
// accessors and modifiers for the font elements
|
||||||
int GetPointSize() const;
|
int GetPointSize() const;
|
||||||
|
wxSize GetPixelSize() const;
|
||||||
wxFontStyle GetStyle() const;
|
wxFontStyle GetStyle() const;
|
||||||
wxFontWeight GetWeight() const;
|
wxFontWeight GetWeight() const;
|
||||||
bool GetUnderlined() const;
|
bool GetUnderlined() const;
|
||||||
@@ -248,6 +249,7 @@ public:
|
|||||||
wxFontEncoding GetEncoding() const;
|
wxFontEncoding GetEncoding() const;
|
||||||
|
|
||||||
void SetPointSize(int pointsize);
|
void SetPointSize(int pointsize);
|
||||||
|
void SetPixelSize(const wxSize& pixelSize);
|
||||||
void SetStyle(wxFontStyle style);
|
void SetStyle(wxFontStyle style);
|
||||||
void SetWeight(wxFontWeight weight);
|
void SetWeight(wxFontWeight weight);
|
||||||
void SetUnderlined(bool underlined);
|
void SetUnderlined(bool underlined);
|
||||||
@@ -460,6 +462,23 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// There is a real ctor for this on wxMSW, but not the others, so just use
|
||||||
|
// the factory funciton in all cases.
|
||||||
|
%extend {
|
||||||
|
%name(FontFromPixelSize) wxFont(const wxSize& pixelSize,
|
||||||
|
int family,
|
||||||
|
int style,
|
||||||
|
int weight,
|
||||||
|
bool underlined = false,
|
||||||
|
const wxString& face = wxEmptyString,
|
||||||
|
wxFontEncoding encoding = wxFONTENCODING_DEFAULT) {
|
||||||
|
return wxFontBase::New(pixelSize, family,
|
||||||
|
style, weight, underlined,
|
||||||
|
face, encoding);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// was the font successfully created?
|
// was the font successfully created?
|
||||||
bool Ok() const;
|
bool Ok() const;
|
||||||
@@ -473,6 +492,8 @@ public:
|
|||||||
|
|
||||||
// accessors: get the font characteristics
|
// accessors: get the font characteristics
|
||||||
virtual int GetPointSize() const;
|
virtual int GetPointSize() const;
|
||||||
|
virtual wxSize GetPixelSize() const;
|
||||||
|
virtual bool IsUsingSizeInPixels() const;
|
||||||
virtual int GetFamily() const;
|
virtual int GetFamily() const;
|
||||||
virtual int GetStyle() const;
|
virtual int GetStyle() const;
|
||||||
virtual int GetWeight() const;
|
virtual int GetWeight() const;
|
||||||
@@ -488,6 +509,7 @@ public:
|
|||||||
|
|
||||||
// change the font characteristics
|
// change the font characteristics
|
||||||
virtual void SetPointSize( int pointSize );
|
virtual void SetPointSize( int pointSize );
|
||||||
|
virtual void SetPixelSize( const wxSize& pixelSize );
|
||||||
virtual void SetFamily( int family );
|
virtual void SetFamily( int family );
|
||||||
virtual void SetStyle( int style );
|
virtual void SetStyle( int style );
|
||||||
virtual void SetWeight( int weight );
|
virtual void SetWeight( int weight );
|
||||||
|
Reference in New Issue
Block a user