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;
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
|
@ -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<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;
|
||||
static MenuContext context;
|
||||
|
||||
FbTk::Menu *submenu = new LayerMenu(screen->menuTheme(),
|
||||
screen->imageControl(),
|
||||
|
|
Loading…
Reference in a new issue