+
+// ----------------------------------------------------------------------------
+// private classes
+// ----------------------------------------------------------------------------
+
+// For every wxFont, there must be a font for each display and scale requested.
+// So these objects are stored in wxFontRefData::m_fonts
+class wxXFont : public wxObject
+{
+public:
+ wxXFont();
+ ~wxXFont();
+
+ WXFontStructPtr m_fontStruct; // XFontStruct
+ WXFontList m_fontList; // Motif XmFontList
+ WXDisplay* m_display; // XDisplay
+ int m_scale; // Scale * 100
+};
+
+class wxFontRefData: public wxGDIRefData
+{
+friend class wxFont;
+
+public:
+ wxFontRefData(int size = wxDEFAULT,
+ int family = wxDEFAULT,
+ int style = wxDEFAULT,
+ int weight = wxDEFAULT,
+ bool underlined = FALSE,
+ const wxString& faceName = wxEmptyString,
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
+ {
+ Init(size, family, style, weight, underlined, faceName, encoding);
+ }
+
+ wxFontRefData(const wxFontRefData& data)
+ {
+ Init(data.m_pointSize, data.m_family, data.m_style, data.m_weight,
+ data.m_underlined, data.m_faceName, data.m_encoding);
+ }
+
+ ~wxFontRefData();
+
+protected:
+ // common part of all ctors
+ void Init(int size,
+ int family,
+ int style,
+ int weight,
+ bool underlined,
+ const wxString& faceName,
+ wxFontEncoding encoding);
+
+ // font attributes
+ int m_pointSize;
+ int m_family;
+ int m_style;
+ int m_weight;
+ bool m_underlined;
+ wxString m_faceName;
+ wxFontEncoding m_encoding;
+
+ // A list of wxXFonts
+ wxList m_fonts;
+};
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// wxXFont
+// ----------------------------------------------------------------------------