28 Racket
|
method
(send a-racket:sexp-snip get-saved-snips)
→ (listof (is-a?/c snip%)) This returns the list of snips hidden by the sexp snip.
| ||||
superclass: snip% | ||||
|
method
(send a-racket:sexp-snip get-text offset num [ flattened?]) → string? offset : number? num : number? flattened? : boolean? = #f Returns the concatenation of the text for all of the hidden snips.
method
(send a-racket:sexp-snip copy) → (is-a?/c racket:sexp-snip%)
Returns a copy of this snip that includes the hidden snips.
method
stream-out : (is-a?/c editor-stream-out%) Saves the embedded snips
method
(send a-racket:sexp-snip draw dc x y left top right bottom dx dy draw-caret) → void? dc : dc<%> x : real? y : real? left : real? top : real? right : real? bottom : real? dx : real? dy : real? draw-caret : symbol? Draws brackets with a centered ellipses between them.
method
(send a-racket:sexp-snip get-extent dc x y [ w h descent space lspace rspace]) → void? dc : (is-a?/c dc<%>) x : real? y : real? w : (or/c (box/c (and/c real? (not/c negative?))) #f) = #f h : (or/c (box/c (and/c real? (not/c negative?))) #f) = #f
descent : (or/c (box/c (and/c real? (not/c negative?))) #f) = #f space : (or/c (box/c (and/c real? (not/c negative?))) #f) = #f
lspace : (or/c (box/c (and/c real? (not/c negative?))) #f) = #f
rspace : (or/c (box/c (and/c real? (not/c negative?))) #f) = #f Overrides get-extent in snip%.Returns a size corresponding to what this snip draws.
| ||||||
|
method
(send a-racket:text get-limit start) → exact-integer?
start : exact-integer? Returns a limit for backward-matching parenthesis starting at position start.
method
(send a-racket:text balance-parens key-event) → void?
key-event : (is-a?/c key-event%) This function is called when the user types a close parenthesis in the text%. If the close parenthesis that the user inserted does not match the corresponding open parenthesis and the 'framework:fixup-parens preference is #t (see preferences:get) the correct closing parenthesis is inserted. If the 'framework:paren-match preference is #t (see preferences:get) the matching open parenthesis is flashed.
method
(send a-racket:text tabify-on-return?) → boolean?
The result of this method is used to determine if the return key automatically tabs over to the correct position.Override it to change its behavior.
method
start-pos : exact-integer? = (send this get-start-position) Tabs the line containing by start-pos
method
(send a-racket:text tabify-selection [ start end]) → void? start : exact-integer? = (send this get-start-position) end : exact-integer? = (send this get-end-position) Sets the tabbing for the lines containing positions start through end.
method
(send a-racket:text tabify-all) → void?
Tabs all lines.
method
(send a-racket:text insert-return) → void?
Inserts a newline into the buffer. If tabify-on-return? returns #t, this will tabify the new line.
method
(send a-racket:text box-comment-out-selection start-pos end-pos) → void? start-pos : (or/c (symbols 'start) exact-integer?) end-pos : (or/c (symbols 'end) exact-integer?) This method comments out a selection in the text by putting it into a comment box.Removes the region from start-pos to end-pos from the editor and inserts a comment box with that region of text inserted into the box.
If start-pos is 'start, the starting point of the selection is used. If end-pos is 'end, the ending point of the selection is used.
method
(send a-racket:text comment-out-selection start end) → void? start : exact-integer? end : exact-integer? Comments the lines containing positions start through end by inserting a semi-colon at the front of each line.
method
(send a-racket:text uncomment-selection start end) → void? start : exact-integer? end : exact-integer? Uncomments the lines containing positions start through end.
method
(send a-racket:text get-forward-sexp start)
→ (or/c #f exact-integer?) start : exact-integer? Returns the position of the end of next S-expression after position start, or #f if there is no appropriate answer.
method
(send a-racket:text remove-sexp start) → void?
start : exact-integer? Forward-deletes the S-expression starting after the position start.
method
(send a-racket:text forward-sexp start) → void?
start : exact-integer? Moves forward over the S-expression starting at position start.
method
(send a-racket:text flash-forward-sexp start-pos) → void?
start-pos : exact-integer? Flashes the parenthesis that closes the sexpression at start-pos.
method
(send a-racket:text get-backward-sexp start)
→ (or/c exact-integer? #f) start : exact-integer? Returns the position of the start of the S-expression before or containing start, or #f if there is no appropriate answer.
method
(send a-racket:text flash-backward-sexp start-pos) → void?
start-pos : exact-integer? Flashes the parenthesis that opens the sexpression at start-pos.
method
(send a-racket:text backward-sexp start-pos) → void?
start-pos : exact-integer? Move the caret backwards one sexpressionMoves the caret to the beginning of the sexpression that ends at start-pos.
method
(send a-racket:text find-up-sexp start-pos)
→ (or/c #f exact-integer?) start-pos : exact-integer? Returns the position of the beginning of the next sexpression outside the sexpression that contains start-pos. If there is no such sexpression, it returns #f.
method
start : exact-integer? Moves backward out of the S-expression containing the position start.
method
(send a-racket:text find-down-sexp start-pos)
→ (or/c #f exact-integer?) start-pos : exact-integer? Returns the position of the beginning of the next sexpression inside the sexpression that contains start-pos. If there is no such sexpression, it returns #f.
method
start : exact-integer? Moves forward into the next S-expression after the position start.
method
(send a-racket:text remove-parens-forward start) → void?
start : exact-integer? Removes the parentheses from the S-expression starting after the position start.
method
(send a-racket:text select-forward-sexp) → void?
Selects the next S-expression, starting at the start of the current selection.
method
(send a-racket:text select-backward-sexp) → void?
Selects the previous S-expression, starting at the start of the current selection.
method
(send a-racket:text select-up-sexp) → void?
Selects the region to the enclosing S-expression, starting at the start of the current selection.
method
(send a-racket:text select-down-sexp) → void?
Selects the region to the next contained S-expression, starting at the start of the current selection.
method
(send a-racket:text transpose-sexp start) → void?
start : exact-integer? Swaps the S-expression beginning before the position start with the next S-expression following start.
method
(send a-racket:text mark-matching-parenthesis pos) → void?
pos : exact-positive-integer? If the paren after pos is matched, this method highlights it and its matching counterpart in dark green.
method
(send a-racket:text get-tab-size) → exact-integer?
This method returns the current size of the tabs for scheme mode. See also set-tab-size.
method
(send a-racket:text set-tab-size new-size) → void?
new-size : exact-integer? This method sets the tab size for this text.
method
(send a-racket:text introduce-let-ans start-pos) → void?
start-pos : exact-integer? Adds a let around the current s-expression and a printf into the body of the let.
method
(send a-racket:text move-sexp-out start-pos) → void?
start-pos : exact-integer? Replaces the sexpression surrounding the insertion point with the sexpression following the insertion point.
| ||||||||
| ||||||||
|
method
(send a-racket:text get-word-at pos) → string?
pos : exact-positive-integer? Overrides get-word-at in text:autocomplete<%>.Returns the word just before pos, which is then used as the prefix for auto-completion.
method
(send a-racket:text get-start-of-line pos)
→ exact-nonnegative-integer? pos : exact-nonnegative-integer? Overrides get-start-of-line in text:basic<%>.Returns the first non-whitespace character in the paragraph containing pos, unless the position is already there, in which case it returns the first position of the paragraph.
|
| ||||
| ||||
|
method
(send a-racket:text-mode on-disable-surrogate) → void?
Overrides on-disable-surrogate in mode:surrogate-text<%>.Removes the scheme keymap (see also racket:get-keymap) and disables any parenthesis highlighting in the host editor.
method
(send a-racket:text-mode on-enable-surrogate) → void?
Overrides on-enable-surrogate in mode:surrogate-text<%>.Adds the scheme keymap (see also racket:get-keymap) and enables a parenthesis highlighting in the host editor.
| ||||
|
|
superclass: (racket:set-mode-mixin (racket:text-mixin (text:autocomplete-mixin (mode:host-text-mixin color:text%)))) |
|
superclass: (racket:text-mode-mixin color:text-mode%) |
procedure
(racket:text-balanced? text [start end]) → boolean?
text : (is-a?/c text%) start : number? = 0 end : (or/c false/c number?) = #f
procedure
procedure
(racket:get-keymap) → (is-a?/c keymap%)
procedure
These symbols are suitable for input to racket:short-sym->pref-name and racket:short-sym->style-name.
procedure
(racket:short-sym->pref-name short-sym) → symbol?
short-sym : symbol?
procedure
(racket:short-sym->style-name short-sym) → string?
short-sym : symbol?
procedure
(racket:get-wordbreak-map) → (is-a?/c editor-wordbreak-map%)
procedure
(racket:init-wordbreak-map key) → void?
key : (is-a?/c keymap%)
procedure
(racket:setup-keymap keymap) → void?
keymap : (is-a?/c keymap%)