From bbaf59927207550635b7bac7e51e0862047bb7a0 Mon Sep 17 00:00:00 2001 From: Jinhao Date: Thu, 4 May 2017 06:10:54 +0800 Subject: [PATCH] remove member type menu::item_type --- include/nana/gui/widgets/menu.hpp | 5 ++--- source/gui/widgets/menu.cpp | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/nana/gui/widgets/menu.hpp b/include/nana/gui/widgets/menu.hpp index 693310a2..662b84a5 100644 --- a/include/nana/gui/widgets/menu.hpp +++ b/include/nana/gui/widgets/menu.hpp @@ -117,9 +117,8 @@ namespace nana typedef drawerbase::menu::checks checks; typedef drawerbase::menu::renderer_interface renderer_interface; - typedef drawerbase::menu::menu_item_type item_type; - typedef item_type::item_proxy item_proxy; - typedef item_type::event_fn_t event_fn_t; ///< A callback functor type. Prototype: `void(item_proxy&)` + typedef drawerbase::menu::menu_item_type::item_proxy item_proxy; + typedef drawerbase::menu::menu_item_type::event_fn_t event_fn_t; ///< A callback functor type. Prototype: `void(item_proxy&)` menu(); ///< The default constructor. NO OTHER CONSTRUCTOR. ~menu(); diff --git a/source/gui/widgets/menu.cpp b/source/gui/widgets/menu.cpp index 78f842bc..76f367e0 100644 --- a/source/gui/widgets/menu.cpp +++ b/source/gui/widgets/menu.cpp @@ -1128,6 +1128,8 @@ namespace nana delete impl_; } + using item_type = drawerbase::menu::menu_item_type; + auto menu::append(std::string text_utf8, const menu::event_fn_t& handler) -> item_proxy { std::unique_ptr item{ new item_type{ std::move(text_utf8), handler } };