actions: Switch all modules over to new system

All modules now expose their actions as public static constants

Issues: The menu module no longer closes when an item is clicked (before
it would intercept any executed command and look if it matches one of
its exec commands)
This commit is contained in:
patrick96 2020-05-24 18:35:12 +02:00 committed by Patrick Ziegler
parent 816b73a95f
commit ae2350167b
31 changed files with 197 additions and 232 deletions
include/modules

View file

@ -24,16 +24,16 @@ namespace modules {
static constexpr auto TYPE = "custom/menu";
static constexpr auto EVENT_OPEN = "open";
static constexpr auto EVENT_CLOSE = "close";
protected:
bool input(string&& cmd);
bool input(string&& action);
private:
static constexpr auto TAG_LABEL_TOGGLE = "<label-toggle>";
static constexpr auto TAG_MENU = "<menu>";
static constexpr auto EVENT_MENU_OPEN = "menu-open-";
static constexpr auto EVENT_MENU_CLOSE = "menu-close";
bool m_expand_right{true};
label_t m_labelopen;