EditorGeomNodesSystemComponent.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 <GeomNodes/Components/GeomNodesSystemComponent.h>
  11. #include <Editor/Common/GNEvents.h>
  12. namespace GeomNodes
  13. {
  14. class GeomNodesSystem;
  15. /// System component for GeomNodes editor
  16. class EditorGeomNodesSystemComponent
  17. : public GeomNodesSystemComponent
  18. , private AzToolsFramework::EditorEvents::Bus::Handler
  19. {
  20. using BaseSystemComponent = GeomNodesSystemComponent;
  21. public:
  22. AZ_COMPONENT_DECL(EditorGeomNodesSystemComponent);
  23. static void Reflect(AZ::ReflectContext* context);
  24. EditorGeomNodesSystemComponent();
  25. ~EditorGeomNodesSystemComponent();
  26. private:
  27. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  28. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  29. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  30. static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
  31. void ActivateGeomNodesSystem();
  32. // AZ::Component
  33. void Activate() override;
  34. void Deactivate() override;
  35. // AztoolsFramework::EditorEvents overrides...
  36. void NotifyRegisterViews() override;
  37. GeomNodesSystem* m_system = nullptr;
  38. SystemEvents::OnInitializedEvent::Handler m_onSystemInitializedHandler;
  39. SystemEvents::OnConfigurationChangedEvent::Handler m_onSystemConfigChangedHandler;
  40. };
  41. } // namespace GeomNodes