action.cpp 885 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #if defined(Hiro_Action)
  2. namespace hiro {
  3. auto pAction::construct() -> void {
  4. }
  5. auto pAction::destruct() -> void {
  6. }
  7. auto pAction::setEnabled(bool enabled) -> void {
  8. _setState();
  9. }
  10. auto pAction::setFont(const Font& font) -> void {
  11. _setState();
  12. }
  13. auto pAction::setVisible(bool visible) -> void {
  14. _setState();
  15. }
  16. auto pAction::_parentMenu() -> maybe<pMenu&> {
  17. if(auto parent = self().parentMenu()) {
  18. if(auto self = parent->self()) return *self;
  19. }
  20. return nothing;
  21. }
  22. auto pAction::_parentMenuBar() -> maybe<pMenuBar&> {
  23. if(auto parent = self().parentMenuBar()) {
  24. if(auto self = parent->self()) return *self;
  25. }
  26. return nothing;
  27. }
  28. auto pAction::_parentPopupMenu() -> maybe<pPopupMenu&> {
  29. if(auto parent = self().parentPopupMenu()) {
  30. if(auto self = parent->self()) return *self;
  31. }
  32. return nothing;
  33. }
  34. auto pAction::_setState() -> void {
  35. }
  36. }
  37. #endif