libnick 2025.1.0
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
Nickvision::Notifications::NotifyIconActionMenuItem Class Reference

An actionable menu item for a NotifyIcon. More...

#include <notifyiconmenu.h>

Inheritance diagram for Nickvision::Notifications::NotifyIconActionMenuItem:
Nickvision::Notifications::NotifyIconMenuItem

Public Member Functions

 NotifyIconActionMenuItem (const std::string &label, const std::function< void()> &action)
 Constructs a NotifyIconActionMenuItem.
 
const std::string & getLabel () const
 Gets the label for the menu item.
 
void invoke () const
 Calls the callback function of the menu item.
 
void operator() () const
 Calls the callback function of the menu item.
 
- Public Member Functions inherited from Nickvision::Notifications::NotifyIconMenuItem
 NotifyIconMenuItem (NotifyIconMenuItemType type)
 Constructs a NotifyIconMenuItem.
 
virtual ~NotifyIconMenuItem ()=default
 Destructs a NotifyIconMenuItem.
 
NotifyIconMenuItemType getType () const
 Gets the type of the menu item.
 

Detailed Description

An actionable menu item for a NotifyIcon.

Constructor & Destructor Documentation

◆ NotifyIconActionMenuItem()

Nickvision::Notifications::NotifyIconActionMenuItem::NotifyIconActionMenuItem ( const std::string & label,
const std::function< void()> & action )

Constructs a NotifyIconActionMenuItem.

Parameters
labelThe label for the menu item
actionThe function to call when the menu item is clicked

Member Function Documentation

◆ getLabel()

const std::string & Nickvision::Notifications::NotifyIconActionMenuItem::getLabel ( ) const

Gets the label for the menu item.

Returns
The label for the menu item

◆ invoke()

void Nickvision::Notifications::NotifyIconActionMenuItem::invoke ( ) const

Calls the callback function of the menu item.

◆ operator()()

void Nickvision::Notifications::NotifyIconActionMenuItem::operator() ( ) const

Calls the callback function of the menu item.


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