]> git.saurik.com Git - wxWidgets.git/commitdiff
Forward-ported wxPython-bindings related cleanup from 2.9.0 branch
authorJaakko Salli <jaakko.salli@dnainternet.net>
Sat, 30 May 2009 10:49:05 +0000 (10:49 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Sat, 30 May 2009 10:49:05 +0000 (10:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/propgrid/advprops.h
include/wx/propgrid/editors.h
include/wx/propgrid/property.h
include/wx/propgrid/propgrid.h
include/wx/propgrid/props.h
src/propgrid/propgrid.cpp

index 9326cc40b99a68ffa91068350f879ac19888b88a..bc8bd3e49cda6f9e0740c63fd1f05e1682152b0f 100644 (file)
@@ -156,7 +156,7 @@ DECLARE_VARIANT_OBJECT_EXPORTED(wxColourPropertyValue, WXDLLIMPEXP_PROPGRID)
 // -----------------------------------------------------------------------
 // Declare part of custom colour property macro pairs.
 
-#if wxUSE_IMAGE || defined(SWIG)
+#if wxUSE_IMAGE
     #include "wx/image.h"
 #endif
 
@@ -356,7 +356,7 @@ protected:
 
 #endif
 
-#if wxUSE_CHOICEDLG || defined(SWIG)
+#if wxUSE_CHOICEDLG
 
 /** @class wxMultiChoiceProperty
     @ingroup classes
index dcc66671e580a20b92c793b93ab9146ebbe4bae4..cf81fcee2bb502b3d3a9065e326b363f525cc9d9 100644 (file)
@@ -75,9 +75,7 @@ public:
 */
 class WXDLLIMPEXP_PROPGRID wxPGEditor : public wxObject
 {
-#ifndef SWIG
     DECLARE_ABSTRACT_CLASS(wxPGEditor)
-#endif
 public:
 
     /** Constructor. */
@@ -223,9 +221,7 @@ wxPGEditor* wxPGEditor_##EDITOR = NULL;
 
 class WXDLLIMPEXP_PROPGRID wxPGTextCtrlEditor : public wxPGEditor
 {
-#ifndef SWIG
     DECLARE_DYNAMIC_CLASS(wxPGTextCtrlEditor)
-#endif
 public:
     wxPGTextCtrlEditor() {}
     virtual ~wxPGTextCtrlEditor();
@@ -270,9 +266,7 @@ public:
 
 class WXDLLIMPEXP_PROPGRID wxPGChoiceEditor : public wxPGEditor
 {
-#ifndef SWIG
     DECLARE_DYNAMIC_CLASS(wxPGChoiceEditor)
-#endif
 public:
     wxPGChoiceEditor() {}
     virtual ~wxPGChoiceEditor();
@@ -319,9 +313,7 @@ public:
 
 class WXDLLIMPEXP_PROPGRID wxPGComboBoxEditor : public wxPGChoiceEditor
 {
-#ifndef SWIG
     DECLARE_DYNAMIC_CLASS(wxPGComboBoxEditor)
-#endif
 public:
     wxPGComboBoxEditor() {}
     virtual ~wxPGComboBoxEditor();
@@ -392,9 +384,7 @@ public:
 //
 class WXDLLIMPEXP_PROPGRID wxPGCheckBoxEditor : public wxPGEditor
 {
-#ifndef SWIG
     DECLARE_DYNAMIC_CLASS(wxPGCheckBoxEditor)
-#endif
 public:
     wxPGCheckBoxEditor() {}
     virtual ~wxPGCheckBoxEditor();
@@ -456,9 +446,7 @@ public:
 */
 class WXDLLIMPEXP_PROPGRID wxPGEditorDialogAdapter : public wxObject
 {
-#ifndef SWIG
     DECLARE_ABSTRACT_CLASS(wxPGEditorDialogAdapter)
-#endif
 public:
     wxPGEditorDialogAdapter()
         : wxObject()
index d8dcf5363f1fe2f62d95bb34e6649ed10c855fe2..e84a602e38ce8af58e8d90d0b2b919d598d85a88 100644 (file)
@@ -2156,34 +2156,6 @@ public:
     */
     wxPGProperty* GetPropertyByName( const wxString& name ) const;
 
-#ifdef SWIG
-     %extend {
-        DocStr(GetClientData,
-               "Returns the client data object for a property", "");
-        PyObject* GetClientData() {
-            wxPyClientData* data = (wxPyClientData*)self->GetClientObject();
-            if (data) {
-                Py_INCREF(data->m_obj);
-                return data->m_obj;
-            } else {
-                Py_INCREF(Py_None);
-                return Py_None;
-            }
-        }
-
-        DocStr(SetClientData,
-               "Associate the given client data.", "");
-        void SetClientData(PyObject* clientData) {
-            wxPyClientData* data = new wxPyClientData(clientData);
-            self->SetClientObject(data);
-        }
-    }
-    %pythoncode {
-         GetClientObject = GetClientData
-         SetClientObject = SetClientData
-    }
-#endif
-
 #ifndef SWIG
 
     // Returns various display-related information for given column
index 60012619184d9da29d4282b949aa8732ebff8591..8c49a819e13f89c61b95cf1b6f6e4b3a9ed42788 100644 (file)
@@ -102,6 +102,10 @@ extern WXDLLIMPEXP_PROPGRID wxPGGlobalVarsClass* wxPGGlobalVars;
 
 #define wxPGVariant_Bool(A)     (A?wxPGVariant_True:wxPGVariant_False)
 
+// When wxPG is loaded dynamically after the application is already running
+// then the built-in module system won't pick this one up.  Add it manually.
+WXDLLIMPEXP_PROPGRID void wxPGInitResourceModule();
+
 #endif // !SWIG
 
 // -----------------------------------------------------------------------
index 93f0ed542d6900931f8b4176dfaef53dc15af14b..5a31c34bf6cd7d4e44259efcb60bf036ef427d46 100644 (file)
@@ -696,9 +696,7 @@ protected:
 */
 class WXDLLIMPEXP_PROPGRID wxDirProperty : public wxLongStringProperty
 {
-#ifndef SWIG
     DECLARE_DYNAMIC_CLASS(wxDirProperty)
-#endif
 public:
     wxDirProperty( const wxString& name = wxPG_LABEL,
                    const wxString& label = wxPG_LABEL,
@@ -954,10 +952,8 @@ protected:
     virtual void ArraySwap( size_t first, size_t second ) = 0;
 
 private:
-#ifndef SWIG
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxArrayEditorDialog)
     DECLARE_EVENT_TABLE()
-#endif
 };
 
 // -----------------------------------------------------------------------
@@ -1004,10 +1000,8 @@ protected:
     virtual void ArraySwap( size_t first, size_t second );
 
 private:
-#ifndef SWIG
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxPGArrayStringEditorDialog)
     DECLARE_EVENT_TABLE()
-#endif
 };
 
 // -----------------------------------------------------------------------
index f33e2c71198ce39bb7da0cbce9a3eebd4e625482..5a18f55513412b2c820da7867ec4c30d3a8e969f 100644 (file)
@@ -152,6 +152,15 @@ public:
 IMPLEMENT_DYNAMIC_CLASS(wxPGGlobalVarsClassManager, wxModule)
 
 
+// When wxPG is loaded dynamically after the application is already running
+// then the built-in module system won't pick this one up.  Add it manually.
+void wxPGInitResourceModule()
+{
+    wxModule* module = new wxPGGlobalVarsClassManager;
+    module->Init();
+    wxModule::RegisterModule(module);
+}
+
 wxPGGlobalVarsClass* wxPGGlobalVars = NULL;