LUAEditorViewMessages.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. #ifndef LUAEDITOR_VIEWMESSAGES_H
  9. #define LUAEDITOR_VIEWMESSAGES_H
  10. #include <AzCore/base.h>
  11. #include <AzCore/EBus/EBus.h>
  12. #pragma once
  13. namespace LUAEditor
  14. {
  15. struct DocumentInfo;
  16. // these are the messages targeted to the main window of the lua editor
  17. // they are used to talk to the views and so on.
  18. class LUAEditorMainWindowMessages
  19. : public AZ::EBusTraits
  20. {
  21. public:
  22. //////////////////////////////////////////////////////////////////////////
  23. // Bus configuration
  24. static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; // we have one bus that we always broadcast to
  25. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ:: EBusHandlerPolicy::Multiple; // we have multiple listeners.
  26. //////////////////////////////////////////////////////////////////////////
  27. typedef AZ::EBus<LUAEditorMainWindowMessages> Bus;
  28. typedef Bus::Handler Handler;
  29. virtual ~LUAEditorMainWindowMessages() {}
  30. virtual void OnFocusInEvent(const AZStd::string& assetId) = 0;
  31. virtual void OnFocusOutEvent(const AZStd::string& assetId) = 0;
  32. virtual void OnRequestCheckOut(const AZStd::string& assetId) = 0;
  33. virtual void OnConnectedToTarget() = 0;
  34. virtual void OnDisconnectedFromTarget() = 0;
  35. virtual void OnConnectedToDebugger() = 0;
  36. virtual void OnDisconnectedFromDebugger() = 0;
  37. virtual void OnExecuteScriptResult(bool success) = 0;
  38. /// Request a main window repaint
  39. virtual void Repaint() = 0;
  40. };
  41. }
  42. #endif//LUAEDITOR_VIEWMESSAGES_H