ViewArrangement.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. namespace Terminal.Gui;
  2. /// <summary>
  3. /// Describes what user actions are enabled for arranging a <see cref="View"/> within it's <see cref="View.SuperView"/>
  4. /// .
  5. /// See <see cref="View.Arrangement"/>.
  6. /// </summary>
  7. /// <remarks>
  8. /// <para>
  9. /// See the View Arrangement Deep Dive for more information:
  10. /// <see href="https://gui-cs.github.io/Terminal.GuiV2Docs/docs/arrangement.html"/>
  11. /// </para>
  12. /// <para>
  13. /// Sizing or moving a view is only possible if the <see cref="View"/> is part of a <see cref="View.SuperView"/>
  14. /// and
  15. /// the relevant position and dimensions of the <see cref="View"/> are independent of other SubViews
  16. /// </para>
  17. /// </remarks>
  18. [Flags]
  19. public enum ViewArrangement
  20. {
  21. /// <summary>
  22. /// The view can neither be moved nor resized.
  23. /// </summary>
  24. Fixed = 0,
  25. /// <summary>
  26. /// The view can be moved.
  27. /// </summary>
  28. Movable = 1,
  29. /// <summary>
  30. /// The left edge of the view can be resized.
  31. /// </summary>
  32. LeftResizable = 2,
  33. /// <summary>
  34. /// The right edge of the view can be resized.
  35. /// </summary>
  36. RightResizable = 4,
  37. /// <summary>
  38. /// The top edge of the view can be resized.
  39. /// <para>
  40. /// This flag is mutually exclusive with <see cref="Movable"/>. If both are set, <see cref="Movable"/> takes
  41. /// precedence.
  42. /// </para>
  43. /// </summary>
  44. TopResizable = 8,
  45. /// <summary>
  46. /// The bottom edge of the view can be resized.
  47. /// </summary>
  48. BottomResizable = 16,
  49. /// <summary>
  50. /// The view can be resized in any direction.
  51. /// <para>
  52. /// If <see cref="Movable"/> is also set, the top will not be resizable.
  53. /// </para>
  54. /// </summary>
  55. Resizable = LeftResizable | RightResizable | TopResizable | BottomResizable,
  56. /// <summary>
  57. /// The view overlaps other views (the order of <see cref="View.Subviews"/> dicates the Z-order). If this flag is not
  58. /// set the view will operate in tiled mode.
  59. /// <para>
  60. /// When set, Tab and Shift-Tab will be constrained to the subviews of the view (normally, they will navigate to
  61. /// the next/prev view in the next/prev Tabindex).
  62. /// Use Ctrl-Tab (Ctrl-PageDown) / Ctrl-Shift-Tab (Ctrl-PageUp) to move between overlapped views.
  63. /// </para>
  64. /// </summary>
  65. Overlapped = 32
  66. }