2.9.0. Please use UseAppInfo(AppInfo_AppName | AppInfo_VendorName) explicitly
to use the vendor name in the paths returned by wxStandardPaths.
+- wxDataViewModel::GetAttr() is now const, as it should have been from the very
+ beginning. You will need to change it to be const in your derived model
+ class too if you override it.
+
All:
}
// Get text attribute, return false of default attributes should be used
- virtual bool GetAttr( const wxDataViewItem &WXUNUSED(item), unsigned int WXUNUSED(col), wxDataViewItemAttr &WXUNUSED(attr) )
- { return false; }
+ virtual bool GetAttr(const wxDataViewItem &WXUNUSED(item),
+ unsigned int WXUNUSED(col),
+ wxDataViewItemAttr &WXUNUSED(attr)) const
+ {
+ return false;
+ }
// define hierachy
virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const = 0;
virtual bool
GetAttrByRow(unsigned WXUNUSED(row), unsigned WXUNUSED(col),
- wxDataViewItemAttr &WXUNUSED(attr))
+ wxDataViewItemAttr &WXUNUSED(attr)) const
{
return false;
}
}
virtual bool GetAttr(const wxDataViewItem &item, unsigned int col,
- wxDataViewItemAttr &attr)
+ wxDataViewItemAttr &attr) const
{
return GetAttrByRow( GetRow(item), col, attr );
}
Override this to indicate that the item has special font attributes.
This only affects the wxDataViewTextRendererText renderer.
+ The base class version always simply returns @false.
+
@see wxDataViewItemAttr.
+
+ @param item
+ The item for which the attribute is requested.
+ @param col
+ The column of the item for which the attribute is requested.
+ @param attr
+ The attribute to be filled in if the function returns @true.
+ @return
+ @true if this item has an attribute or @false otherwise.
*/
virtual bool GetAttr(const wxDataViewItem& item, unsigned int col,
- wxDataViewItemAttr& attr);
+ wxDataViewItemAttr& attr) const;
/**
Override this so the control can query the child items of an item.
Override this to indicate that the row has special font attributes.
This only affects the wxDataViewTextRendererText() renderer.
+ The base class version always simply returns @false.
+
@see wxDataViewItemAttr.
+
+ @param row
+ The row for which the attribute is requested.
+ @param col
+ The column for which the attribute is requested.
+ @param attr
+ The attribute to be filled in if the function returns @true.
+ @return
+ @true if this item has an attribute or @false otherwise.
*/
virtual bool GetAttrByRow(unsigned int row, unsigned int col,
- wxDataViewItemAttr& attr);
+ wxDataViewItemAttr& attr) const;
/**
Returns the wxDataViewItem at the given @e row.
}
bool MyListModel::GetAttrByRow( unsigned int row, unsigned int col,
- wxDataViewItemAttr &attr )
+ wxDataViewItemAttr &attr ) const
{
switch ( col )
{
virtual void GetValueByRow( wxVariant &variant,
unsigned int row, unsigned int col ) const;
- virtual bool GetAttrByRow( unsigned int row, unsigned int col, wxDataViewItemAttr &attr );
+ virtual bool GetAttrByRow( unsigned int row, unsigned int col,
+ wxDataViewItemAttr &attr ) const;
virtual bool SetValueByRow( const wxVariant &variant,
unsigned int row, unsigned int col );