Replace wxTreeItemAttr and wxListItemAttr with wxItemAttr
The two existing structs were completely identical, just replace them with a single wxItemAttr. Notice that wxDataViewItemAttr is not quite the same, although pretty similar, so it remains separate for now. It would be nice to combine it with this one too in the future, e.g. to make it simpler to make items bold in a wxListCtrl.
This commit is contained in:
@@ -168,7 +168,7 @@ void wxListItemData::SetItem( const wxListItem &info )
|
||||
if ( m_attr )
|
||||
m_attr->AssignFrom(*info.GetAttributes());
|
||||
else
|
||||
m_attr = new wxListItemAttr(*info.GetAttributes());
|
||||
m_attr = new wxItemAttr(*info.GetAttributes());
|
||||
}
|
||||
|
||||
if ( m_rect )
|
||||
@@ -654,7 +654,7 @@ int wxListLineData::GetImage( int index ) const
|
||||
return item->GetImage();
|
||||
}
|
||||
|
||||
wxListItemAttr *wxListLineData::GetAttr() const
|
||||
wxItemAttr *wxListLineData::GetAttr() const
|
||||
{
|
||||
wxListItemDataList::compatibility_iterator node = m_items.GetFirst();
|
||||
wxCHECK_MSG( node, NULL, wxT("invalid column index in GetAttr()") );
|
||||
@@ -663,7 +663,7 @@ wxListItemAttr *wxListLineData::GetAttr() const
|
||||
return item->GetAttr();
|
||||
}
|
||||
|
||||
void wxListLineData::SetAttr(wxListItemAttr *attr)
|
||||
void wxListLineData::SetAttr(wxItemAttr *attr)
|
||||
{
|
||||
wxListItemDataList::compatibility_iterator node = m_items.GetFirst();
|
||||
wxCHECK_RET( node, wxT("invalid column index in SetAttr()") );
|
||||
@@ -677,7 +677,7 @@ void wxListLineData::ApplyAttributes(wxDC *dc,
|
||||
bool highlighted,
|
||||
bool current)
|
||||
{
|
||||
const wxListItemAttr * const attr = GetAttr();
|
||||
const wxItemAttr * const attr = GetAttr();
|
||||
|
||||
wxWindow * const listctrl = m_owner->GetParent();
|
||||
|
||||
|
Reference in New Issue
Block a user