wxWidgets: wxItemAttr Class Reference

| Version: 3.1.5

Loading...
Searching...
No Matches
Public Member Functions | List of all members
wxItemAttr Class Reference
Class List by Category » Data Structures

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

## Detailed Description

Represents the attributes (colour, font, ...) of an item of a control with multiple items such as e.g.

wxListCtrl.

##

Library: wxCore

<>< =''>:</>&;&;< =''>\ </></>

See also
  wxListCtrl Overview

Since
  3.1.1 (previous versions had a similar wxListItemAttr class)

## Public Member Functions
| wxItemAttr ()
| Default Constructor.
| wxItemAttr (const wxColour &colText, const wxColour &colBack, const wxFont &font)
| Construct a wxItemAttr with the specified foreground and background colours and font.
bool | operator== (const wxItemAttr &other) const
| Compare two item attributes for equality.
bool | operator!= (const wxItemAttr &other) const
| Compare two item attributes for inequality.
const wxColour & | GetBackgroundColour () const
| Returns the currently set background colour.
const wxFont & | GetFont () const
| Returns the currently set font.
const wxColour & | GetTextColour () const
| Returns the currently set text colour.
bool | HasBackgroundColour () const
| Returns true if the currently set background colour is valid.
bool | HasColours () const
| Returns true if either text or background colour is set.
bool | HasFont () const
| Returns true if the currently set font is valid.
bool | HasTextColour () const
| Returns true if the currently set text colour is valid.
bool | IsDefault () const
| Returns true if this object has no custom attributes set.
void | SetBackgroundColour (const wxColour &colour)
| Sets a new background colour.
void | SetFont (const wxFont &font)
| Sets a new font.
void | SetTextColour (const wxColour &colour)
| Sets a new text colour.

## Constructor & Destructor Documentation

## ◆ wxItemAttr() [1/2]

wxItemAttr::wxItemAttr | ( |  | ) |

Default Constructor.

## ◆ wxItemAttr() [2/2]

wxItemAttr::wxItemAttr | ( | const wxColour & | colText,
|  | const wxColour & | colBack,
|  | const wxFont & | font )

Construct a wxItemAttr with the specified foreground and background colours and font.

## Member Function Documentation

## ◆ GetBackgroundColour()

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

Returns the currently set background colour.

## ◆ GetFont()

const wxFont & wxItemAttr::GetFont | ( |  | ) | const

Returns the currently set font.

## ◆ GetTextColour()

const wxColour & wxItemAttr::GetTextColour | ( |  | ) | const

Returns the currently set text colour.

## ◆ HasBackgroundColour()

bool wxItemAttr::HasBackgroundColour | ( |  | ) | const

Returns true if the currently set background colour is valid.

## ◆ HasColours()

bool wxItemAttr::HasColours | ( |  | ) | const

Returns true if either text or background colour is set.

See also
  HasBackgroundColour(), HasTextColour()

## ◆ HasFont()

bool wxItemAttr::HasFont | ( |  | ) | const

Returns true if the currently set font is valid.

## ◆ HasTextColour()

bool wxItemAttr::HasTextColour | ( |  | ) | const

Returns true if the currently set text colour is valid.

## ◆ IsDefault()

bool wxItemAttr::IsDefault | ( |  | ) | const

Returns true if this object has no custom attributes set.

## ◆ operator!=()

bool wxItemAttr::operator!= | ( | const wxItemAttr & | other | ) | const

Compare two item attributes for inequality.

## ◆ operator==()

bool wxItemAttr::operator== | ( | const wxItemAttr & | other | ) | const

Compare two item attributes for equality.

## ◆ SetBackgroundColour()

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

Sets a new background colour.

## ◆ SetFont()

void wxItemAttr::SetFont | ( | const wxFont & | font | ) |

Sets a new font.

## ◆ SetTextColour()

void wxItemAttr::SetTextColour | ( | const wxColour & | colour | ) |

Sets a new text colour.