X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/30764ab5246a5a9876d6313607da56cf1f1909d2..761df41e86ceeed56d32c038a6c9f88554d4f47a:/include/wx/motif/font.h diff --git a/include/wx/motif/font.h b/include/wx/motif/font.h index d6aeb9e1bf..99d6600abb 100644 --- a/include/wx/motif/font.h +++ b/include/wx/motif/font.h @@ -16,6 +16,8 @@ #pragma interface "font.h" #endif +class wxXFont; + // Font class wxFont : public wxFontBase { @@ -37,13 +39,7 @@ public: (void)Create(size, family, style, weight, underlined, face, encoding); } - wxFont(const wxNativeFontInfo& info) - { - Init(); - - (void)Create(info.pointSize, info.family, info.style, info.weight, - info.underlined, info.faceName, info.encoding); - } + wxFont(const wxNativeFontInfo& info); bool Create(int size, int family, @@ -53,6 +49,11 @@ public: const wxString& face = wxEmptyString, wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + // wxMOTIF-specific + bool Create(const wxString& fontname, + wxFontEncoding fontenc = wxFONTENCODING_DEFAULT); + bool Create(const wxNativeFontInfo& fontinfo); + virtual ~wxFont(); // assignment @@ -66,7 +67,8 @@ public: virtual bool GetUnderlined() const; virtual wxString GetFaceName() const; virtual wxFontEncoding GetEncoding() const; - + virtual wxNativeFontInfo *GetNativeFontInfo() const; + virtual void SetPointSize(int pointSize); virtual void SetFamily(int family); virtual void SetStyle(int style); @@ -74,7 +76,8 @@ public: virtual void SetFaceName(const wxString& faceName); virtual void SetUnderlined(bool underlined); virtual void SetEncoding(wxFontEncoding encoding); - + virtual void SetNativeFontInfo( const wxNativeFontInfo& info ); + // Implementation // Find an existing, or create a new, XFontStruct @@ -89,8 +92,8 @@ public: // of the fonts and a mapping file. // Return font struct, and optionally the Motif font list - class wxXFont* GetInternalFont(double scale = 1.0, - WXDisplay* display = NULL) const; + wxXFont *GetInternalFont(double scale = 1.0, + WXDisplay* display = NULL) const; // These two are helper functions for convenient access of the above. WXFontStructPtr GetFontStruct(double scale = 1.0,