LyShineEditorSystemComponent.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 <AzCore/Component/Component.h>
  10. #include <AzToolsFramework/API/ToolsApplicationAPI.h>
  11. #include <AzToolsFramework/AssetBrowser/AssetBrowserBus.h>
  12. #include <AzToolsFramework/Entity/EditorEntityContextBus.h>
  13. #include <LyShine/LyShineBus.h>
  14. namespace LyShineEditor
  15. {
  16. class LyShineEditorSystemComponent
  17. : public AZ::Component
  18. , protected AzToolsFramework::EditorEvents::Bus::Handler
  19. , protected AzToolsFramework::EditorEntityContextNotificationBus::Handler
  20. , protected AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler
  21. , protected LyShine::LyShineRequestBus::Handler
  22. {
  23. public:
  24. AZ_COMPONENT(LyShineEditorSystemComponent, "{64D08A3F-A682-4CAF-86C1-DA91638494BA}");
  25. LyShineEditorSystemComponent();
  26. ~LyShineEditorSystemComponent() override;
  27. static void Reflect(AZ::ReflectContext* context);
  28. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  29. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  30. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  31. static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
  32. protected:
  33. ////////////////////////////////////////////////////////////////////////
  34. // AZ::Component interface implementation
  35. void Init() override;
  36. void Activate() override;
  37. void Deactivate() override;
  38. ////////////////////////////////////////////////////////////////////////
  39. ////////////////////////////////////////////////////////////////////////
  40. // EditorEvents interface implementation
  41. void NotifyRegisterViews() override;
  42. ////////////////////////////////////////////////////////////////////////
  43. ////////////////////////////////////////////////////////////////////////
  44. // AssetBrowserInteractionNotifications interface implementation
  45. void AddSourceFileOpeners(const char* fullSourceFileName, const AZ::Uuid& /*sourceUUID*/, AzToolsFramework::AssetBrowser::SourceFileOpenerList& openers) override;
  46. AzToolsFramework::AssetBrowser::SourceFileDetails GetSourceFileDetails(const char* fullSourceFileName) override;
  47. ////////////////////////////////////////////////////////////////////////
  48. ////////////////////////////////////////////////////////////////////////
  49. // LyShineRequestBus interface implementation
  50. void EditUICanvas(const AZStd::string_view& canvasPath) override;
  51. ////////////////////////////////////////////////////////////////////////
  52. ////////////////////////////////////////////////////////////////////////
  53. // EditorEntityContextNotificationBus
  54. void OnStopPlayInEditor() override;
  55. ////////////////////////////////////////////////////////////////////////
  56. };
  57. }