|
@@ -968,28 +968,12 @@ namespace AzToolsFramework
|
|
|
{
|
|
|
public:
|
|
|
AZ_CLASS_ALLOCATOR(ScopedUndoBatch, AZ::SystemAllocator, 0);
|
|
|
-
|
|
|
- explicit ScopedUndoBatch(const char* batchName)
|
|
|
- {
|
|
|
- ToolsApplicationRequests::Bus::BroadcastResult(
|
|
|
- m_undoBatch, &ToolsApplicationRequests::Bus::Events::BeginUndoBatch, batchName);
|
|
|
- }
|
|
|
-
|
|
|
- ~ScopedUndoBatch()
|
|
|
- {
|
|
|
- ToolsApplicationRequests::Bus::Broadcast(&ToolsApplicationRequests::Bus::Events::EndUndoBatch);
|
|
|
- }
|
|
|
+ explicit ScopedUndoBatch(const char* batchName);
|
|
|
+ ~ScopedUndoBatch();
|
|
|
|
|
|
// utility/convenience function for adding dirty entity
|
|
|
- static void MarkEntityDirty(const AZ::EntityId& id)
|
|
|
- {
|
|
|
- ToolsApplicationRequests::Bus::Broadcast(&ToolsApplicationRequests::Bus::Events::AddDirtyEntity, id);
|
|
|
- }
|
|
|
-
|
|
|
- UndoSystem::URSequencePoint* GetUndoBatch() const
|
|
|
- {
|
|
|
- return m_undoBatch;
|
|
|
- }
|
|
|
+ static void MarkEntityDirty(const AZ::EntityId& id);
|
|
|
+ UndoSystem::URSequencePoint* GetUndoBatch() const;
|
|
|
|
|
|
private:
|
|
|
AZ_DISABLE_COPY_MOVE(ScopedUndoBatch);
|
|
@@ -1038,10 +1022,7 @@ namespace AzToolsFramework
|
|
|
/// Any currently open view panes of this type will be closed before the view pane handlers are unregistered.
|
|
|
///
|
|
|
/// \param viewPaneName - name of the pane to unregister. Must be the same as the name previously registered with RegisterViewPane.
|
|
|
- inline void UnregisterViewPane(const char* viewPaneName)
|
|
|
- {
|
|
|
- EditorRequests::Bus::Broadcast(&EditorRequests::UnregisterViewPane, viewPaneName);
|
|
|
- }
|
|
|
+ void UnregisterViewPane(const char* viewPaneName);
|
|
|
|
|
|
/// Returns the widget contained/wrapped in a view pane.
|
|
|
/// \param name - the name of the pane which contains the widget to be retrieved. This must match the name used for registration.
|
|
@@ -1057,41 +1038,25 @@ namespace AzToolsFramework
|
|
|
/// Opens a view pane if not already open, and activating the view pane if it was already opened.
|
|
|
///
|
|
|
/// \param viewPaneName - name of the pane to open/activate. Must be the same as the name previously registered with RegisterViewPane.
|
|
|
- inline void OpenViewPane(const char* viewPaneName)
|
|
|
- {
|
|
|
- EditorRequests::Bus::Broadcast(&EditorRequests::OpenViewPane, viewPaneName);
|
|
|
- }
|
|
|
+ void OpenViewPane(const char* viewPaneName);
|
|
|
|
|
|
/// Opens a view pane if not already open, and activating the view pane if it was already opened.
|
|
|
///
|
|
|
/// \param viewPaneName - name of the pane to open/activate. Must be the same as the name previously registered with RegisterViewPane.
|
|
|
- inline QDockWidget* InstanceViewPane(const char* viewPaneName)
|
|
|
- {
|
|
|
- QDockWidget* ret = nullptr;
|
|
|
- EditorRequests::Bus::BroadcastResult(ret, &EditorRequests::InstanceViewPane, viewPaneName);
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
+ QDockWidget* InstanceViewPane(const char* viewPaneName);
|
|
|
|
|
|
/// Closes a view pane if it is currently open.
|
|
|
///
|
|
|
/// \param viewPaneName - name of the pane to open/activate. Must be the same as the name previously registered with RegisterViewPane.
|
|
|
- inline void CloseViewPane(const char* viewPaneName)
|
|
|
- {
|
|
|
- EditorRequests::Bus::Broadcast(&EditorRequests::CloseViewPane, viewPaneName);
|
|
|
- }
|
|
|
+ void CloseViewPane(const char* viewPaneName);
|
|
|
|
|
|
/**
|
|
|
* Helper to wrap checking if an undo/redo operation is in progress.
|
|
|
*/
|
|
|
- inline bool UndoRedoOperationInProgress()
|
|
|
- {
|
|
|
- bool isDuringUndoRedo = false;
|
|
|
- ToolsApplicationRequestBus::BroadcastResult(
|
|
|
- isDuringUndoRedo, &ToolsApplicationRequests::IsDuringUndoRedo);
|
|
|
- return isDuringUndoRedo;
|
|
|
- }
|
|
|
+ bool UndoRedoOperationInProgress();
|
|
|
} // namespace AzToolsFramework
|
|
|
|
|
|
AZ_DECLARE_BUDGET(AzToolsFramework);
|
|
|
-
|
|
|
+DECLARE_EBUS_EXTERN(AzToolsFramework::EditorRequests);
|
|
|
+DECLARE_EBUS_EXTERN(AzToolsFramework::ToolsApplicationEvents);
|
|
|
+DECLARE_EBUS_EXTERN(AzToolsFramework::EntitySelectionEvents);
|