Heaven v0.1.0-1
C++ global-menu library for Wayland sessions
Loading...
Searching...
No Matches
Public Member Functions
HNWithIcon Class Reference

Mixin interface for client objects that expose an icon name. More...

#include "HNWithIcon.h"

Inheritance diagram for HNWithIcon:
Inheritance graph
[legend]

Public Member Functions

const std::string & icon () const noexcept
 Returns the current icon name.
 
void setIcon (const std::string &icon) noexcept
 Updates the icon name and notifies the bar.
 
virtual ~HNWithIcon () noexcept=default
 Virtual destructor (makes the mixin polymorphic for safe cross-casts).
 

Detailed Description

Mixin interface for client objects that expose an icon name.

Member Function Documentation

◆ icon()

const std::string & icon ( ) const
inlinenoexcept

Returns the current icon name.

Returns
Const reference to the icon name string (may be empty).

◆ setIcon()

void setIcon ( const std::string &  icon)
noexcept

Updates the icon name and notifies the bar.

If the new icon equals the current one, nothing is sent. Otherwise the change is queued and delivered to the bar on the next commit().

Parameters
iconNew icon name.

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