Modes

Gridraw has a concept of “mode”. As with the modes used in vi and vim, switching the modes changes the key bindings etc. This allows various operations only using the keyboard.

This section describes the common modes in the Class and Sequence diagrams. About the unique modes in Class and Sequence, please refer to the followings.

The mode is displayed at the lower left on the screen.

orig/mode-line-674575d0ff0144dea0b491e0b4958a9ba2d00aa1523439da8f709986c1a0b1f9.png

Cell Mode

This is the mode for selecting and moving cells, and others. This mode serves as the starting point for all operations. Gridraw starts in this mode at startup. Usually you can return to the Cell Mode by pressing ESC a few times. If you do not know what to do during operation, press ESC several times and start again from the Cell Mode.

orig/seq32.png

Vertical mode / Horizontal mode

The cell mode in Sequence diagram contains Vertical mode and Horizontal mode. Pressing <Space>, toggles the Vertical mode and Horizontal mode. In addition, pressing <Ctrl + Space> switches to the Vertical mode, pressing <Shift + Space> switches to the Horizontal mode, without toggling. The initial mode at the start-up is Horizontal mode.

The horizontal lines of grid is highlighted in the Horizontal mode.

orig/cell-mode-horz.png

On the other hand, the vertical lines of grid is highlighted in the Vertical mode.

orig/cell-mode-vert.png

If you lost the now mode which is selected, you can see the current mode by pressing <Space> several times, because the highlight of the grid lines are changed.

The behaviors varies as follows depending on the Vertical or Horizontal modes.

Horizontal mode  
i Insert a lifeline.
o Insert a row.
dd Remove a row.
Vertical mode  
i Insert a message.
o Insert a column.
dd Remove a column.

Select Cell Mode

orig/select-cell-mode-674575d0ff0144dea0b491e0b4958a9ba2d00aa1523439da8f709986c1a0b1f9.png

This mode is for selecting multiple cells. For more details, refer to link.

Press v in the Cell Mode to switch to this mode. Dragging with the mouse in the Cell Mode also switches to this mode. Press ESC to return to the Cell Mode.

Insert Mode

orig/insert-mode-class-674575d0ff0144dea0b491e0b4958a9ba2d00aa1523439da8f709986c1a0b1f9.png

This mode is for editing the text in a class. It allows much the same operations as the Insert Mode of vi / vim.

Text in the cell are editable in the all same operations. Text of classes, objects, messages, comments and etc. are able to edit.

Press i at the cell in which these text exists, switches to the INSERT MODE. Besides, you can also start the INSERT MODE with the cursor moves the end of the line by pressing , or with the cursor moves the beginning of the line by pressing I.

orig/cls32.png

In addition, it also supports mouse. Double-click the text placed in the cell, switches to the insert mode.

orig/cls32.png

The text in a connector (multiplicity) is a special text which is not arranged in a cell. For these text editing, by pressing the i after the connector selection, you can switch to the INSERT MODE.

Please refer to the connector for more information.

Normal Mode

orig/normal-mode-class-674575d0ff0144dea0b491e0b4958a9ba2d00aa1523439da8f709986c1a0b1f9.png

This mode is mainly for cursor operation in a class. It allows much the same operations as the Normal Mode of vi / vim.

Text in the cell are able to move cursor or edit in the all same operations. Text of classes, objects, messages, comments and etc. are able to operate in the NORMAL MODE.

Press the key as follows at the cell in which these text exists, switches to the NORMAL MODE.

orig/cls32.png

Press <Enter> at the cell in which a class exists.

orig/seq32.png

Press r at the cell in which a class, object, message or text exists.

In the normal mode, you can not input text. Switch to the ‘INSERT MODE’ to input or insert text.

Visual Mode

orig/visual-mode-class-674575d0ff0144dea0b491e0b4958a9ba2d00aa1523439da8f709986c1a0b1f9.png

This mode is for selecting the text in a class. It allows much the same operations as the Visual Mode of vi / vim.

Press v in the Normal Mode (Class) to switch to this mode. Press ESC to return to the Normal Mode (Class).

In addition, you can select the arbitrary range with mouse dragging in the INSERT MODE or NORMAL MODE.

The selected text can be operated as follows:

x / <Ctrl + x> Cut.
y / <Ctrl + c> Copy.