ViewArrangement.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. /// Sizing or moving a view is only possible if the <see cref="View"/> is part of a <see cref="View.SuperView"/>
  10. /// and
  11. /// the relevant position and dimensions of the <see cref="View"/> are independent of other SubViews
  12. /// </para>
  13. /// </remarks>
  14. [Flags]
  15. public enum ViewArrangement
  16. {
  17. /// <summary>
  18. /// The view can neither be moved nor resized.
  19. /// </summary>
  20. Fixed = 0,
  21. /// <summary>
  22. /// The view can be moved.
  23. /// </summary>
  24. Movable = 1,
  25. /// <summary>
  26. /// The left edge of the view can be resized.
  27. /// </summary>
  28. LeftResizable = 2,
  29. /// <summary>
  30. /// The right edge of the view can be resized.
  31. /// </summary>
  32. RightResizable = 4,
  33. /// <summary>
  34. /// The top edge of the view can be resized.
  35. /// </summary>
  36. /// <remarks>
  37. /// This flag is mutually exclusive with <see cref="Movable"/>. If both are set, <see cref="Movable"/> takes
  38. /// precedence.
  39. /// </remarks>
  40. TopResizable = 8,
  41. /// <summary>
  42. /// The bottom edge of the view can be resized.
  43. /// </summary>
  44. BottomResizable = 16,
  45. /// <summary>
  46. /// The view can be resized in any direction.
  47. /// </summary>
  48. /// <remarks>
  49. /// If <see cref="Movable"/> is also set, the top will not be resizable.
  50. /// </remarks>
  51. Resizable = LeftResizable | RightResizable | TopResizable | BottomResizable,
  52. /// <summary>
  53. /// The view overlap other views.
  54. /// </summary>
  55. /// <remarks>
  56. /// <para>
  57. /// When set, Tab and Shift-Tab will be constrained to the subviews of the view (normally, they will navigate to
  58. /// the next/prev view in the next/prev Tabindex).
  59. /// Use Ctrl-Tab (Ctrl-PageDown) / Ctrl-Shift-Tab (Ctrl-PageUp) to move between overlapped views.
  60. /// </para>
  61. /// </remarks>
  62. Overlapped = 32,
  63. }