]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/gdicmn.cpp
return the index of the inserted/appended item
[wxWidgets.git] / src / common / gdicmn.cpp
index 280d4d94c3e680f0df0a278df137ec32b6e4e55b..69ddd2098684ffe8a2bf32ec3000ca666c6aefc5 100644 (file)
@@ -9,7 +9,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "gdicmn.h"
 #endif
 
 #include "wx/mac/uma.h"
 #endif
 
+#if wxUSE_EXTENDED_RTTI
+
+// wxPoint
+
+template<> void wxStringReadValue(const wxString &s , wxPoint &data )
+{
+       wxSscanf(s, wxT("%d,%d"), &data.x , &data.y ) ;
+}
+
+template<> void wxStringWriteValue(wxString &s , const wxPoint &data )
+{
+       s = wxString::Format(wxT("%d,%d"), data.x , data.y ) ;
+}
+
+WX_CUSTOM_TYPE_INFO(wxPoint, wxToStringConverter<wxPoint> , wxFromStringConverter<wxPoint>)
+
+template<> void wxStringReadValue(const wxString &s , wxSize &data )
+{
+       wxSscanf(s, wxT("%d,%d"), &data.x , &data.y ) ;
+}
+
+template<> void wxStringWriteValue(wxString &s , const wxSize &data )
+{
+       s = wxString::Format(wxT("%d,%d"), data.x , data.y ) ;
+}
+
+WX_CUSTOM_TYPE_INFO(wxSize, wxToStringConverter<wxSize> , wxFromStringConverter<wxSize>)
+
+#endif
+
 IMPLEMENT_ABSTRACT_CLASS(wxDCBase, wxObject)
 
 wxRect::wxRect(const wxPoint& topLeft, const wxPoint& bottomRight)