ISuggestionGenerator.cs 786 B

12345678910111213141516171819202122232425
  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 <paramref name="context"/>
  10. /// </summary>
  11. IEnumerable<Suggestion> GenerateSuggestions (AutocompleteContext context);
  12. /// <summary>
  13. /// Returns <see langword="true"/> if <paramref name="rune"/> is a character that
  14. /// would continue autocomplete suggesting. Returns <see langword="false"/> if it
  15. /// is a 'breaking' character (i.e. terminating current word boundary)
  16. /// </summary>
  17. bool IsWordChar (Rune rune);
  18. }
  19. }