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:
Vadim Zeitlin
2016-04-16 17:44:19 +02:00
parent c592363e95
commit 246ae58c19
24 changed files with 232 additions and 221 deletions

View File

@@ -85,8 +85,8 @@ public:
void GetItem( wxListItem &info ) const;
void SetAttr(wxListItemAttr *attr) { m_attr = attr; }
wxListItemAttr *GetAttr() const { return m_attr; }
void SetAttr(wxItemAttr *attr) { m_attr = attr; }
wxItemAttr *GetAttr() const { return m_attr; }
public:
// the item image or -1
@@ -103,7 +103,7 @@ public:
wxListMainWindow *m_owner;
// custom attributes or NULL
wxListItemAttr *m_attr;
wxItemAttr *m_attr;
protected:
// common part of all ctors
@@ -263,8 +263,8 @@ public:
wxString GetText(int index) const;
void SetText( int index, const wxString& s );
wxListItemAttr *GetAttr() const;
void SetAttr(wxListItemAttr *attr);
wxItemAttr *GetAttr() const;
void SetAttr(wxItemAttr *attr);
// return true if the highlighting really changed
bool Highlight( bool on );