Table of Contents Previous Chapter 23 The SDL Editor

23 The SDL Editor

Symbol Menu

The symbol menu contains the SDL symbols that can be placed into the drawing area. The contents of the symbol menu depends upon the type of diagram that is displayed in the SDL Editor window.

Symbol Menu Properties

The two symbol menus are each fixed-sized, non-moveable auxiliary windows, associated with the drawing area and placed to the right of it. Each SDL Editor window has its own symbol menu.The symbol menu can be made invisible and visible again with a menu choice, Window Options.

Basically, selecting a symbol in the symbol menu and clicking it into the drawing area adds it to the diagram. This reference manual does not describe how to work with symbols; this are described in "Managing Symbols" on page 69 in chapter 2, Editing SDL Diagrams.

All symbols appear the same appearance in the symbol menu as they do in the drawing area. The size of symbols as shown in the symbol menu is half of the default size, 10 * 5 mm.

For a reference to these symbols, see "Symbols on Interaction Pages" on page 1170 and "Symbols on Flow Pages" on page 1171.

Figure 311 : The Symbol Menu. 
-----
(fig)  
       
-----

Syntax Checking on SDL Symbols

If syntax checking is enabled, some of the symbols displayed in the symbol menu may be dimmed. This indicates that those symbols are not valid within the current context, and cannot be selected.

Text Window

The text window is pane of the SDL Editor window, as shown in Figure 312, which can be resized vertically.

Figure 312 : The SDL Editor Text Window. 
-----
(fig)  
       
-----
The text window provides a menu bar with two menus, containing clipboard functions, as well as means to transfer text to / from a file.

Text Editing Functions

The following text editing functions are provided in the text window:

Text Selection - First Method

  1. Point to the beginning or the end of the portion of text to be selected.
  2. Drag the I-beam pointer to the other end of the text to be selected. The selected text is highlighted as the mouse is moved.
  3. Release the mouse button.

Text Selection - Second Method

  1. Point to the beginning or the end of the text to be selected and click.
  2. Move the I-beam pointer to the other end of the text to be selected.
  3. Press <Shift> and click.

Word Selection

A single word, delimited by spaces, is selected by double-clicking it.

Line Selection

One line of text is selected by triple-clicking it.

Text Editing Functions

Any attempt to enter an illegal character(1) will always result in an audible warning.

The editing functions that are available depend upon the context. Some functions are standardized and are available from the Edit menu of the Text window.

Other standardized functions include:

The File menu of the Text window

The File menu provides functions that transfer text from a file to the text window and vice-versa. The basic intention is to provide the user a means to edit larger portions of text with a more suitable text editor (for instance signal definitions in text symbols). The available menu choices are:

Import

Import imports the contents of a file into the text window and inserts the contents of the file at the current I-beam cursor position, possibly replacing selected text in the text window. Following this menu choice, a Standard File Selection Dialog is issued, where the file to import text from is to be specified. The file name filter is set to .txt by default.

Export

Export exports the selected text to a file. If no text is selected in the text window, the entire text window contents will be exported to the file. Following this menu choice, a Standard File Selection Dialog is issued, where the file to export the text to is to be specified. The file name filter is set to .txt by default.

The Edit menu of the Text window

The Edit menu provides the following choices, which may or may not be dimmed depending upon whether or not some text is selected:

Cut

Cut removes the selected portion of text from the text window and saves it in the clipboard buffer. Cut is only valid if a portion of text has been selected.

Copy

Copy makes a copy of the selected portion of text in the clipboard buffer. The content of the text window is not affected. Copy is only valid if a portion of text has been selected.

Paste

Paste inserts the content of the clipboard buffer into the text window. The clipboard buffer will be appended immediately following the cursor position. Paste is only valid if a portion of text has been cut or copied into clipboard buffer.

Clear

Clear removes the selected portion of text from the text window. The content of the clipboard buffer is not affected. Clear is only valid if a portion of text has been selected.

Select All

Select All selects all of the text contained in the text window.

Programmable Function Keys

SDT allows to tie a function key to a defined text string. When typing that defined function key, the programmed text string will be inserted at the current cursor location. Each user can customize his own programming of function keys.

Global SDT Resources

The function keys are set up as X-resources. It is possible to set up both system default and user-defined X-resources, allowing each user to customize his environment. The X- resources are defined in a file that is common for all SDT users, namely

/usr/lib/X11/app-defaults/SDT 
To program the function keys, insert following lines anywhere into the SDT file:

/* Any suitable comment */
SDT*XmText.translations: #override \n\
<Key>F1: insert-string("F1Text") \n\
<Key>F2: insert-string("F2Text") \n\
<Key>F3: insert-string("F3Text") \n\
<Key>F4: insert-string("F4Text") \n\
<Key>F5: insert-string("F5Text") \n\
<Key>F6: insert-string("F6Text") \n\
<Key>F7: insert-string("F7Text") \n\
<Key>F8: insert-string("F8Text") \n\
<Key>F9: insert-string("F9Text")
/* Note the absence of \n\ on line 9 */
------------------------------------------------------------
Note:                                                         
Omitting to define some of the function keys is permissible.  
------------------------------------------------------------

User-defined SDT resources

An SDT user can define his own function keys. This is done by defining the X-resources described above in a personal copy of the definition file and to store that file it into the user's home directory:

 ~/username/SDT
Alternatively, any directory designated by environment variable
XAPPLRESDIR can be used.

Restrictions

  1. Only one line for each function key can be defined. Attempting to define more than one line into one function key may cause an unpredictable result when pressing that key.
    For instance, it is not certain that the following line will produce the expected result:
<Key>F1: insert-string("F1Line1\nLine2") \n\ 
  
  1. Only the keys F1-F9 can be defined.

Font Faces and Sizes

All textual objects managed by the SDL Editor use predefined font faces and sizes. The fonts that are assigned are determined when starting he SDL Editor, no change is possible to perform during an SDL Editor session. When printing the SDL graphs, SDT will use the same font face as defined for the SDL Editor. See chapter 30, The Preference Manager.

Supported Font Faces

On workstations, the availability of font faces is determined by the version of the X Windows server which are running. With a revision 5 or higher (X11 R5), scalable fonts are supported. In that case, the available list of predefined font faces would be:

Default Font Face

The default font face is Helvetica. If scalable fonts are not supported, the font face will be replaced by a Schumacher font (which can be used in all circumstances).

Default Font Sizes

The default font sizes are as follows:

-----------------------------------------------------
Flow Page Font Sizes                                   
-----------------------------------------------------
Text Object:                                Font Size  
Kernel heading symbol and page name symbol  12 points  
Other text objects                          9 points   
-----------------------------------------------------
----------------------------------------------
Interaction Page Font Sizes                     
----------------------------------------------
Text Object:                         Font Size  
Text symbol and signal list symbol.  9 points   
Other text objects                   12 points  
----------------------------------------------
-------------------------------------
Overview Page Font Sizes               
-------------------------------------
Text Object:               Font Size:  
Kernel heading symbol      12 points   
Signal list symbol.        6 points    
Other text objects         8 points    
-------------------------------------
This page intentionally left blank


Footnotes

(1)
Illegal in the sense that characters must comply to the set that is valid according to Z.100
 
Table of Contents Next Chapter