2.8. Details of Edit Commands

2.8.1. Undo and Redo

When the user selects Undo from the Edit menu, the system undoes the effect of the most recently confirmed updating command, or the effect of a previously executed Undo command. An updating command is any CSTutor-Teacher command in the creation of a tutorial that leads to an unsaved change. The definition of user actions that lead to an usaved change is given in Section 2.7.1. For any of these actions, the precise definition of Undo is that the CSTutor-Teacher workspace is restored to the state that existed immediately prior to the confirmed execution of the action. If no confirmed updating command has been executed since the CSTutor-Teacher was invoked, Undo has no effect.

If Undo is executed twice in succession, with no intervening confirmed update between the two executions, the two most recent unsaved changes are undone. That is, the state of the workspace is restored to the state that existed immediately prior to the second Undo. Third and further successive executions of Undo, without an intervening updating command, continue to cause the system to take steps back in the lists of unsaved changes. This behavior means that multiple levels of undo and redo are available.

Redo performs the most recently undone command. That is, for every invocation of Undo, a command is added to a list, Redo peforms the command at the end of the list in a First in Last out manner. Repeated invocations of Redo when there have been no commands undone has no effect on the system. Undo and Redo only apply to the updating commands and themselves, not to any other commands. Specifically, Undo and Redo do not apply to:

2.8.2. Cut, Copy, and Paste

To execute the Cut or Copy command, the user must first select a segment of text in a text box or select a graphic within the drawing tool. This selection is performed using click and drag with the mouse.

After the selection, when the user selects the Cut command from the Edit menu, the system removes the selected text or graphic from the edit box and copies it over into the clipboard. When the user selects the Copy command, the selected text or graphic is copied to the clipboard, but is not removed from the display in which it is selected and the text or graphic remains selected. A particular segment of selected text is unselected by selecting another text or graphical segment or by single-clicking the mouse anywhere in the CSTutor display. Other environment-specific means of unselecting text may be available.

The Cut command can only be executed in the context of a display where the text boxes and graphical images are editable, i.e., where the user may type in the text boxes or draw on the graphic. In contrast to Cut, the Copy command can be executed in any dialog in which text boxes or graphics appear.

To execute the Paste command, the user must first execute a Cut or Copy and then place the typing cursor within some editable text box or in the case of a graphic, click the canvas on which to output the graphic. After these steps, when the user selects the Paste command from the Edit menu, the text or graphic stored in the clipboard is inserted at the point of the typing cursor, as if it had been entered by the user from the keyboard. If the content of the clipboard is a graphic, then the graphic is placed on the upper left hand corner of the selected canvas. Pasted text and graphics are not highlighted when pasted.

If the user attempts to execute a Cut or Copy command without first selecting text or a graphic, the commands have no effect. If the user attempts to execute a Paste command without having executed either a Cut or Copy, the Paste command has no effect.

The use of the clipboard for communication between the CSTutor and the outside operating environment depends on the capabilities of the environment. Specifically, the environment must support the insertion and removal of plain text and images to and from the clipboard. If this requirement is met, and the operating environment permits inter-tool clipboard communication, then plain text and graphics copied to the clipboard from another tool can be pasted in the CSTutor using Paste.




Prev: file | Next: [none] | Up: functional | Top: index