libnick 2025.1.0
A cross-platform base for native Nickvision applications.
|
An actionable menu item for a NotifyIcon. More...
#include <notifyiconmenu.h>
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. | |
An actionable menu item for a NotifyIcon.
Nickvision::Notifications::NotifyIconActionMenuItem::NotifyIconActionMenuItem | ( | const std::string & | label, |
const std::function< void()> & | action ) |
Constructs a NotifyIconActionMenuItem.
label | The label for the menu item |
action | The function to call when the menu item is clicked |
const std::string & Nickvision::Notifications::NotifyIconActionMenuItem::getLabel | ( | ) | const |
Gets the label for the menu item.
void Nickvision::Notifications::NotifyIconActionMenuItem::invoke | ( | ) | const |
Calls the callback function of the menu item.
void Nickvision::Notifications::NotifyIconActionMenuItem::operator() | ( | ) | const |
Calls the callback function of the menu item.