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

Mixin interface for client objects that expose a keyboard shortcut. More...

#include "HNWithShortcut.h"

Inheritance diagram for HNWithShortcut:
Inheritance graph
[legend]

Public Member Functions

const std::string & shortcut () const noexcept
 Returns the current keyboard shortcut.
 
void setShortcut (const std::string &shortcut) noexcept
 Updates the shortcut and notifies the bar.
 
virtual ~HNWithShortcut () noexcept=default
 Virtual destructor (makes the mixin polymorphic for safe cross-casts).
 

Detailed Description

Mixin interface for client objects that expose a keyboard shortcut.

Member Function Documentation

◆ setShortcut()

void setShortcut ( const std::string &  shortcut)
noexcept

Updates the shortcut and notifies the bar.

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

Parameters
shortcutNew shortcut string.

◆ shortcut()

const std::string & shortcut ( ) const
inlinenoexcept

Returns the current keyboard shortcut.

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

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