Tried to prevent scrollbars from scrolling as

per MSW, didn't work.
  Added DeleteAllItems event and test to listctrl.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2000-02-06 13:51:01 +00:00
parent 9b1801c19c
commit 12c1b46a2f
7 changed files with 43 additions and 183 deletions

View File

@@ -1171,6 +1171,8 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent, wxWindowID id,
wxListMainWindow::~wxListMainWindow()
{
DeleteEverything();
if (m_hilightBrush) delete m_hilightBrush;
delete m_renameTimer;
@@ -2392,7 +2394,7 @@ void wxListMainWindow::DeleteColumn( int col )
if (node) m_columns.DeleteNode( node );
}
void wxListMainWindow::DeleteAllItems( void )
void wxListMainWindow::DeleteAllItems()
{
m_dirty = TRUE;
m_current = (wxListLineData *) NULL;
@@ -2400,34 +2402,18 @@ void wxListMainWindow::DeleteAllItems( void )
// to make the deletion of all items faster, we don't send the
// notifications in this case: this is compatible with wxMSW and
// documented in DeleteAllItems() description
#if 0
wxNode *node = m_lines.First();
while (node)
{
wxListLineData *line = (wxListLineData*)node->Data();
DeleteLine( line );
node = node->Next();
}
#endif // 0
wxListEvent event( wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, GetParent()->GetId() );
event.SetEventObject( GetParent() );
GetParent()->GetEventHandler()->ProcessEvent( event );
m_lines.Clear();
}
void wxListMainWindow::DeleteEverything( void )
void wxListMainWindow::DeleteEverything()
{
m_dirty = TRUE;
m_current = (wxListLineData *) NULL;
wxNode *node = m_lines.First();
while (node)
{
wxListLineData *line = (wxListLineData*)node->Data();
DeleteLine( line );
node = node->Next();
}
m_lines.Clear();
m_current = (wxListLineData *) NULL;
DeleteAllItems();
m_columns.Clear();
}