if (hilight)
dc->SetTextForeground( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
else
- dc->SetTextForeground( info->GetColour() );
+ dc->SetTextForeground( * info->GetColour() );
dc->DrawText( s, info->GetX()+2, info->GetY() );
dc->DestroyClippingRegion();
node = node->Next();
if (hilight)
dc->SetTextForeground( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
else
- dc->SetTextForeground( item->GetColour() );
+ dc->SetTextForeground( * item->GetColour() );
dc->DrawText( s, m_bound_label.x, m_bound_label.y );
}
}
wxListMainWindow::~wxListMainWindow( void )
{
+ if (m_hilightBrush) delete m_hilightBrush;
+ delete m_renameTimer;
// if (m_hilightColour) delete m_hilightColour;
-// if (m_hilightBrush) delete m_hilightBrush;
// if (m_myFont) delete m_myFont;
- delete m_renameTimer;
// delete m_text;
}
void wxListMainWindow::ActivateLine( wxListLineData *line )
{
- if (!m_parent) return;
- wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, m_parent->GetId() );
- le.SetEventObject( m_parent );
+ if (!GetParent()) return;
+ wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetParent()->GetId() );
+ le.SetEventObject( GetParent() );
le.m_code = 0;
le.m_itemIndex = GetIndexOfLine( line );
le.m_col = 0;
void wxListMainWindow::SendNotify( wxListLineData *line, wxEventType command )
{
- if (!m_parent) return;
- wxListEvent le( command, m_parent->GetId() );
- le.SetEventObject( m_parent );
+ if (!GetParent()) return;
+ wxListEvent le( command, GetParent()->GetId() );
+ le.SetEventObject( GetParent() );
le.m_code = 0;
le.m_itemIndex = GetIndexOfLine( line );
le.m_col = 0;
void wxListMainWindow::RenameLine( wxListLineData *line, const wxString &newName )
{
- if (!m_parent) return;
+ if (!GetParent()) return;
- wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, m_parent->GetId() );
- le.SetEventObject( m_parent );
+ wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, GetParent()->GetId() );
+ le.SetEventObject( GetParent() );
le.m_code = 0;
le.m_itemIndex = GetIndexOfLine( line );
le.m_col = 0;
void wxListMainWindow::OnMouse( wxMouseEvent &event )
{
- if (m_parent->ProcessEvent( event)) return;
+ if (GetParent()->ProcessEvent( event)) return;
if (!m_current) return;
if (m_dirty) return;
if (event.Dragging() && (m_dragCount > 3))
{
m_dragCount = 0;
- wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_DRAG, m_parent->GetId() );
+ wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_DRAG, GetParent()->GetId() );
le.SetEventObject( this );
le.m_code = 0;
le.m_itemIndex = 0;
m_hasFocus = TRUE;
RefreshLine( m_current );
- if (!m_parent) return;
+ if (!GetParent()) return;
- wxFocusEvent event( wxEVT_SET_FOCUS, m_parent->GetId() );
- event.SetEventObject( m_parent );
- m_parent->ProcessEvent( event );
+ wxFocusEvent event( wxEVT_SET_FOCUS, GetParent()->GetId() );
+ event.SetEventObject( GetParent() );
+ GetParent()->ProcessEvent( event );
}
void wxListMainWindow::OnKillFocus( wxFocusEvent &WXUNUSED(event) )
bool wxListMainWindow::OnListNotify( wxListEvent &event )
{
- if (m_parent) m_parent->ProcessEvent( event );
+ if (GetParent()) GetParent()->ProcessEvent( event );
return FALSE;
}