123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- /*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
- #pragma once
- #include <Cry_Geo.h>
- #include <Include/IPlugin.h>
- #include <QtWidgets/QMainWindow>
- #include <LyShine/IDraw2d.h>
- #include <LyShine/ILyShine.h>
- #include <LyShine/Bus/UiCanvasBus.h>
- #include <LyShine/Bus/UiElementBus.h>
- #include <LyShine/Bus/UiEditorBus.h>
- #include <LyShine/Bus/UiLayoutBus.h>
- #include <LyShine/Bus/UiTransform2dBus.h>
- #include <LyShine/Bus/UiVisualBus.h>
- #include <AzCore/Component/ComponentApplicationBus.h>
- #include <AzCore/Component/EntityBus.h>
- #include <AzCore/Component/TickBus.h>
- #include <AzCore/Math/Vector3.h>
- #include <AzToolsFramework/SourceControl/SourceControlAPI.h>
- #include <AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h>
- #include <AzToolsFramework/UI/PropertyEditor/ReflectedPropertyEditor.hxx>
- #include <AzToolsFramework/Undo/UndoSystem.h>
- class CanvasSizeToolbarSection;
- class CommandCanvasPropertiesChange;
- class CommandCanvasSizeToolbarIndex;
- class CommandHierarchyItemCreate;
- class CommandHierarchyItemCreateFromData;
- class CommandHierarchyItemDelete;
- class CommandHierarchyItemRename;
- class CommandHierarchyItemReparent;
- class CommandHierarchyItemToggleIsExpanded;
- class CommandHierarchyItemToggleIsSelectable;
- class CommandHierarchyItemToggleIsVisible;
- class CommandPropertiesChange;
- class ComponentButton;
- class CoordinateSystemToolbarSection;
- class EditorMenu;
- class EditorWindow;
- class EnterPreviewToolbar;
- class HierarchyClipboard;
- class HierarchyHeader;
- class HierarchyItem;
- class HierarchyMenu;
- class HierarchyWidget;
- class MainToolbar;
- class ModeToolbar;
- class NewElementToolbarSection;
- class PreviewActionLog;
- class PreviewAnimationList;
- class PreviewToolbar;
- class PropertiesContainer;
- class PropertiesWidget;
- class PropertiesWrapper;
- class UndoStack;
- class UndoStackExecutionScope;
- class ViewportAnchor;
- class ViewportCanvasBackground;
- class ViewportElement;
- class ViewportHighlight;
- class ViewportIcon;
- class ViewportInteraction;
- class ViewportNudge;
- class ViewportPivot;
- class ViewportSnap;
- class ViewportWidget;
- QT_FORWARD_DECLARE_CLASS(QTreeWidgetItem)
- using HierarchyItemRawPtrList = std::list< HierarchyItem* >;
- using QTreeWidgetItemRawPtrList = std::list< QTreeWidgetItem* >;
- using QTreeWidgetItemRawPtrQList = QList< QTreeWidgetItem* >;
- // This allows iterating over an enum class.
- #define ADD_ENUM_CLASS_ITERATION_OPERATORS(CLASS_NAME, FIRST_VALUE, LAST_VALUE) \
- \
- inline CLASS_NAME operator++(CLASS_NAME & m){ return m = (CLASS_NAME)(std::underlying_type<CLASS_NAME>::type(m) + 1); } \
- inline CLASS_NAME operator*(CLASS_NAME m){ return m; } \
- inline CLASS_NAME begin([[maybe_unused]] CLASS_NAME m){ return FIRST_VALUE; } \
- inline CLASS_NAME end([[maybe_unused]] CLASS_NAME m){ return (CLASS_NAME)(std::underlying_type<CLASS_NAME>::type(LAST_VALUE) + 1); }
- enum class UiEditorMode
- {
- Edit, Preview
- };
- enum class FusibleCommand
- {
- kViewportInteractionMode,
- kCanvasSizeToolbarIndex
- };
- #include "ViewportHelpers.h"
- #include "EntityHelpers.h"
- #include "SerializeHelpers.h"
- #include "FileHelpers.h"
- #include "ComponentHelpers.h"
- #include "HierarchyHelpers.h"
- #include "UiSliceManager.h"
- #include "SelectionHelpers.h"
- #include "ViewportInteraction.h"
- #include "CanvasSizeToolbarSection.h"
- #include "CommandCanvasPropertiesChange.h"
- #include "CommandCanvasSizeToolbarIndex.h"
- #include "CommandHierarchyItemCreate.h"
- #include "CommandHierarchyItemCreateFromData.h"
- #include "CommandHierarchyItemDelete.h"
- #include "CommandHierarchyItemRename.h"
- #include "CommandHierarchyItemReparent.h"
- #include "CommandHierarchyItemToggleIsExpanded.h"
- #include "CommandHierarchyItemToggleIsSelectable.h"
- #include "CommandHierarchyItemToggleIsVisible.h"
- #include "CommandPropertiesChange.h"
- #include "ComponentButton.h"
- #include "CoordinateSystemToolbarSection.h"
- #include "EditorWindow.h"
- #include "EnterPreviewToolbar.h"
- #include "HierarchyClipboard.h"
- #include "HierarchyHeader.h"
- #include "HierarchyItem.h"
- #include "HierarchyMenu.h"
- #include "HierarchyWidget.h"
- #include "MainToolbar.h"
- #include "ModeToolbar.h"
- #include "NewElementToolbarSection.h"
- #include "PreviewActionLog.h"
- #include "PreviewAnimationList.h"
- #include "PreviewToolbar.h"
- #include "PropertiesContainer.h"
- #include "PropertiesWidget.h"
- #include "PropertiesWrapper.h"
- #include "PropertyHandlers.h"
- #include "RecentFiles.h"
- #include "UndoStack.h"
- #include "UndoStackExecutionScope.h"
- #include "ViewportAnchor.h"
- #include "ViewportCanvasBackground.h"
- #include "ViewportHighlight.h"
- #include "ViewportIcon.h"
- #include "ViewportWidget.h"
- // IMPORTANT: This is NOT the permanent location for these values.
- #define AZ_QCOREAPPLICATION_SETTINGS_ORGANIZATION_NAME "O3DE"
- #define AZ_QCOREAPPLICATION_SETTINGS_APPLICATION_NAME "O3DE"
- // See: http://en.wikipedia.org/wiki/Internet_media_type#Prefix_x
- #define UICANVASEDITOR_MIMETYPE "application/x-amazon-o3de-uicanvaseditor"
- bool ClipboardContainsOurDataType();
- #define UICANVASEDITOR_NAME_SHORT "UiCanvasEditor"
- #define UICANVASEDITOR_COORDINATE_SYSTEM_CYCLE_SHORTCUT_KEY_SEQUENCE QKeySequence(Qt::CTRL + Qt::Key_W)
- #define UICANVASEDITOR_SNAP_TO_GRID_TOGGLE_SHORTCUT_KEY_SEQUENCE QKeySequence(Qt::Key_G)
- #define UICANVASEDITOR_CANVAS_DIRECTORY "UI/Canvases"
- #define UICANVASEDITOR_CANVAS_EXTENSION "uicanvas"
- #define UICANVASEDITOR_QMENU_ITEM_DISABLED_STYLESHEET "QMenu::item:disabled { color: rgb(127, 127, 127); }"
- enum HierarchyColumn
- {
- kHierarchyColumnName,
- kHierarchyColumnIsVisible,
- kHierarchyColumnIsSelectable,
- kHierarchyColumnCount
- };
- #define UICANVASEDITOR_HIERARCHY_HEADER_ICON_SIZE (16)
- // Stores startup (original) location of localization folder
- #define UICANVASEDITOR_SETTINGS_STARTUP_LOC_FOLDER_KEY (QString("StartupLocFolder") + " " + FileHelpers::GetAbsoluteGameDir())
|