#include <wx/dataview.h>
This class is used to indicate to a wxDataViewCtrl that a certain item (see wxDataViewItem) has extra font attributes for its renderer.
For this, it is required to override wxDataViewModel::GetAttr.
Attributes are currently only supported by wxDataViewTextRendererText.
Public Member Functions | |
wxDataViewItemAttr () | |
Constructor. More... | |
void | SetBold (bool set) |
Call this to indicate that the item shall be displayed in bold text. More... | |
void | SetColour (const wxColour &colour) |
Call this to indicate that the item shall be displayed with that colour. More... | |
void | SetBackgroundColour (const wxColour &colour) |
Call this to set the background colour to use. More... | |
void | SetItalic (bool set) |
Call this to indicate that the item shall be displayed in italic text. More... | |
void | SetStrikethrough (bool set) |
Call this to indicate that the item shall be displayed in strikethrough text. More... | |
bool | HasColour () const |
Returns true if the colour property has been set. More... | |
const wxColour & | GetColour () const |
Returns this attribute's colour. More... | |
bool | HasFont () const |
Returns true if any property affecting the font has been set. More... | |
bool | GetBold () const |
Returns value of the bold property. More... | |
bool | GetItalic () const |
Returns value of the italics property. More... | |
bool | HasBackgroundColour () const |
Returns true if the background colour property has been set. More... | |
const wxColour & | GetBackgroundColour () const |
Returns the colour to be used for the background. More... | |
bool | IsDefault () const |
Returns true if none of the properties have been set. More... | |
wxFont | GetEffectiveFont (const wxFont &font) const |
Return the font based on the given one with this attribute applied to it. More... | |
wxDataViewItemAttr::wxDataViewItemAttr | ( | ) |
Constructor.
const wxColour& wxDataViewItemAttr::GetBackgroundColour | ( | ) | const |
Returns the colour to be used for the background.
bool wxDataViewItemAttr::GetBold | ( | ) | const |
Returns value of the bold property.
const wxColour& wxDataViewItemAttr::GetColour | ( | ) | const |
Returns this attribute's colour.
Return the font based on the given one with this attribute applied to it.
bool wxDataViewItemAttr::GetItalic | ( | ) | const |
Returns value of the italics property.
bool wxDataViewItemAttr::HasBackgroundColour | ( | ) | const |
Returns true if the background colour property has been set.
bool wxDataViewItemAttr::HasColour | ( | ) | const |
Returns true if the colour property has been set.
bool wxDataViewItemAttr::HasFont | ( | ) | const |
Returns true if any property affecting the font has been set.
bool wxDataViewItemAttr::IsDefault | ( | ) | const |
Returns true if none of the properties have been set.
void wxDataViewItemAttr::SetBackgroundColour | ( | const wxColour & | colour | ) |
Call this to set the background colour to use.
void wxDataViewItemAttr::SetBold | ( | bool | set | ) |
Call this to indicate that the item shall be displayed in bold text.
void wxDataViewItemAttr::SetColour | ( | const wxColour & | colour | ) |
Call this to indicate that the item shall be displayed with that colour.
void wxDataViewItemAttr::SetItalic | ( | bool | set | ) |
Call this to indicate that the item shall be displayed in italic text.
void wxDataViewItemAttr::SetStrikethrough | ( | bool | set | ) |
Call this to indicate that the item shall be displayed in strikethrough text.
Currently this attribute is only supported in the generic version of wxDataViewCtrl and GTK and ignored by the native macOS implementations.