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 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 bool IsShown() const { return m_visible; }
 | 
			
		||||
@@ -520,9 +518,6 @@ class wxShape: public wxShapeEvtHandler
 | 
			
		||||
  wxBrush GetBackgroundBrush();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 private:
 | 
			
		||||
  wxObject*             m_clientData;
 | 
			
		||||
 | 
			
		||||
 protected:
 | 
			
		||||
  wxShapeEvtHandler*    m_eventHandler;
 | 
			
		||||
  bool                  m_formatted;
 | 
			
		||||
 
 | 
			
		||||
@@ -288,7 +288,6 @@ wxShape::wxShape(wxShapeCanvas *can)
 | 
			
		||||
  m_textColour = wxBLACK;
 | 
			
		||||
  m_textColourName = "BLACK";
 | 
			
		||||
  m_visible = FALSE;
 | 
			
		||||
  m_clientData = NULL;
 | 
			
		||||
  m_selected = FALSE;
 | 
			
		||||
  m_attachmentMode = ATTACHMENT_MODE_NONE;
 | 
			
		||||
  m_spaceAttachments = TRUE;
 | 
			
		||||
@@ -338,11 +337,6 @@ wxShape::~wxShape()
 | 
			
		||||
  if (m_canvas)
 | 
			
		||||
    m_canvas->RemoveShape(this);
 | 
			
		||||
 | 
			
		||||
  if (m_clientData) {
 | 
			
		||||
      delete m_clientData;
 | 
			
		||||
      m_clientData = NULL;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  GetEventHandler()->OnDelete();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -240,25 +240,17 @@ public:
 | 
			
		||||
 | 
			
		||||
    // void SetClientData(wxObject *client_data);
 | 
			
		||||
    // wxObject *GetClientData();
 | 
			
		||||
    %addmethods {
 | 
			
		||||
        void SetClientData(PyObject* userData) {
 | 
			
		||||
            wxPyUserData* data = NULL;
 | 
			
		||||
            if (userData)
 | 
			
		||||
                data = new wxPyUserData(userData);
 | 
			
		||||
            self->SetClientData(data);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        PyObject* GetClientData() {
 | 
			
		||||
            wxPyUserData* data = (wxPyUserData*)self->GetClientData();
 | 
			
		||||
            if (data) {
 | 
			
		||||
                Py_INCREF(data->m_obj);
 | 
			
		||||
                return data->m_obj;
 | 
			
		||||
            } else {
 | 
			
		||||
                Py_INCREF(Py_None);
 | 
			
		||||
                return Py_None;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    // The real client data methods are being used for OOR, so just fake it.
 | 
			
		||||
    %pragma(python) addtoclass = "
 | 
			
		||||
    def SetClientData(self, data):
 | 
			
		||||
        self.clientData = data
 | 
			
		||||
    def GetClientData(self):
 | 
			
		||||
        if hasattr(self, 'clientData'):
 | 
			
		||||
            return self.clientData
 | 
			
		||||
        else:
 | 
			
		||||
            return None
 | 
			
		||||
"
 | 
			
		||||
 | 
			
		||||
    void Show(bool show);
 | 
			
		||||
    bool IsShown();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user