Removed m_clientData and related methods as it's now handled by the
wxClientDataContainer mixin. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -299,8 +299,6 @@ class wxShape: public wxShapeEvtHandler
|
|||||||
|
|
||||||
void SetPen(wxPen *pen);
|
void SetPen(wxPen *pen);
|
||||||
void SetBrush(wxBrush *brush);
|
void SetBrush(wxBrush *brush);
|
||||||
inline void SetClientData(wxObject *client_data) { m_clientData = client_data; };
|
|
||||||
inline wxObject *GetClientData() const { return m_clientData; };
|
|
||||||
|
|
||||||
virtual void Show(bool show);
|
virtual void Show(bool show);
|
||||||
virtual bool IsShown() const { return m_visible; }
|
virtual bool IsShown() const { return m_visible; }
|
||||||
@@ -520,9 +518,6 @@ class wxShape: public wxShapeEvtHandler
|
|||||||
wxBrush GetBackgroundBrush();
|
wxBrush GetBackgroundBrush();
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
wxObject* m_clientData;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxShapeEvtHandler* m_eventHandler;
|
wxShapeEvtHandler* m_eventHandler;
|
||||||
bool m_formatted;
|
bool m_formatted;
|
||||||
|
@@ -288,7 +288,6 @@ wxShape::wxShape(wxShapeCanvas *can)
|
|||||||
m_textColour = wxBLACK;
|
m_textColour = wxBLACK;
|
||||||
m_textColourName = "BLACK";
|
m_textColourName = "BLACK";
|
||||||
m_visible = FALSE;
|
m_visible = FALSE;
|
||||||
m_clientData = NULL;
|
|
||||||
m_selected = FALSE;
|
m_selected = FALSE;
|
||||||
m_attachmentMode = ATTACHMENT_MODE_NONE;
|
m_attachmentMode = ATTACHMENT_MODE_NONE;
|
||||||
m_spaceAttachments = TRUE;
|
m_spaceAttachments = TRUE;
|
||||||
@@ -338,11 +337,6 @@ wxShape::~wxShape()
|
|||||||
if (m_canvas)
|
if (m_canvas)
|
||||||
m_canvas->RemoveShape(this);
|
m_canvas->RemoveShape(this);
|
||||||
|
|
||||||
if (m_clientData) {
|
|
||||||
delete m_clientData;
|
|
||||||
m_clientData = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
GetEventHandler()->OnDelete();
|
GetEventHandler()->OnDelete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -240,25 +240,17 @@ public:
|
|||||||
|
|
||||||
// void SetClientData(wxObject *client_data);
|
// void SetClientData(wxObject *client_data);
|
||||||
// wxObject *GetClientData();
|
// wxObject *GetClientData();
|
||||||
%addmethods {
|
|
||||||
void SetClientData(PyObject* userData) {
|
|
||||||
wxPyUserData* data = NULL;
|
|
||||||
if (userData)
|
|
||||||
data = new wxPyUserData(userData);
|
|
||||||
self->SetClientData(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
PyObject* GetClientData() {
|
// The real client data methods are being used for OOR, so just fake it.
|
||||||
wxPyUserData* data = (wxPyUserData*)self->GetClientData();
|
%pragma(python) addtoclass = "
|
||||||
if (data) {
|
def SetClientData(self, data):
|
||||||
Py_INCREF(data->m_obj);
|
self.clientData = data
|
||||||
return data->m_obj;
|
def GetClientData(self):
|
||||||
} else {
|
if hasattr(self, 'clientData'):
|
||||||
Py_INCREF(Py_None);
|
return self.clientData
|
||||||
return Py_None;
|
else:
|
||||||
}
|
return None
|
||||||
}
|
"
|
||||||
}
|
|
||||||
|
|
||||||
void Show(bool show);
|
void Show(bool show);
|
||||||
bool IsShown();
|
bool IsShown();
|
||||||
|
Reference in New Issue
Block a user