27 Text
|
Classes matching this interface are expected to implement the basic functionality needed by the framework.
(send a-text:basic highlight-range
start
end
color
[
bitmap
caret-space
priority])
→
start : exact-integer
end : exact-integer
color : (instance color%)
bitmap : (union |#f| (instance bitmap%)) = |#f|
caret-space : boolean = |#f|
priority : (union 'high 'low) = 'low
This function highlights a region of text in the buffer.
The range between start and end will be highlighted with the color in color, and bitmap will be painted over the range of text in black and white. If bitmap is #f, the range will be inverted, using the platform specific xor. This method is not recommended, because the selection is also displayed using xor.
If caret-space? is not #f, the left edge of the range will be one pixel short, to leave space for the caret. The caret does not interfere with the right hand side of the range. Note that under X windows the caret is drawn with XOR, which means almost anything can happen. So if the caret is in the middle of the range it may be hard to see, or if it is on the left of the range and caret-space? is #f it may also be hard to see.
The priority argument indicates the relative priority for drawing overlapping regions. If two regions overlap and have different priorities, the region with 'high priority will be drawn second and only it will be visible in the overlapping region.
This method returns a thunk, which, when invoked, will turn off the highlighting from this range.
See also unhighlight-range.
(send a-text:basic unhighlight-range
start
end
color
[
bitmap
caret-space])
→
start : exact-integer
end : exact-integer
color : (instance color%)
bitmap : (union |#f| (instance bitmap%)) = |#f|
caret-space : boolean = |#f|
This method removes the highlight from a region of text in the buffer.
The region must match up to a region specified from an earlier call to highlight-range.
(send a-text:basic get-highlighted-ranges) → (listof range)
Returns a list of (opaque) values representing the active ranges in the editor.
(send a-text:basic get-styles-fixed) → boolean
If the result of this function is #t, the styles in this text:basic<%> will be fixed. This means that any text inserted to this editor has its style set to this editor’s style-list%’s "Standard" style.
See also set-styles-fixed.
(send a-text:basic get-fixed-style) → (is-a?/c style<%>)
Returns the style used by set-styles-fixedwhen setting the styles.
(send a-text:basic set-styles-fixed fixed?) → void
fixed? : boolean
Sets the styles fixed parameter of this text%. See also get-styles-fixed and get-fixed-style.
(send a-text:basic move/copy-to-edit
dest-text
start
end
dest-pos)
→
dest-text : (instance text%)
start : exact-integer
end : exact-integer
dest-pos : exact-integer
This moves or copies text and snips to another edit.
Moves or copies from the edit starting at start and ending at end. It puts the copied text and snips in dest-text starting at location dest-pos.
If a snip refused to be moved, it will be copied, otherwise it will be moved. A snip may refuse to be moved by returning #f from release-from-owner.
(send a-text:basic initial-autowrap-bitmap)
→ (union |#f| (instance bitmap%))
The result of this method is used as the initial autowrap bitmap. Override this method to change the initial bitmap%. See also set-autowrap-bitmap
Defaultly returns the result of icon:get-autowrap-bitmap
(send a-text:basic get-port-name) → symbol?
The result of this method is a symbol that identifies this editor and that is used as the port-name of a port that is read from this editor if this editor is used in DrScheme. See also port-name-matches?.
(send a-text:basic port-name-matches? id) → boolean
Indicates if id matches the port name of this file. If the file is saved, the port name matches when the save file is the path as id. If the file has not been saved, the port name matches if the symbol is the same as the result of port-name-matches?.
text:basic-mixin : (class? . -> . class?) | ||||
| ||||
|
This mixin implements the basic functionality needed for text% objects in the framework.
The class that this mixin produces uses the same initialization arguments as it’s input.
before?
dc
left
top
right
bottom
dx
dy
draw-caret)
→
before? : any/c
left : real?
top : real?
right : real?
bottom : real?
dx : real?
dy : real?
draw-caret : (one-of/c 'no-caret 'show-inactive-caret 'show-caret)
Overrides on-paint in editor<%>.
Draws the rectangles installed by highlight-range.
start : exact-int
end : exact-int
See set-styles-fixed.
(send a-text:basic after-insert start len) → void
start : nonnegative-exact-integer?
len : nonnegative-exact-integer?
Augments after-insert in text%.
See set-styles-fixed.
directory
default-name)
→
directory : path
default-name : path
Overrides put-file in editor<%>.
Like put-file but uses finder:put-file instead of put-file.
|
text:foreground-color-mixin : (class? . -> . class?) | ||||
| ||||
|
This mixin changes the default text style to have the foreground color controlled by editor:set-default-font-color.
(send a-text:foreground-color default-style-name) → string
Overrides default-style-name in editor<%>.
Returns the result of editor:get-default-color-style-name.
(send a-text:foreground-color get-fixed-style)
Overrides get-fixed-style in text:basic<%>.
Returns the style named by editor:get-default-color-style-name.
|
This class hides the caret, except when the selection is active.
Instances of this class are useful for editors that used for displaying purposes, but still allow users to copy their text.
text:hide-caret/selection-mixin : (class? . -> . class?) | ||
| ||
|
(send a-text:hide-caret/selection after-set-position) → void
Augments after-set-position in text%.
Calls hide-caret to hide the caret when there is only a caret and no selection.
|
Classes that implement this interface silently change non-breaking spaces, ie the character (integer->char 160), to regular spaces when inserted into the editor.
text:nbsp->space-mixin : (class? . -> . class?) | ||
| ||
|
start
end)
→
start : exact-int
end : exact-int
Starts an edit-sequence by calling begin-edit-sequence.
(send a-text:nbsp->space after-insert
start
len)
→
start : nonnegative-exact-integer?
len : nonnegative-exact-integer?
Augments after-insert in text%.
Replaces all non-breaking space characters (integer->char 160) by #\space characters.
Ends the edit sequence (by calling end-edit-sequence) started in on-insert.
|
Any object matching this interface can be searched.
text:searching-mixin : (class? . -> . class?) | ||||
| ||||
|
This text% can be searched.
The result of this mixin uses the same initialization arguments as the mixin’s argument.
(send a-text:searching get-keymaps)
→ (list-of (instance keymap%))
Overrides get-keymaps in editor:keymap<%>.
This returns a list containing the super-class’s keymaps, plus the result of keymap:get-search
|
Objects supporting this interface were created by text:return-mixin.
text:return-mixin : (class? . -> . class?) | ||
| ||
|
Use this buffer to perform some special action when return is typed.
(new text:return-mixin [return return])
return : (-> boolean)
(send a-text:return on-local-char event) → void
event : (is-a?/c key-event%)
Overrides on-local-char in editor<%>.
If key is either return or newline, only invoke the return thunk (initialization argument) and do nothing else.
|
(send a-text:wide-snip add-wide-snip snip) → void
snip : (instance snip%)
Registers a snip in this editor to be resized when its viewing area changes. Ensures the snip is as wide as the viewing area.
This method should only be called by add-tall-snip.
(send a-text:wide-snip add-tall-snip snip) → void
Registers a snip in this editor. It is resized when the viewing area of the editor changes.
This method should only be called by add-tall-snip.
text:wide-snip-mixin : (class? . -> . class?) | ||
| ||
|
|
Implementations of this interface copy all of the changes to this editor to the result of get-delegate except instead of regular string and tab snips, instead instances of text:1-pixel-string-snip% and text:1-pixel-tab-snip% are created.
The contents of the two editor are kept in sync, as modifications to this object happen.
(send a-text:delegate get-delegate)
→ (union |#f| (instanceof text%))
The result of this method is the text% object that the contents of this editor are being delegated to, or #f, if there is none.
(send a-text:delegate set-delegate delegate) → void
delegate : (union |#f| (instanceof text%))
This method sets the current delegate.
When it is set, all of the snips are copied from this object to delegate. Additionally, if this object implements scheme:text<%> the tab settings of delegate are updated to match this objects.
superclass: string-snip% |
This class re-uses the implementation of string-snip% to implement a string snip that just draws a single pixel for each character in the string.
See also text:1-pixel-tab-snip% for a similar extension to the tab-snip%class.
This snip is used in conjunction with the frame:delegate<%> and text:delegate<%> interfaces.
position
first
second)
→
position : exact
Fills the boxes with instance of text:1-pixel-string-snip%s.
Creates and returns an instance of text:1-pixel-string-snip%.
(send a-text:1-pixel-string-snip get-extent
dc
x
y
[
w
h
descent
space
lspace
rspace])
→
dc : (instanceof dc<%>)
x : real
y : real
w : (box (union non-negative-real-number |#f|)) = |#f|
h : (box (union non-negative-real-number |#f|)) = |#f|
descent : (box (union non-negative-real-number |#f|)) = |#f|
space : (box (union non-negative-real-number |#f|)) = |#f|
lspace : (box (union non-negative-real-number |#f|)) = |#f|
rspace : (box (union non-negative-real-number |#f|)) = |#f|
Overrides get-extent in snip%.
Sets the descent, space, lspace, and rspace to zero. Sets the height to 1. Sets the width to the number of characters in the string.
s
len
[
pos])
→
s : string
len : exact
pos : exact = 0
Overrides insert in string-snip%.
dc
x
y
left
top
right
bottom
dx
dy
draw-caret)
→
dc : (instanceof dc<%>)
x : real
y : real
left : real
top : real
right : real
bottom : real
dx : real
dy : real
draw-caret : (union 'no-caret 'show-inactive-caret 'show-caret)
Draws black pixels for non-whitespace characters and draws nothing for whitespace characters.
superclass: tab-snip% |
This class re-uses the implementation of tab-snip% to implement a string snip that is always one pixel high.
See also text:1-pixel-string-snip% for a similar extension to the string-snip%class.
This snip is used in conjunction with the frame:delegate<%> and text:delegate<%> interfaces.
position
first
second)
→
position : exact
Fills the boxes with instance of text:1-pixel-tab-snip%s.
Creates and returns an instance of text:1-pixel-tab-snip%.
(send a-text:1-pixel-tab-snip get-extent
dc
x
y
[
w
h
descent
space
lspace
rspace])
→
dc : (instanceof dc<%>)
x : real
y : real
w : (box (union non-negative-real-number |#f|)) = |#f|
h : (box (union non-negative-real-number |#f|)) = |#f|
descent : (box (union non-negative-real-number |#f|)) = |#f|
space : (box (union non-negative-real-number |#f|)) = |#f|
lspace : (box (union non-negative-real-number |#f|)) = |#f|
rspace : (box (union non-negative-real-number |#f|)) = |#f|
Overrides get-extent in snip%.
Sets the descent, space, lspace, and rspace to zero. Sets the height to 1. Sets the width to the width of tabs as returned in the tab-width parameter of the get-tabs method.
dc
x
y
left
top
right
bottom
dx
dy
draw-caret)
→
dc : (instanceof dc<%>)
x : real
y : real
left : real
top : real
right : real
bottom : real
dx : real
dy : real
draw-caret : (union 'no-caret 'show-inactive-caret 'show-caret)
Draws nothing.
text:delegate-mixin : (class? . -> . class?) | ||
| ||
|
This mixin provides an implementation of the text:delegate<%> interface.
(send a-text:delegate highlight-range
start
end
color
bitmap
[
caret-space
priority])
→
start : exact-integer
end : exact-integer
color : (instance color%)
bitmap : (union |#f| (instance bitmap%))
caret-space : boolean = |#f|
priority : (union 'high 'low) = 'low
Overrides highlight-range in text:basic<%>.
In addition to calling the super method, highlight-range, this method forwards the highlighting to the delegatee.
(send a-text:delegate unhighlight-range
start
end
color
[
bitmap
caret-space])
→
start : exact-integer
end : exact-integer
color : (instance color%)
bitmap : (union |#f| (instance bitmap%)) = |#f|
caret-space : boolean = |#f|
Overrides unhighlight-range in text:basic<%>.
This method propagates the call to the delegate.
before?
dc
left
top
right
bottom
dx
dy
draw-caret)
→
before? : any/c
left : real?
top : real?
right : real?
bottom : real?
dx : real?
dy : real?
draw-caret : (one-of/c 'no-caret 'show-inactive-caret 'show-caret)
Overrides on-paint in editor<%>.
Draws a blue region in the delegatee editor that shows where the visible region of the delegate editor is.
(send a-text:delegate on-edit-sequence) → void
Augments on-edit-sequence in editor<%>.
starts an edit sequence in the delegate.
(send a-text:delegate after-edit-sequence) → void
Augments after-edit-sequence in editor<%>.
ends an edit sequence in the delegate.
snip
redraw-now?)
→
redraw-now? : boolean
Overrides resized in editor<%>.
Sends a message to the delegate to update the size of the copied snip, if there is one.
(send a-text:delegate after-insert
start
len)
→
start : number
len : number
Augments after-insert in text%.
forwards the change to the delegate
(send a-text:delegate after-delete
start
len)
→
start : number
len : number
Augments after-delete in text%.
forwards the change to the delegate.
(send a-text:delegate after-change-style
start
len)
→
start : number
len : number
Augments after-change-style in text%.
forwards the changed style to the delegate.
(send a-text:delegate on-load-file
filename
format)
→
filename : string
format : symbol?
Augments on-load-file in editor<%>.
remembers the filename, for use in after-load-file.
(send a-text:delegate after-load-file success?) → void
success? : boolean
Augments after-load-file in editor<%>.
updates the delegate with the new contents of the text.
|
Objects supporting this interface are expected to send information about themselves to the frame that is displaying them.
text:info-mixin : (class? . -> . class?) | ||||
| ||||
|
This mixin adds support for supplying information to objects created with frame:info-mixin. When this editor:basic<%> is displayed in a frame, that frame must have been created with frame:info-mixin.
(send a-text:info set-anchor on?) → void
on? : any/c
Overrides set-anchor in text%.
Calls the anchor-status-changed method of the frame that is viewing this object. It uses get-canvas to get the canvas for this frame, and uses that canvas’s top-level-window<%> as the frame.
(send a-text:info set-overwrite-mode on?) → void
on? : any/c
Overrides set-overwrite-mode in text%.
Calls the overwrite-status-changedmethod of the frame that is viewing this object. It uses get-canvas to get the canvas for this frame, and uses that canvas’s top-level-window<%> as the frame.
(send a-text:info after-set-position) → void
Augments after-set-position in text%.
Calls the editor-position-changed method of the frame that is viewing this object. It uses get-canvas to get the canvas for this frame, and uses that canvas’s top-level-window<%> as the frame.
(send a-text:info after-insert start len) → void
start : nonnegative-exact-integer?
len : nonnegative-exact-integer?
Augments after-insert in text%.
Calls the editor-position-changed method of the frame that is viewing this object. It uses get-canvas to get the canvas for this frame, and uses that canvas’s top-level-window<%> as the frame.
(send a-text:info after-delete start len) → void
start : nonnegative-exact-integer?
len : nonnegative-exact-integer?
Augments after-delete in text%.
Calls the editor-position-changed method of the frame that is viewing this object. It uses get-canvas to get the canvas for this frame, and uses that canvas’s top-level-window<%> as the frame.
|
Objects supporting this interface are expected to support a clever file format when saving.
text:clever-file-format-mixin : (class? . -> . class?) | ||
| ||
|
The result of this mixin uses the same initialization arguments as the mixin’s argument.
When files are saved from this text%, a check is made to see if there are any non-string-snip% objects in the text%. If so, it is saved using the file format 'std. (see set-file-format for more information. If not, the file format passed to save-file is used.
(send a-text:clever-file-format on-save-file
filename
format)
→
filename : path?
format : (one-of/c 'guess 'standard 'text 'text-force-cr 'same 'copy)
Augments on-save-file in editor<%>.
If the method get-file-format returns 'standard and the text has only string-snip%s, the file format is set to 'text.
If the method get-file-format returns 'text and the text has some non string-snip%s, the file format is set to 'standard.
Depending on the user’s preferences, the user may also be queried.
Also, the changes to the file format only happen if the argument file-format is 'copy or 'same.
|
Mixins that implement this interface lock themselves when the file they are editing is read only.
(send a-text:file get-read-write?) → boolean
Indicates whether or not this editor is in read-write mode.
(send a-text:file while-unlocked thunk) → any/c
Unlocks the editor, calls the thunk, and then relocks the editor, all using a dynamic-wind.
text:file-mixin : (class? . -> . class?) | ||||
| ||||
|
(send a-text:file can-insert? start len) → boolean
start : number
len : number
Augments can-insert? in text%.
Returns false if the result of get-read-write? is true, otherwise returns the result of calling inner.
(send a-text:file can-delete? start len) → boolean
start : number
len : number
Augments can-delete? in text%.
Returns false if the result of get-read-write? is true, otherwise returns the result of calling inner.
(send a-text:file after-save-file) → void
Augments after-save-file in editor<%>.
Checks if the newly saved file is write-only in the filesystem. If so, locks the editor with the lock method. Otherwise unlocks the buffer
For each canvas returned from get-canvases it checks to see if the canvas%’s get-top-level-window matches the frame:editor<%> interface. If so, it calls set-label with the last part of the filename (ie, the name of the file, not the directory the file is in).
(send a-text:file after-load-file) → void
Augments after-load-file in editor<%>.
Checks if the newly loaded file is write-only in the filesystem. If so, locks the editor with the lock method. Otherwise unlocks the buffer
For each canvas returned from get-canvases it checks to see if the canvas%’s get-top-level-window matches the frame:editor<%> interface. If so, it calls set-label with the last part of the filename (ie, the name of the file, not the directory the file is in).
Classes implementing this interface (via the associated mixin) support input and output ports that read from the editor.
There are two input ports: the normal input port just reads from the editor’s contents directly and the box input port inserts an editor snip into this text and uses input typed into the box as input into the port.
They create three threads to mediate access to the input and output ports (one for each input port and one for all of the output ports).
start : exact-integer
end : exact-integer
Deletes the text between start and end without changing the behavior of the ports (otherwise, deleting the text would break internal invariants of the port).
Both start and end must be less than get-insertion-point (or else it is safe to delete them so you don’t need this method).
(send a-text:ports get-insertion-point) → exact-integer
Returns the position where characters put into the output port will appear.
(send a-text:ports set-insertion-point ip) → void
ip : exact-integer
Sets the position where the output port will insert characters. See also get-insertion-point.
(send a-text:ports get-unread-start-point) → exact-integer
Returns the position where input will be taken into the input port (after the next time return is typed).
(send a-text:ports set-unread-start-point usp) → void
usp : exact-integer
Sets the position where input will be taken into the input port (after the next time return is typed).
See also get-unread-start-point.
(send a-text:ports set-allow-edits allow-edits?) → void
allow-edits? : boolean
Enables or disables editing in the buffer. Be sure to update the unread start point (via set-unread-start-point) and the insertion point (via set-insertion-point) after making changes to the buffer.
(send a-text:ports get-allow-edits) → boolean
Indicates if editing is allowed in the buffer at this point.
(send a-text:ports insert-between str) → void
Inserts some text between the unread start point and the insertion point (and updates them properly). To insert before the two points, see insert-before.
See also set-unread-start-point and set-insertion-point.
(send a-text:ports insert-before str) → void
Inserts some text before the unread start point and updates it and the insertion point properly. To insert between the two points, see insert-between.
See also set-unread-start-point and set-insertion-point.
(send a-text:ports submit-to-port? key) → boolean
key : char
Augment this method to help control when characters should be submitted to the input port.
Return #t or the result of calling inner.
This method is called when text is sent into the input port.
Does nothing.
(send a-text:ports send-eof-to-in-port) → void
This method puts an eof into the input port.
(send a-text:ports send-eof-to-box-in-port) → void
This method puts an eof into the box input port.
(send a-text:ports reset-input-box) → void
This method removes the current input box from the editor (and all input in it is lost).
(send a-text:ports clear-output-ports) → void
Flushes all of the data in all of the output ports that hasn’t appeared in the editor yet.
(send a-text:ports clear-input-port) → void
Flushes all of the data in the input port that hasn’t yet been read. Reading will now block.
(send a-text:ports clear-box-input-port) → void
Flushes all of the data in the box input port that hasn’t yet been read. Reading will now block.
(send a-text:ports get-out-style-delta)
→ (or/c (is-a?/c style-delta%) string?)
The result of this method is the style that is used to color text submitted to the result of get-out-port.
If the result is a string that is not mapped in the editor’s style list, the style named "Standard" is used and if that isn’t mapped, the style named "Basic" is used.
This method is called during the initialization of the class.
Defaultly returns "text:ports out" which is mapped to a blue style in the style list returned by editor:get-standard-style-list.
(send a-text:ports get-err-style-delta)
→ (or/c (is-a?/c style-delta%) string?)
The result of this method is the style that is used to color text submitted to the result of get-err-port.
If the result is a string that is not mapped in the editor’s style list, the style named "Standard" is used and if that isn’t mapped, the style named "Basic" is used.
This method is called during the initialization of the class.
Defaultly returns "text:ports err" which is mapped to a red italic style in the style list returned by editor:get-standard-style-list.
(send a-text:ports get-value-style-delta)
→ (or/c (is-a?/c style-delta%) string?)
The result of this method is the style (or the name of the style) that is used to color text submitted to the result of get-value-port.
If the result is a string that is not mapped in the editor’s style list, the style named "Standard" is used and if that isn’t mapped, the style named "Basic" is used.
This method is called during the initialization of the class.
Defaultly returns "text:ports value" which is mapped to a blue style in the style list returned by editor:get-standard-style-list.
(send a-text:ports get-in-port) → input-port
Returns the input port that data in this editor is sent to.
(send a-text:ports get-in-box-port) → input-port
Returns the box input port that data in this editor is sent to.
(send a-text:ports get-out-port) → output-port
Returns an output port that writes into this editor. The only difference between this port and the ports returned by get-err-port and get-value-port is the font style and color.
(send a-text:ports get-err-port) → output-port
Returns an output port that writes into this editor. The only difference between this port and the ports returned by get-err-port and get-out-port is the font style and color.
(send a-text:ports get-value-port) → output-port
Returns an output port that writes into this editor. The only difference between this port and the ports returned by get-err-port and get-out-port is the font style and color.
(send a-text:ports after-io-insertion) → void
This method is called after an insertion due to IO occurs.
(send a-text:ports get-box-input-editor-snip%)
→ (subclass editor-snip%)
The result of this method is used as the class of editor snips that is inserted by the box port in this editor.
(send a-text:ports get-box-input-text%)
→ (is-a?/c text:input-box)
The result of this method is instantiated and placed inside the result of get-box-input-editor-snip%.
text:ports-mixin : (class? . -> . class?) | ||
| ||
|
(send a-text:ports can-insert? start len) → boolean
start : exact-integer
len : exact-integer
Augments can-insert? in text%.
Returns the results of the inner call, unless get-allow-edits returns #f.
(send a-text:ports can-delete? start len) → boolean
start : exact-integer
len : exact-integer
Augments can-delete? in text%.
Returns the results of the inner call, unless get-allow-edits returns #f.
(send a-text:ports on-local-char event) → void
event : (is-a?/c key-event%)
Overrides on-local-char in editor<%>.
Sends the data between the last position and the result of get-unread-start-point to the input port, unless submit-to-port? returns #f.
Also calls on-submit.
(send a-text:ports on-display-size) → void
Augments on-display-size in editor<%>.
Adjusts the embedded editor-snip (used for reading input to the get-in-box-port) to match the width of the editor.
|
Classes that implement this interface are used as the editors for the box input port in text:ports%.
text:input-box-mixin : (class? . -> . class?) | ||
| ||
|
This mixin provides an implementation of text:input-box<%> for use with text:ports<%>.
(send a-text:input-box on-default-char event) → void
event : key-event%
Overrides on-default-char in text%.
Notifies the text:ports<%> enclosing this editor that a new line of input has been provided.
|
The mixin implementing this interface provides an unintrusive autocompletion menu when a particular (configurable) keystroke is pressed.
(send a-text:autocomplete auto-complete) → void
Starts a completion.
(send a-text:autocomplete get-autocomplete-border-color)
The border color for the autocomplete menu. Defaults to "black".
(send a-text:autocomplete get-autocomplete-background-color)
The background color for the non-selected menu items. Defaults to "lavender".
(send a-text:autocomplete get-autocomplete-selected-color)
The background color for the selected menu item. Defaults to (make-object color% 204 153 255).
(send a-text:autocomplete completion-mode-key-event? key-event)
→ boolean
key-event : key-event%
Returns true when the key event passed to it should initiate the completions menu.
(send a-text:autocomplete get-all-words) → (listof string)
Returns the list of the words that autocompletion should choose from.
(send a-text:autocomplete get-word-at pos) → string
pos : positive-exact-integer
Given an editor location, returns the prefix ending at that location that autocompletion should try to complete.
text:autocomplete-mixin : (class? . -> . class?) | ||
| ||
|
Overrides on-paint in editor<%>.
Draws the completion menu (when it is popped up).
Overrides on-char in editor<%>.
Takes over the handling of key events when the completions menu is visible. Also, when the completions menu is not visible, it calls the completion-mode-key-event? method to see if it should start completing.
Overrides on-event in editor<%>.
This method is overridden to allow mouse access of the completions menu. It only handles events when there is a menu open and the mouse is in the menu, in which case it makes the menu trace the mouse.
The only time it does not call the super method is when the mouse is button is pushed.
superclass: (text:basic-mixin (editor:basic-mixin text%)) |
superclass: (text:hide-caret/selection-mixin text:basic%) |
superclass: (text:nbsp->space-mixin text:basic%) |
superclass: (text:delegate-mixin text:basic%) |
superclass: (text:wide-snip-mixin text:basic%) |
superclass: (editor:standard-style-list-mixin text:wide-snip%) |
superclass: (text:input-box-mixin text:standard-style-list%) |
superclass: (editor:keymap-mixin text:standard-style-list%) |
superclass: (text:return-mixin text:keymap%) |
superclass: (editor:autowrap-mixin text:keymap%) |
superclass: (text:file-mixin (editor:file-mixin text:autowrap%)) |
superclass: (text:clever-file-format-mixin text:file%) |
superclass: (editor:backup-autosave-mixin text:clever-file-format%) |
superclass: (text:searching-mixin text:backup-autosave%) |
superclass: (text:info-mixin (editor:info-mixin text:searching%)) |
(text:autocomplete-append-after suffix) → void? |
suffix : string? |
A string that is inserted after a completion is inserted by a text:autocomplete instance.
Defaults to "".
(text:autocomplete-limit) → (and/c integer? exact? positive?) |
(text:autocomplete-limit count) → void? |
Controls the number of completions visible at a time in the menu produced by text:autocomplete instances.
Defaults to 15.
(text:get-completions/manuals manuals) → (listof string?) |
Returns the list of keywords for the manuals from manuals by extracting all of the documented exports of the manuals. The symbols are meant to be module paths. If manuals is false, then all of the documented names are used.