X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5e2ab1ea5d6bab772a7d2600e708f38f0f3439aa..708c45a6cef439edb007ca8f8329582244f152f5:/src/common/gdicmn.cpp diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index 20450b557e..69ddd20986 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "gdicmn.h" #endif @@ -64,12 +64,36 @@ #include "wx/mac/private.h" #include "wx/mac/uma.h" #endif -//IMPLEMENT_CLASS(wxColourDatabase, wxList) -//IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList) -//IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList) -//IMPLEMENT_DYNAMIC_CLASS(wxBrushList, wxList) -//IMPLEMENT_DYNAMIC_CLASS(wxBitmapList, wxList) -//IMPLEMENT_DYNAMIC_CLASS(wxResourceCache, wxList) + +#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 , wxFromStringConverter) + +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 , wxFromStringConverter) + +#endif IMPLEMENT_ABSTRACT_CLASS(wxDCBase, wxObject)