DUDS
Distributed Update of Data from Something
duds::ui::menu::renderers::BppIconItem Class Reference

Generalized item thingy that holds a bit-per-pixel image as an icon. More...

#include <BppIconItem.hpp>

Inheritance diagram for duds::ui::menu::renderers::BppIconItem:

Public Member Functions

 BppIconItem ()=default
 Constructs the item without an icon. More...
 
 BppIconItem (const duds::ui::graphics::ConstBppImageSptr &icon)
 Constructs the item with the given icon. More...
 
 BppIconItem (duds::ui::graphics::ConstBppImageSptr &&icon)
 Constructs the item with the given icon. More...
 
const duds::ui::graphics::ConstBppImageSptricon () const
 Returns the item's icon. More...
 
void icon (const duds::ui::graphics::ConstBppImageSptr &newimg)
 Sets the item's icon to the given image. More...
 
void icon (duds::ui::graphics::ConstBppImageSptr &&newimg)
 Sets the item's icon to the given image. More...
 

Private Attributes

duds::ui::graphics::ConstBppImageSptr img
 The contained icon image. More...
 

Detailed Description

Generalized item thingy that holds a bit-per-pixel image as an icon.

Intended to be used as one of at least two base classes: one class that defines some kind of item, and this one to add an icon.

Author
Jeff Jackowski

Definition at line 21 of file BppIconItem.hpp.

Constructor & Destructor Documentation

◆ BppIconItem() [1/3]

duds::ui::menu::renderers::BppIconItem::BppIconItem ( )
default

Constructs the item without an icon.

◆ BppIconItem() [2/3]

duds::ui::menu::renderers::BppIconItem::BppIconItem ( const duds::ui::graphics::ConstBppImageSptr icon)
inline

Constructs the item with the given icon.

Parameters
iconThe image for the item's icon.

Definition at line 35 of file BppIconItem.hpp.

◆ BppIconItem() [3/3]

duds::ui::menu::renderers::BppIconItem::BppIconItem ( duds::ui::graphics::ConstBppImageSptr &&  icon)
inline

Constructs the item with the given icon.

Parameters
iconThe image for the item's icon. The shared pointer is moved into this object.

Definition at line 41 of file BppIconItem.hpp.

Member Function Documentation

◆ icon() [1/3]

const duds::ui::graphics::ConstBppImageSptr& duds::ui::menu::renderers::BppIconItem::icon ( ) const
inline

◆ icon() [2/3]

void duds::ui::menu::renderers::BppIconItem::icon ( const duds::ui::graphics::ConstBppImageSptr newimg)
inline

Sets the item's icon to the given image.

Parameters
newimgThe new image for the item's icon.

Definition at line 53 of file BppIconItem.hpp.

◆ icon() [3/3]

void duds::ui::menu::renderers::BppIconItem::icon ( duds::ui::graphics::ConstBppImageSptr &&  newimg)
inline

Sets the item's icon to the given image.

Parameters
newimgThe new image for the item's icon. The shared pointer is moved into this object.

Definition at line 61 of file BppIconItem.hpp.

Member Data Documentation

◆ img

duds::ui::graphics::ConstBppImageSptr duds::ui::menu::renderers::BppIconItem::img
private

The contained icon image.

Definition at line 25 of file BppIconItem.hpp.

Referenced by icon().


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