summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8e5ec9c)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24640
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
protected:
virtual wxSize DoGetBestSize() const ;
protected:
virtual wxSize DoGetBestSize() const ;
+
+public: // for wxComboBox only
virtual void DoSetItemClientData( int n, void* clientData );
virtual void* DoGetItemClientData( int n ) const;
virtual void DoSetItemClientObject( int n, wxClientData* clientData );
virtual wxClientData* DoGetItemClientObject( int n ) const;
virtual void DoSetItemClientData( int n, void* clientData );
virtual void* DoGetItemClientData( int n ) const;
virtual void DoSetItemClientObject( int n, wxClientData* clientData );
virtual wxClientData* DoGetItemClientObject( int n ) const;
// free all memory we have (used by Clear() and dtor)
// prevent collision with some BSD definitions of macro Free()
void FreeData();
// free all memory we have (used by Clear() and dtor)
// prevent collision with some BSD definitions of macro Free()
void FreeData();
virtual void DoSetItemClientObject(int n, wxClientData* clientData) ;
virtual wxClientData* DoGetItemClientObject(int n) const ;
virtual void DoSetItemClientObject(int n, wxClientData* clientData) ;
virtual wxClientData* DoGetItemClientObject(int n) const ;
// the subcontrols
wxTextCtrl* m_text;
wxChoice* m_choice;
// the subcontrols
wxTextCtrl* m_text;
wxChoice* m_choice;
void wxComboBox::DoSetItemClientData(int n, void* clientData)
{
void wxComboBox::DoSetItemClientData(int n, void* clientData)
{
- return m_choice->SetClientData( n , clientData ) ;
+ return m_choice->DoSetItemClientData( n , clientData ) ;
}
void* wxComboBox::DoGetItemClientData(int n) const
{
}
void* wxComboBox::DoGetItemClientData(int n) const
{
- return m_choice->GetClientData( n ) ;
+ return m_choice->DoGetItemClientData( n ) ;
}
void wxComboBox::DoSetItemClientObject(int n, wxClientData* clientData)
{
}
void wxComboBox::DoSetItemClientObject(int n, wxClientData* clientData)
{
- return m_choice->SetClientObject( n , clientData ) ;
+ return m_choice->DoSetItemClientObject( n , clientData ) ;
}
wxClientData* wxComboBox::DoGetItemClientObject(int n) const
{
}
wxClientData* wxComboBox::DoGetItemClientObject(int n) const
{
- return m_choice->GetClientObject( n ) ;
+ return m_choice->DoGetItemClientObject( n ) ;
+}
+
+void wxComboBox::FreeData()
+{
+ if ( HasClientObjectData() )
+ {
+ size_t count = GetCount();
+ for ( size_t n = 0; n < count; n++ )
+ {
+ SetClientObject( n, NULL );
+ }
+ }
}
void wxComboBox::Delete(int n)
{
}
void wxComboBox::Delete(int n)
{
+ // force client object deletion
+ if( HasClientObjectData() )
+ SetClientObject( n, NULL );
m_choice->Delete( n );
}
void wxComboBox::Clear()
{
m_choice->Delete( n );
}
void wxComboBox::Clear()
{
void wxComboBox::DoSetItemClientData(int n, void* clientData)
{
void wxComboBox::DoSetItemClientData(int n, void* clientData)
{
- return m_choice->SetClientData( n , clientData ) ;
+ return m_choice->DoSetItemClientData( n , clientData ) ;
}
void* wxComboBox::DoGetItemClientData(int n) const
{
}
void* wxComboBox::DoGetItemClientData(int n) const
{
- return m_choice->GetClientData( n ) ;
+ return m_choice->DoGetItemClientData( n ) ;
}
void wxComboBox::DoSetItemClientObject(int n, wxClientData* clientData)
{
}
void wxComboBox::DoSetItemClientObject(int n, wxClientData* clientData)
{
- return m_choice->SetClientObject( n , clientData ) ;
+ return m_choice->DoSetItemClientObject( n , clientData ) ;
}
wxClientData* wxComboBox::DoGetItemClientObject(int n) const
{
}
wxClientData* wxComboBox::DoGetItemClientObject(int n) const
{
- return m_choice->GetClientObject( n ) ;
+ return m_choice->DoGetItemClientObject( n ) ;
+}
+
+void wxComboBox::FreeData()
+{
+ if ( HasClientObjectData() )
+ {
+ size_t count = GetCount();
+ for ( size_t n = 0; n < count; n++ )
+ {
+ SetClientObject( n, NULL );
+ }
+ }
}
void wxComboBox::Delete(int n)
{
}
void wxComboBox::Delete(int n)
{
+ // force client object deletion
+ if( HasClientObjectData() )
+ SetClientObject( n, NULL );
m_choice->Delete( n );
}
void wxComboBox::Clear()
{
m_choice->Delete( n );
}
void wxComboBox::Clear()
{