X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8bbe427f8e5a2078b266e282453595b5a634d35c..0dbd6262a9ee7d735fb3930707346298f71b2cb7:/include/wx/gtk/font.h?ds=sidebyside diff --git a/include/wx/gtk/font.h b/include/wx/gtk/font.h index becbfb1eeb..9234d3390c 100644 --- a/include/wx/gtk/font.h +++ b/include/wx/gtk/font.h @@ -36,7 +36,8 @@ class wxFontNameDirectory; // global variables //----------------------------------------------------------------------------- -//extern wxFontNameDirectory *wxTheFontNameDirectory; // defined below +extern wxFontNameDirectory *wxTheFontNameDirectory; +extern const char* wxEmptyString; //----------------------------------------------------------------------------- // wxFont @@ -46,38 +47,44 @@ class wxFont: public wxGDIObject { DECLARE_DYNAMIC_CLASS(wxFont) - public: - wxFont(); - wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight, - bool underlined = FALSE, const char *Face = ( const char *) NULL ); - wxFont( int PointSize, const char *Face, int Family, - int Style, int Weight, bool underlined = FALSE ); - wxFont( const wxFont& font ); - ~wxFont(); - wxFont& operator = ( const wxFont& font ); - bool operator == ( const wxFont& font ); - bool operator != ( const wxFont& font ); - bool Ok() const; - - int GetPointSize() const; - wxString GetFaceName() const; - int GetFamily() const; - wxString GetFamilyString() const; - int GetFontId() const; - wxString GetFaceString() const; - int GetStyle() const; - wxString GetStyleString() const; - int GetWeight() const; - wxString GetWeightString() const; - bool GetUnderlined() const; - - wxFont( char *xFontName ); - +public: + wxFont(); + wxFont( int pointSize, int family, int style, int weight, bool underlined = FALSE, + const wxString& face = wxEmptyString ); + wxFont( const wxFont& font ); + ~wxFont(); + wxFont& operator = ( const wxFont& font ); + bool operator == ( const wxFont& font ); + bool operator != ( const wxFont& font ); + bool Ok() const; + + int GetPointSize() const; + int GetFamily() const; + int GetFontId() const; + int GetStyle() const; + int GetWeight() const; + bool GetUnderlined() const; + + void SetPointSize( int pointSize ); + void SetFamily( int family ); + void SetStyle( int style ); + void SetWeight( int weight ); + void SetFaceName( const wxString& faceName ); + void SetUnderlined( bool underlined ); + + wxString GetFaceName() const; + wxString GetFamilyString() const; + wxString GetStyleString() const; + wxString GetWeightString() const; + // implementation + + wxFont( char *xFontName ); + void Unshare(); - GdkFont* GetInternalFont(float scale = 1.0) const; + GdkFont* GetInternalFont(float scale = 1.0) const; - // no data :-) + // no data :-) }; //----------------------------------------------------------------------------- @@ -108,6 +115,4 @@ class wxFontNameDirectory: public wxObject int nextFontId; }; -extern wxFontNameDirectory *wxTheFontNameDirectory; - #endif // __GTKFONTH__