X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..8a126fcc3438c6b2693090e8c97761fa12d8ca7a:/include/wx/gtk1/font.h diff --git a/include/wx/gtk1/font.h b/include/wx/gtk1/font.h index 619813b17e..70e594cc9b 100644 --- a/include/wx/gtk1/font.h +++ b/include/wx/gtk1/font.h @@ -2,10 +2,9 @@ // Name: font.h // Purpose: // Author: Robert Roebling -// Created: 01/02/97 -// Id: +// Id: $Id$ // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -31,74 +30,80 @@ class wxPaintDC; class wxWindow; class wxFont; +/* class wxFontNameDirectory; +*/ //----------------------------------------------------------------------------- // global variables //----------------------------------------------------------------------------- -// extern wxFontNameDirectory wxTheFontNameDirectory; // defined below +/* +extern wxFontNameDirectory *wxTheFontNameDirectory; +*/ +extern const wxChar* wxEmptyString; //----------------------------------------------------------------------------- // wxFont //----------------------------------------------------------------------------- -class wxFont: public wxGDIObject +class wxFont: public wxGDIObject { DECLARE_DYNAMIC_CLASS(wxFont) - - public: - wxFont(void); - wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight, - bool underlined = FALSE, const char *Face=NULL ); - wxFont( int PointSize, const char *Face, int Family, int Style, int Weight, - bool underlined = FALSE ); - wxFont( const wxFont& font ); - wxFont( const wxFont* font ); - ~wxFont(void); - wxFont& operator = ( const wxFont& font ); - bool operator == ( const wxFont& font ); - bool operator != ( const wxFont& font ); - bool Ok(); - - int GetPointSize(void) const; - wxString GetFaceName(void) const; - int GetFamily(void) const; - wxString GetFamilyString(void) const; - int GetFontId(void) const; - wxString GetFaceString(void) const; - int GetStyle(void) const; - wxString GetStyleString(void) const; - int GetWeight(void) const; - wxString GetWeightString(void) const; - bool GetUnderlined(void) 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 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 ); - private: - - friend wxDC; - friend wxPaintDC; - friend wxWindow; + wxString GetFaceName() const; + wxString GetFamilyString() const; + wxString GetStyleString() const; + wxString GetWeightString() const; - GdkFont* GetInternalFont(float scale = 1.0); + // implementation + + wxFont( char *xFontName ); + void Unshare(); + + GdkFont* GetInternalFont(float scale = 1.0) const; - // no data :-) + // no data :-) }; +/* //----------------------------------------------------------------------------- // wxFontDirectory //----------------------------------------------------------------------------- -class wxFontNameDirectory: public wxObject +class wxFontNameDirectory: public wxObject { DECLARE_DYNAMIC_CLASS(wxFontNameDirectory) - + public: - wxFontNameDirectory(void); + wxFontNameDirectory(); ~wxFontNameDirectory(); - void Initialize(void); + void Initialize(); void Initialize(int fontid, int family, const char *name); int FindOrCreateFontId(const char *name, int family); @@ -106,15 +111,13 @@ class wxFontNameDirectory: public wxObject int GetFamily(int fontid); int GetFontId(const char *name); char* GetFontName(int fontid); - int GetNewFontId(void); + int GetNewFontId(); char* GetPostScriptName(int fontid, int weight, int style); char* GetScreenName(int fontid, int weight, int style); - - + class wxHashTable *table; int nextFontId; }; - -extern wxFontNameDirectory wxTheFontNameDirectory; +*/ #endif // __GTKFONTH__