ViewportAlign.h 975 B

12345678910111213141516171819202122232425262728293031323334
  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. #pragma once
  9. ////////////////////////////////////////////////////////////////////////////////////////////////////
  10. //! ViewportAlign contains static function that implement alignment operations on elements.
  11. class ViewportAlign
  12. {
  13. public: //types
  14. enum class AlignType
  15. {
  16. HorizontalLeft,
  17. HorizontalCenter,
  18. HorizontalRight,
  19. VerticalTop,
  20. VerticalCenter,
  21. VerticalBottom
  22. };
  23. public: //static functions
  24. //! Align the selected elements using the given type of alignment operation
  25. static void AlignSelectedElements(EditorWindow* editorWindow, AlignType alignType);
  26. //! Check if alignment is allowed given the current selection
  27. static bool IsAlignAllowed(EditorWindow* editorWindow);
  28. };