5.8. Edit.rsl
(****
*
* Module Edit defines the objects and operations related to generic editing
* in the calendar system.
*
*)
module Edit;
from File import WorkSpace, PreviousState;
from ProjectModule import ProjectDB;
export Clipboard, Selection, SelectionContext;
object Clipboard is
components: string;
description: (*
The clipboard holds a selection of cut or copied text.
*);
end Clipboard;
object Selection is
components: start_position:integer and end_position:integer and
context:string;
description: (*
The workspace text selection is the defined as the starting and ending
character positions in current workspace text context.
*);
end Selection;
object SelectionContext is
components: string;
description: (*
SelectionContext is the text context in which the user makes a
selection.
*);
end SelectionContext;
operation EditUndo is
inputs: uws:WorkSpace;
outputs: uws':WorkSpace;
description: (*
Undo the most recent operation. Only one level of undo/redo
is specified here. Successive invocations of undo toggle between the
current and previous states of the project. Note that the schedule
editing operations support undo by saving a snapshot of the project
in the previous_state component of the workspace.
*);
end EditUndo;
operation EditCut is
inputs: uws:WorkSpace;
outputs: uws':WorkSpace;
description: (*
The currently selected text segment is copied into the clipboard and
removed from its context. The workspace selection in set to empty.
*);
end EditCut;
operation EditCopy is
inputs: uws:WorkSpace;
outputs: uws':WorkSpace;
description: (*
The currently selected text segment is copied into the clipboard;
*);
end EditCopy;
operation EditPaste is
inputs: uws:WorkSpace;
outputs: uws':WorkSpace;
description: (*
Paste the contents of the clipboard into the currently selected
start position, replacing any selected text from start to end position.
*);
end EditPaste;
operation EditDelete is
inputs: uws:WorkSpace;
outputs: uws':WorkSpace;
description: (*
The currently selected text is removed from the context. The workspace
selection in set to empty.
*);
end EditDelete;
end Edit;
Prev: File Commands
| Next: Reporting
| Up: Specification
| Top: index