#include <canvas.h>
Public Member Functions | |
ContextMenuItem ()=default | |
ContextMenuItem (const std::string &lbl, std::function< void()> cb, const std::string &sc="") | |
Static Public Member Functions | |
static ContextMenuItem | Disabled (const std::string &lbl) |
static ContextMenuItem | Conditional (const std::string &lbl, std::function< void()> cb, std::function< bool()> condition) |
Public Attributes | |
std::string | label |
std::string | shortcut |
std::function< void()> | callback |
std::function< bool()> | enabled_condition = []() { return true; } |
std::vector< ContextMenuItem > | subitems |
|
default |
|
inline |
|
inlinestatic |
Definition at line 166 of file canvas.h.
References enabled_condition, and label.
|
inlinestatic |
Definition at line 174 of file canvas.h.
References callback, enabled_condition, and label.
std::string yaze::gui::Canvas::ContextMenuItem::label |
Definition at line 153 of file canvas.h.
Referenced by Conditional(), Disabled(), yaze::gui::Canvas::DrawContextMenuItem(), yaze::editor::DungeonCanvasViewer::DrawDungeonCanvas(), and yaze::editor::MapPropertiesSystem::SetupCanvasContextMenu().
std::string yaze::gui::Canvas::ContextMenuItem::shortcut |
Definition at line 154 of file canvas.h.
Referenced by yaze::gui::Canvas::DrawContextMenuItem().
std::function<void()> yaze::gui::Canvas::ContextMenuItem::callback |
Definition at line 155 of file canvas.h.
Referenced by Conditional(), yaze::gui::Canvas::DrawContextMenuItem(), yaze::editor::DungeonCanvasViewer::DrawDungeonCanvas(), and yaze::editor::MapPropertiesSystem::SetupCanvasContextMenu().
std::function<bool()> yaze::gui::Canvas::ContextMenuItem::enabled_condition = []() { return true; } |
Definition at line 156 of file canvas.h.
Referenced by Conditional(), Disabled(), yaze::gui::Canvas::DrawContextMenuItem(), and yaze::editor::DungeonCanvasViewer::DrawDungeonCanvas().
std::vector<ContextMenuItem> yaze::gui::Canvas::ContextMenuItem::subitems |
Definition at line 157 of file canvas.h.
Referenced by yaze::gui::Canvas::DrawContextMenuItem(), and yaze::editor::DungeonCanvasViewer::DrawDungeonCanvas().