next up previous contents index
Next: 3. Diagram Editing Up: Toolkit for Conceptual Modeling Previous: 1. Introduction


2. Document Editing

This chapter describes the features common to all the TCM editors. This includes most of the user interface components, loading documents, saving documents, printing documents and the on-line help.

2.1 The User Interface of TCM

Figure 2.1: TCM main window.

When you start up an editor, you will see the so-called main window. For a screen dump of the main window see figure 2.1.

TCM needs in principle a 3-button mouse. The left and middle buttons are the most essential for drawing nodes and edges and the right button is only used for a pop-up menu. However, pressing or dragging with the left mouse button while you are pressing the Shift key has the same effect as pressing or dragging the middle button. This means that you can use TCM as well with a 2-button mouse. Instead of button-2, you use Shift+button-1. Another solution is to change the function of the right and middle mouse button with: xmodmap -e "pointer = 1 3 2". If you're using a so-called 5-button mouse (IntelliMouse with wheel-button), you can change the function of the right and middle mouse button with: xmodmap -e "pointer = 1 3 2 4 5". In this manual the mouse buttons are called from left to right: button-1, button-2 and button-3 (or from right to left, if you have a special left-hand adjusted mouse). We almost never mention button-3 because button-3 is only used for popping up the Edit pop-up menu in the drawing area, whereas the same menu is also accessible via the menu bar.

Except the basic drawing commands in the drawing area, all parts of the user interface can be accessed by keystrokes as well as by mouse operations. This manual assumes that you are using the mouse as much as possible.

2.1.1 Tiled buttons.

On the left edge of the main window of the diagram and tree editors there are two sets of tiled buttons containing a bitmap symbol. These contain two kinds of toggle buttons: radio buttons and check buttons. Radio buttons are a set of mutually exclusive selection options. The visual cue is a little diamond that is filled or unfilled. A check button is a non-mutually exclusive selection option. The visual cue is a little box that is filled or unfilled. When you pass the mouse pointer over a tiled button for a second or two, a one line bubble help clue is popped up giving the full name of what the tile represents.

2.1.2 Menu bar.

The menu bar located under the main window's title bar organizes most of the commands and features of the editors. The menu bar works in a straightforward way: press button-1 on an entry and keep it pressed down. A pull-down menu appears. Drag the mouse to the desired command and then release button-1. The menu is dismissed and the command is executed. Some menus contain nested submenus, called cascading menus, that work in a similar way. You cancel a menu by moving somewhere outside the menu and then releasing button-1.

Some frequently used commands can also be called directly, without going through a menu, by means of a keystroke shortcut, called an accelerator.   For example <Ctrl+L> is an accelerator for loading a document from file. You can see in the text of the menu entries which commands have an accelerator. Some menu entries contain check buttons that indicate that a certain property of the editor is switched on or off. If you select this entry, the value of the property will be inverted. See for example the Show Page Boundary entry in the Page menu. Some other menu entries contain a submenu of radio buttons indicating that a certain editor property has a value that is one from a set of menu choices. Try for example the Page Size entry in the Page menu.

2.1.3 Drawing area.

The drawing area, also called pane or canvas, is used to create, edit and delete the graphical items of your document by using the mouse. The mouse operations that are distinguished by TCM are summarized in figure 2.2. 

Figure 2.2: Mouse operations.

The whole drawing area is larger than the main window. You can use the scroll bars on the right and bottom side of the drawing area to view the drawing area that requires more space than is available at any one time. By resizing the main window you can resize the visible part of the drawing area, keeping the other parts of the main window the same size as much as possible. 

TCM has its own coordinate system. By default, the TCM coordinates have the same distance as the coordinates of X Windows.  The origin is in the top left corner of the drawing area. Like the X Window coordinates, the x-coordinates increase from left to right and the y-coordinates increase from the top down. By scaling the ratio between the TCM and X Window coordinates can be updated.

2.1.4 Document Type.

This is visible as an uneditable text field above the drawing area. See figure 2.3 for how the document types are called.

2.1.5 Document name.

This is visible as an editable text field  above the drawing area. See section 2.2 for how to change the document name.

2.1.6 Modified.

This is visible as a toggle above the drawing  area. When the document has been modified, but it is not saved yet, it is on. If the toggle is on and you have loaded or created a new document, TCM warns you that the old document will be lost, and you get the opportunity to save the old document first.

2.1.7 Status area.

The result of the last issued command is displayed  below the drawing area in an unshaded and uneditable text field.

2.1.8 Directory.

The name of the project or working directory  is visible in an editable text field at the bottom of the main window right below the status area. See section 2.3 for how to change the project directory.

2.1.9 Scale value.

The current scale percentage is shown   in the bottom-right corner. By performing the scaling commands of the Scale menu, this value is updated.

2.1.10 Autoresizing.

This is visible as a toggle beneath the status area. When it is on, the shapes in the diagram or the cells in the table are automatically resized to make it fit the text that they contain (see section 2.5). When it is off, you should resize the shapes and cells manually to make them the right size.

2.1.11 In-line editor.

This is visible as a toggle beneath the status  area next to the autoresize toggle. When it is on, text can be typed directly into the drawing area. When it is off, text editing takes place in a text edit dialog window (see section 2.5).

2.1.12 Hierarchic document.

This is visible as a toggle beneath the status area, next to the In-line editor toggle. When it is on, the current document is hierarchic, i.e., nodes in this document can be hierarchically related. This toggle is only relevant for hierarchic editors (most diagram editors allow hierarchic documents).

2.1.13 Arrow Buttons.

In the bottom-left corner of the main window there are four arrow shaped buttons by which you can move the entire document over the drawing area. Amidst these four buttons there is a button labeled C, by which you can center the drawing on the first page in the drawing area, at least when the drawing is not larger than a single page. When the drawing is larger than one page, the drawing will be centered on the set of pages that the drawing occupies.

Figure 2.3: Document editors, document types and document name suffixes.

2.2 Changing the Document Name

You can type in a new name in the document name text field above the drawing area. When you enter <Return>, the document name is changed. TCM checks whether the name has a valid suffix  for the current type of document. See figure 2.3 for the required suffixes. Furthermore, the document name should contain only non-white space printable characters and it should not contain the characters {, } or /.

When a document is loaded, the document name field is set to the name of that document. If a new document is created, either by starting the editor without a file name or by issuing the New command, the newly created document will receive the default name untitled.

2.3 Changing the Project Directory

You can change the project (working) directory with the Project Directory entry  in the File menu of the TCM startup window (see figure 1.2). You can also change the project (working) directory by editing the directory text field at the bottom of the main window. You can change it by editing it and entering <Return>. TCM checks if the directory exists and if it is accessible. This directory is intended for storing the files related to the current (sub)project that you are working on. It is used as the starting directory for the file selection dialogs for loading and saving documents.

2.4 Loading and Saving Documents

You can instantly start a TCM editor with a specific document via the Open Document entry  in the File menu of the TCM startup window (see figure 1.2). The Open Document dialog is simular to the Load Document dialog described below. Selecting a TCM document will result in starting the TCM editor associated with the document extension. For example selecting a .ucd document will launch the TUCD (Use Case Diagram) Editor with the designated document loaded.

Figure 2.4: TCM File selection dialog.

The File pull-down menu of the TCM editors contains the following entries: 

The file selection dialog (figure 2.4) allows you  to select a file in the right side listing or to navigate through the file system by selecting a directory, including the parent directory (..), in the left side listing. You can select a file or directory by either: 1. quickly double clicking on an entry, 2. single clicking on an entry and clicking OK or 3. filling in the field labeled Selection and clicking OK. The Filter field on top determines which file names are displayed. You can edit the filter setting, which takes effect after clicking the Filter button.

When you change directory in the load or save to file dialog then the directory field in the main window is updated to that directory after that you dismissed the dialog. So with the load or save to file dialog you can browse through the file system and the latest visited directory is always remembered in the directory text field. The export dialog from the Print menu also remembers its last visited directory but independently from the directory from the load or save to file dialog.

2.5 Editing Documents

There are two types of document edit commands: commands that are issued by the mouse, when the mouse pointer is in the drawing area, and the commands listed in the Edit menu. All diagram and tree editors share the same set of edit commands (chapter 3). All table editors share the same set of edit commands too (chapter 7). However, the edit commands of diagram and tree editors on one hand and table editors differ to a large extent.

All document edit commands, except the simple selection commands and the key-stroke text edit commands are undo-able and redo-able (multiple levels). All editors have certain commands to select items, to move and resize items, to edit the text of items, to add items and to delete items. Only the text edit commands are very similar across all editors and therefore they are described in this chapter. For the other commands you are referred to chapter 3 (diagrams and trees) and chapter 7 (tables).

2.5.1 Editing Text in a Document

In order to be able to type in a label of a shape in a diagram or the text in a table cell, the shape or cell should be the only currently selected shape or cell. For going into edit mode you can do the following. Move the mouse pointer into the single selected shape or cell, and when the mouse pointer has turned into a  \epsfig{figure=p/}, you can start editing by typing characters or by clicking button-1 again. In both cases the edit mode starts.

There are two edit modes: in-line editing and out-line editing.     In-line editing takes place directly in the drawing area and during in-line editing a black triangle shaped cursor is visible. Out-line editing takes place in a separate window with a text editor that is popped up when the edit mode is entered. That window contains an editable Motif text entry area, a menu bar, scroll bars and two buttons: OK and Cancel. You can indicate which of the two possible edit modes has to be used by a toggle button labeled in-line editor. That toggle is near the bottom of the main window and it is also accessible via the View menu. In general, in-line editing is more suitable for quickly editing short labels, whereas out-line editing has scroll bars and some extra edit operations and is more suitable for editing large chunks of texts. With out-line editing it is also possible to cut and paste text within and between text edit windows.

2.5.2 The In-line Text Editor

Here we summarize all operations that are available in the in-line editor.

2.5.3 The Text Edit Dialog

Text edit dialogs are almost complete text editors, see figure 2.5. Text edit dialogs are not only used for out-line editing text labels but also for editing document and subject annotations. The operations in the dialog are mostly standard Motif operations. Here we will summarize the most important ones:

Figure 2.5: TCM text edit dialog.

Figure 2.6: TCM find dialog.

Figure 2.7: TCM replace dialog.

2.6 Viewing Documents

The View menu  contains certain commands that have to do with how a document is viewed or how it can be edited in the document itself. View commands do not actually change something in the document. The Scale operations are in a separate menu but these are view commands too (as opposed to edit commands). The document editors have different View menu entries, but all editors share at least the following View menu commands:

2.7 Printing Documents

The page layout determines how a document is sent to the printer or saved as PostScript. See section 2.9 for the commands which determine the page layout. When a document is printed or saved as PostScript, each page that contains a part of the drawing is printed or saved. The Print menu  contains the following entries:

2.8 The Scaler

The Scale menu  contains the following entries:

A slider dialog  is a dialog that is used to set an editor option from a subrange of values by adjusting a horizontal slider. For an example of a slider dialog see figure 2.8.

Figure 2.8: TCM slider dialog.

  The current scale percentage is always visible in the bottom-right corner of the main window and is updated by the scaling commands. The scale percentage is the  ratio between the TCM coordinates and the X Window coordinates, which is 100% when there is no scaling. By making the drawing larger you make this percentage larger, by making the drawing smaller, you make percentage smaller. The scale factor is the factor by which the scale percentage is increased or decreased during scaling. The scale percentage and factor are saved to file together with the document. When the drawing is saved as PostScript, EPSF, Fig or PNG-format the output is also scaled by the scale percentage.

2.9 The Page Layout

The Page menu commands determine the page layout. Any change in page layout is directly made visible in the drawing area. TCM is WYSIWYP, i.e. What You See Is What You Print. The page layout has effect when plain PostScript is generated either when the document is printed, previewed or exported as plain PostScript. The Page menu commands have no effect on the document when saved as Encapsulated PostScript, as this format is independent from the page layout by definition. The Page menu  contains the following entries:

The page orientation, the page numbering and the inclusion of document info are saved in a document file. However, the page size and boundary are are options of the editor not of the edited document. So when you save a document the latter options are not saved.

2.10 The Properties Menu

The Properties menu contains commands for performing operations for updating line and text properties that cannot be done from within the in-line or out-line editor. The following commands are available:

2.11 The Search Menu

The Search menu contains commands for performing find and replace operations on text that cannot be done from within the in-line or out-line editor. The following commands are available:

2.12 Checking and Annotating Documents

The Document menu  contains the following entries.

Both Document Info as Check Document use a text view dialog  which resembles a text edit dialog except that the text is read-only. So you cannot edit the text (also including Cut, Replace and Paste) and you cannot load text from file. It further works pretty much the same as a text edit dialog. Text view dialogs are also used for the on-line help.

2.13 On-line Help

The on-line help is kept as simple as possible, because it is possible to read this user manual as HTML document, including hyper-links and with an index and a table of contents. It is not our intention to duplicate everything in the form of on-line help built-in in the editors. There is a collection of Help menu entries and each Help menu entry pops up a text view dialog. The on-line help contains the basic bare minimal that you have to know to be able to work with the editor. From the on-line help dialog you can save the text to a file, print it as PostScript or you can copy some of it to the clipboard. Furthermore, there is a Find command. The Help menu of the editors  contains the following topics:

next up previous contents index
Next: 3. Diagram Editing Up: Toolkit for Conceptual Modeling Previous: 1. Introduction
Henk van de Zandschulp