]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/gdicmn.cpp
Add some WXDLLIMPEXP's
[wxWidgets.git] / src / common / gdicmn.cpp
index 20450b557e11dd12a355e1dad5b8fd324d1716d9..a525af1b0d4b1f68df4092e1c5f8762376911425 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/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 ) ;
+}
+
+wxCUSTOM_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 ) ;
+}
+
+wxCUSTOM_TYPE_INFO(wxSize, wxToStringConverter<wxSize> , wxFromStringConverter<wxSize>)
+
+#endif
 
 IMPLEMENT_ABSTRACT_CLASS(wxDCBase, wxObject)
 
-wxRect::wxRect(const wxPoint& topLeft, const wxPoint& bottomRight)
+wxRect::wxRect(const wxPoint& point1, const wxPoint& point2)
 {
-  x = topLeft.x;
-  y = topLeft.y;
-  width = bottomRight.x - topLeft.x + 1;
-  height = bottomRight.y - topLeft.y + 1;
+  x = point1.x;
+  y = point1.y;
+  width = point2.x - point1.x;
+  height = point2.y - point1.y;
 
   if (width < 0)
   {
     width = -width;
-    x -= width;
+    x = point2.x;
   }
+  width++;
 
   if (height < 0)
   {
     height = -height;
-    y -= height;
+    y = point2.y;
   }
+  height++;
 }
 
 wxRect::wxRect(const wxPoint& point, const wxSize& size)
@@ -484,7 +510,7 @@ void wxInitializeStockObjects ()
 
        GetThemeFont(kThemeSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
        sizeFont = fontSize ;
-    wxSWISS_FONT = new wxFont (fontSize, wxSWISS, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal(fontName) );
+    wxNORMAL_FONT = new wxFont (fontSize, wxMODERN, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal(fontName) );
 #elif defined(__WXPM__)
   static const int sizeFont = 12;
 #else
@@ -502,7 +528,7 @@ void wxInitializeStockObjects ()
   wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL);
   wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */
 #elif defined(__WXMAC__)
-    wxNORMAL_FONT = new wxFont (sizeFont, wxMODERN, wxNORMAL, wxNORMAL);
+    wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */
     wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL);
        GetThemeFont(kThemeSmallSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
     wxSMALL_FONT = new wxFont (fontSize, wxSWISS, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal( fontName ) );