SplitterEventArgs.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. namespace Terminal.Gui {
  3. /// <summary>
  4. /// Provides data for <see cref="TileView"/> events.
  5. /// </summary>
  6. public class SplitterEventArgs : EventArgs {
  7. /// <summary>
  8. /// Creates a new instance of the <see cref="SplitterEventArgs"/> class.
  9. /// </summary>
  10. /// <param name="tileView"><see cref="TileView"/> in which splitter is being moved.</param>
  11. /// <param name="idx">Index of the splitter being moved in <see cref="TileView.SplitterDistances"/>.</param>
  12. /// <param name="splitterDistance">The new <see cref="Pos"/> of the splitter line.</param>
  13. public SplitterEventArgs (TileView tileView, int idx, Pos splitterDistance)
  14. {
  15. SplitterDistance = splitterDistance;
  16. TileView = tileView;
  17. Idx = idx;
  18. }
  19. /// <summary>
  20. /// New position of the splitter line (see <see cref="TileView.SplitterDistances"/>).
  21. /// </summary>
  22. public Pos SplitterDistance { get; }
  23. /// <summary>
  24. /// Container (sender) of the event.
  25. /// </summary>
  26. public TileView TileView { get; }
  27. /// <summary>
  28. /// Gets the index of the splitter that is being moved. This can be
  29. /// used to index <see cref="TileView.SplitterDistances"/>
  30. /// </summary>
  31. public int Idx { get; }
  32. }
  33. }