moved MenuContext class
This commit is contained in:
parent
8634b9b3ef
commit
43fc6483b4
1 changed files with 14 additions and 13 deletions
|
@ -143,6 +143,19 @@ private:
|
||||||
FbTk::Menu *m_menu;
|
FbTk::Menu *m_menu;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class MenuContext: public LayerObject {
|
||||||
|
public:
|
||||||
|
void moveToLayer(int layer_number) {
|
||||||
|
if (WindowCmd<void>::window() == 0)
|
||||||
|
return;
|
||||||
|
WindowCmd<void>::window()->moveToLayer(layer_number);
|
||||||
|
}
|
||||||
|
int layerNumber() const {
|
||||||
|
if (WindowCmd<void>::window() == 0)
|
||||||
|
return -1;
|
||||||
|
return WindowCmd<void>::window()->layerItem().getLayerNum();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
static void translateMenuItem(Parser &parse, ParseItem &item);
|
static void translateMenuItem(Parser &parse, ParseItem &item);
|
||||||
|
|
||||||
|
@ -532,19 +545,7 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
|
||||||
if (screen == 0)
|
if (screen == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
class MenuContext: public LayerObject {
|
static MenuContext context;
|
||||||
public:
|
|
||||||
void moveToLayer(int layer_number) {
|
|
||||||
if (WindowCmd<void>::window() == 0)
|
|
||||||
return;
|
|
||||||
WindowCmd<void>::window()->moveToLayer(layer_number);
|
|
||||||
}
|
|
||||||
int layerNumber() const {
|
|
||||||
if (WindowCmd<void>::window() == 0)
|
|
||||||
return -1;
|
|
||||||
return WindowCmd<void>::window()->layerItem().getLayerNum();
|
|
||||||
}
|
|
||||||
} static context;
|
|
||||||
|
|
||||||
FbTk::Menu *submenu = new LayerMenu(screen->menuTheme(),
|
FbTk::Menu *submenu = new LayerMenu(screen->menuTheme(),
|
||||||
screen->imageControl(),
|
screen->imageControl(),
|
||||||
|
|
Loading…
Reference in a new issue