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

Mixin interface for client objects that can be enabled or disabled. More...

#include "HNWithEnabled.h"

Inheritance diagram for HNWithEnabled:
Inheritance graph
[legend]

Public Member Functions

bool enabled () const noexcept
 Returns whether the object is currently enabled.
 
void setEnabled (bool enabled) noexcept
 Updates the enabled state and notifies the bar.
 
virtual ~HNWithEnabled () noexcept=default
 Virtual destructor (makes the mixin polymorphic for safe cross-casts).
 

Detailed Description

Mixin interface for client objects that can be enabled or disabled.

Member Function Documentation

◆ enabled()

bool enabled ( ) const
inlinenoexcept

Returns whether the object is currently enabled.

Returns
true if enabled, false otherwise.

◆ setEnabled()

void setEnabled ( bool  enabled)
noexcept

Updates the enabled state and notifies the bar.

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

Parameters
enabledNew enabled state.

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