On this page:
color-textoid<%>
get-text
get-character
last-position
position-paragraph
paragraph-start-position
paragraph-end-position
skip-whitespace
backward-match
backward-containing-sexp
forward-match
classify-position
classify-position*
get-token-range
get-backward-navigation-limit
get-regions
8.6

8 Interface for Clients of Syntax Color Output

 (require syntax-color/color-textoid)
  package: syntax-color-lib

Added in version 1.3 of package syntax-color-lib.

The color-textoid<%> interface matches a subset of the color:text<%> interface. It specifies methods that indentation and expression-navigation functions can use so that they work either on actual color:text<%> objects or in other environments that use the start-colorer in color:text<%> protocol without racket/gui.

method

(send a-color-textoid get-text [start end])  string?

  start : exact-nonnegative-integer? = 0
  end : (or/c exact-nonnegative-integer? 'eof) = 'eof
Like get-text in text%.

method

(send a-color-textoid get-character start)  char?

  start : exact-nonnegative-integer?

method

(send a-color-textoid last-position)

  exact-nonnegative-integer?

method

(send a-color-textoid position-paragraph start 
  [at-eol?]) 
  exact-nonnegative-integer?
  start : exact-nonnegative-integer?
  at-eol? : any/c = #f

method

(send a-color-textoid paragraph-start-position paragraph 
  [visible?]) 
  exact-nonnegative-integer?
  paragraph : exact-nonnegative-integer?
  visible? : any/c = #t

method

(send a-color-textoid paragraph-end-position paragraph 
  [visible?]) 
  exact-nonnegative-integer?
  paragraph : exact-nonnegative-integer?
  visible? : any/c = #t

method

(send a-color-textoid skip-whitespace position 
  direction 
  comments?) 
  exact-nonnegative-integer?
  position : exact-nonnegative-integer?
  direction : (or/c 'forward 'backward)
  comments? : boolean?

method

(send a-color-textoid backward-match position 
  cutoff) 
  (or/c exact-nonnegative-integer? #f)
  position : exact-nonnegative-integer?
  cutoff : exact-nonnegative-integer?

method

(send a-color-textoid backward-containing-sexp position 
  cutoff) 
  (or/c exact-nonnegative-integer? #f)
  position : exact-nonnegative-integer?
  cutoff : exact-nonnegative-integer?

method

(send a-color-textoid forward-match position 
  cutoff) 
  (or/c exact-nonnegative-integer? #f)
  position : exact-nonnegative-integer?
  cutoff : exact-nonnegative-integer?

method

(send a-color-textoid classify-position position)

  (or/c symbol? #f)
  position : exact-nonnegative-integer?

method

(send a-color-textoid classify-position* position)

  (or/c (and/c (hash/c symbol? any/c) immutable?) #f)
  position : exact-nonnegative-integer?

method

(send a-color-textoid get-token-range position)

  
(or/c #f exact-nonnegative-integer?)
(or/c #f exact-nonnegative-integer?)
  position : exact-nonnegative-integer?

method

(send a-color-textoid get-backward-navigation-limit start)

  exact-integer?
  start : exact-integer?

method

(send a-color-textoid get-regions)

  (listof (list/c exact-nonnegative-integer? (or/c exact-nonnegative-integer? 'end)))