pasteboard% : class? | ||
superclass: object% | ||
|
(new pasteboard%) → (is-a?/c pasteboard%)
A new keymap% object is created for the new editor. See also get-keymap and set-keymap.
A new style-list% object is created for the new editor. See also get-style-list and set-style-list.
(send a-pasteboard add-selected snip) → void? snip : (is-a?/c snip%) (send a-pasteboard add-selected x y w h) → void? x : real? y : real? w : (and/c real? (not/c negative?)) h : (and/c real? (not/c negative?))
The selection in a pasteboard can be changed by the system in response to other method calls, and such changes do not go through this method; use on-select to monitor selection changes.
(send a-pasteboard after-delete snip) → void? snip : (is-a?/c snip%)
See also can-delete? and on-edit-sequence.
No internals locks are set when this method is called.
Default implementation: Does nothing.
(send a-pasteboard after-insert snip before x y) → void? snip : (is-a?/c snip%) before : (or/c (is-a?/c snip%) false/c) x : real? y : real?
See also can-insert? and on-edit-sequence.
No internals locks are set when this method is called.
Default implementation: Does nothing.
(send a-pasteboard after-interactive-move event) → void? event : (is-a?/c mouse-event%)
See also can-interactive-move? and on-interactive-move.
Default implementation: Does nothing.
(send a-pasteboard after-interactive-resize snip) → void? snip : (is-a?/c snip%)
See also can-interactive-resize? and on-interactive-resize.
Default implementation: Does nothing.
(send a-pasteboard after-move-to snip x y dragging?) → void? snip : (is-a?/c snip%) x : real? y : real? dragging? : any/c
If dragging? is not #f, then this move was a temporary move for dragging.
See also can-move-to? and on-edit-sequence.
No internals locks are set when this method is called.
Default implementation: Does nothing.
(send a-pasteboard after-reorder snip to-snip before?) → boolean? snip : (is-a?/c snip%) to-snip : (is-a?/c snip%) before? : any/c
If before? is #t, then snip was moved before to-snip, otherwise snip was moved after to-snip.
See also can-reorder? and on-edit-sequence.
No internals locks are set when this method is called.
Default implementation: Does nothing.
(send a-pasteboard after-resize snip w h resized?) → void? snip : (is-a?/c snip%) w : (and/c real? (not/c negative?)) h : (and/c real? (not/c negative?)) resized? : any/c
If resized? is not #f, the snip was successfully resized.
See also can-resize? and on-edit-sequence.
No internals locks are set when this method is called.
Default implementation: Does nothing.
If on? is #t, then snip was just selected, otherwise snip was just deselected.
See also can-select? and on-edit-sequence.
No internals locks are set when this method is called.
Default implementation: Does nothing.
(send a-pasteboard can-delete? snip) → boolean? snip : (is-a?/c snip%)
See also on-delete and after-delete.
The editor is internally locked for writing when this method is called (see also Internal Editor Locks).
Default implementation: Returns #t.
(send a-pasteboard can-insert? snip before x y) → boolean? snip : (is-a?/c snip%) before : (or/c (is-a?/c snip%) false/c) x : real? y : real?
See also on-insert and after-insert.
The editor is internally locked for writing when this method is called (see also Internal Editor Locks).
Default implementation: Returns #t.
(send a-pasteboard can-interactive-move? event) → boolean? event : (is-a?/c mouse-event%)
See also on-interactive-move, after-interactive-move, and interactive-adjust-move.
Default implementation: Returns #t.
(send a-pasteboard can-interactive-resize? snip) → boolean? snip : (is-a?/c snip%)
The snip argument is the snip that will be resized.
See also after-interactive-resize, after-interactive-resize, and interactive-adjust-resize.
Default implementation: Returns #t.
(send a-pasteboard can-move-to? snip x y dragging?) → boolean? snip : (is-a?/c snip%) x : real? y : real? dragging? : any/c
If dragging? is not #f, then this move is a temporary move for dragging.
See also on-move-to and after-move-to.
The editor is internally locked for writing when this method is called (see also Internal Editor Locks).
Default implementation: Returns #t.
(send a-pasteboard can-reorder? snip to-snip before?) → boolean? snip : (is-a?/c snip%) to-snip : (is-a?/c snip%) before? : any/c
If before? is #t, then snip is to be moved before to-snip, otherwise snip is to be moved after to-snip.
See also on-reorder and after-reorder.
The editor is internally locked for writing when this method is called (see also Internal Editor Locks).
Default implementation: Returns #t.
(send a-pasteboard can-resize? snip w h) → boolean? snip : (is-a?/c snip%) w : (and/c real? (not/c negative?)) h : (and/c real? (not/c negative?))
See also on-resize and after-resize.
The editor is internally locked for writing when this method is called (see also Internal Editor Locks).
Default implementation: Returns #t.
If on? is #t, then snip will be selected, otherwise snip will be deselected.
See also on-select and after-select.
The editor is internally locked for writing when this method is called (see also Internal Editor Locks).
Default implementation: Returns #t.
(send a-pasteboard change-style [style snip]) → void?
style : (or/c (is-a?/c style-delta%) (is-a?/c style<%>) #f) = #f snip : (or/c (is-a?/c snip%) #f) = #f
To change a large collection of snips from one style to another style, consider providing a style<%> instance rather than a style-delta% instance. Otherwise, change-style must convert the style-delta% instance to the style<%> instance for every snip; this conversion consumes both time and (temporary) memory.
When a style is provided: The editor’s style list must contain style, otherwise the style is not changed. See also convert in style-list%.
(send a-pasteboard copy-self-to dest) → void? dest : (or/c (is-a?/c text%) (is-a?/c pasteboard%))
The content of an editor can be changed by the system in response to other method calls, and such changes do not go through this method; use on-delete to monitor content deletion changes.
(send a-pasteboard do-copy time extend?) → void? time : exact-integer? extend? : any/c
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.
Default implementation: Copies the current selection, extending the current clipboard contexts if extend? is true.
(send a-pasteboard do-paste time) → void? time : exact-integer?
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.
Default implementation: Pastes.
(send a-pasteboard do-paste-x-selection time) → void? time : exact-integer?
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.
Default implementation: Pastes.
See also delete.
(send a-pasteboard find-next-selected-snip start) → (or/c (is-a?/c snip%) false/c) start : (or/c (is-a?/c snip%) false/c)
(send a-pasteboard find-snip x y [after]) → (or/c (is-a?/c snip%) false/c) x : real? y : real? after : (or/c (is-a?/c snip%) false/c) = #f
The x and y arguments are in editor coordinates. If after is not supplied, the frontmost snip at x and y is returned, otherwise the frontmost snip behind after is returned. If after is a snip that is not in the pasteboard, #f is returned.
The result is only valid when the editor is displayed (see Editor Structure and Terminology).
(send a-pasteboard get-center) →
real? real?
The first result is the x-coordinate of the center and the second result is the y-coordinate of the center.
(send a-pasteboard get-dragable) → boolean?
(send a-pasteboard get-selection-visible) → boolean?
(send a-pasteboard insert snip) → void? snip : (is-a?/c snip%) (send a-pasteboard insert snip before x y) → void? snip : (is-a?/c snip%) before : (or/c (is-a?/c snip%) false/c) x : real? y : real? (send a-pasteboard insert snip x y) → void? snip : (is-a?/c snip%) x : real? y : real? (send a-pasteboard insert snip before) → void? snip : (is-a?/c snip%) before : (or/c (is-a?/c snip%) false/c)
See also interactive-adjust-resize.
Default implementation: A negative value for either x or y is replaced with 0.
(send a-pasteboard interactive-adjust-move snip x y) → void? snip : (is-a?/c snip%) x : (box/c real?) y : (box/c real?)
The actual mouse coordinates are first sent through interactive-adjust-mouse before determining the locations passed into this method.
Default implementation: Does nothing.
(send a-pasteboard interactive-adjust-resize snip width height) → void? snip : (is-a?/c snip%) width : (box/c (and/c real? (not/c negative?))) height : (box/c (and/c real? (not/c negative?)))
The actual mouse coordinates are first sent through interactive-adjust-mouse before determining the sizes passed into this method.
Default implementation: Does nothing.
(send a-pasteboard is-selected? snip) → boolean? snip : (is-a?/c snip%)
See also raise, set-before, and set-after.
(send a-pasteboard move snip x y) → void? snip : (is-a?/c snip%) x : real? y : real? (send a-pasteboard move x y) → void? x : real? y : real?
Snip locations in a pasteboard can be changed by the system in response to other method calls, and such changes do not go through this method; use on-move-to to monitor snip position changes.
Snip locations in a pasteboard can be changed by the system in response to other method calls, and such changes do not go through this method; use on-move-to to monitor snip position changes.
(send a-pasteboard no-selected) → void?
The selection in a pasteboard can be changed by the system in response to other method calls, and such changes do not go through this method; use on-select to monitor selection changes.
(send a-pasteboard on-default-event event) → void? event : (is-a?/c mouse-event%)
Clicking on a snip selects the snip. Shift-clicking extends the current selection with the snip.
Clicking in the space between snips drags a selection box; once the mouse button is released, all snips touching the box are selected. Shift-clicking extends the current selection with the new snips.
Double-clicking on a snip calls on-double-click.
Clicking on a selected snip drags the selected snip(s) to a new location.
Clicking on a hiliting tab for a selected object resizes the object.
The editor is internally locked for writing when this method is called (see also Internal Editor Locks). Use after-delete to modify the editor, if necessary.
(send a-pasteboard on-double-click snip event) → void? snip : (is-a?/c snip%) event : (is-a?/c mouse-event%)
Default implementation: If snip accepts events, it is designated as the caret owner and all snips in the editor are unselected.
(send a-pasteboard on-insert snip before x y) → void? snip : (is-a?/c snip%) before : (or/c (is-a?/c snip%) false/c) x : real? y : real?
Called before a snip is inserted from the editor, after can-insert? is called to verify that the insertion is allowed. The after-insert method is guaranteed to be called after the insert has completed.
The editor is internally locked for writing when this method is called (see also Internal Editor Locks). Use after-insert to modify the editor, if necessary.
(send a-pasteboard on-interactive-move event) → void? event : (is-a?/c mouse-event%)
See also interactive-adjust-move.
Default implementation: Does nothing.
(send a-pasteboard on-interactive-resize snip) → void? snip : (is-a?/c snip%)
The snip argument is the snip that will be resized.
Default implementation: Does nothing.
(send a-pasteboard on-move-to snip x y dragging?) → void? snip : (is-a?/c snip%) x : real? y : real? dragging? : any/c
If dragging? is not #f, then this move is a temporary move for dragging.
The editor is internally locked for writing when this method is called (see also Internal Editor Locks). Use after-move-to to modify the editor, if necessary. See also on-interactive-move and interactive-adjust-move.
Default implementation: Does nothing.
(send a-pasteboard on-reorder snip to-snip before?) → void? snip : (is-a?/c snip%) to-snip : (is-a?/c snip%) before? : any/c
If before? is #t, then snip is to be moved before to-snip, otherwise snip is to be moved after to-snip.
The editor is internally locked for writing when this method is called (see also Internal Editor Locks). Use after-reorder to modify the editor, if necessary.
Default implementation: Does nothing.
(send a-pasteboard on-resize snip w h) → void? snip : (is-a?/c snip%) w : (and/c real? (not/c negative?)) h : (and/c real? (not/c negative?))
The editor is internally locked for writing when this method is called (see also Internal Editor Locks). Use after-resize to modify the editor, if necessary.
Note that a snip calls resized, not this method, to notify the pasteboard that the snip resized itself.
Default implementation: Does nothing.
If on? is #t, then snip will be selected, otherwise snip will be deselected.
The editor is internally locked for writing when this method is called (see also Internal Editor Locks). Use after-select to modify the editor, if necessary.
Default implementation: Does nothing.
See also lower, set-before, and set-after.
See also delete.
(send a-pasteboard remove-selected snip) → void? snip : (is-a?/c snip%)
The selection in a pasteboard can be changed by the system in response to other method calls, and such changes do not go through this method; use on-select to monitor selection changes.
(send a-pasteboard resize snip w h) → boolean? snip : (is-a?/c snip%) w : (and/c real? (not/c negative?)) h : (and/c real? (not/c negative?))
(send a-pasteboard set-after snip after) → void? snip : (is-a?/c snip%) after : (or/c (is-a?/c snip%) false/c)
See also raise, lower, and set-before.
(send a-pasteboard set-before snip before) → void? snip : (is-a?/c snip%) before : (or/c (is-a?/c snip%) false/c)
See also raise, lower, and set-after.
(send a-pasteboard set-dragable allow-drag?) → void? allow-drag? : any/c
(send a-pasteboard set-selected snip) → void? snip : (is-a?/c snip%)
The selection in a pasteboard can be changed by the system in response to other method calls, and such changes do not go through this method; use on-select to monitor selection changes.
(send a-pasteboard set-selection-visible visible?) → void? visible? : any/c