holding pen for refactor

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
Guthrie Adams
2021-08-11 14:55:28 -05:00
parent 2564e8f8dc
commit f1e8d37b86
23 changed files with 569 additions and 343 deletions
@@ -10,6 +10,9 @@
#include <AzCore/Asset/AssetCommon.h>
#include <AzCore/std/any.h>
#include <AtomToolsFramework/DynamicProperty/DynamicProperty.h>
#include <AtomToolsFramework/DynamicProperty/DynamicPropertyGroup.h>
namespace ShaderManagementConsole
{
class ShaderManagementConsoleDocumentNotifications
@@ -47,9 +50,33 @@ namespace ShaderManagementConsole
//! @param documentId unique id of document for which the notification is sent
virtual void OnDocumentModified([[maybe_unused]] const AZ::Uuid& documentId) {}
//! Signal that a document dependency was modified
//! @param documentId unique id of document for which the notification is sent
virtual void OnDocumentDependencyModified([[maybe_unused]] const AZ::Uuid& documentId) {}
//! Signal that a document was modified externally
//! @param documentId unique id of document for which the notification is sent
virtual void OnDocumentExternallyModified([[maybe_unused]] const AZ::Uuid& documentId) {}
//! Signal that a document undo state was updated
//! @param documentId unique id of document for which the notification is sent
virtual void OnDocumentUndoStateChanged([[maybe_unused]] const AZ::Uuid& documentId) {}
//! Signal that a property changed
//! @param documentId unique id of document for which the notification is sent
//! @param property object containing the property value and configuration that was modified
virtual void OnDocumentPropertyValueModified([[maybe_unused]] const AZ::Uuid& documentId, [[maybe_unused]] const AtomToolsFramework::DynamicProperty& property) {}
//! Signal that the property configuration has been changed.
//! @param documentId unique id of document for which the notification is sent
//! @param property object containing the property value and configuration that was modified
virtual void OnDocumentPropertyConfigModified([[maybe_unused]] const AZ::Uuid& documentId, [[maybe_unused]] const AtomToolsFramework::DynamicProperty& property) {}
//! Signal that the property group visibility has been changed.
//! @param documentId unique id of document for which the notification is sent
//! @param groupId id of the group that changed
//! @param visible whether the property group is visible
virtual void OnDocumentPropertyGroupVisibilityChanged([[maybe_unused]] const AZ::Uuid& documentId, [[maybe_unused]] const AZ::Name& groupId, [[maybe_unused]] bool visible) {}
};
using ShaderManagementConsoleDocumentNotificationBus = AZ::EBus<ShaderManagementConsoleDocumentNotifications>;
@@ -18,7 +18,6 @@
namespace ShaderManagementConsole
{
using ShaderManagementConsoleDocumentResult = AZ::Outcome<AZStd::string, AZStd::string>;
class ShaderManagementConsoleDocumentRequests
: public AZ::EBusTraits
@@ -48,17 +47,17 @@ namespace ShaderManagementConsole
//! Load document and related data
//! @param loadPath Absolute path of document to load
virtual ShaderManagementConsoleDocumentResult Open(AZStd::string_view loadPath) = 0;
virtual bool Open(AZStd::string_view loadPath) = 0;
//! Save document to file
virtual ShaderManagementConsoleDocumentResult Save() = 0;
virtual bool Save() = 0;
//! Save document copy
//! @param savePath Absolute path where document is saved
virtual ShaderManagementConsoleDocumentResult SaveAsCopy(AZStd::string_view savePath) = 0;
virtual bool SaveAsCopy(AZStd::string_view savePath) = 0;
//! Close document and reset its data
virtual ShaderManagementConsoleDocumentResult Close() = 0;
virtual bool Close() = 0;
//! document is loaded
virtual bool IsOpen() const = 0;
@@ -29,9 +29,9 @@ namespace ShaderManagementConsole
virtual bool DestroyDocument(const AZ::Uuid& documentId) = 0;
//! Open a document for editing
//! @param path document to edit.
//! @param sourcePath document to open.
//! @return unique id of new document if successful, otherwise null Uuid
virtual AZ::Uuid OpenDocument(AZStd::string_view path) = 0;
virtual AZ::Uuid OpenDocument(AZStd::string_view sourcePath) = 0;
//! Close the specified document
//! @param documentId unique id of document to close
@@ -40,13 +40,18 @@ namespace ShaderManagementConsole
//! Close all documents
virtual bool CloseAllDocuments() = 0;
//! Close all documents except for documentId
//! @param documentId unique id of document to not close
virtual bool CloseAllDocumentsExcept(const AZ::Uuid& documentId) = 0;
//! Save the specified document
//! @param documentId unique id of document to save
virtual bool SaveDocument(const AZ::Uuid& documentId) = 0;
//! Save the specified document to a different file
//! @param documentId unique id of document to save
virtual bool SaveDocumentAsCopy(const AZ::Uuid& documentId) = 0;
//! @param targetPath location where document is saved.
virtual bool SaveDocumentAsCopy(const AZ::Uuid& documentId, AZStd::string_view targetPath) = 0;
//! Save all documents
virtual bool SaveAllDocuments() = 0;