wxListItemData *item = (wxListItemData*)node->Data();
wxString s;
item->GetText( s );
- if (s.IsEmpty()) s = _T("H");
+ if (s.IsEmpty()) s = wxT("H");
long lw,lh;
dc->GetTextExtent( s, &lw, &lh );
m_bound_label.width = lw;
void wxListMainWindow::EditLabel( long item )
{
wxNode *node = m_lines.Nth( item );
- wxCHECK_RET( node, _T("wrong index in wxListCtrl::Edit()") );
+ wxCHECK_RET( node, wxT("wrong index in wxListCtrl::Edit()") );
m_currentEdit = (wxListLineData*) node->Data();
void wxListMainWindow::OnRenameTimer()
{
- wxCHECK_RET( m_current, _T("invalid m_current") );
+ wxCHECK_RET( m_current, wxT("invalid m_current") );
Edit( m_lines.IndexOf( m_current ) );
}
{
int y_s = m_yScroll*GetScrollPos( wxVERTICAL );
if ((y > y_s) && (y+h < y_s+h_p)) return;
- if (y-y_s < 5) { Scroll( -1, (y-5-h_p/2)/m_yScroll ); Refresh(); }
- if (y+h+5 > y_s+h_p) { Scroll( -1, (y+h-h_p/2+h+15)/m_yScroll); Refresh(); }
+ if (y-y_s < 5) { Scroll( -1, (y-5-h_p/2)/m_yScroll ); }
+ if (y+h+5 > y_s+h_p) { Scroll( -1, (y+h-h_p/2+h+15)/m_yScroll); }
}
else
{
int x_s = m_xScroll*GetScrollPos( wxHORIZONTAL );
if ((x > x_s) && (x+w < x_s+w_p)) return;
- if (x-x_s < 5) { Scroll( (x-5)/m_xScroll, -1 ); Refresh(); }
- if (x+w-5 > x_s+w_p) { Scroll( (x+w-w_p+15)/m_xScroll, -1 ); Refresh(); }
+ if (x-x_s < 5) { Scroll( (x-5)/m_xScroll, -1 ); }
+ if (x+w-5 > x_s+w_p) { Scroll( (x+w-w_p+15)/m_xScroll, -1 ); }
}
}
void wxListMainWindow::DeleteColumn( int col )
{
wxCHECK_RET( col < (int)m_columns.GetCount(),
- _T("attempting to delete inexistent column in wxListView") );
+ wxT("attempting to delete inexistent column in wxListView") );
m_dirty = TRUE;
wxNode *node = m_columns.Nth( col );
long wxListCtrl::InsertItem( wxListItem& info )
{
m_mainWin->InsertItem( info );
- return 0;
+ return info.m_itemId;
}
long wxListCtrl::InsertItem( long index, const wxString &label )