Forward-ported wxPython-bindings related cleanup from 2.9.0 branch

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-05-30 10:49:05 +00:00
parent a7d8506b4f
commit b512ed9320
6 changed files with 15 additions and 48 deletions

View File

@@ -156,7 +156,7 @@ DECLARE_VARIANT_OBJECT_EXPORTED(wxColourPropertyValue, WXDLLIMPEXP_PROPGRID)
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// Declare part of custom colour property macro pairs. // Declare part of custom colour property macro pairs.
#if wxUSE_IMAGE || defined(SWIG) #if wxUSE_IMAGE
#include "wx/image.h" #include "wx/image.h"
#endif #endif
@@ -356,7 +356,7 @@ protected:
#endif #endif
#if wxUSE_CHOICEDLG || defined(SWIG) #if wxUSE_CHOICEDLG
/** @class wxMultiChoiceProperty /** @class wxMultiChoiceProperty
@ingroup classes @ingroup classes

View File

@@ -75,9 +75,7 @@ public:
*/ */
class WXDLLIMPEXP_PROPGRID wxPGEditor : public wxObject class WXDLLIMPEXP_PROPGRID wxPGEditor : public wxObject
{ {
#ifndef SWIG
DECLARE_ABSTRACT_CLASS(wxPGEditor) DECLARE_ABSTRACT_CLASS(wxPGEditor)
#endif
public: public:
/** Constructor. */ /** Constructor. */
@@ -223,9 +221,7 @@ wxPGEditor* wxPGEditor_##EDITOR = NULL;
class WXDLLIMPEXP_PROPGRID wxPGTextCtrlEditor : public wxPGEditor class WXDLLIMPEXP_PROPGRID wxPGTextCtrlEditor : public wxPGEditor
{ {
#ifndef SWIG
DECLARE_DYNAMIC_CLASS(wxPGTextCtrlEditor) DECLARE_DYNAMIC_CLASS(wxPGTextCtrlEditor)
#endif
public: public:
wxPGTextCtrlEditor() {} wxPGTextCtrlEditor() {}
virtual ~wxPGTextCtrlEditor(); virtual ~wxPGTextCtrlEditor();
@@ -270,9 +266,7 @@ public:
class WXDLLIMPEXP_PROPGRID wxPGChoiceEditor : public wxPGEditor class WXDLLIMPEXP_PROPGRID wxPGChoiceEditor : public wxPGEditor
{ {
#ifndef SWIG
DECLARE_DYNAMIC_CLASS(wxPGChoiceEditor) DECLARE_DYNAMIC_CLASS(wxPGChoiceEditor)
#endif
public: public:
wxPGChoiceEditor() {} wxPGChoiceEditor() {}
virtual ~wxPGChoiceEditor(); virtual ~wxPGChoiceEditor();
@@ -319,9 +313,7 @@ public:
class WXDLLIMPEXP_PROPGRID wxPGComboBoxEditor : public wxPGChoiceEditor class WXDLLIMPEXP_PROPGRID wxPGComboBoxEditor : public wxPGChoiceEditor
{ {
#ifndef SWIG
DECLARE_DYNAMIC_CLASS(wxPGComboBoxEditor) DECLARE_DYNAMIC_CLASS(wxPGComboBoxEditor)
#endif
public: public:
wxPGComboBoxEditor() {} wxPGComboBoxEditor() {}
virtual ~wxPGComboBoxEditor(); virtual ~wxPGComboBoxEditor();
@@ -392,9 +384,7 @@ public:
// //
class WXDLLIMPEXP_PROPGRID wxPGCheckBoxEditor : public wxPGEditor class WXDLLIMPEXP_PROPGRID wxPGCheckBoxEditor : public wxPGEditor
{ {
#ifndef SWIG
DECLARE_DYNAMIC_CLASS(wxPGCheckBoxEditor) DECLARE_DYNAMIC_CLASS(wxPGCheckBoxEditor)
#endif
public: public:
wxPGCheckBoxEditor() {} wxPGCheckBoxEditor() {}
virtual ~wxPGCheckBoxEditor(); virtual ~wxPGCheckBoxEditor();
@@ -456,9 +446,7 @@ public:
*/ */
class WXDLLIMPEXP_PROPGRID wxPGEditorDialogAdapter : public wxObject class WXDLLIMPEXP_PROPGRID wxPGEditorDialogAdapter : public wxObject
{ {
#ifndef SWIG
DECLARE_ABSTRACT_CLASS(wxPGEditorDialogAdapter) DECLARE_ABSTRACT_CLASS(wxPGEditorDialogAdapter)
#endif
public: public:
wxPGEditorDialogAdapter() wxPGEditorDialogAdapter()
: wxObject() : wxObject()

View File

@@ -2156,34 +2156,6 @@ public:
*/ */
wxPGProperty* GetPropertyByName( const wxString& name ) const; 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 #ifndef SWIG
// Returns various display-related information for given column // Returns various display-related information for given column

View File

@@ -102,6 +102,10 @@ extern WXDLLIMPEXP_PROPGRID wxPGGlobalVarsClass* wxPGGlobalVars;
#define wxPGVariant_Bool(A) (A?wxPGVariant_True:wxPGVariant_False) #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 #endif // !SWIG
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

View File

@@ -696,9 +696,7 @@ protected:
*/ */
class WXDLLIMPEXP_PROPGRID wxDirProperty : public wxLongStringProperty class WXDLLIMPEXP_PROPGRID wxDirProperty : public wxLongStringProperty
{ {
#ifndef SWIG
DECLARE_DYNAMIC_CLASS(wxDirProperty) DECLARE_DYNAMIC_CLASS(wxDirProperty)
#endif
public: public:
wxDirProperty( const wxString& name = wxPG_LABEL, wxDirProperty( const wxString& name = wxPG_LABEL,
const wxString& label = wxPG_LABEL, const wxString& label = wxPG_LABEL,
@@ -954,10 +952,8 @@ protected:
virtual void ArraySwap( size_t first, size_t second ) = 0; virtual void ArraySwap( size_t first, size_t second ) = 0;
private: private:
#ifndef SWIG
DECLARE_DYNAMIC_CLASS_NO_COPY(wxArrayEditorDialog) DECLARE_DYNAMIC_CLASS_NO_COPY(wxArrayEditorDialog)
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
#endif
}; };
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -1004,10 +1000,8 @@ protected:
virtual void ArraySwap( size_t first, size_t second ); virtual void ArraySwap( size_t first, size_t second );
private: private:
#ifndef SWIG
DECLARE_DYNAMIC_CLASS_NO_COPY(wxPGArrayStringEditorDialog) DECLARE_DYNAMIC_CLASS_NO_COPY(wxPGArrayStringEditorDialog)
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
#endif
}; };
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

View File

@@ -152,6 +152,15 @@ public:
IMPLEMENT_DYNAMIC_CLASS(wxPGGlobalVarsClassManager, wxModule) 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; wxPGGlobalVarsClass* wxPGGlobalVars = NULL;