AtomToolsMainWindowSystemComponent.cpp 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. #include <AtomToolsFramework/Window/AtomToolsMainWindowRequestBus.h>
  9. #include <AzCore/RTTI/BehaviorContext.h>
  10. #include <AzCore/Serialization/EditContext.h>
  11. #include <AzCore/Serialization/SerializeContext.h>
  12. #include <Window/AtomToolsMainWindowSystemComponent.h>
  13. namespace AtomToolsFramework
  14. {
  15. void AtomToolsMainWindowSystemComponent::Reflect(AZ::ReflectContext* context)
  16. {
  17. if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
  18. {
  19. serialize->Class<AtomToolsMainWindowSystemComponent, AZ::Component>()
  20. ->Version(0);
  21. }
  22. if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
  23. {
  24. behaviorContext->EBus<AtomToolsMainWindowRequestBus>("AtomToolsMainWindowRequestBus")
  25. ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
  26. ->Attribute(AZ::Script::Attributes::Category, "Editor")
  27. ->Attribute(AZ::Script::Attributes::Module, "atomtools")
  28. ->Event("ActivateWindow", &AtomToolsMainWindowRequestBus::Events::ActivateWindow)
  29. ->Event("SetDockWidgetVisible", &AtomToolsMainWindowRequestBus::Events::SetDockWidgetVisible)
  30. ->Event("IsDockWidgetVisible", &AtomToolsMainWindowRequestBus::Events::IsDockWidgetVisible)
  31. ->Event("GetDockWidgetNames", &AtomToolsMainWindowRequestBus::Events::GetDockWidgetNames)
  32. ->Event("QueueUpdateMenus", &AtomToolsMainWindowRequestBus::Events::QueueUpdateMenus)
  33. ->Event("SetStatusMessage", &AtomToolsMainWindowRequestBus::Events::SetStatusMessage)
  34. ->Event("SetStatusWarning", &AtomToolsMainWindowRequestBus::Events::SetStatusWarning)
  35. ->Event("SetStatusError", &AtomToolsMainWindowRequestBus::Events::SetStatusError)
  36. ->Event("ResizeViewportRenderTarget", &AtomToolsMainWindowRequestBus::Events::ResizeViewportRenderTarget)
  37. ->Event("LockViewportRenderTargetSize", &AtomToolsMainWindowRequestBus::Events::LockViewportRenderTargetSize)
  38. ->Event("UnlockViewportRenderTargetSize", &AtomToolsMainWindowRequestBus::Events::UnlockViewportRenderTargetSize)
  39. ;
  40. }
  41. }
  42. void AtomToolsMainWindowSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  43. {
  44. provided.push_back(AZ_CRC_CE("AtomToolsMainWindowSystemService"));
  45. }
  46. void AtomToolsMainWindowSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  47. {
  48. incompatible.push_back(AZ_CRC_CE("AtomToolsMainWindowSystemService"));
  49. }
  50. void AtomToolsMainWindowSystemComponent::Init()
  51. {
  52. }
  53. void AtomToolsMainWindowSystemComponent::Activate()
  54. {
  55. }
  56. void AtomToolsMainWindowSystemComponent::Deactivate()
  57. {
  58. }
  59. } // namespace AtomToolsFramework