#if defined(Hiro_MenuCheckItem) struct mMenuCheckItem : mAction { Declare(MenuCheckItem) auto checked() const -> bool; auto doToggle() const -> void; auto onToggle(const std::function& callback = {}) -> type&; auto setChecked(bool checked = true) -> type&; auto setText(const string& text = "") -> type&; auto text() const -> string; //private: struct State { bool checked = false; std::function onToggle; string text; } state; }; #endif