NXWidgets: NXWidgets::CListBoxDataItem Class Reference

NXWidgets 1.19

Public Member Functions | Private Attributes | List of all members
NXWidgets::CListBoxDataItem Class Reference

`#include <clistboxdataitem.hxx>`

Inheritance diagram for NXWidgets::CListBoxDataItem:

## Public Member Functions
| CListBoxDataItem (const CNxString &text, const uint32_t value, const nxwidget_pixel_t normalTextColor, const nxwidget_pixel_t normalBackColor, const nxwidget_pixel_t selectedTextColor, const nxwidget_pixel_t selectedBackColor)
nxwidget_pixel_t | getNormalTextColor (void) const
nxwidget_pixel_t | getNormalBackColor (void) const
nxwidget_pixel_t | getSelectedTextColor (void) const
nxwidget_pixel_t | getSelectedBackColor (void) const
Public Member Functions inherited from NXWidgets::CListDataItem
| CListDataItem (const CNxString &text, const uint32_t value)
virtual | ~CListDataItem (void)
const CNxString & | getText (void) const
const uint32_t | getValue (void) const
const bool | isSelected (void) const
void | setSelected (bool selected)
virtual int | compareTo (const CListDataItem *item) const

## Private Attributes
nxwidget_pixel_t | m_normalTextColor
nxwidget_pixel_t | m_normalBackColor
nxwidget_pixel_t | m_selectedTextColor
nxwidget_pixel_t | m_selectedBackColor

## Additional Inherited Members
Protected Attributes inherited from NXWidgets::CListDataItem
CNxString | m_text
uint32_t | m_value
bool | m_isSelected

## Detailed Description

Class representing a data item within a ListBox.

Definition at line 104 of file clistboxdataitem.hxx.

## Constructor & Destructor Documentation

## ◆ CListBoxDataItem()

CListBoxDataItem::CListBoxDataItem | ( | const CNxString & | text,
|  | const uint32_t | value,
|  | const nxwidget_pixel_t | normalTextColor,
|  | const nxwidget_pixel_t | normalBackColor,
|  | const nxwidget_pixel_t | selectedTextColor,
|  | const nxwidget_pixel_t | selectedBackColor
| ) |  |

Constructor.

Parameters

  text | The text to display in the item.
  value | The value of the item.
  normalTextColor | Color to draw the text with when not selected.
  normalBackColor | Color to draw the background with when not selected.
  selectedTextColor | Color to draw the text with when selected.
  selectedBackColor | Color to draw the background with when selected.

Definition at line 103 of file clistboxdataitem.cxx.

## Member Function Documentation

## ◆ getNormalBackColor()

nxwidget_pixel_t NXWidgets::CListBoxDataItem::getNormalBackColor | ( | void |  | ) | const
| inline

Get the color used for the background when the item is unselected.

Returns
  The background color when the item is unselected.

Definition at line 148 of file clistboxdataitem.hxx.

## ◆ getNormalTextColor()

nxwidget_pixel_t NXWidgets::CListBoxDataItem::getNormalTextColor | ( | void |  | ) | const
| inline

Get the color used for text when the item is unselected.

Returns
  The text color when the item is unselected.

Definition at line 137 of file clistboxdataitem.hxx.

## ◆ getSelectedBackColor()

nxwidget_pixel_t NXWidgets::CListBoxDataItem::getSelectedBackColor | ( | void |  | ) | const
| inline

Get the color used for the background when the item is selected.

Returns
  The background color when the item is selected.

Definition at line 170 of file clistboxdataitem.hxx.

## ◆ getSelectedTextColor()

nxwidget_pixel_t NXWidgets::CListBoxDataItem::getSelectedTextColor | ( | void |  | ) | const
| inline

Get the color used for text when the item is selected.

Returns
  The text color when the item is selected.

Definition at line 159 of file clistboxdataitem.hxx.

## Member Data Documentation

## ◆ m_normalBackColor

nxwidget_pixel_t NXWidgets::CListBoxDataItem::m_normalBackColor
| private

Color used for background when not selected.

Definition at line 108 of file clistboxdataitem.hxx.

## ◆ m_normalTextColor

nxwidget_pixel_t NXWidgets::CListBoxDataItem::m_normalTextColor
| private

Color used for text when not selected.

Definition at line 107 of file clistboxdataitem.hxx.

## ◆ m_selectedBackColor

nxwidget_pixel_t NXWidgets::CListBoxDataItem::m_selectedBackColor
| private

Color used for background when selected.

Definition at line 110 of file clistboxdataitem.hxx.

## ◆ m_selectedTextColor

nxwidget_pixel_t NXWidgets::CListBoxDataItem::m_selectedTextColor
| private

Color used for text when selected.

Definition at line 109 of file clistboxdataitem.hxx.

The documentation for this class was generated from the following files:

- clistboxdataitem.hxx
- clistboxdataitem.cxx