From 5e4f5cd2a01605bdbce062011d15318d089da6c9 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 20 Nov 2015 08:50:53 +0000 Subject: Move enum option handling in enum.hh and refactor enum options --- src/input_handler.hh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/input_handler.hh') diff --git a/src/input_handler.hh b/src/input_handler.hh index 49767eb4..036633dc 100644 --- a/src/input_handler.hh +++ b/src/input_handler.hh @@ -103,6 +103,26 @@ private: int m_handle_key_level = 0; }; +enum class AutoInfo +{ + None = 0, + Command = 1 << 0, + OnKey = 1 << 1, + Normal = 1 << 2 +}; + +template<> +struct WithBitOps : std::true_type {}; + +constexpr Array, 3> enum_desc(AutoInfo) +{ + return { { + { AutoInfo::Command, "command"}, + { AutoInfo::OnKey, "onkey"}, + { AutoInfo::Normal, "normal" } + } }; +} + bool show_auto_info_ifn(StringView title, StringView info, AutoInfo mask, const Context& context); template -- cgit v1.2.3