SplitterEventArgs.cs 1.2 KB

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