wxWidgets: wxDataViewItemAttr Class Reference

| Version: 3.1.7

Loading...
Searching...
No Matches
Public Member Functions | List of all members
wxDataViewItemAttr Class Reference
Class List by Category » wxDataViewCtrl Related Classes

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.1/wxWidgets3.1-3.1.7-1.x86_64/src/wxWidgets-3.1.7/interface/wx/dataview.h>`

## Detailed Description

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.

##

Library: wxCore
Category: wxDataViewCtrl Related Classes

## Public Member Functions
| wxDataViewItemAttr ()
| Constructor.
void | SetBold (bool set)
| Call this to indicate that the item shall be displayed in bold text.
void | SetColour (const wxColour &colour)
| Call this to indicate that the item shall be displayed with that colour.
void | SetBackgroundColour (const wxColour &colour)
| Call this to set the background colour to use.
void | SetItalic (bool set)
| Call this to indicate that the item shall be displayed in italic text.
void | SetStrikethrough (bool set)
| Call this to indicate that the item shall be displayed in strikethrough text.
bool | HasColour () const
| Returns true if the colour property has been set.
const wxColour & | GetColour () const
| Returns this attribute's colour.
bool | HasFont () const
| Returns true if any property affecting the font has been set.
bool | GetBold () const
| Returns value of the bold property.
bool | GetItalic () const
| Returns value of the italics property.
bool | HasBackgroundColour () const
| Returns true if the background colour property has been set.
const wxColour & | GetBackgroundColour () const
| Returns the colour to be used for the background.
bool | IsDefault () const
| Returns true if none of the properties have been set.
wxFont | GetEffectiveFont (const wxFont &font) const
| Return the font based on the given one with this attribute applied to it.

## Constructor & Destructor Documentation

## ◆ wxDataViewItemAttr()

wxDataViewItemAttr::wxDataViewItemAttr | ( |  | ) |

Constructor.

## Member Function Documentation

## ◆ GetBackgroundColour()

const wxColour & wxDataViewItemAttr::GetBackgroundColour | ( |  | ) | const

Returns the colour to be used for the background.

## ◆ GetBold()

bool wxDataViewItemAttr::GetBold | ( |  | ) | const

Returns value of the bold property.

## ◆ GetColour()

const wxColour & wxDataViewItemAttr::GetColour | ( |  | ) | const

Returns this attribute's colour.

## ◆ GetEffectiveFont()

wxFont wxDataViewItemAttr::GetEffectiveFont | ( | const wxFont & | font | ) | const

Return the font based on the given one with this attribute applied to it.

## ◆ GetItalic()

bool wxDataViewItemAttr::GetItalic | ( |  | ) | const

Returns value of the italics property.

## ◆ HasBackgroundColour()

bool wxDataViewItemAttr::HasBackgroundColour | ( |  | ) | const

Returns true if the background colour property has been set.

## ◆ HasColour()

bool wxDataViewItemAttr::HasColour | ( |  | ) | const

Returns true if the colour property has been set.

## ◆ HasFont()

bool wxDataViewItemAttr::HasFont | ( |  | ) | const

Returns true if any property affecting the font has been set.

## ◆ IsDefault()

bool wxDataViewItemAttr::IsDefault | ( |  | ) | const

Returns true if none of the properties have been set.

## ◆ SetBackgroundColour()

void wxDataViewItemAttr::SetBackgroundColour | ( | const wxColour & | colour | ) |

Call this to set the background colour to use.

Since
  2.9.4 - Generic
  3.1.1 - wxGTK
  3.1.4 - wxOSX

## ◆ SetBold()

void wxDataViewItemAttr::SetBold | ( | bool | set | ) |

Call this to indicate that the item shall be displayed in bold text.

## ◆ SetColour()

void wxDataViewItemAttr::SetColour | ( | const wxColour & | colour | ) |

Call this to indicate that the item shall be displayed with that colour.

## ◆ SetItalic()

void wxDataViewItemAttr::SetItalic | ( | bool | set | ) |

Call this to indicate that the item shall be displayed in italic text.

## ◆ SetStrikethrough()

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.

Since
  3.1.2