2015-06-12 13:14:38 +00:00
|
|
|
#if defined(Hiro_Action)
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-06-12 13:14:38 +00:00
|
|
|
namespace hiro {
|
|
|
|
|
|
|
|
auto pAction::construct() -> void {
|
|
|
|
}
|
|
|
|
|
|
|
|
auto pAction::destruct() -> void {
|
|
|
|
}
|
|
|
|
|
|
|
|
auto pAction::setEnabled(bool enabled) -> void {
|
|
|
|
_synchronize();
|
|
|
|
}
|
|
|
|
|
|
|
|
auto pAction::setVisible(bool visible) -> void {
|
|
|
|
_synchronize();
|
|
|
|
}
|
|
|
|
|
|
|
|
auto pAction::_parentMenu() -> maybe<pMenu&> {
|
|
|
|
if(auto parent = self().parentMenu()) {
|
|
|
|
if(auto self = parent->self()) return *self;
|
|
|
|
}
|
|
|
|
return nothing;
|
2011-02-24 09:25:20 +00:00
|
|
|
}
|
|
|
|
|
2015-06-12 13:14:38 +00:00
|
|
|
auto pAction::_parentMenuBar() -> maybe<pMenuBar&> {
|
|
|
|
if(auto parent = self().parentMenuBar(true)) {
|
|
|
|
if(auto self = parent->self()) return *self;
|
|
|
|
}
|
|
|
|
return nothing;
|
2011-02-24 09:25:20 +00:00
|
|
|
}
|
|
|
|
|
2015-06-12 13:14:38 +00:00
|
|
|
auto pAction::_parentPopupMenu() -> maybe<pPopupMenu&> {
|
|
|
|
if(auto parent = self().parentPopupMenu(true)) {
|
|
|
|
if(auto self = parent->self()) return *self;
|
|
|
|
}
|
|
|
|
return nothing;
|
2011-02-24 09:25:20 +00:00
|
|
|
}
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-06-12 13:14:38 +00:00
|
|
|
auto pAction::_synchronize() -> void {
|
|
|
|
if(auto parent = _parentMenuBar()) parent->_update();
|
2013-03-15 13:11:33 +00:00
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|