+// ----------------------------------------------------------------------------
+// client data
+// ----------------------------------------------------------------------------
+
+void wxWindowBase::DoSetClientObject( wxClientData *data )
+{
+ wxASSERT_MSG( m_clientDataType != ClientData_Void,
+ wxT("can't have both object and void client data") );
+
+ if ( m_clientObject )
+ delete m_clientObject;
+
+ m_clientObject = data;
+ m_clientDataType = ClientData_Object;
+}
+
+wxClientData *wxWindowBase::DoGetClientObject() const
+{
+ // it's not an error to call GetClientObject() on a window which doesn't
+ // have client data at all - NULL will be returned
+ wxASSERT_MSG( m_clientDataType != ClientData_Void,
+ wxT("this window doesn't have object client data") );
+
+ return m_clientObject;
+}
+
+void wxWindowBase::DoSetClientData( void *data )
+{
+ wxASSERT_MSG( m_clientDataType != ClientData_Object,
+ wxT("can't have both object and void client data") );
+
+ m_clientData = data;
+ m_clientDataType = ClientData_Void;
+}
+
+void *wxWindowBase::DoGetClientData() const
+{
+ // it's not an error to call GetClientData() on a window which doesn't have
+ // client data at all - NULL will be returned
+ wxASSERT_MSG( m_clientDataType != ClientData_Object,
+ wxT("this window doesn't have void client data") );
+
+ return m_clientData;
+}
+