Previous: The context, Up: The Anatomy of the Graphical User Interface



5.3 The mechanism of creating new graphic objects

Creating a new graphic object works similarly to a finite automaton: You set the starting state (e.g. “Create a segment”) by clicking an icon the the View toolbar, and then choose the desired arguments of the operation (in this case, two hangers), step by step. By pressing the BackSpace key, you return one step back, by pressing Esc, you cancel the creation process and delete the GO that is being created. Once you choose the desired argument (usually by clicking an object with the left mouse button), in case of success the editor moves to another state and allows you to choose another argument. In case of a failure (e.g. when creating a circumscribed circle of three points and having chosen the first two points as equal) the editor reports an error and asks you to choose the last argument again. The error can occur for various reasons: when trying to create a circle circumscribed to three collinear points, or move a fully dependent object, for example. When the creation process is finished, the editor returns to the starting state again so that you can create another GO of the same type.

The GO creating state is global for the whole VRR . You can operate on one page at one time (but you can work in any of the page's Views interchangeably). Setting some other page as the context page resets the process and returns to the starting state. Any action incompatible with the current GO creating action, the process is cancelled and the editor returns to the starting state, as well.

Almost all other actions are incompatible with GO creating operations, like selection, menu commands, .... The most important exception are the snap buttons – you can change snap settings even during the creation of a new graphic object. Thus you can snap the first point of an object to a hanger, the second one to the grid and the third one to a line, for example. See What is snap? What is it good for?.

The interface for creating a new GO is contained in the view. Toolbar buttons switch between editor states, by clicking the drawing area you position the points as arguments of the current operation, select objects, move the transformation gadgets and thus transform objects, etc. The argument required in the current state is described in the right part of the status bar.

The editor uses the undo history to enable the “Step back” feature and needs to make sure that no other actions interfere with its own. That is the reason why almost all menu commands interrupt the current operation. Moreover, the editor needs to have several undo items enabled (in the Global settings, see Global Settings). If you set the maximum number of undo history items to a too small number (say, three), the “Step back” feature will work in a very odd way.

The editor has the following kinds of states/modes: the Select/Transform mode, the Santiago's transform mode, the Anchor rehang mode and the go creating modes. We now describe these modes in detail: