]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't make private wxGraphicsContext-derived classes dynamically creatable.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 9 Oct 2011 22:07:13 +0000 (22:07 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 9 Oct 2011 22:07:13 +0000 (22:07 +0000)
This doesn't make any sense because classes such as wxGDIPlusContext,
wxGDIPlusMeasuringContext and wxMacCoreGraphicsContext are private and don't
need to be creatable by name (only renderers potentially need to be) and was
inconsistent with Unix/Cairo backend in which these classes were not dynamic.

So remove wxRTTI macros from them in wxMSW/wxOSX as well as this allows us to
get rid of unnecessary default ctors.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/graphics.cpp
src/osx/carbon/graphics.cpp

index 88d5fb55941455a14ca6401a0cb02a9d90c8cd62..b09c1dca149fc834583a9575ac9b8665201f0e7d 100644 (file)
@@ -391,7 +391,7 @@ private:
     GraphicsState m_state1;
     GraphicsState m_state2;
 
-    DECLARE_DYNAMIC_CLASS_NO_COPY(wxGDIPlusContext)
+    wxDECLARE_NO_COPY_CLASS(wxGDIPlusContext);
 };
 
 class wxGDIPlusMeasuringContext : public wxGDIPlusContext
@@ -411,7 +411,6 @@ public:
 
 private:
     HDC m_hdc ;
-    DECLARE_DYNAMIC_CLASS_NO_COPY(wxGDIPlusMeasuringContext)
 } ;
 
 class wxGDIPlusPrintingContext : public wxGDIPlusContext
@@ -1247,9 +1246,6 @@ void * wxGDIPlusMatrixData::GetNativeMatrix() const
 // wxGDIPlusContext implementation
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxGDIPlusContext,wxGraphicsContext)
-IMPLEMENT_DYNAMIC_CLASS(wxGDIPlusMeasuringContext,wxGDIPlusContext)
-
 class wxGDIPlusOffsetHelper
 {
 public :
index e5e2a07b6ccf0d7f7f6dc0aa6d94cf539ac38de3..e481253450ef46011e308be4dbeb7d5335d566dd 100644 (file)
@@ -1404,8 +1404,6 @@ public:
 
     wxMacCoreGraphicsContext( wxGraphicsRenderer* renderer);
 
-    wxMacCoreGraphicsContext();
-
     ~wxMacCoreGraphicsContext();
 
     void Init();
@@ -1517,7 +1515,7 @@ public:
 
     void SetNativeContext( CGContextRef cg );
 
-    DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacCoreGraphicsContext)
+    wxDECLARE_NO_COPY_CLASS(wxMacCoreGraphicsContext);
 
 private:
     bool EnsureIsValid();
@@ -1556,8 +1554,6 @@ private:
 // wxMacCoreGraphicsContext implementation
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxMacCoreGraphicsContext, wxGraphicsContext)
-
 class wxQuartzOffsetHelper
 {
 public :
@@ -1662,12 +1658,6 @@ wxMacCoreGraphicsContext::wxMacCoreGraphicsContext(wxGraphicsRenderer* renderer)
     Init();
 }
 
-wxMacCoreGraphicsContext::wxMacCoreGraphicsContext() : wxGraphicsContext(NULL)
-{
-    Init();
-    wxLogDebug(wxT("Illegal Constructor called"));
-}
-
 wxMacCoreGraphicsContext::~wxMacCoreGraphicsContext()
 {
     SetNativeContext(NULL);