psychic-ui 0.0.0
Loading...
Searching...
No Matches
psychic_ui::CheckMenuItem Class Reference

#include <Menu.hpp>

Inheritance diagram for psychic_ui::CheckMenuItem:
psychic_ui::MenuItem

Public Member Functions

 CheckMenuItem (const std::string &itemLabel, bool itemChecked, std::function< void(bool)> itemCallback, const std::string &itemShortcut="", const std::string &itemIcon="")
Public Member Functions inherited from psychic_ui::MenuItem
 MenuItem (std::string itemLabel, std::string itemShortcut="", std::string itemIcon="")
 MenuItem (const MenuItem &)=delete
MenuItem & operator= (const MenuItem &)=delete
 MenuItem (MenuItem &&)=delete
MenuItem & operator= (MenuItem &&)=delete

Public Attributes

bool checked {false}
std::function< void(bool)> callback {nullptr}
Public Attributes inherited from psychic_ui::MenuItem
std::string label {}
std::string shortcut {}
std::string icon {}
bool enabled {true}
bool danger {false}

Detailed Description

An item with a check mark, toggled when chosen (the menu stays open), then callback with the new state


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