AtomRenderOptionsActionHandler.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <AzToolsFramework/API/ToolsApplicationAPI.h>
  10. #include <AzToolsFramework/ActionManager/ActionManagerRegistrationNotificationBus.h>
  11. #include <AzCore/Name/Name.h>
  12. #include <AzCore/std/containers/unordered_map.h>
  13. #include <AzCore/std/string/string.h>
  14. namespace AzToolsFramework
  15. {
  16. class ActionManagerInterface;
  17. class MenuManagerInterface;
  18. } // namespace AzToolsFramework
  19. namespace AZ::Render
  20. {
  21. //! Handle menu and action registration for render options
  22. class AtomRenderOptionsActionHandler
  23. : private AzToolsFramework::ActionManagerRegistrationNotificationBus::Handler
  24. , private AzToolsFramework::EditorEventsBus::Handler
  25. {
  26. public:
  27. void Activate();
  28. void Deactivate();
  29. private:
  30. // ActionManagerRegistrationNotificationBus overrides...
  31. void OnMenuRegistrationHook() override;
  32. void OnActionRegistrationHook() override;
  33. void OnMenuBindingHook() override;
  34. // EditorEventsBus overrides...
  35. void NotifyMainWindowInitialized(QMainWindow* mainWindow) override;
  36. AzToolsFramework::ActionManagerInterface* m_actionManagerInterface = nullptr;
  37. AzToolsFramework::MenuManagerInterface* m_menuManagerInterface = nullptr;
  38. AZStd::unordered_map<AZ::Name, AZStd::string> m_passToActionNames;
  39. };
  40. } // namespace AZ::Render