From 43fc6483b4bbe72bb31142b079269e219ee675d6 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 14 Sep 2005 20:28:15 +0000 Subject: moved MenuContext class --- src/MenuCreator.cc | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc index cb1f33c..fc427aa 100644 --- a/src/MenuCreator.cc +++ b/src/MenuCreator.cc @@ -143,6 +143,19 @@ private: FbTk::Menu *m_menu; }; +class MenuContext: public LayerObject { +public: + void moveToLayer(int layer_number) { + if (WindowCmd::window() == 0) + return; + WindowCmd::window()->moveToLayer(layer_number); + } + int layerNumber() const { + if (WindowCmd::window() == 0) + return -1; + return WindowCmd::window()->layerItem().getLayerNum(); + } +}; static void translateMenuItem(Parser &parse, ParseItem &item); @@ -532,19 +545,7 @@ bool MenuCreator::createWindowMenuItem(const std::string &type, if (screen == 0) return false; - class MenuContext: public LayerObject { - public: - void moveToLayer(int layer_number) { - if (WindowCmd::window() == 0) - return; - WindowCmd::window()->moveToLayer(layer_number); - } - int layerNumber() const { - if (WindowCmd::window() == 0) - return -1; - return WindowCmd::window()->layerItem().getLayerNum(); - } - } static context; + static MenuContext context; FbTk::Menu *submenu = new LayerMenu(screen->menuTheme(), screen->imageControl(), -- cgit v0.11.2