]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gdi.i
SWIG updates for wxGTK
[wxWidgets.git] / wxPython / src / gdi.i
index 90b74151916cfcf1bef26e48dcf93d6166cf4173..5b8587565b80378cda91cd11e6a62cb9adff3b64 100644 (file)
@@ -202,7 +202,9 @@ public:
            int desiredWidth = -1, int desiredHeight = -1);
     ~wxIcon();
 
+#ifndef __WXMAC__
     bool LoadFile(const wxString& name, long flags);
+#endif
 
     // wxGDIImage methods
 #ifdef __WXMSW__
@@ -300,7 +302,8 @@ enum wxFontFamily
     wxFONTFAMILY_SWISS = wxSWISS,
     wxFONTFAMILY_MODERN = wxMODERN,
     wxFONTFAMILY_TELETYPE = wxTELETYPE,
-    wxFONTFAMILY_MAX
+    wxFONTFAMILY_MAX,
+    wxFONTFAMILY_UNKNOWN
 };
 
 // font styles
@@ -394,6 +397,44 @@ enum wxFontEncoding
 // ToString() and restore them using FromString())
 struct wxNativeFontInfo
 {
+#ifdef __WXGTK__
+    // init the elements from an XLFD, return TRUE if ok
+    bool FromXFontName(const wxString& xFontName);
+
+    // return false if we were never initialized with a valid XLFD
+    bool IsDefault() const;
+
+    // generate an XLFD using the fontElements
+    wxString GetXFontName() const;
+
+    // set the XFLD
+    void SetXFontName(const wxString& xFontName);
+#endif
+
+    wxNativeFontInfo() { Init(); }
+
+    // reset to the default state
+    void Init();
+
+#ifndef __WXGTK__
+    // accessors and modifiers for the font elements
+    int GetPointSize() const;
+    wxFontStyle GetStyle() const;
+    wxFontWeight GetWeight() const;
+    bool GetUnderlined() const;
+    wxString GetFaceName() const;
+    wxFontFamily GetFamily() const;
+    wxFontEncoding GetEncoding() const;
+
+    void SetPointSize(int pointsize);
+    void SetStyle(wxFontStyle style);
+    void SetWeight(wxFontWeight weight);
+    void SetUnderlined(bool underlined);
+    void SetFaceName(wxString facename);
+    void SetFamily(wxFontFamily family);
+    void SetEncoding(wxFontEncoding encoding);
+#endif
+
     // it is important to be able to serialize wxNativeFontInfo objects to be
     // able to store them (in config file, for example)
     bool FromString(const wxString& s);
@@ -404,6 +445,12 @@ struct wxNativeFontInfo
             return self->ToString();
         }
     }
+
+    // we also want to present the native font descriptions to the user in some
+    // human-readable form (it is not platform independent neither, but can
+    // hopefully be understood by the user)
+    bool FromUserString(const wxString& s);
+    wxString ToUserString() const;
 };
 
 
@@ -514,7 +561,12 @@ public:
     bool GetUnderlined() const;
     wxString GetFaceName() const;
     wxFontEncoding GetEncoding() const;
+
+    bool IsFixedWidth();
+
     wxNativeFontInfo* GetNativeFontInfo() const;
+    wxString GetNativeFontInfoDesc() const;
+    wxString GetNativeFontInfoUserDesc() const;
 
     void SetPointSize(int pointSize);
     void SetFamily(int family);
@@ -524,6 +576,8 @@ public:
     void SetUnderlined(bool underlined);
     void SetEncoding(wxFontEncoding encoding);
     void SetNativeFontInfo(const wxNativeFontInfo& info);
+    // void SetNativeFontInfo(const wxString& info);
+    void SetNativeFontInfoUserDesc(const wxString& info);
 
     wxString GetFamilyString() const;
     wxString GetStyleString() const;