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.
#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

View 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()

View 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

View 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
// -----------------------------------------------------------------------

View 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
};
// -----------------------------------------------------------------------

View 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;