lecui 1.0.0-alpha.20
lecui C++ user interface library
Public Member Functions | Protected Attributes | List of all members
liblec::lecui::widgets::badge_widget Class Referenceabstract

Base class for all widgets with badges. More...

#include <widget.h>

Inheritance diagram for liblec::lecui::widgets::badge_widget:
liblec::lecui::containers::pane_specs liblec::lecui::containers::tab liblec::lecui::widgets::button liblec::lecui::widgets::custom liblec::lecui::widgets::icon liblec::lecui::widgets::image_view liblec::lecui::widgets::rectangle liblec::lecui::containers::pane

Public Member Functions

bool operator== (const badge_widget &param)
 Check whether two badges are equal. Only those badge properties that require the badge's resources to be re-created are considered. More...
 
bool operator!= (const badge_widget &param)
 Check whether two badges are NOT equal. Only those badge properties that require the badge's resources to be re-created are considered. More...
 
virtual badge_specsbadge ()=0
 Get or set the widget's badge. More...
 

Protected Attributes

badge_specs _badge
 The badge's specs.
 

Detailed Description

Base class for all widgets with badges.

Widgets that use badges inherit from both this class and the widget class.

Member Function Documentation

◆ badge()

virtual badge_specs & liblec::lecui::widgets::badge_widget::badge ( )
pure virtual

Get or set the widget's badge.

Returns
A reference to the badge specs.

The badge is useful in indicating when something requires user attention, e.g., for showing how many unread messages the user has or for indicating when an update is available.

Implemented in liblec::lecui::containers::pane_specs, liblec::lecui::containers::tab, liblec::lecui::widgets::button, liblec::lecui::widgets::custom, liblec::lecui::widgets::icon, liblec::lecui::widgets::image_view, and liblec::lecui::widgets::rectangle.

◆ operator!=()

bool liblec::lecui::widgets::badge_widget::operator!= ( const badge_widget param)

Check whether two badges are NOT equal. Only those badge properties that require the badge's resources to be re-created are considered.

Parameters
paramThe badge to compare to.
Returns
Returns true if the badges are NOT equal, else false.

◆ operator==()

bool liblec::lecui::widgets::badge_widget::operator== ( const badge_widget param)

Check whether two badges are equal. Only those badge properties that require the badge's resources to be re-created are considered.

Parameters
paramThe badge to compare to.
Returns
Returns true if the badges are equal, else false.

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