1\documentclass[10pt]{article}
2\textwidth 160mm
3\textheight 220mm
4\topmargin 0mm
5\headheight=0mm
6\headsep=5mm
7\evensidemargin -0.4mm
8\oddsidemargin -0.4mm
9\pagestyle{headings}
10
11\title{Zap Brannagans's Big Book of Operations \& Modes}
12\author{Dominik G\"oddeke}
13\date{July 13th, 2001}
14
15\begin{document}
16
17\maketitle
18
19This document describes all operations available in the \textbf{DeViSoRGriD 2} application, and the corresponding mode changes invoked by them.
20For more details about the implementation and how we put these rules into code, see the programmer's guide.
21
22\tableofcontents
23
24
25\section{The Main Modes}
26As outlined in the documentation, there are eight major modes the
27application can be in. Each mode strictly determines what happens if
28the user clicks on the central drawing area. Of course, the
29application is in only one mode at all times and the current mode is
30never unspecified.
31\begin{itemize}
32\item \texttt{NO MODE} This is the default mode. Only selecting is allowed by throwing a lasso on the drawing area. There is no explicit one-click button to switch back to NO MODE, however, if all additional dialogs are closed, if zooming is disabled, the addType is set to NOTHING and Rectifying is disabled too, the application sure returns to NO MODE. As there can be only one mode at at time, usually one click on the button that toggles the current mode will suffice to go back to NO MODE.
33\item \texttt{ZOOM MODE} In this mode, zoom operations are available. If the zoomType submode is set to SET, rectangle-drawing results in zooming into the enclosed area so that it fits the current main frame size. If the zoomType is set to IN, single-clicking results in zooming into the domain by a constant factor, centering the view to the event point.
34\item \texttt{DRAW MODE} In this mode, depending on the current addType selected, multiple elements and segments can be inserted in the drawing area. See below for a brief description of the input of every item.
35\item \texttt{EDGE STATUS MODE} This mode is activated only by the according dialog. Clicking on an edge with the left button sets the edge's values to the ones set in the dialog, clicking on an edge with the right button displays the edge's values in the dialog. This also works with selections of edges. In the dialog, clicking APPLY has the same effect as a left click (for the selection), clicking close closes the dialog and switches back to normal mode.
36\item \texttt{PARALLELBLOCK MODE} This mode is activated only by the according dialog. Clicking APPLY sets the values from the dialog to the currently selected macro elements, clicking on macro elements updates the values in the dialog. CLOSE and AUTOMATIC work respectively. Lasso-throwing for selections has the same effect.
37\item \texttt{REFINE MODE} This mode is also only activated by the corresponding dialog. Clicking REFINE in the dialog calls the TriGen tool with the parameters set in the dialog to work on the current selection of elements. selecting is also allowed. Clicking CANCEL closes the dialog and switches back to NO MODE.
38\item \texttt{PROPERTY MODE} This mode allows to change the properties of any
39  item of the domain. Clicking on an item pops up a modal dialog where the user can change certain properties of the selected item. The dialog differs for
40  various items, however, not all item types are supported. In that case, an
41  error message is displayed.
42\item \texttt{RECTIFYELEMENT MODE} This mode allows to transform quads
43and macros to rectangular shape with several left clicks on the
44element (all possible rectifications are cycled through). A
45right-click on the same element perfoms an undo operation of the last
46transformation. Clicking on other items on the drawing area has no
47effect.
48\item \texttt{MIRROR MODE} This mode is only used for indirect
49mirroring. Basically, it allows the user to draw a line against which
50mirroring is performed on the drawing area. as soon as the line is
51finished, the selected items will be mirrored and the application will
52automatically return to NO MODE.
53
54\end{itemize}
55
56\section{Modes and Operations}
57In this section, for all operations the pre-condition (what mode the application must be in to have a discernable effect) and the post-condition (what mode the application is in after performing the operation) are once and for all defined. As all operations are available through the menu (Toolbar and keyboard access is just additional to some of them), the definition is structured according to the submenus.\\
58There are three different types of operations available, single-action operations, toggle operations and multiple toggle operations.
59
60\subsection{The Default Setting}
61This short section just lists the default submode entries. It is used in every mode change to update the GUI. For easier reference, it is explicitly outlined here:
62\begin{itemize}
63\item All submode mask buttons remain in their previous setting, so
64does the directInput toggle and the copyMode.
65\item The current addType is set to ``Nothing'', therefore all ''add...'' checkbox-menu-entries and toolbar buttons are deselected.
66\item For the modes that are valid only when the appropriate dialog is visible
67  (PROPERTY, PARALLELBLOCK and EDGE STATUS), the according dialog is closed.
68\item The Zoom toggle buttons are disabled.
69\end{itemize}
70
71\subsection{Operations in the FILE menu}
72\begin{itemize}
73\item NEW:
74\begin{description}
75\item[Precondition:] This operation can be performed in any mode.
76\item[Actions:] A confirmation dialog is brought up if the user has unchanged data.
77\item[Postcondition:] If the user approves the confirmation, the application
78  goes back to default settings, additionally selecting the select mask
79  buttons. It then switches to NO MODE. Otherwise nothing is changed.
80\end{description}
81\item OPEN:
82\begin{description}
83\item[Precondition:] This operation can be performed in any mode.
84\item[Actions:] A confirmation dialog is brought up if the user has unchanged data.
85\item[Postcondition:] If the user approves the confirmation, the FileLoader
86  dialog is brought up. If the user makes a valid selection in this dialog, the
87  application goes back to default settings, additionally selecting the select
88  mask buttons, and the domain is loaded. It then switches to NO MODE. If the user exits either of the dialogs non-applovingly, nothing is changed.
89\end{description}
90\item SAVE:
91\begin{description}
92\item[Precondition:] This operation can be performed in any mode.
93\item[Actions:] If the domain has not been saved before, the saveAs dialog is displayed, otherwise the domain is saved using the most recently used filename and file type.
94\item[Postcondition:] In any case, nothing is changed.
95\end{description}
96\item SAVE AS (UCD, FEAT, FEAST):
97\begin{description}
98\item[Precondition:] This operation can be performed in any mode.
99\item[Actions:] The saveAs dialog is displayed.
100\item[Postcondition:] If the user approves the dialog, the domain is saved in the specified format to the specified file. Otherwise, nothing is changed.
101\end{description}
102\item MERGE DOMAIN:
103\begin{description}
104\item same as load, the newly loaded domain is merged with the existing domain, the boundary container numbering is updated to make sure all boundary containers have different, subsequent numbers.
105\end{description}
106\item PRINT:
107\begin{description}
108\item[Precondition:] This operation can be performed in any mode.
109\item[Actions:] The print dialog is displayed.
110\item[Postcondition:]  If the user approves the dialog, the specified part of the domain is printed on the selected printer. Otherwise, nothing is changed.
111\end{description}
112\item EXIT:
113\begin{description}
114\item[Precondition:] This operation can be performed in any mode.
115\item[Actions:] If the user has unchanged data, a confirmation dialog is displayed.
116\item[Postcondition:] if the user approves, the application is shut down, otherwise, nothing is changed.
117\end{description}
118\end{itemize}
119
120
121\subsection{Operations in the EDIT menu}
122\begin{itemize}
123\item UNDO:
124\begin{description}
125\item[Precondition:] This operation can be performed in any mode.
126\item[Actions:] The most recent change is reverted.
127\item[Postcondition:] Due to our undo model, the application is in the mode it was in before the last action (see the UndoFunctionality paper).
128\end{description}
129\item CUT:
130\begin{description}
131\item[Precondition:] This operation can be performed in any mode.
132\item[Actions:] If the current selection is empty, nothing happens. Otherwise, the selected elements are removed from both the internal data structure and the drawing area and stored in the clipboard.
133\item[Postcondition:] The previous mode is kept.
134\end{description}
135\item COPY:
136\begin{description}
137\item[Precondition:] This operation can be performed in any mode.
138\item[Actions:] If the current selection is empty, nothing happens. Otherwise, the selected elements are copied to the clipboard.
139\item[Postcondition:] The mode is not changed.
140\end{description}
141\item PASTE (Toggle operation)
142\begin{description}
143\item[Precondition:] This operation can be performed if the current selection is
144  not empty.
145\item[Actions:] The application first restores the default setting (without mode changes of course. This is done to deselect all sub-modes that might have been activated before).The application switches to DRAW mode, and the addType is set to CLIPBOARD.
146\item[Postcondition:] DRAW mode and CLIPBOARD addType. Clicks on the drawing area result in pasting the contents of the clipboard, with the upper left corner of the selection being the point the click occurred at. This means the same items can be pasted to the domain multiple times.
147\end{description}
148\item SCALE:
149\begin{description}
150\item[Precondition:] This operation can be performed in any mode.
151\item[Actions:] If the current selection is empty, nothing happens. Otherwise, a dialog pops up asking for the scale factor (a positive or negative nonzero percent value). The selected elements are then scaled by the given factor.
152\item[Postcondition:] The mode is not changed.
153\end{description}
154\item ROTATE:
155\begin{description}
156\item[Precondition:] This operation can be performed in any mode.
157\item[Actions:] If the current selection is empty, nothing happens. Otherwise, a dialog pops up asking for the rotating angle (a positive or negative double value in the range of -360 to 360 degrees). The selected elements are then rotated by the given angle.
158\item[Postcondition:] The mode is not changed.
159\end{description}
160\item MIRROR (Toggle Operation):
161\begin{description}
162\item[Precondition:] This operation can be performed in any mode.
163\item[Actions:] If the current selection is empty, nothing
164happens. Otherwise, if direct input is active, a dialog is shown. In
165indirect input mode, the application switches to MIRROR MODE.
166\item[Postcondition:] When the dialog is closed or when the line is
167finished, the application jumps back to NO MODE.
168\end{description}
169\item SELECT CURRENT BOUNDARY:
170\begin{description}
171\item[Precondition:] This operation can be performed in any mode.
172\item[Actions:] The application displays a dialog. After selecting a boundary there, its number is set as currentBoundary in the ControlCenter.
173\item[Postcondition:] No mode change.
174\end{description}
175
176\end{itemize}
177
178\subsection{Operations in the VIEW menu}
179\begin{itemize}
180\item SET ZOOM (Toggle Operation):
181\begin{description}
182\item[Precondition:] This operation can be performed in any mode.
183\item[Actions:] No iminent action.
184\item[Postcondition:] After restoring default submode settings, the application switches to ZOOM MODE, zoomType is set to SET. In this mode, rectangle-drawing on the drawing area results in zooming into the enclosed area so that the rectangle fits the screen. This is a toggle mode, so the application stays in this mode until the next mode change.
185\end{description}
186\item RESET ZOOM:
187\begin{description}
188\item[Precondition:] This operation can be performed in any mode.
189\item[Actions:] This is a single operation, the whole domain is zoomed back to default zoom level.
190\item[Postcondition:] The previous mode is kept.
191\end{description}
192\item ZOOM IN (Toggle Operation):
193\begin{description}
194\item[Precondition:] This operation can be performed in any mode.
195\item[Actions:] After restoring default sub-modes, the application switches to ZOOM MODE with zoomType IN. Clicking on the drawing area results in zooming in on the domain by a constant factor (+20\%), centering the view on the event point.
196\item[Postcondition:] This is a toggle mode, the application stays in that mode
197\end{description}
198\item ZOOM OUT:
199\begin{description}
200\item[Precondition:] This operation can be performed in any mode.
201\item[Actions:] The last ''set zoom'' or ''zoom in'' operation is taken back, in other words, this is a one-step undo for zooming.
202\item[Postcondition:] The previous mode is kept.
203\end{description}
204\item SELECT NODES (Multiple Toggle Mode):
205\begin{description}
206\item[Precondition:] This operation can be performed in any mode.
207\item[Actions:] No iminent action.
208\item[Postcondition:] No mode change, only the selection flag for
209nodes is updated.
210\end{description}
211\item SELECT ELEMENTS (Multiple Toggle Mode):
212\begin{description}
213\item[Precondition:] This operation can be performed in any mode.
214\item[Actions:] No iminent action.
215\item[Postcondition:] No mode change, only the selection flag for
216elements is updated.
217\end{description}
218\item SELECT SEGMENTS (Multiple Toggle Mode):
219\begin{description}
220\item[Precondition:] This operation can be performed in any mode.
221\item[Actions:] No iminent action.
222\item[Postcondition:] No mode change, only the selction flag for
223segments is updated.
224\end{description}
225\item SELECT EDGES (Multiple Toggle Mode):
226\begin{description}
227\item[Precondition:] This operation can be performed in any mode.
228\item[Actions:] No iminent action.
229\item[Postcondition:] No mode change, only the selction flag for
230edges is updated.
231\end{description}
232\item PROPERTIES (Toggle Mode):
233\begin{description}
234\item[Precondition:] This operation can be performed in any mode.
235\item[Actions:] No iminent action.
236\item[Postcondition:] After restoring default sub-modes, the application switches to PROPERTY MODE.
237\end{description}
238\end{itemize}
239
240
241\subsection{Operations in the DOMAIN menu}
242\begin{itemize}
243\item NEW BOUNDARY CONTAINER
244\begin{description}
245\item[Precondition:] This operation can be performed in any mode.
246\item[Actions:] A new empty boundary container is added to the domain, the boundary counter is incremented.
247\item[Postcondition:] The mode is not changed.
248\end{description}
249\item ANALYTIC DOMAIN DESCRIPTION:
250\begin{description}
251\item[Precondition:] This operation can be performed in any mode.
252\item[Actions:] If the current domain contains non-analytic segments, a warning dialog pops up. If the user confirms that dialog, a new empty domain is created. A modal dialog box is brought up allowing the user to enter a parametric or analytic description of the domain. An analyticly defined domain must not contain any other segments.
253\item[Postcondition:] The mode is not changed.
254\end{description}
255\item DIRECT INPUT  (Toggle Mode):
256\begin{description}
257\item[Precondition:] This operation can be performed in any mode.
258\item[Actions:] The direct flag is set to \texttt{true} if it has been set to false before, to false otherwise.
259\item[Postcondition:] The mode is not changed.
260\end{description}
261\item NEW LINE (Toggle Mode):
262\begin{description}
263\item[Precondition:] This operation can be performed in any mode.
264\item[Actions:] After restoring defaults except for the direct input mode, the application switches to DRAW MODE with addType LINE. If that has been the previous mode, it switches to NO MODE with addType NOTHING.
265If the direct flag is enabled, single-clicking on the domain brings up a modal dialog asking for the startpoint and endpoint coordinates. The event point is the pre-set startpoint. Selecting APPLY in that dialog adds the newly defined line to the currently selected boundary container if the user input has been successfully validated. If validation is not successful, an error message is brought up. Selecting OK closes the dialog afterwards. Selecting CANCEL in that dialog closes the dialog without adding a new line. \\
266Otherwise, Left-clicking marks the startpoint, moving the mouse cursor draws a direct line from the startpoint to the current cursor position, and a second left-click marks the endpoint, thus adding the new line to the current boundary container.
267\item[Postcondition:] This mode is a toggle mode.
268\end{description}
269\item NEW MULTILINE (Toggle Mode):
270\begin{description}
271\item[Precondition:] This operation can be performed in any mode.
272\item[Actions:] After restoring defaults for all other submodes except the direct input mode, the application switches to DRAW MODE with addType MULTILINE. If that has been the previous mode, it switches to NO MODE with addType NOTHING. For this segment type, the direct flag is ignored. Left-clicking marks the startpoint of a new line element, moving the mouse cursor draws a direct line from the startpoint to the current cursor position, and another left-click marks the an endpoint of the line element, which is also considered the startpoint for the next line segment. Right-Clicking marks the current endpoint as the final endpoint, the application then returns to the state before the first click, allowing for adding more multiline items directly afterwards.
273\item[Postcondition:] This mode is a toggle mode.
274\end{description}
275 \item NEW CIRCLE+ (Toggle Mode):
276\begin{description}
277\item[Precondition:] This operation can be performed in any mode.
278\item[Actions:] After restoring defaults for all other submodes except the direct input mode, the application switches to DRAW MODE with addType CIRCLEP. If that has been the previous mode, it switches to NO MODE with addType NOTHING. If the direct flag is enabled, single-clicking on the domain brings up a modal dialog asking for the midpoint coordinates, radius and angle. The event point is the pre-set midpoint. Selecting OK in that dialog adds the newly defined arc to the currently selected boundary if the user input has been successfully validated. If validation is not successful, an error message is brought up. Selecting CANCEL in that dialog closes the dialog without adding a new line.\\
279Otherwise, Left-clicking marks the midpoint, dragging (with still pressed left button) draws a direct line from the startpoint to the current cursor position, and releasing the button marks the radius. After that, two input formats are supported: Right-Clicking results in drawing a full circle (with mathematical positive orientation) and adding it to the currently selected boundary, just moving the mouse pointer allows for drawing semi-circles or any arc. Once the desired angle has been reached, left-clicking adds the arc to the currently selected boundary.
280\item[Postcondition:] This mode is a toggle mode.
281\end{description}
282\item NEW CIRCLE- (Toggle Mode):\\
283Analogously to positively-oriented circles.
284\item NEW TRI (Toggle Mode):
285\begin{description}
286\item[Precondition:] This operation can be performed in any mode.
287\item[Actions:] After restoring defaults for all other submodes except the direct input mode, the application switches to DRAW MODE with addType TRI. If that has been the previous mode, it switches to NO MODE with addType NOTHING. If direct input is disabled, Tris are added just like multilines, despite the fact that tris always form a closed triangle, and all three points must be nodes. Therefore, if there is no node at the desired points (modulo the snap value of course), a new node is added. If direct input is enabled, a modal dialog pops up asking for three nodes (by their number, therefore these nodes have to exist already). Selecting apply adds a new Tri element to the domain (after validation of course), selecting OK closes the dialog afterwards, selecting CANCEL closes the dialog without adding anything.
288\item[Postcondition:] This mode is a toggle mode.
289\end{description}
290\item NEW QUAD (Toggle Mode):
291\begin{description}
292\item[Precondition:] This operation can be performed in any mode.
293\item[Actions:] After restoring defaults for all other submodes except the direct input mode, the application switches to DRAW MODE with addType QUAD. If that has been the previous mode, it switches to NO MODE with addType NOTHING. If direct input is disabled, Quads are added just like multilines, despite the fact that they always have four sides, forming a closed rectangle,  and all four corners must be nodes. Therefore, if there is no node at the desired points (modulo the snap value of course), a new node is added. The direct input works exactly the same as for Tris, except that four nodes are required.
294\item[Postcondition:] This mode is a toggle mode.
295\end{description}
296\item NEW MACRO (Toggle Mode):
297\begin{description}
298\item[Precondition:] This operation can be performed in any mode.
299\item[Actions:] Macros are added just like quads, the local refinement is not part of the drawing process and can be invoked by selecting PARALLELBLOCK from the GRID menu.
300\item[Postcondition:] This mode is a toggle mode.
301\end{description}
302\item ADJUST ALL BOUNDARIES:
303\begin{description}
304\item[Precondition:] This operation can be performed in any mode.
305\item[Actions:] All boundary parts are processed to make them continous. If this is not possible, the application automatically selects the malformed boundary and displayes a warning message.
306\item[Postcondition:] The mode is not changed.
307\end{description}
308\item LINK BOUNDARIES:
309\begin{description}
310\item[Precondition:] This operation can be performed in any mode.
311\item[Actions:] All boundaries are processed. If two boundaries share one or more segments (full segments, not only segment parts, share implies visual sharing, both boundaries have to be continous on their own), they are merged into one boundary, which means the shared segments are removed. One boundary number is removed, the boundary numbering is updated.
312\item[Postcondition:] The mode is not changed.
313\end{description}
314\item SWAP BOUNDARY ORIENTATION:
315\begin{description}
316\item[Precondition:] This operation can be performed in any mode.
317\item[Actions:] The orientation of the (parametric description of the) selected boundary is swapped.
318\item[Postcondition:] The mode is not changed.
319\end{description}
320\item DOMAIN STATISTICS:
321\begin{description}
322\item[Precondition:] This operation can be performed in any mode.
323\item[Actions:] A non-modal dialog pops up displaying the domain statistics.
324\item[Postcondition:] The mode is not changed.
325\end{description}
326\end{itemize}
327
328
329\subsection{Operations in the GRID menu}
330\begin{itemize}
331\item ADD MULTIPLE BOUNDARY NODES:
332\begin{description}
333\item[Precondition:] This operation can be performed in any mode.
334\item[Actions:] A modal dialog pops up asking for details (number of nodes to create, the boundary number on which nodes are to ne added etc.). Clicking APPLY adds boundary nodes to the boundary specified in the dialog, OK closes the dialog afterwards, CANCEL doesn't add any nodes and closes the dialog.
335\item[Postcondition:] The mode is not changed.
336\end{description}
337\item SET EDGE STATUS (Toggle Mode):
338\begin{description}
339\item[Precondition:] This operation can be performed in any mode.
340\item[Actions:] After restoring default submodes, the application switches to EDGE STATUS MODE. The non-modal (additional toolbar-like) dialog pops up at the reserved position. If that has been the previous mode, it switches to NO MODE, closing the dialog.
341\item[Postcondition:] This is a toggle mode.
342\end{description}
343\item SET PARALLEL BLOCK (Toggle Mode):
344\begin{description}
345\item[Precondition:] This operation can be performed in any mode.
346\item[Actions:] After restoring default submodes, the application switches to PARALLELBLOCK MODE. The non-modal (additional toolbar-like) dialog pops up at the reserved position. If that has been the previous mode, it switches to NO MODE, closing the dialog.
347\item[Postcondition:] This is a toggle mode.
348\end{description}
349\item LOADBALANCING:
350\begin{description}
351\item[Precondition:] This operation can be performed in any mode.
352\item[Actions:] A modal dialog pops up asking for details.
353\item[Postcondition:] The previous mode is kept.
354\end{description}
355\item RECTIFY ELEMENTS (Toggle Mode):
356\begin{description}
357\item[Precondition:] This operation can be performed in any mode.
358\item[Actions:] After restoring default submodes, the application switches to RECTIFYELEMENT MODE. If that has been the previous mode, it switches to NO MODE.
359\end{description}
360\item REFINE (Toggle Mode):
361\begin{description}
362\item[Precondition:] This operation can be performed in any mode.
363\item[Actions:] After restoring default submodes, the application switches to REFINE MODE. If that has been the previous mode, it switches to NO MODE.
364\end{description}
365\end{itemize}
366
367
368
369\subsection{Operations in the OPTIONS menu}
370The Options menu's only entries are shortcuts to the according tab sheet in the Options Dialog. So the mode changes are the same for all these entries.
371\begin{description}
372\item[Precondition:] This operation can be performed in any mode.
373\item[Actions:] The modal Options Dialog pops up displaying the corresponding tab sheet.
374\item[Postcondition:] The application resets itself to default mode.
375\end{description}
376
377
378\subsection{Operations in the HELP menu}
379\begin{itemize}
380\item MANUAL:
381\begin{description}
382\item[Precondition:] This operation can be performed in any mode.
383\item[Actions:] The help screen is displayed (non-modally).
384\item[Postcondition:] The mode is not changed.
385\end{description}
386\item ABOUT:
387\begin{description}
388\item[Precondition:] This operation can be performed in any mode.
389\item[Actions:] The modal ABOUT dialog is displayed.
390\item[Postcondition:] The mode is not changed.
391\end{description}
392\end{itemize}
393
394\end{document}
395
396