ISuggestionGenerator.cs 573 B

1234567891011121314151617181920
  1. using System.Collections.Generic;
  2. using Rune = System.Rune;
  3. namespace Terminal.Gui {
  4. /// <summary>
  5. /// Generates autocomplete <see cref="Suggestion"/> based on a given cursor location within a string
  6. /// </summary>
  7. public interface ISuggestionGenerator {
  8. /// <summary>
  9. /// Generates autocomplete <see cref="Suggestion"/> based on a given cursor location <paramref name="idx"/>
  10. /// within a <paramref name="currentLine"/>
  11. /// </summary>
  12. IEnumerable<Suggestion> GenerateSuggestions (List<Rune> currentLine, int idx);
  13. bool IsWordChar (Rune rune);
  14. }
  15. }