SplitterEventArgs.cs 1.2 KB

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