Sei sulla pagina 1di 210

SL-GMSDraw

Users Guide

SL Corporation

OBJECT-ORIENTED
GRAPHICAL MODELING SYSTEM
Version 6.2a- 26 May 2006

Part Number DRAW-360526


The information in this document is subject to change without notice and should
not be construed as a commitment by the Sherrill-Lubinski Corporation. The
Sherrill-Lubinski Corporation assumes no responsibility for any errors that may
appear in this document.
The software described in this document is furnished under a license and may be
used or copied only in accordance with the terms of such license.
This software is based in part on the work of the Independent JPEG Group.

SL-GMS Draw Users Guide


Copyright 1987-2006 by Sherrill-Lubinski Corporation
All rights reserved.
This manual is for use only in connection with the described software and may not
be used for any commercial purpose or copied, distributed, sold, displayed,
modified, published, or posted in whole or in part without the prior written
permission of Sherrill-Lubinski Corporation.
SL-GMS, SL Corporation, the SL Logo, and all Sherrill-Lubinski product names
referenced in this manual are trademarks or registered trademarks of the
Sherrill-Lubinski Corporation; any unauthorized use of these marks is strictly
prohibited. All trademarks and registered trademarks referenced in this document
are property of their respective companies.

SL-GMS (6.2x) 26 May 2006


Configuration: C62a1_360526
Copyright (c) 1987-2006 Sherrill-Lubinski Corporation. All Rights Reserved.

LIMITATIONS ON USE

Use, duplication, or disclosure by the U.S. Government is subject to restrictions as


set forth in the Technical Data - Commercial Items clause at DFARS
252.227-7015, the Rights in Data - General clause at FAR 52.227-14, and any
other applicable provisions of the DFARS, FAR, or the NASA FAR supplement.

Sherrill-Lubinski Corporation
240 Tamal Vista Blvd.
Corte Madera, CA 94925

TECHNICAL SUPPORT
Phone 800.548.6881 (inside U.S.)
415.927.8400
Fax 415.927.8401
E-mail support@sl.com

5/26/06 v6.2x
Table of Contents
1. Overview
Dynamics .................................................................................... 1-2
Editing Functions ........................................................................ 1-3
Editor Layout .............................................................................. 1-4
Dialog Windows .......................................................................... 1-17
Palettes ........................................................................................ 1-18
Localization of output .................................................................. 1-19
Organization of the Manual ......................................................... 1-19
2. Tools
Create Tools ................................................................................ 2-1
Select Mode Tool ......................................................................... 2-9
Select Point Tool ......................................................................... 2-11
Change Tools ............................................................................... 2-12
View Tools .................................................................................. 2-13
View Preset Tool.......................................................................... 2-16
Keyboard Equivalents .................................................................. 2-17
3. Setting Object Properties
Graphic Properties ....................................................................... 3-2
Attaching a Name to Objects ....................................................... 3-23
Attaching a String to Pass to an Application (UserData) .............. 3-24
Attaching an Integer to Pass to an Application (UserWord) .......... 3-25
Setting Model Properties ............................................................. 3-26
4. Dynamics
Dynamic Descriptions.................................................................. 4-2
Attaching Dynamic Descriptions to Objects ................................. 4-5
Renaming Variables ..................................................................... 4-9
Previewing the Dynamic Behavior of Objects .............................. 4-12
5. Menus
File Menu .................................................................................... 5-3
Edit Pull-Down Menu .................................................................. 5-13
View Menu .................................................................................. 5-21
Model Pull-Down Menu............................................................... 5-23
Object Pull-Down Menu .............................................................. 5-24
Dynamics Pull-Down Menu ......................................................... 5-35
Options Pull-Down Menu ............................................................ 5-36

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide i


Palettes Pull-Down Menu............................................................. 5-44
Point Pull-Down Menu ................................................................ 5-49
Help Pull-Down Menu ................................................................. 5-52
6. Building Models
Invoking the SL-GMSDraw Editor ............................................... 6-1
Command-line options ................................................................. 6-1
Setting up the SL-GMSDraw Editor ............................................. 6-2
Laying Out a Model ..................................................................... 6-9
Building the Model ...................................................................... 6-10
Optimizing Loading and Displaying a Model ............................... 6-49
Testing a Model ........................................................................... 6-52
Appendix A Using Active X Controls
Index

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide ii


List of Figures

Number Title Page


Figure 1-1: Dynamic Model example ............................................................. 1-2
Figure 1-2: Editor Layout (Motif) ................................................................... 1-4
Figure 1-3: Editor Layout (Windows) ............................................................. 1-5
Figure 1-4: Examples of pull-down and hierarchical menus ........................... 1-7
Figure 1-5: Point Selection Control and Loop Control icons (Motif) ................ 1-8
Figure 1-6: Point Selection Control and Loop Control icons (Windows).......... 1-8
Figure 1-7: Undo and Redo Tools ................................................................. 1-9
Figure 1-8: Object Creation Tools ................................................................. 1-10
Figure 1-9: Change Tools ............................................................................. 1-11
Figure 1-10: Selection Tools ........................................................................... 1-11
Figure 1-11: View Tools .................................................................................. 1-12
Figure 1-12: View Preset Tool ......................................................................... 1-12
Figure 1-13: "Default Graphic Properties" tabs (part 1) ................................... 1-14
Figure 1-14: "Default Graphic Properties" tabs (part 2) ................................... 1-15
Figure 1-15: "Status" window (Motif) ............................................................... 1-16
Figure 1-16: Text entry dialog window ............................................................. 1-17
Figure 1-17: A standard Palette (Motif) ........................................................... 1-18
Figure 1-18: A standard Palette (Windows) ..................................................... 1-19
Figure 3-19: "Default Graphic Properties" tabs (part 1) ................................... 3-2
Figure 3-20: "Default Graphic Properties" tabs (part 2) ................................... 3-3
Figure 3-21: "Fill" graphic properties .............................................................. 3-5
Figure 3-22: Fill directions .............................................................................. 3-6
Figure 3-23: Gradient Fill Properties ............................................................... 3-8
Figure 3-24: "Edge" graphic properties ........................................................... 3-9
Figure 3-25: "Text" Default Graphic Properties window (Windows) .................. 3-14
Figure 3-26: "Text" Default Graphic Properties window (Motif)......................... 3-14
Figure 3-27: Fifteen different positions available for aligning text..................... 3-15
Figure 3-28: Example text alignments in a Text Rectangle .............................. 3-16
Figure 3-29: "TRect" Default Graphic Properties window (Windows) ............... 3-19
Figure 3-30: "Marker" Default Graphic Properties window (Motif) .................... 3-21
Figure 3-31: "Marker" Default Graphic Properties window (Windows) .............. 3-21
Figure 3-32: "Object Name" window ............................................................... 3-23

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide iii


Figure 3-33: "Object Userdata" window........................................................... 3-24
Figure 3-34: "Object Userword" window .......................................................... 3-25
Figure 3-35: "Model Properties" window ......................................................... 3-26
Figure 3-36: "Holes" in meter face .................................................................. 3-27
Figure 3-37: Background color set to the same color as meter "face" .............. 3-28
Figure 3-38: "Model Userdata" window ........................................................... 3-28
Figure 3-39: "Model Userword" window .......................................................... 3-29
Figure 3-40: "Model Dynamic Properties" window ........................................... 3-29
Figure 3-41: "Model Flags" window ................................................................. 3-30
Figure 4-1: DynProp containing two dynamic descriptions ............................. 4-2
Figure 4-2: Dynamic description with unconditional display dynamics ........... 4-2
Figure 4-3: Dynamic description with conditional display dynamics ............... 4-3
Figure 4-4: DynProp with input and conditional display dynamics .................. 4-4
Figure 4-5: A DynProp in the "Object Dynamic Properties" window ............... 4-6
Figure 4-6: A DynProp indented after pressing the "Apply" button ................. 4-7
Figure 4-7: A DynProp typed incorrectly with an error on line 3 ..................... 4-8
Figure 4-8: A dialog box displaying the location of an error ........................... 4-8
Figure 4-9: Renaming the "bg_color" variable in a Model Instance ................ 4-10
Figure 4-10: "Edit Data File" window............................................................... 4-12
Figure 4-11: "Preview Options" window........................................................... 4-13
Figure 5-1: SL-GMSDraw Menu Bar.............................................................. 5-1
Figure 5-2: SL-GMSDraw menu structure ..................................................... 5-2
Figure 5-3: File menu structure ..................................................................... 5-3
Figure 5-4: Available Images window ............................................................ 5-6
Figure 5-5: Export Bitmap File window.......................................................... 5-7
Figure 5-6: Export JPEG File window ........................................................... 5-8
Figure 5-7: Export Java window .................................................................... 5-9
Figure 5-8: "Open .m1 File" window (Motif) ................................................... 5-10
Figure 5-9: "Print Dialog" window ................................................................. 5-11
Figure 5-10: Edit menu structure .................................................................... 5-15
Figure 5-11: "Select by Properties " window ................................................... 5-19
Figure 5-12: "View Options" window ............................................................... 5-22
Figure 5-13: Model Pull-Down Menu ............................................................... 5-23
Figure 5-14: Object menu structure ................................................................ 5-24
Figure 5-15: "Object Information" window ....................................................... 5-29

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide iv


Figure 5-16: "Object Name" window ............................................................... 5-29
Figure 5-17: "Object Userdata" window........................................................... 5-30
Figure 5-18: "Object Userword" window .......................................................... 5-30
Figure 5-19: "Object Flags" window ................................................................ 5-31
Figure 5-20: "Move" window ........................................................................... 5-33
Figure 5-21: "Scale" window ........................................................................... 5-33
Figure 5-22: "Rotate" window ......................................................................... 5-34
Figure 5-23: Options menu structure .............................................................. 5-36
Figure 5-24: "Grid Options" window ................................................................ 5-38
Figure 5-25: "Snap and Point Modes" window ................................................. 5-40
Figure 5-26: "User Preferences" window ......................................................... 5-41
Figure 5-27: "Available Palettes" window ........................................................ 5-45
Figure 5-28: Six Palettes available in SL-GMS ................................................ 5-46
Figure 5-29: "Enter Point" window .................................................................. 5-51
Figure 5-30: The "About SL-GMSDRAW" window ........................................... 5-52
Figure 6-1: "User Preferences" window ......................................................... 6-2
Figure 6-2: Setting grid parameters with the "Grid Options" window .............. 6-3
Figure 6-3: "View Options" window ............................................................... 6-3
Figure 6-4: "Text" view on Windows (top) and Motif (bottom) ......................... 6-5
Figure 6-5: Color indexes in the "Default Graphic Properties" window ........... 6-8
Figure 6-6: "Print Dialog" window ................................................................. 6-9
Figure 6-7: Setting background object properties .......................................... 6-11
Figure 6-8: A sample DynProp ...................................................................... 6-12
Figure 6-9: A DynProp in the "Object Dynamic Properties" window ............... 6-13
Figure 6-10: "Available Submodels" window.................................................... 6-15
Figure 6-11: "c1_txtflds" Palette ..................................................................... 6-17
Figure 6-12: Instancing the Text Display Box Control Object ........................... 6-18
Figure 6-13: "Available Submodels" window.................................................... 6-21
Figure 6-14: Selecting the Option Menu Control.............................................. 6-23
Figure 6-15: "c1_txtflds" Palette ..................................................................... 6-27
Figure 6-16: "c1_scales" Palette ..................................................................... 6-30
Figure 6-17: "c1_buttons" Palette ................................................................... 6-32
Figure 6-18: Containers Palette ...................................................................... 6-34
Figure 6-19: Buttons Palette ........................................................................... 6-35
Figure 6-20: "Object Renamed Variables" window........................................... 6-36

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide v


Figure 6-21: A dialog box example.................................................................. 6-38
Figure 6-22: "Model Properties" window ......................................................... 6-40
Figure 6-23: The Model width and height changed to 40 and 30...................... 6-41
Figure 6-24: Model Edit Mode (New Window) selected ................................... 6-42
Figure 6-25: A dialog box example.................................................................. 6-43
Figure 6-26: Selecting a Text Display Box Control Object ................................ 6-44
Figure 6-27: Select button to send "value" as an integer ................................. 6-47
Figure 6-28: "Edit Data File " window.............................................................. 6-52
Figure 6-29: "Preview Options" window........................................................... 6-53
Figure A-1: Insert Active X Control option selected ..................................... A-1
Figure A-2: Insert Active X Control dialog ................................................... A-2

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide vi


Overview
SherrillLubinski

The SL-GMSDraw graphical editor is the primary tool used to create inter-
active graphical screens with colorful dynamic components. When you
begin a new Model, you can draw any screen object, attach dynamic
behavior to the object, and preview the behavior without leaving the graph-
ical editor. After you have verified and tested the Model within SL-GMS-
Draw, you can then save the Model to disk and easily integrate it into a
user-developed application, either as the primary interface screen or as a
SubModel.
There are two different environments for which SL-GMSDraw is available:
Unix/Motif
32-bit Windows 1
SL-GMSDraw is functionally identical in both environments. This manual
illustrates primarily the Windows environment.
This chapter presents an overview of the key points of SL-GMSDraw:
Easy dynamics specification
User-friendly editing functionality
Comprehensive editor layout
Dialog windows used for user input
Palettes of buttons, text boxes, and scales that can be selected
and placed into a Model
Internationalization/localization of menus and output
The organization of this manual is described at the end of the chapter.

1. "32-bit Windows" refers to a platform with a 32-bit architecture running Microsoft


Windows NT or Windows 95.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-1


Dynamics
SL-GMSDraw provides a comprehensive and powerful set of tools that
allows you to control the dynamic updating of screens in response to
changing data. Dynamics specification is accomplished entirely from with-
in the SL-GMSDraw editor through the SL-GMS dynamics scripting lan-
guage. You may either edit the dynamics scripting language directly or use
a GUI-driven interface.
As a developer, you may be required to write minimal code in order to
translate the user application variables into a form recognized by the
dynamic translator engine, and thereby allow the mapping between the
variables defined in the Models and the application variables. Fundamental
dynamic behaviors, such as change of color and motion, are accessible
directly through the editor. You will also need to write code when you devel-
op Models using more sophisticated dynamic behavior.
Figure 1-1: shows a representative dynamic Model.

Figure 1-1: Dynamic Model example

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-2


Editing Functions
You will find that your development time is significantly reduced over typical
dynamic graphics editors, in which constructing screens (Models) that dis-
play application data is extremely time intensive. With SL-GMSDraw, your
time is more productive. Layout, object creation, animation, and notation
are all combined in a single editing session.
SL-GMSDraw provides:
tool panels to create and change objects
menus organized according to functionality
easy-to-use dialog windows
printing capabilities
import capabilities for foreign file formats, including ".xwd"
(Motif), ".bmp" (32-bit Windows), and .jpg.
zoom and pan capabilities
"drag-and-drop" drawing operations for moving, scaling, rotating,
and duplicating objects, and point handling
capability to select a list of objects and modify a graphical
property on the entire list with a single key-click
capability to select a list of objects and move forward and
backward through the list during editing operations
multiple "undo" and "redo" operations with the type of each
operation identified
line-by-line error checking of dynamics scripts
32-bit Windows- and Motif-compliant copy, cut, and paste
operations via a clipboard

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-3


Editor Layout

 Menus, Control(page
Icons, and Undo/Redo Tools
7)

Tools
View


(page 2-13)

Active
*
Working
*+ View
 (page 16)
Object
Tools
(page 2-1)

 Graphical Properties  Status Information


(page 3-2) (page 16)

Figure 1-2: Editor Layout (Motif)

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-4


 Menus, Control Icons, and Undo/Redo Tools
(page 7)

 Status bar  Active Working View


(page 16)
 (page
Tool Panels
2-1)
(page 16)

Properties
Graphical

(page 3-2)

Figure 1-3: Editor Layout (Windows)

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-5


Figure 1-2: and Figure 1-3: show the layout of the SL-GMSDraw editor.
There are five different parts.
Main Menu bar contains pull-down menus, control icons, and
the tools used to undo/redo editing functions
Tool Panels contain tools used to create, change, view
objects, and to preset views
Default Graphic Properties window controls the properties
of objects, such as color and edge style
Active Working View contains the current Model being
edited
Status window (Motif) and Status bar (Windows) displays
status of editing operations
The layout of the SL-GMSDraw user interface varies slightly between the
Motif and Windows versions. However, the editor provides the same tools
and functionality in both environments.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-6


 Menus, control icons, and undo/redo tools
Figure 1-4: shows examples of the pull-down, cascading menus of
SL-GMSDraw. For example, to modify properties on an object, click the
mouse on Object and within the resulting pull-down menu, click on Proper-
ties. Choices for Object properties pop up in the Properties submenu.

File Object

Palettes

Dynamics

Figure 1-4: Examples of pull-down and hierarchical menus

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-7


Snap Mode Point Mode

Point Selection Control Loop Control Select


by
Extent

Figure 1-5: Point Selection Control and Loop Control icons (Motif)

Loop Control

Select by Extent

Snap Mode

Point Selection Control


Point Mode

Figure 1-6: Point Selection Control and Loop Control icons (Windows)

The Point Selection Control icons provide different modes to pick Points
while building objects. Snap Mode allows you to place the next Point
picked at either the nearest grid intersection (Snap to Grid), the nearest

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-8


predefined Point of the closest object (Snap to Gravity), or anywhere in the
Model (Snap Mode Off).
Point Mode controls the Reference Point used to move, rotate, scale, or
mirror objects. There are three modes available: Point Mode, Center Mode,
and Reference Mode. Point Mode (the default) means that selected objects
are moved, rotated, or otherwise transformed relative to the predefined
Point on an object nearest to the Point selected. Center Mode uses an
objects center. The Reference Mode uses the Reference Point of an
object.
Use Loop Control to move forward and backward through a list of selected
objects and to perform different operations, such as assigning dynamic
behavior to selected objects.
When the Select by Extent icon is activated, you can click a specified point
in the Model and drag the mouse to create a Selection Extent. The Selection
Extent appears as a rectangle and all items within that rectangle become
selected. Typically, you can create a Selection Extent by clicking the Select
Tool in an empty space in the edit window, and then dragging across the
objects to be selected. The Select by Extent icon is useful when there is no
empty space to click in to begin the typical operation. See the section
Select Mode Tool on page 2-9 for more information about object selection.

Motif

Windows

Figure 1-7: Undo and Redo Tools

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-9


The Undo and Redo tools allow you to erase or recreate the last editing
change you made such as creating, moving or deleting an object, or chang-
ing a property within an object.

Tools
The panel of tools provided with the SL-GMSDraw editor allows you to cre-
ate, change, view objects, and to preset views. Use of these Tools is
described in Chapter 2 Tools.

Create Tools

Line
Polyline
Spline
Polygon
Closed Spline
Rectangle
Circle
Filled Polygon
Filled Closed Spline
Filled Rectangle
Filled Circle
Sector
Three Point Sector
Wedge
Marker
Text
Text Rectangle

Figure 1-8: Object Creation Tools

The icons are representative of the objects they create, as


defined in Figure 1-8:.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-10


Change Tools

Duplicate

Figure 1-9: Change Tools

Use the Duplicate Tool, illustrated in Figure 1-9:, to duplicate an


object.

Selection Tools

Select Mode Select Point

Figure 1-10: Selection Tools

Use the Select Mode Tool, illustrated in Figure 1-10:, to select


any object in the Active Working View by placing the cursor
over the object and clicking the left mouse button. Each time you
select an object, it is added to the Select List.
Use the Select Point Tool, illustrated in Figure 1-10:, to move
and delete Points and to identify a specific Point in an object.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-11


View Tools

Grabber Point Pan

Zoom In Continuous Zoom Out Continuous

Zoom In Once Zoom Out Once

Zoom Rect Reset View

Figure 1-11: View Tools

The View Tools in Figure 1-11: are used to visually move and
resize (pan and zoom) the graphics displayed in the Active
Working View window of SL-GMSDraw. They do not
permanently affect the objects displayed.

View Preset Tool

Figure 1-12: View Preset Tool

The view preset tool presents the same functionality as the set views found
in the View Options dialog. The view preset tool allows you to save up to 5
views.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-12


 Graphical Properties
You can easily set graphical properties for a single object or a
group of objects by pointing and clicking in the Default Graphic
Properties window. Figure 1-13: on page 14 and Figure 1-14:
on page 15, illustrate the five different menus, Fill, Edge, Text,
TRect, and Marker, accessible from this window. To shift
between menus, click on any one of the tabs. (In Motif, the tabs
appear as buttons on the left side of the window.)

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-13


Fill Properties

Edge Properties

Text Properties

Figure 1-13: "Default Graphic Properties" tabs (part 1)

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-14


Text Rectangle Properties

Marker Properties

Figure 1-14: "Default Graphic Properties" tabs (part 2)

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-15


 Active Working View
The Models you are currently creating or modifying are displayed in the
Active Working View window.

 Status Information
Information concerning the current operation is displayed in the status bar.
For example, if you are currently using the Line Tool, a prompt appears
that reminds you to enter the starting and ending Points of the Line. In the
Motif environment, the status information is displayed in the Status win-
dow, as shown in Figure 1-15:.

Figure 1-15: "Status" window (Motif)

In the 32-bit Windows environment, the status information is displayed in


the Status bar at the bottom of the main SL-GMSDraw window.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-16


Dialog Windows
SL-GMSDraw makes extensive use of dialog boxes, which are displayed if
keyboard input is required. Many of these dialog boxes are native to the
active operating system.
For example, to attach a name to a button, simply enter the name you wish
to use and select Apply to activate your choice. Most dialog boxes accept
standard text editor inputs, such as cursor-controlled cut, copy, and paste
operations.
Figure 1-16: illustrates a dialog window used by SL-GMSDraw to handle
text entry.

startbutton

Figure 1-16: Text entry dialog window

Note that in all cases, clicking Apply applies changes without closing the
Window. Click Close to close the window without applying the changes. If
you make changes and forget to click Apply before clicking Close, a
prompt appears reminding you that the changes will be lost if you continue.
Clicking Reset redisplays the initial information you selected before any
changes were made.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-17


Palettes
To better organize and present frequently used SubModels, SL-GMSDraw
features Palettes. Palettes provide the ability to re-use Models, making them
easy to access and incorporate into Models under development. Any Model
created with SL-GMSDraw can be instanced as a SubModel, saved on a
Palette, and used in the construction of a more complex Model. The
instancing of a SubModel on a Palette makes it easy to apply global chang-
es to objects which have been embedded in many screens.
Included as Palettes with SL-GMSDraw are push buttons, radio buttons,
text label boxes, text edit boxes, slider scales, and more. Figure 1-17:
shows a Motif-style Palette. Figure 1-18: on page 19 shows the equivalent
Windows-style Palette.

Figure 1-17: A standard Palette (Motif)

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-18


Figure 1-18: A standard Palette (Windows)

Localization of output
Messages and other output from SL-GMSDraw is internationalized. The
internationalization of messages and other output is described in Localiza-
tion of output on page 6-7.

Organization of the Manual


Chapter 2 Tools describes the Create, Change, Point, and View Tools
panels. These tools allow you to create objects, modify existing objects,
manipulate the Points that comprise an object, and manipulate how the
objects are viewed during an editing session.
Chapter 3 Setting Object Properties describes the window tools that
modify object properties.
Chapter 4 Dynamics describes how to attach dynamic behavior to
objects in a Model.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-19


Chapter 5 Menus describes the pull-down menus and their various sub-
menus. The options available within each menu allow you to load and save
Models, edit objects and change their properties, attach dynamic behavior
to objects, zoom and pan, and access Palettes of objects that you can
select and include in the Model being edited.
Chapter 6 Building Models describes how to use SL-GMSDraw to create
and test Models, create dialog boxes, create radio button groups, and
design and implement Models for increased performance.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 1-20


2 Tools

This chapter describes the options available with the SL-GMSDraw Tool
Panels. The Tools Panels contain:
Create Tools to create objects
Change Tools to change an existing object
Point Tools to manipulate individual Points in an object
View Tools for zooming and panning
View Preset Tool for setting up to 5 views

Create Tools
The Create Tools panel displays all the primitive graphical
objects (i.e., Lines, Polygons, Circles, and the like) that can be
created and added to Models developed with SL-GMSDraw.
When you select a tool, the icon is highlighted and remains
highlighted and pushed-in until you select another tool, or
double-click the right mouse button. When you select a tool, you
can draw any number of objects that meet the selected
parameters until you de-select the tool. You can also set a
preference that automatically disables the tool once a single
object is created. Click the Options Pull-Down menu and select
User Preferences to display the User Preferences window.
Next, select Create Single Objects. With this preference
selected, the editor returns to selection mode as soon as
the points needed to create the object are picked.
When you select a tool, you must then establish a series of
Points that define the object in the Active Working View (refer
to page 1-16). Click the left mouse button to select Points to
create any shape. The status bar displays prompts for each
remaining action needed to complete the object. To terminate
the activity, select another tool or click the right mouse button.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-1


Tools

It is not necessary to pick the same Point as the starting and


ending Point to create "Closed" objects. Once you have
identified the Points, simply click the right mouse button or
select another tool. Selecting another tool signals SL-GMSDraw
to automatically connect the starting and ending Points to close
the object.
Subsequent sections in this chapter provide more detail about
creating different types of objects.

Lines
By comparison with a simple Line, a Polyline is defined by more than two
points a starting Point, ending Point, and additional Points between the
two. The Points are connected by SL-GMSDraw with straight lines.

Line Polyline

Splines
Points are connected by a Polyline as they are selected. On completion,
the Polyline you created is redrawn as a Spline, and the curved lines are
smoothed. When you create a Closed Spline or Filled Closed Spline,
SL-GMSDraw connects the end Points of the Polyline and converts them to
a Closed Spline.

Spline Closed Spline Filled Closed Spline

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-2


Tools

Polygons
Polygons (Closed Polylines) may appear as triangles, trapezoids, rectan-
gles, or any shape composed of straight edges. When creating a Rectangle
or Filled Rectangle, you need only define the two Points that define one of
the diagonals. SL-GMSDraw automatically completes these simple rectan-
gles.
Filled Filled
Polygon Polygon Rectangle Rectangle

Circles
To identify the location and size of a Circle, select a center Point and a
Point on the outer edge of the circle.

Circle Filled Circle

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-3


Tools

Sectors and Wedges


Three Point Sectors and Sectors are curved Lines taken from the edge of a
Circle. Three Point Sectors, Sectors, and Pies are always drawn counter-
clockwise. The Points must be picked in the order (a, b, and c) illustrated in
the corresponding diagrams. For Sectors and Pies, SL-GMSDraw arranges
the final Point you picked so that it has the same radius as that of the first
Point picked on the curved edge. Three Point Sectors, Sectors, and Pies
may be filled.

Three Point Sector: SL-GMSDraw creates the Sector which best fits the
three Points picked.

Sector

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-4


Tools

Wedge: The curved edges of a Wedge are always drawn


counterclockwise.

If a final Point is picked that is clockwise from the second Point, SL-GMS-
Draw creates a Circle shape with a single piece missing (as shown below)
rather than a small Wedge.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-5


Tools

Markers
Markers are small characters used to indicate positions of single Points.
Markers are created by picking Points in the Active Working View. All
Markers created until either another Tool is selected, or the right mouse
button is clicked, are treated as a single object (i.e., individual characters
can not be selected). The Undo Tool "unpicks" all Markers created since
the Marker tool was clicked.
The style of Marker created is set in the Default Graphic Properties win-
dow, as described in Marker Style on page 3-21.

Text
Text is any printable character entered from the keyboard. A Text object is
created by picking a Point to position the Text and then entering characters
from the keyboard. By default, the Text entered is centered left-to-right
around this Point. The alignment of the Text and the direction of the Text
that is written may both be changed by clicking Text in the Default Graph-
ic Properties window. Refer to Text font, size, alignment, direction, and col-
or on page 3-14.
Text Rectangles are Rectangles (either filled or unfilled) with Text written
on top of them. It is faster to erase and redraw Text Rectangles than it is to
erase and redraw ordinary Text. Text Rectangles are used to create Text
objects that will be changed by an application. Changing Text requires that
the old Text be erased by redrawing the Text in the erase color a rela-
tively slow operation for most graphical workstations. Text in Text Rectan-
gles is deleted by erasing the Rectangle a much faster operation.
Text may be constrained to fit within the boundaries of the Text Rectangle.
Refer to Text Rectangle constraint on page 3-19.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-6


Tools

Text Text Rectangle

When you wish to enter multiple lines of Text, use the <RETURN> key to
begin each new line. When you are finished, click the right mouse button or
select another tool to terminate the procedure.1
Thus, to enter

This is five
lines of text,

with a blank
third line.

key in:
This is five<RETURN>
lines of text,<RETURN>
<RETURN>
with a blank<RETURN>
third line.<right mouse button>

Text entry is done in-place. Text replacement and editing are accomplished
using the Replace Text button (Replace button in Motif) in the Text tab of
the Default Graphic Properties window, described in the section Text font,
size, alignment, direction, and color on page 3-14.

NOTE: SL-GMSDraw does not prevent Text from appearing outside of a


Text Rectangle when text constraint is set to its default mode.
The section Text Rectangle constraint on page 3-19, describes

1. The <ESCAPE> key can also be used to terminate the procedure on Motif
systems.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-7


Tools

how to control the behavior of text when it overflows the bounds of


a Text Rectangle object.

Changing Graphical Properties


Whether you are creating Text or Text Rectangles, the properties
used to define the Text are the same. Text properties, such as
color and font, are described in Text font, size, alignment,
direction, and color on page 3-14. The procedure to change edge
style and width, edge color, and fill color properties of the Text
Rectangle is described in Edge color, style, and width on page
3-9 and in Fill color, style, and direction on page 3-5. The
procedure to change the text constraint within Text Rectangle
objects is described in Text Rectangle constraint on page 3-19.
The properties of the most recently created Text object can be
changed until a Point for positioning the next Text object has
been selected. You can also select multiple objects and change
any or all properties for that group at one time.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-8


Tools

Select Mode Tool


Select Mode is the default mode of SL-GMSDraw. The
Select Mode Tool is active unless another tool is currently in
use. Select Mode allows you to select any object in the
Active Working View by placing the cursor over the object
and clicking the left mouse button. As each object is
selected, it is added to a list called the Select List. The
number of items on the Select List is displayed in the Status
area (refer to page 1-16). To view the items that are
contained on the Select List, click the Object Pull-Down
Menu and select Select List to display the Select List
window.
Additional objects can be added to the Select List by the following meth-
ods:
by clicking on the first object, then selecting additional objects
while holding down the <SHIFT> key.
by clicking the Edit Pull-Down Menu and choosing Select. A
submenu is displayed that allows you to choose among several
different selection criteria. The different selection options are
described in "Select" Submenu Options on page 5-17.
by clicking in empty space and dragging the mouse to create a
Selection Extent. The Selection Extent appears as a dashed
rectangle and all items within that rectangle are selected.

NOTE: The Select By Extent icon in the Main Menu can be used when
there is no empty space in which to place the cursor. Refer to
page 1-8 for additional information.

Control Handles are displayed on the corners of selected objects and on


both the corners and edge mid-points of the Selection Extent.
To deselect any items that appear on the Select List you can either:
click in empty space to deselect all previously selected items (all
items on the Select List) or
click on any item to deselect all previously selected objects and
select the item clicked on.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-9


Tools

The Control Handles are useful for scaling (making larger or smaller) and
rotating objects.
Objects are scaled by simply clicking on a Control Handle of the selection
extent of a selected object and dragging the mouse. Dragging a corner
scales the object proportionally (by the same rescale percent for both
axes); dragging an edge scales the object non-proportionally (either in the
horizontal or vertical direction).

NOTE: When an object is rotated, mirrored, scaled, or moved, a


Transformation object is added to that object. A Transformation
object contains information used to display the object in its new
position. When SL-GMS displays an object using a
Transformation object, it takes longer than if the object did not
include a Transformation object. To improve performance, the
transformations can be applied to the objects Points by using the
Apply Transform option of the Object Pull-Down Menu. For
efficiency, it is suggested that the Apply Transform option be
used on all objects in a Model.

Objects are rotated by holding down the <CONTROL> key, clicking on a


Control Handle, and dragging the mouse. The object is rotated in the direc-
tion in which the mouse is moved.
By default, objects rotate around their centers. The Point around which an
object is rotated is called its Reference Point. The Reference Point of an
object is changed by using the Set Reference Point option of the Point
Pull-Down Menu or the Point Mode icons on the Main Menu bar (see page
1-8).
Select Mode is also useful for moving an object. Moving an object is most
easily accomplished by simply selecting an object and dragging it to the
desired location.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-10


Tools

Select Point Tool


The Select Point Tool moves and deletes Points and
provides the means to identify a specific Point on the object.
Click the Select Point Tool, then select an object: the Points
defining the selected object become visible. Click the desired
Point to highlight and select it.

NOTE: Only one object at a time may be selected.

Move the selected Point by dragging the Point to another location in the
Active Working View. Click the right mouse button to complete the move
operation. Points on Text cannot be moved.
Delete the selected Point by pressing the <DELETE> key or by selecting
Delete from the Edit Pull-Down Menu. Points on Text, Pie, Sector,
Three-Point Sector, Rectangle, Marker, and Text Rectangle objects cannot
be deleted.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-11


Tools

Change Tools

Duplicate
The Duplicate Tool is used to duplicate objects. When you select objects,
SL-GMSDraw outlines your selection with an echo rectangle. The four
anchor points of the echo rectangle are displayed as the mouse pointer is
moved to the location in which the copy is to be placed. The mouse pointer
is shown at the location of the Reference Point. The Reference Point can
be changed by clicking the Point Pull-Down Menu and selecting Set Refer-
ence Point.
The copy can be aligned with the original object by clicking the Edit
Pull-Down Menu and selecting Align (refer to Edit Pull-Down Menu on page
5-13 for the different types of alignment). In addition, the placement of a
copy (in relation to the original object) can be restrained horizontally or ver-
tically by holding down the <SHIFT> key.
The procedure used to modify object properties is described in Setting
Object Properties on page 3-1.

NOTE: Objects can also be duplicated by holding down the


<CONTROL> key and selecting the object, then dragging the
echo rectangle to a new position in the Model.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-12


Tools

View Tools
View Tools provide a way to visually pan and zoom the
objects displayed in the Active Working View. They do not
permanently affect the objects displayed. To exit any of the
View Modes, either select another Tool or click the right
mouse button. To reset the View after any of the panning or
zooming operations, perform one of the following actions:
click the Reset View Tool, as described in Resetting the View
on page 2-15
click the View Pull-Down Menu and select Reset

Panning around a View


The Grabber Tool is used to pan the View by clicking on the View and then
"dragging" it to a new position.
The Pan Tool pans the current View to a Point picked in the Active Work-
ing View and continues to do so as long as the mouse button remains
depressed. A frame is displayed to "simulate" the View area.

Grabber Pan

Zooming into a View


Zooming in scales the View "up" to a larger View by a pre-defined percent-
age. A smaller area of the Model is covered and, therefore, the individual
objects in the Active Working View appear larger.
The maximum percentage that the object or group of objects can be
zoomed into is 100 by default (i.e., the final size of the object will be 100%
larger than the original). Each time a new zoom in occurs, the zoomfactor2
is decreased until it reaches the zoom limit. The default value of the zoom

2. The zoomfactor equals the (old X or Y dimension)/(new X or Y dimension).

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-13


Tools

limit is 0.01. The value of the zoom limit can be changed by clicking the
View Pull-Down Menu, selecting View Options, and modifying the Zoom
Limit value in the View Options window.
The Zoom In Once Tool zooms in on the entire View by a pre-defined per-
centage. The pre-defined percentage can be changed by clicking the View
Pull-Down Menu, selecting View Options, modifying the Zoom Percent
value, and clicking Apply in the View Options window.
The Zoom In Continuous Tool zooms in on the entire View, centered on a
Point picked in the Model, and continues zooming in until the mouse button
is released.
The Zoom Rect Tool provides the ability to zoom objects in a region of the
Model; the region is selected by clicking on two corners of a rectangular
region.

Zoom In Once Zoom in Continuous Zoom Rect

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-14


Tools

Zooming out of a View


Zooming out is the opposite of zooming in. The View is scaled "down" to a
smaller View by a pre-defined percentage. A larger area of the Model
becomes visible and, therefore, the individual objects in the Active Work-
ing View appear smaller.
The maximum percentage that the objects in the View can be zoomed out
is 62.5 by default (i.e., the final size of the object will be 62.5% smaller than
the original). Each time a new zoom out occurs, the zoomfactor is
increased until it reaches the zoom limit. The default value of the zoom lim-
it is 0.01. The value of the zoom limit can be changed by clicking the View
Pull-Down Menu, selecting View Options, and modifying the Zoom Limit
value in the View Options window.
The Zoom Out Once Tool zooms out of the View by a pre-defined percent-
age. The pre-defined percentage can be changed by clicking the View
Pull-Down Menu, selecting View Options, modifying the Zoom Percent
value, and clicking the Apply button in the View Options window.
The Zoom Out Continuous Tool zooms out of the View, centered on a
Point picked in the Model, and continues zooming out until the mouse but-
ton is released.

Zoom-Out Once Zoom-Out Continuous

Resetting the View


The Reset View Tool resets the Active Working View to its original,
un-zoomed state.

Reset View

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-15


Tools

View Preset Tool


The View Preset Panel is used to save and recall up to five zoom and pan
settings. This tool has the same functionality as the set views found in the
View Options dialog, which is activated by clicking the View menu, and
selecting View Options.

The current zoom and pan settings for the Active Working View are saved
by clicking the Set button, and then clicking a preset button (1 - 5). When a
view preset button has a saved zoom and pan setting associated with it, the
buttons background color will change.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-16


Tools

Keyboard Equivalents
Model creation tools have, to this point, been described in terms of select-
ing tool buttons, clicking on objects, and entering text. However, SL-GMS-
Draw provides keyboard combinations that speed up many Model-building
activities. Sometimes referred to as "quick keys" or "power-user keys," the
shortcut key combinations consist of simultaneous use of Tool Buttons and
Modifier keys: <ALT>, <CONTROL>, <SHIFT>, <TAB>, and certain num-
bers.

SL-GMSDraw Quick Keys


Function Performed Tool used + Modifier keys
Temporarily invokes the Any <ALT>
Select Mode Tool
Copies an object (Select) <CONTROL>

Constrains modification, Any <SHIFT>


horizontally, vertically,
proportionally
Incremental move in arrow Any <ARROW>
direction of current object
selected
Makes next object on the Any <TAB>
Select List the focus object

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-17


Tools

Left mouse button operations (Windows only)


Double-clicking the left mouse button on a Control or SubModel Instance
displays the Object Renamed Variables window. Double-clicking the left
mouse button on any other type of object displays the Object Information
window.

Right mouse button context menus (Windows only)


Clicking the right mouse button also provides access to a menu of com-
monly-used operations depending on what object or objects are selected.
The menu selections include the display of the Model Properties, View
Options, Edit Dynamics, Object Information, Graphic Properties, and
Object Renamed Variables windows.
In addition, the menu provides functions such as cut, copy, paste, delete,
Group and Ungroup. If multiple objects are selected, the option to loop for-
ward and backward thru the Select List is provided.
Select Point provides the capability of moving or deleting a Point in an
object. The Select Point mode is described in Select Point Tool on page
2-11.

Available Operations

Selected Object Available Operations


No object Done
Select Point
Model Properties
View Options

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-18


Tools

Available Operations

Selected Object Available Operations


Single Object Done
Cut
Copy
Paste
Delete
Select Point
Edit Dynamics
Object Information
Graphic Properties
Multiple Objects Done
Cut
Copy
Paste
Delete
Select Point
Edit Dynamics
Group
Loop Forward
Loop Backward
Object Information
Graphic Properties
Group Done
Cut
Copy
Paste
Delete
Select Point
Ungroup
Object Information
Graphic Properties

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-19


Tools

Available Operations

Selected Object Available Operations


ModInst Done
Cut
Copy
Paste
Delete
Select Point
Renamed Variables
Object Information

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 2-20


3 Setting Object Properties

This chapter explains how to modify object properties. It describes how to


set the following types of properties for an object:
Graphic
Fill color, style, and direction
Edge color, style, and width
Text font, size, alignment, direction, and color
Text constraint for Text Rectangles
Marker style, and color

Attach a name to an object


Attach a string to pass to an application (UserData)
Attach an integer to pass to an application (UserWord)
The Model itself is also an object and UserData, dynamics, Background,
and other properties can be set for it.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-1


Setting Object Properties

Graphic Properties

Fill Properties

Edge Properties

Text Properties

Figure 3-19: "Default Graphic Properties" tabs (part 1)

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-2


Setting Object Properties

Text Rectangle Properties

Marker Properties

Figure 3-20: "Default Graphic Properties" tabs (part 2)

The five tabs (Fill, Edge, Text, TRect, and Marker) of the Default Graphic
Properties dialog box, shown in Figure 3-19: on page 3-2 and Figure 3-20:
on page 3-3, change the graphic properties of selected objects. (Select
Properties from the Object Pull-Down Menu and then select Graphic in
the Properties submenu to access this dialog box.) Only the properties for
the selected tab are visible. To shift between the five different tabs, click
one of the tabs labeled Fill, Edge, Text, TRect, or Marker. (On Motif plat-

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-3


Setting Object Properties

forms, the tabs are represented by buttons, along the left side of the dialog
box, that perform the same function as the tabs.)
Additionally, you can select the font type you wish to apply to any text you
have added to the object. The Default Graphic Properties dialog provides
Hershey and Raster type text choices. In addition, the Windows version
allows you to select one of several different TrueType text styles.
The color panel to the right side of each dialog box (patterned, in the case
of monochrome workstations) contains buttons that set the color of fill,
edge, text, or Marker (depending upon which view is being displayed).
When one of these buttons is clicked, the fill, edge, or text color of any
selected object is changed to the color indicated on the button.
By default, the color panel displays 32 colors. If more colors are defined in
the colordef.dat file, the user can scroll to select a color. See the section
Setting Color Definitions on page 6-8 for more information about defining
colors.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-4


Setting Object Properties

Fill color, style, and direction

Direction Fill percent Interior Gradient dialog Fill and Unfill Pattern Color

Figure 3-21: "Fill" graphic properties

The Fill graphic properties tab, shown in Figure 3-21:, has the following
active regions:
Direction
Fill percent
Interior
Gradient dialog
Fill and Unfill
Pattern
Color

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-5


Setting Object Properties

Fill Direction
The fill direction buttons change the direction from which the fill
proceeds. Click the radio button corresponding to the
appropriate direction. Four fill directions are available, as
illustrated in Figure 3-22:.

from bottom to top

from top to bottom

from right to left

from left to right

Figure 3-22: Fill directions

The fill directions and percent of fill are used in dynamics where
the direction of fill and percent of fill are determined by data
values.

Fill Percent
The Fill Percent button (Fill % in Motif ) sets the fill percent (the
fraction of the selected polygon 1 that is filled), beginning at one
of the four sides. A dialog window prompts for the fill percent.

Fill Interior
The fill interior buttons specify whether the fill interior (finter)
color pattern for the selected object is hollow, solid, opaque, or
transparent:
Hollow the object is logically filled but no fill pattern
appears on the screen (finter = 0).

NOTE: When the Hollow button is selected, changing colors on filled


objects apparently has no effect because they are hollow (similar
to being unfilled). However, one advantage is that an object with

1. This includes Polygons, Closed Splines, Rectangles, Pies, Sectors, Three Point
Sectors, Circles, and Text Rectangles.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-6


Setting Object Properties

hollow interior fill can be selected by clicking its interior, whereas


an object that is unfilled can be selected only by clicking on its
edge.

Solid the object is filled with an unpatterned color (finter


= 1).
Opaque the object is filled with the patterned opaque
color (finter = 2).
Transparent the object is filled with the patterned
transparent color, that is, objects logically behind can be
seen through the transparent object (finter = 3).
Gradient a filled object is shaded from the start color to
the end color (finter = 4).
An object behind an object with finter 2 will not show through,
whereas an object behind an object with finter 3 will show
through. Further information about the fstyle and finter
commands is provided in the chapter SL-GML Reference in the
SL-GMS Quick Reference.

Gradient Dialog
The Gradient Dialog button allows the gradient fill attribute to
be set on a filled object. A Gradient Fill Properties dialog window
prompts for the gradient style, configuration, start color, and up
to 4 color intervals, as shown in Figure 3-23:.

NOTE: On pseudocolor machines, the gradient is filled according to the


colordef.dat indices. For example, if the gradient start color is
index 4 and the end color is index 8 the gradient will consist of
colors 4, 5, 6, 7, and 8. The gradient may appear as stripes. To
display the best gradient quality, set up the color table with a
smooth color gradient in the indices between the start and end
colors. The 256 color mode on Windows NT acts the same as
pseudocolor.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-7


Setting Object Properties

Figure 3-23: Gradient Fill Properties

Fill
The Fill button fills selected objects. Select one or more objects,
then click the Fill button. Next, modify the Fill properties by
clicking the color, style, interior, direction, and percentage
controls, as described in this section.

Unfill
The Unfill button resets selected objects to their unfilled state.

Fill Pattern
The boxes in the fill style panel are buttons which set the fill
pattern or style (fstyle). There are eleven pre-defined patterns.
Custom fill styles can be defined using fstyle entries in a
platform-independent gmsprefs.dat file, which is read by
SL-GMS during runtime initialization.
The fill pattern panel is enabled only when the fill interior is set
to Opaque or Transparent.

Fill Color
Sets fill color, as described on page 3-4.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-8


Setting Object Properties

Edge color, style, and width

Style Width Close/Open Polygons Color

Figure 3-24: "Edge" graphic properties

The Edge graphic properties tab has the following active regions:
Edge Style (estyle)
User-entry of style other than defaults [Motif only; not yet
implemented in Windows]
Edge Width (ewidth)
Buttons to create either Closed or Open Polygons
User-entry of width other than defaults
Color

Edge Style
Set the edge style property of a selected object by clicking the
desired style in the Edge Style selector. In the Windows version,
spin buttons (up-down arrow buttons) can also be used to select
the edge style (the integer corresponding to the desired edge

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-9


Setting Object Properties

style can also be entered directly in the text entry box to the left
of the spin buttons).
The edge style of an object can be set to 0 (none) if that object is
also filled. Not drawing the edge increases performance in the
drawing of filled objects by eliminating the step required to draw
the outline of the object.

Edge Style Other (Motif only)


Click the Style button in the Edge Style selector to specify a line
style that is not included in the Style selector, as described in
SL-GMS Edge and Line styles on page 3-10. Enter an integer
style value in the Edge Style dialog box and click the Apply
button.

SL-GMS Edge and Line styles


SL-GMSDraw allows selection of five different edge and line
styles (estyle) via the Style selector. They are, from top to
bottom in Figure 3-24: on page 3-9: estyle 0, 1, 2, 3, and 4.
When you select any of the edge or line style buttons, that style
is applied to the selected object.
However, SL-GMS supports 27 different Edge (line) styles. In
Motif only, clicking the Style button beneath the edge Style
selector allows specification of line styles other than those
provided by the selector. (Specification of other edge styles is
not supported in the Windows version of SL-GMSDraw.)

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-10


Setting Object Properties

The SL-GMS Line style numbers have the following meanings:

Line Style Number Description


Single digit N Basic Line style with the appearance
shown
1N Line style N with each cycle shortened
by a factor of 2
2N Line style N with each cycle lengthened
by a factor of 2

For example:

Line
Command
Appearance
estyle 2 .............
estyle 12 ..........................
estyle 22 . . . . . . .

In summary, the valid Line styles for the estyle command are as follows:

Valid Line Styles for the SL-GML "estyle" Command

Style Approximate
Description
Numbers Appearance
1 11 21 solid _________________
2 12 22 dot, dot2, dotx2 ..................
3 13 23 dashed, dashed2, dashedx2 __ __ __ __ __ __ __

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-11


Setting Object Properties

Valid Line Styles for the SL-GML "estyle" Command

Style Approximate
Description
Numbers Appearance
4 14 24 dashdot, dashdot2, dashdot2x __ . __ . __ . __ . __ .
5 15 25 border, border2, borderx2 __ __ . __ __ . __ __
6 16 26 center, center2, centerx2 ____ _ ____ _ __ _
7 17 27 divide, divide2, dividex2 __ . . __ . .__. . __ . .
8 18 28 hidden, hidden2, hiddenx2 ___________
9 19 29 phantom, phantom2, phantomx2 ____ _ _ ____ _ _ __

Because of the half and twice relationships, some redundancy exists


among some of the Line styles. For example, Line styles 3 and 28 have vir-
tually identical appearances.

Edge Width
Set the edge width property of a selected object by clicking the
desired width in the Width selector. In the Windows version, spin
buttons (up-down arrow buttons) can also be used to select the
edge width (the integer corresponding to the desired edge width
can also be entered directly in the text entry box to the left of the
spin buttons).

Open and Close Polygon


The Close Polygon button closes the two ends of a polyline to
create a polygon. The Open Polygon button disconnects the
two ends of a polygon to create a polyline.

Edge Width Other


In Motif versions, click the Width button in the Edge Width
selector to specify a line width that is not included in the Width
selector. Enter an integer width value in the Edge Width dialog

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-12


Setting Object Properties

box and click Apply. The Width selector provides lines with
widths ranging from 1 to 5, hence a value of 6 or more must be
used.
In the Windows version, spin buttons (up-down arrow buttons)
are used to select an edge width greater than five (the integer
corresponding to the desired edge width can also be entered
directly in the text entry box to the left of the spin buttons)

Edge Color
Set edge color, as described on page 3-4.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-13


Setting Object Properties

Text font, size, alignment, direction, and color

Scaling
Alignment Font Size TrueType Font Style
Font Type Text Direction
Color
Replace Text Selector
Font Name

Figure 3-25: "Text" Default Graphic Properties window (Windows)

Font Type Selector Font Size Text Direction


Alignment Color Selector
Font Name Replace Text Selector

Figure 3-26: "Text" Default Graphic Properties window (Motif)

As shown in Figure 3-25: and Figure 3-26:, the text graphic properties win-
dows contains the following active regions:
Text Alignment Panel
Font Type Selector
Text Direction
Font Size

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-14


Setting Object Properties

TrueType Styles (Windows only)


Font Name
Replace Text
Color

Text Alignment Panel


Set text alignment using the Text Alignment Panel. The panel
provides 15 different positions for text alignment, as represented
by the circles at each of the intersections in Figure 3-27:. In the
Windows version, each position is represented by a radio button.
In the Motif version, text is aligned by clicking one of the 15
"diamond" markers (each marker corresponds to one of the
positions in the text alignment grid shown in Figure 3-27:.)
Text alignment is defined as the offset of Text relative to the
Point chosen for positioning the Text object. The vertical buttons
in the panel represent the left edge, center, and right edge of the
Text extent. The horizontal buttons show the bottom of the Text
extent, the base of the Text, the middle of the extent, the top of
capital letters, and the top of the Text extent. Set the alignment
by selecting the appropriate button.

Figure 3-27: Fifteen different positions available for aligning text

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-15


Setting Object Properties

Figure 3-28: illustrates the alignment positions controlled with


the Text Alignment Panel. Four copies of a Text Rectangle are
shown, with each copy having its text string aligned with different
alignment settings.

Figure 3-28: Example text alignments in a Text Rectangle

It is advisable to use half-center alignment the default


alignment whenever Text Rectangles are created. Using
half-center alignment positions Text precisely in the center of the
Rectangle.

Font Type Selector


The Font Type can be either Hershey or Raster. 2 When
"Hershey" is selected, only the names of the Hershey Fonts are
2. In the Windows version, the font type can be either Hershey or TrueType, or one
of the thirteen SL-GMS default fonts, but the available font names for all font types
are displayed in the "Font Name" scrollbox at all times.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-16


Setting Object Properties

displayed in the "Font Name" scroll box. When "Raster" is


selected, only the names of the available Raster fonts are
displayed in the "Font Name" scroll box.

Text Direction
Text Direction has two settings: left-to-right and top-to-bottom,
indicated by arrows. When the down arrow is selected, all Text
objects currently on the Select List, and all new Text objects will
display vertically. When the horizontal arrow is selected, all Text
objects currently on the Select List, and all new Text objects will
display horizontally.

Font Size
Set the height of text by clicking the font Size button in Motif,
then entering a value in the dialog box prompt. In Windows, the
font size setting can either be directly typed into the Height text
entry box, or the spin buttons (up/down arrows) can be used to
incrementally increase or decrease the font size. 3 Height is
specified in World Coordinates.4
The Size button dialog box in Motif, and the Default Graphic
Properties window in Windows also contain a check box labeled
Adjust for scaling. If this box is checked, the text height
attribute of each object on the Select List will be set to the given
value adjusted for a scaling matrix that may be attached to the
object. For example, suppose a Text Rectangle object were
scaled by a factor of 2, and the value "3" is entered for the size
of the text. The text height attribute of the object would be set to
1.5.

TrueType Styles (Windows only)


If the Font Type is a TrueType font, a style other than the default
can be selected by clicking one of the style buttons in the
TrueType Styles section. Four additional styles are available:

3. The value of the font height entered by the user is limited to the height of the
Model.
4. World Coordinates are double precision.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-17


Setting Object Properties

bold, italic, underlined, and strike-through. The style buttons


toggle the font style. For instance, if the default style is
displayed, clicking the "bold" button will display the "Bold" style.
Clicking the "bold" button again will display the default style.

Font Name
On Motif systems, if Font Type is set to "Hershey," only the
names of the Hershey Fonts are displayed in the "Font Name"
scroll box. When "Raster" is selected, only the names of the
Raster fonts are displayed in the "Font Name" scroll box. Select
the font by clicking the appropriate entry in the "Font Name"
scrollbox.
On Windows systems, the available font names for Hershey,
TrueType, and the thirteen SL-GMS pre-defined fonts are
displayed at all times in the "Font Name" scrollbox. Hershey
fonts are designated with "Hs" preceding the name of the font.
TrueType fonts are designated with "TT".
The available fonts are defined in the file "fontdef.dat." A
discussion of setting font definitions is provided in the section
Setting text font definitions on page 6-4. The SL-GMS Quick
Reference provides additional information about font definitions
and availability.

Replace Text
To replace a text string, click the Replace Text button (Replace
button in Motif). The Object Text dialog window displays the
current Text string attached to the object. The Text string can be
added to, modified, or deleted.
Another manner in which to replace text is to click the Object
Pull-Down Menu and select Properties, then select Text to
display the Object Text dialog window.

Text Color
Sets text color, as described on page 3-4.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-18


Setting Object Properties

Text Rectangle constraint

Figure 3-29: "TRect" Default Graphic Properties window (Windows)

A text constraint attribute is available for Text Rectangle objects. This


attribute controls how text behaves when it overflows the bounds of a Text
Rectangle object.
All constraint modes use an edge width of 1 to determine the boundary of
the Text Rectangle. None of the constraint modes use edge width to make
the text rectangle boundary smaller for fitting or clipping the text.
There are three settings available for text constraint, with None being the
default:
None (value = 0)
Clip (value = 1)
Fit Width (value = 2)
Setting text constraint equal to None allows a Text Rectangle objects text
to display outside (overflow) the text rectangle boundary. This is the default
setting.
The Clip setting will cause a Text Rectangle objects text to be clipped to
the text rectangle boundary.
The Fit Width setting is used to constrain the text in a Text Rectangle
object to fit within the boundary of the text rectangle. This is accomplished
by changing the position of the individual characters in the text. The char-

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-19


Setting Object Properties

acters may overlay each other to stay inside the boundary. If the width of a
single character overflows the boundary, the characters will overlay each
other and the text will overflow the text rectangle (it will not be clipped).
This mode does not modify font size, just character positioning.
The Fit Width setting is only supported for precision 0 fonts (TrueType
fonts), and only on Windows platforms. The Fit Width setting is only for
horizontal text and width is determined by the width of the Text Rectangle
without any transformations applied (e.g., scaling, rotating).
Windows only: If you are going to rotate a Text Rectangle, and you want
the precision 0 (TrueType font) text to fit within the rotated rectangle, set
the text constraint to Fit Width. In addition, enable the rotation of Precision
0 (TrueType fonts)
Precision 0 fonts rotation is enabled in an application by calling
gmsTPrec0RotFlag( )5 or by sending the "tprec0_rot_flag" message to the
StandardTopState.6 Precision 0 fonts rotation is enabled in SL-GMSDraw
by sending the "tprec0_rot_flag to the StandardTopState in the ".gms-
drawrc" file 7 as shown below:

gmsdraw_standard_top_state tprec0_rot_flag 1

The text constraint can be set by selecting either None, Clip, or Fit Width.
In the Windows version, the numeric value can also be entered using the
spin-control box.
All Text Rectangle objects created after the text constraint is set will use
this mode unless another setting is selected.

5. Refer to the SL-GMS Function Reference.


6. Refer to the SL-GMS State Class Library Reference.
7. Refer to the section Saving the Editor Set-up.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-20


Setting Object Properties

Marker Style

Style Color

Figure 3-30: "Marker" Default Graphic Properties window (Motif)

Style Color

Figure 3-31: "Marker" Default Graphic Properties window (Windows)

The Marker graphic properties tab has the following active regions:
Marker Style (mstyle)
Color

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-21


Setting Object Properties

Marker Style
Set the style property of a selected Marker by clicking the
desired style in the Marker Style selector. In the Windows
version, spin buttons (up-down arrow buttons) can also be used
to select the Marker style (the integer corresponding to the
desired Marker style can also be entered directly in the text entry
box to the left of the spin buttons).

Marker Color
Sets Marker color, as described on page 3-4.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-22


Setting Object Properties

Attaching a Name to Objects


Attaching a name to an object:
allows objects to be selected by name (e.g., for selection of
invisible or undetectable objects)
allows objects to be found by an application program
Names may be any collection of alpha-numeric characters and must begin
with a letter. The SL-GMS reserved words, listed in the chapter SL-GMS
Reserved Words in the SL-GMS Quick Reference, cannot be used as
names.
To attach a name to a selected object, click the Object Pull-Down Menu
and select Properties, then select Name. The Object Name window is dis-
played. Enter the name of the object, then click Apply.

Figure 3-32: "Object Name" window

The maximum length of an object name is 40 characters. A name can be


added to only one object at a time. If multiple objects are on the Select List,
use the Loop Control icons in the Main Menu bar (refer to page 1-8) to
move among the objects in the Select List.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-23


Setting Object Properties

Attaching a String to Pass to an Application (UserData)


UserData is an arbitrary string used by an application program in any way
desired. UserData must be fewer than 256 characters in length and it must
be a C string.8
To add UserData to a selected object, click the Object Pull-Down Menu
and select Properties, then select Userdata. The Object Userdata win-
dow is displayed. Enter the string, then click Apply.

Figure 3-33: "Object Userdata" window

UserData can be added to only one object at a time. If multiple objects are
on the Select List, use the Loop Control icons in the Main Menu bar (refer
to page 1-8) to move among the objects in the Select List.

8. Application programs can attach UserData up to 16,384 characters through the


gmsUserData( ) function; the SL-GMSDraw interface limits the entry to 256
characters. The limits within SL-GMSDraw will probably be increased when line
editing of UserData becomes available on all supported platforms.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-24


Setting Object Properties

Attaching an Integer to Pass to an Application (UserWord)


UserWord is an integer used by an application program in any way desired.
To add UserWord to a selected object, click the Object Pull-Down Menu
and select Properties, then select Userword. The Object Userword win-
dow is displayed. Enter the integer, then click Apply.

Figure 3-34: "Object Userword" window

A UserWord can be added to only one object at a time. If multiple objects


are on the Select List, use the Loop Control icons in the Main Menu bar
(refer to page 1-8) to move among the objects in the Select List.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-25


Setting Object Properties

Setting Model Properties


A Model is another type of object and several different properties can be
set for it.
To set Model properties, click the Model Pull-Down Menu and select Prop-
erties. The Model Properties window is displayed.

Figure 3-35: "Model Properties" window

When a blank Model is created using the the New with Background option
of the File Pull-Down Menu, SL-GMSDraw automatically creates a
non-detectable Filled Rectangle as the background object in the back-
ground color. The size of the background object is set by changing the
default values (72 units wide and 54 units high) in the Model Properties
window.

NOTE: The size of the Model is set to the size of the background object.

A blank Model can also be created using the New option of the File
Pull-Down Menu. The first object created in the Model (typically a Filled
Rectangle) is considered the background object. When the first object is
created in the Model, the Background Detectable and Background
Object Dimensions and Origin areas in the Model Properties window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-26


Setting Object Properties

are enabled. The size of the background object can be changed by modify-
ing the width and height values in the Model Properties window.
By default, the lower left corner of the WC-window is defined as the Point
0,0. To change the default, modify the text entry box designating the lower
left corner of the dotted-line graphic.
The color of the background object is set by entering an integer in the
Background Color entry box that corresponds to one of the color boxes in
the Default Graphic Properties window.
In addition, setting Background Detectable to OFF (i.e.,unchecked), will
cause the background object in the current Model to become undetectable.
Setting Background Detectable to ON (i.e., checked) allows the back-
ground object to be selected and modified.
If the Erase in Background Color is set to OFF (i.e., unchecked), the
Model erases objects using color index 0 (white). However, if objects are
being erased and redrawn on top of an object whose color is other than col-
or 0, "holes" are left as the dynamic objects are changed. An example is
the meter shown in Figure 3-36:. Each time the needle moves it is erased in
color 0 (white), and holes are left in the face of the meter marking the
previous positions of the needle. When the needle moves to 50, a white
line appears at 0 because the needle erased in white on the grey back-
ground.

Figure 3-36: "Holes" in meter face

If the Erase in Background Color is set to ON (i.e., checked), the Model


erases objects in the fill color of the background object, if the object is

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-27


Setting Object Properties

filled. The color used by the Model to erase objects is called the back-
ground color. If the first object is not filled, the background color is set to
color index 0.
To correct the "holes" in the previous "meter" example, the first object in the
Model would be a Filled Rectangle whose color is the same as the "face" of
the meter. With Erase in Background Color set to ON, the needle erases
in the color of the meter "face" as shown in Figure 3-37:.

Figure 3-37: Background color set to the same color as meter "face"

The background color is used as the erase color for all objects in the Model
except for parts within a SubModel Instance which has its own background
color.
A UserData string can be added to the Model by clicking the UserData but-
ton in the Model Properties window. The Model Userdata window is dis-
played, as shown in Figure 3-38:. Enter the UserData string and click the
Apply button.

Figure 3-38: "Model Userdata" window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-28


Setting Object Properties

A UserWord can also be added to the Model by clicking the UserWord but-
ton in the Model Properties window. The Model Userword window is dis-
played, as shown in Figure 3-39:. Enter the UserWord and click the Apply
button.
.

Figure 3-39: "Model Userword" window

Dynamics can be added to the Model by clicking the Dynamics button in


the Model Properties window. The Model Dynamic Properties window is
displayed, as shown in Figure 3-40:.

Figure 3-40: "Model Dynamic Properties" window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-29


Setting Object Properties

The dynamic scripting language (described in the section Attaching


Dynamics to an Object on page 6-12) is used to add dynamics to the Model.
Type the dynamic script into the Model Dynamic Properties window and
click the Apply button.
Selecting the Flags button in the Model Properties window displays the
Model Flags window, as shown in Figure 3-41: on page 3-30.

Figure 3-41: "Model Flags" window

Flags can be set on the Model unconditionally.

"Model Flags" Options

Flag Description
Erase Flags
noerase Causes the update pass to omit erasure of
any of the Models parts before redrawing
the Model.
batcherase Causes all objects in a Model to be erased
first and the entire Model to be redrawn.
Point Flags

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-30


Setting Object Properties

"Model Flags" Options


(continued)

Flag Description
pts relative Forces the Points of a Polyline or Polygon
(filled ones also) to be transformed relative
to the first Point of the object; useful for
objects distorted while animated and
moved around the screen due to pixel
rounding.
pts symmetric Forces an objects Points to be transformed
relative to each other; useful for objects
distorted while animated and moved
around the screen due to pixel rounding.
General Flags
dynarray Marks a Model so it passes the index of
each part down as the traversal index to be
used in Array Dynamics.
doublebuffer Enables software double buffering.

Selecting the Apply button will apply the settings in the Model Properties
window to the current Model.
Selecting the Apply as Default button will apply the background color, and
on/off settings to all subsequent Models built within the current editing ses-
sion. The background object dimensions are also applied to all subsequent
Models built using the New with Background option of the File Pull-Down
Menu within the current editing session.
When you exit SL-GMSDraw, the settings in the Model Properties window
revert to SL-GMSDraw default values.

NOTE: To use the new Model property settings as defaults for future
editing sessions, the settings must be saved to a resource file.
The section Saving the Editor Set-up on page 6-4 provides more
information.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 3-31


4 Dynamics

This chapter explains how to attach dynamic behavior to objects in a Mod-


el. This dynamic behavior is accomplished through actions which specify
changes to be applied to objects in response to changes in application vari-
ables. Any object, or individual object elements, may be driven separately
by as many different variables as required.
This chapter explains:
dynamic descriptions the SL-GMS text that defines the
dynamic behavior of objects
tools used to attach dynamic descriptions to objects
renaming variables in a Model Instance
setting Control Object properties
showing variables contained in objects
previewing the dynamic behavior of a Model

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 4-1


Dynamics

Dynamic Descriptions
A dynamic description is text in a syntax recognized by SL-GMS that spec-
ifies a change in the appearance of an object in response to a change in an
application variable, or an action that is taken in response to input events
for the object. A DynProp (Dynamic Property) comprises all of the dynamic
descriptions attached to an object.

* fcolor stat dynamic


description
tankvol1
= (tankmin1+1) : (tankmax1-1)
dynamic DynProp
fpercent 0:100 description
fcolor 2

Figure 4-1: DynProp containing two dynamic descriptions

In Figure 4-2:, the dynamic description is unconditional. It specifies,


"Whenever the variable stat changes, the object is filled with the color
indexed by the value of stat."

* fcolor stat

Figure 4-2: Dynamic description with unconditional display dynamics

fcolor is an action keyword. A complete table of all valid dynamic action


keywords is provided in the Dynamics Reference chapter in the SL-GMS
Quick Reference.
stat is a Variable Reference. A Variable Reference can be identical to a
variable in a programming language such as Ada, FORTRAN, Pascal, or C.
A Variable Reference can also be an expression a more complex entity

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 4-2


Dynamics

involving formulas, function calls, data structures, files, and other data.
Expressions can include any number of references to variables or calls to
application-specific functions and standard arithmetic and logical opera-
tors. Expressions are parsed for conventional notations.
Actions in unconditional dynamic descriptions are executed whenever any
Variable Reference in an objects DynProp changes. Compare this to the
conditional dynamic description in Figure 4-3:. It specifies, "When the vari-
able tankvol1 is within the indicated range, the object becomes per-
cent-filled according to where in the range the variable falls, and the fill
color is set to the color indexed by 2."

tankvol1
= (tankmin + 1) : (tankmax - 1)
fpercent 0:100
fcolor 2

Figure 4-3: Dynamic description with conditional display dynamics

fpercent and fcolor are action keywords that change the fill percent and fill
color attributes of the object. tankvol1, tankmin, and tankmax are Variable
References. tankmin+1 and tankmax-1 are expressions.
Actions in conditional dynamic descriptions are executed only when the
testing of any logical expression results in TRUE after reading the value of
a Variable Reference. When an asterisk (*) is used in a conditional dynamic
description, the object is updated whenever the variable, or any variable in
the arguments in the action(s), changes.

NOTE: Unconditional dynamic descriptions must be specified before any


conditional dynamic descriptions in an objects DynProp. Refer to
the Dynamics chapter in the SL-GMS Reference for further
information.

Figure 4-2: on page 4-2 and Figure 4-3: show examples of unconditional
and conditional display dynamics. However, dynamic changes to objects
can also occur as a result of an input event, referred to as input dynamics.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 4-3


Dynamics

Input dynamics can manipulate either SL-GMS internal or application pro-


gram variable(s) and they are preceded by the pound sign (#). An object
can have both unconditional and conditional display dynamics, in addition
to input dynamics, in its attached DynProp.

# input
call gms_flash( ) dynamic
description
DynProp
tanklevel conditional
=* dynamic
fcolor noalarm description

Figure 4-4: DynProp with input and conditional display dynamics

The dynamic description shown in Figure 4-4: specifies, "Whenever an


input event occurs, call the function gms_flash( ); and whenever the vari-
able tanklevel changes, set the fill color to the color specified by the vari-
able noalarm."

NOTE: The input dynamic description shown above uses the call action
keyword to call a function. Other types of action keywords can
also be included in an input dynamic. gms_flash( ) is a function
call supplied in the SL-GMS GISMO Action Functions in the
SL-GMS Quick Reference. User-defined functions may also be
used.

Further information about DynProps, actions, variable references, and con-


ditional, unconditional, and input dynamics are provided in the Dynamics
chapter in the SL-GMS Reference.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 4-4


Dynamics

Attaching Dynamic Descriptions to Objects


Objects can be given dynamic descriptions that cause them to rotate,
move, change scale, change Text strings, change Line style and color, and
become visible or invisible. The proper syntax for dynamic descriptions is
described in the Dynamics chapter of the SL-GMS Reference.

Editing Dynamics
Dynamic descriptions are normally attached to objects by using the Object
Dynamic Properties option of the Dynamics Pull-Down Menu. The Object
Dynamic Properties option displays the Object Dynamic Properties window.
The Object Dynamic Properties window instances a simple text editor used
to create or modify the objects dynamic description. No changes are actu-
ally made to the objects dynamics until the Apply button is clicked.
Only one object at a time may have a DynProp edited in the Object Dynamic
Properties window. If multiple objects are on the Select List, use the Loop
Control buttons in the Main Menu bar (refer to page 1-8) to select the next
object on the Select List.
Click inside the Object Dynamic Properties window to begin editing. An
example of a DynProp typed into the Object Dynamic Properties window is
shown in Figure 4-5:.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 4-5


Dynamics

Figure 4-5: A DynProp in the "Object Dynamic Properties" window

Press the <RETURN> key at the end of a line to move the cursor to the
next line to be typed. To insert a line, click at the end of the previous line
and press the <RETURN> key. To modify a line, click the line, backspace
over the characters you wish to change, and enter the correct information.
You can place the cursor anywhere on the line and edit from that point. To
delete a line, either click on the line until the entire line is highlighted and
press the <RETURN> key or click on the line and use the <BACKSPACE>
key to delete all the characters in the line.
When you have entered the format of the dynamic descriptions correctly,
the DynProp automatically indents the line when you click the Apply button.
This indentation, illustrated in Figure 4-6:, clarifies the grouping of the
dynamic descriptions and the actions and variable tests within a particular
dynamic description. The indentation has no effect on the execution of the
dynamic description.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 4-6


Dynamics

Figure 4-6: A DynProp indented after pressing the "Apply" button

Hold, Release, and Clear


The Hold button holds the contents of the entire Object Dynamic
Properties window in a hold buffer. The contents in the hold
buffer are held until quitting SL-GMSDraw or until changed by
clicking the Hold button again. Leaving the Object Dynamic
Properties window does not affect the hold buffer, nor does
changing between Models affect it.
The Release button replaces the current contents of the Object
Dynamic Properties window with the contents of the hold buffer.
The Clear button clears the contents of the hold buffer.

Error checking
Figure 4-7: illustrates a DynProp that contains an error. Line 3
reads "tankvol 1" instead of "tankvol1." SL-GMSDraw detects

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 4-7


Dynamics

"tankvol 1" as an error because it is not a valid dynamic action.


When the Apply button is clicked, a dialog box, as shown in
Figure 4-8:, will display indicating the line in which the error
occurs. Click the OK button to acknowledge the error. Correct all
errors and click the Apply button again. The DynProp will then
appear indented, as illustrated in Figure 4-6: on page 4-7.

Figure 4-7: A DynProp typed incorrectly with an error on line 3

Figure 4-8: A dialog box displaying the location of an error

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 4-8


Dynamics

Renaming Variables
SL-GMS allows you to reuse Models and control objects through instanc-
ing. Model Instances, also called Instances or SubModels, retain the
dynamic properties of the original Model. The various Instances are differ-
entiated from the original by renaming variables the driving variables are
renamed to different variable names. For example, when you develop a
panel of gauges used to represent the same process variable coming from
many different sites, a gauge Model is created with dynamic specifications
driven by the variable volts. The panel Model would then be created with a
collection of gauge Model Instances. The volts variable is renamed for
each instance. For example, volts1, volts2, and so on.

Rename Vars Tool


Use the Rename Vars tool to rename the variables of a SubModel that have
been instanced into a Model. To use the Rename Vars tool, select an
object, click on the Dynamics Pull-Down Menu, and select Object Renamed
Variables. The Object Renamed Variables window, shown in Figure 4-9:, is
displayed.

NOTE: If a SubModel has no DynProps attached to it, or if the selected


object is not a Model Instance, the Object Renamed Variables
window will be empty, since the object does not have any
variables that need to be renamed.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 4-9


Dynamics

Figure 4-9: Renaming the "bg_color" variable in a Model Instance

Double-click on a value to highlight and rename it. Once the value is edit-
ed, either double-click on another value or hit the <ENTER> key.
Click the Apply button to apply the renamed variables to the object. The
Apply button will be enabled after a change, when another cell is clicked,
or when hitting the <ENTER> key.
Only one Model Instance at a time may have its variables renamed. If mul-
tiple Model Instances are on the Select List, use the Loop Control buttons
in the Main Menu bar (refer to page 1-8) to select the next object on the
Select List.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 4-10


Dynamics

Hold, Release, and Clear


The Hold button holds the contents of the entire Object Renamed
Properties window in a hold buffer. The contents in the hold
buffer are held until quitting SL-GMSDraw or until changed by
clicking the Hold button again. Leaving the Object Renamed
Variables window does not affect the hold buffer, nor does
changing between Models affect it.
The Release button replaces the current contents of the Object
Renamed Variables window with the contents of the hold buffer.
The Clear button clears the Renamed Variable strings of all the
variables in the Object Renamed Variables window.

Error checking
When you click the Apply button, SL-GMSDraw will determine whether or
not the renaming is valid. If it is not, a dialog box is displayed indicating the
line in which the error occurs. Click the OK button to acknowledge the error,
then correct the error and click the Apply button again.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 4-11


Dynamics

Previewing the Dynamic Behavior of Objects


A Model must be saved if it has been edited, before the dynamics can be
exercised. In addition, while it is being previewed, the Model cannot be
edited or saved. After previewing, the Model is automatically reloaded so
that any changes made by the dynamic updating are discarded.
Selecting the Preview Options option of the Dynamics Pull-Down Menu
exercises the DynProps in the current Model using data contained in a data
file. The data file has the name of the current Model, with the suffix ".dat."
To create or edit a ".dat" file during a session, the Edit Data File window
must be invoked. This is done by clicking the Dynamics Pull-Down Menu
and selecting the Edit Data File option. Text can then be entered in this win-
dow which will create or modify a ".dat" file. If a data file already exists for
this Model, that data file is automatically displayed in the Edit Data File win-
dow. Clicking the Save File button writes the file to disk. Clicking the Open
File button displays a dialog window which allows entry of the name of a
data file.

Figure 4-10: "Edit Data File" window

Further information about the format and use of .dat files is provided in
the Dynamics chapter of the SL-GMS Reference and in the Dynamics Refer-
ence chapter of the SL-GMS Quick Reference.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 4-12


Dynamics

When the Preview Options option is selected, the Preview Options window
is displayed, as shown in Figure 4-11:.

Figure 4-11: "Preview Options" window

The Preview Options window controls the Timer Period (the number of milli-
seconds between each update). Click the Start button to load the "<model-
name.dat" file 1 and begin previewing the Model. Clicking the Stop button
terminates the preview. Clicking the Pause button suspends dynamic updat-
ing without leaving Preview Mode but the Model cannot be edited or saved.

NOTE: If another Model is opened while a Model is being previewed, the


newly-opened Model will begin previewing automatically.

1. If a "<modelname>.dat" file does not exist, a warning message will display and
previewing will not occur.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 4-13


5 Menus

This chapter describes the menus that appear on the Main Menu bar. When
items on this menu bar are selected, additional pull-down menus will dis-
play.
.

Figure 5-1: SL-GMSDraw Menu Bar

Figure 5-1: illustrates the Main Menu bar with the following tool categories:
File Load, store, print, and other tools that provide access to
Model files
Edit Cut, paste, and other tools used to make changes to
objects
View Zoom, pan, and set screen size
Model Set Model properties

Object Group, visibility, and other object properties


Dynamics Create and edit object dynamics
Options Invoke tool panels, Control Window, Status Window,
and other drawing tools
Palettes Select a SubModel object from a pre-defined
collection
Point Access and control Points on objects
Help Information about the use of SL-GMSDraw

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-1


Menus

Figure 5-2: SL-GMSDraw menu structure

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-2


Menus

File Menu
The File Pull-Down Menu provides the standard application file functions
for Model files, such as opening and closing, saving, printing, and exiting
the SL-GMSDraw application. The options are described in the table "File"
Pull-Down Menu Options on page 5-4.

Import submenu

Export submenu

File Pull-Down Menu


Print submenu
(Windows only)

Figure 5-3: File menu structure

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-3


Menus

Import and Export


The Import and Export submenus, shown in Figure 5-3: on page 5-3, pro-
vide the import and export of images (.xwd on Motif, .bmp on Windows,
.jpeg, .jpg, and .jpe) and export of text models (.g).

"File" Pull-Down Menu Options

Option Description
New Displays an empty Model window with options clear, and
without a background rectangle.
New with Displays an empty Model window with options clear, and a
Background background rectangle.
Open .m1 File Loads and displays a Model from disk.
Close Stops editing the current Model. If the Model has not been
saved since the last change, prompts to save first.
Change Directory Brings up the Change Directory window, which allows you to
change directories for the Save As, Import, and Export options.
Merge... Adds the parts of another Model to the current Model. The
name of the current Model remains the same. The merged
Model still exists as a Model file and a copy of its parts
becomes a part of the current Model.
Save Writes the current Model to disk.
Save As... Prompts you to name the current Model and then saves it to
disk under that name; the file extension is ".m1". Full path
names may be used.
Import Prompts for files to be imported into the current Model.
SL-GMSDraw can import images files (.xwd on Motif, .bmp on
Windows, .jpeg, .jpg, and .jpe). If two files exist with the same
name but different extensions, the file with the extension ".bmp"
or ".xwd" is opened before the ".jpeg, .jpg, or .jpe." The
Available Images dialog of the Image submenu displays a
directory tree listing all image files in the current directory and
directories in the SL-GMS library paths.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-4


Menus

"File" Pull-Down Menu Options


(continued)

Option Description
Export Prompts for the name of a file to be created. The current Model
is written into this file. SL-GMSDraw can export text models (.g)
and images (.xwd on Motif, .bmp on Windows, .jpeg, .jpg, and
.jpe). The JPEG Image option of the Export submenu invokes
a browser dialog that allows selection of the output file and
folder. The option also provides a slider for setting JPEG
quality.
View GML File Prompts for the name of a ".g" file to be viewed. Invokes the
Open .g File window displaying the ".g" file.
Print Invokes the Print submenu to print part or all of the current
(Windows) Model. The PostScript option of the Print submenu invokes the
SL-GMS Print Dialog window to generate a PostScript file.
Print Invokes the SL-GMS Print Dialog window to generate a
(Motif) PostScript file.
Exit Stops editing the current Model and terminates execution of
SL-GMSDraw. If the Model has not been saved since the last
change, prompts to save first.

For compatibility with all supported platforms, file names should not exceed
fourteen characters (including extensions). Model names should be ten (or
fewer) characters to allow for valid extensions of ".g," ".m1," ".ps," ".m2,"
".xwd," ".bmp," .jpg, and ".dat." The characters in the Model name can be
alphabetic, numeric, or underscore {A through Z, a through z, 0 through 9,
_ }. Model names cannot contain dashes, blanks, <ESCAPE>, or other
non-printing characters.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-5


Menus

Import Image
Selecting the Image... option, of the Import submenu, displays the
Available Images window as shown in Figure 5-4:. The Available
Images dialog displays a tree listing image files in the current directory
and directories in the SL-GMS Library path. To preview an image, click
on the image file name and the image will display to the right of the
directory tree.

Figure 5-4: Available Images window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-6


Menus

Bitmap Export
Selecting the Bitmap Image... option, of the Export submenu, displays
the Export Bitmap File window as shown in Figure 5-5:. The Unix
version of this window produces a .xwd file while the Windows version
produces a .bmp file.

Figure 5-5: Export Bitmap File window

GML Export
Selecting the GML Script... option, of the Export submenu,
automatically generates the appropriate file name and writes the file to
disk. A confirmation dialog appears once the operation is complete.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-7


Menus

JPEG Export
Selecting the JPEG Image... option, of the Export submenu, displays
the Export JPEG File window as shown in Figure 5-6:.

Figure 5-6: Export JPEG File window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-8


Menus

Java Export
Selecting the export Java option displays the GUI interface for the
SL-GMS Code Generator for Java utility. This option is available only
with SL-GMS J/Developer or J/Network.

Figure 5-7: Export Java window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-9


Menus

File Operations
The Open .m1 File, Merge, Save, and Save As options, when invoked, dis-
play the standard Explorer Browse window on Windows systems.
On Motif systems, the Save As option and the Save option (if the Model is
being saved for the first time) display a dialog window in which the name of
the file is entered. The Change Directory option can be used first, if
required. The Open .m1 File and Merge options invoke the Open .m1 File
window, shown in Figure 5-8: on page 5-10. This window lists the subdirec-
tories within the current directory, any parallel directories, and the parent
directory. You can select any directory by clicking it. The full file path can
also be typed in from the keyboard, but it must not contain dashes, blanks,
<ESCAPE>, or other non-printing characters.

Figure 5-8: "Open .m1 File" window (Motif)

Models are saved as files with the suffix ".m1" which makes these files
easy to distinguish from other files. Model files are binary files, that is, they
cannot be read or edited without using a special program such as SL-GMS-

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-10


Menus

Draw. An ".m1" file can contain a maximum of 2,147,483,647 (2 31 - 1)


objects.

Print and Postscript


The Print option in Motif, and the PostScript option of the Print submenu in
Windows systems, display the SL-GMS Print Dialog window, shown in Fig-
ure 5-9: on page 5-11. This is a custom dialog that provides options not
found on the standard Print dialog furnished by the operating system.1

Figure 5-9: "Print Dialog" window

The following table describes the elements of the Print Dialog window.

"Print Dialog" Window Buttons and Fields

Option Description
Printer Name Specifies the printer to receive the PostScript output file.
Add Border Creates a thin black border around the PostScript output.

1. The Print option in Windows systems displays the standard Print dialog furnished
by the operating system.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-11


Menus

"Print Dialog" Window Buttons and Fields


(continued)

Option Description
Add Init Graphics Puts "initgraphics" in the PostScript file.
Color Lines Prints any colored lines of width less than 1 in color.
Otherwise, colored lines of width less than 1 are changed to
black.
Print Grid Prints the grid in the Active Working View.
Print Background Prints the Models background object, if any.
Print HiLite Prints the selection highlight box that appears around an
object(s) currently selected, if any.
Output Orientation Valid values:
Portrait Landscape

Copies Specifies the number of copies of PostScript output to send


to the printer.
Scale % Sets the scaling factor for the PostScript output.
Valid values = 0 to 100
Rotate Sets the rotation factor for the PostScript output.
Valid values = 0.0 to 360.0 (+) or ( - ) degrees.
Move X Sets the X offset factor for the PostScript output.
Image is "displaced" by the amount specified in the X
direction.
Move Y Sets the Y offset factor for the PostScript output.
Image is "displaced" by the amount specified in the Y
direction.
Print to disk Sends output to a file instead of the printer.
Print Prints the file.
Cancel Cancels the print function.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-12


Menus

Edit Pull-Down Menu


The Edit Pull-Down Menu, shown in Figure 5-10: on page 5-15, provides
the tools with which to select objects, copy or cut them from a Model to a
clipboard, paste them from the clipboard into a Model, or permanently
delete objects. These edit operations can be applied to a collection of
selected objects, called the Select List.

"Edit" Pull-Down Menu Options

Option Description
Undo "Undoes" the previous Model editing function. Sets the Undo
stack size, as described in User Preferences window on page
5-41.
Redo "Redoes" the previous Model editing function.
Cut Cuts objects in the current Select List.
Copy Copies objects in the current Select List.
Paste Pastes objects from the clipboard into the Model.
To Scratch Palette Displays the "_SCRATCH_" Palette window. The Scratch
Palette is then loaded with duplicates of the objects on the
Select List, replacing any objects previously in the Palette.
The duplicates are placed in the Palette at the lower left
corner, in the same relative position as the objects are in the
Active Working View. Objects can be copied from the
"_SCRATCH_" Palette window into a Model.
Delete Deletes objects in the current Select List.
Mirror Rotates and moves objects in the current Select List so that
they appear as a mirror image. The objects are mirrored in the
direction selected in the Mirror submenu.
Align Changes the alignment between a set of objects in the current
Select List. The objects are aligned according to the selection
in the Align submenu.
Order Controls the order of objects in the current Models part List.
The order of objects affects how objects are displayed. Refer
to page 5-16 for more information.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-13


Menus

"Edit" Pull-Down Menu Options


(continued)

Option Description
Scale Relative Scales (resizes) objects in the current Select List to the
dimensions of the focus object (the first object added to the
Select List) in the horizontal direction only, the vertical
direction only, or equally in both directions.
Select Handles the Select List: adds objects to the Select List in the
order in which they were clicked and provides alternate
methods for selecting objects. Options in this submenu are
used when objects are changed or deleted in
SL-GMSDraw. Refer to page 5-17 for more information.
Insert Active X Creates an Active X Control from a list of Active X Controls on
Control the system. Refer to Inserting Active X Controls on page A-1
(Windows only) for more information.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-14


Menus

Mirror submenu

Align submenu

Order submenu

Scale Relative submenu

Edit Pull-Down
Menu

Select submenu

Figure 5-10: Edit menu structure

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-15


Menus

Order
The Order submenu controls the order of objects in the current Models part
List. The order of objects affects how objects are displayed. Objects are
added to the Models part List in the order created. The first object in a
Models part List is displayed first and the last object is displayed last. Note
that objects displayed later may overwrite those displayed earlier if their
boundaries overlap. The Order submenu presents several methods for
changing the order of objects in the Models part List.

"Order" Submenu Options


Option Description
Front of All Moves the objects on the Select List in front of all other objects
in the Model (i.e., the objects are moved to the end of the
Models part List).
Back of All Moves the objects on the Select List in back of all other objects
in the Model (i.e., the objects are moved to the beginning of the
Models part List).
By Selection Reorders objects in the Models part List based upon their order
on the Select List. The first object on the Select List remains in
its original position in the Models part List, followed by the
remaining objects in the Select List. Select the objects in the
desired order, then click By Selection.

To view the order of objects on the Select List, click the Object
Pull-Down Menu and select Select List. A list of the objects on
the Select List is displayed in the Select List window.
Highlighting an object listed in the Select List window highlights
the object in the Active Working View.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-16


Menus

Scale Relative
The Scale Relative submenu controls how objects are scaled relative to
each other. The first object added to the Select List is the "focus" object. All
other objects on the Select List are scaled relative to the dimensions of the
"focus" object.

"Scale Relative" Submenu Options


Option Description
Horizontal Scales objects on the Select List to have the
same horizontal dimension as the "focus" object.
Vertical Scales objects on the Select List to have the
same vertical dimension as the "focus" object.
Same Scales objects on the Select List to have the
same horizontal and vertical dimensions as the
"focus" object.

Select
The Select submenu handles the Select List. Options in this submenu are
used when objects are changed or deleted in SL-GMSDraw. One way to
add objects to the Select List is by clicking them. As long as the objects are
detectable, they are added to the Select List in the order in which they are
clicked. This menu provides alternative methods for selecting objects.

"Select" Submenu Options


Option Description
All Selects all objects in the current Model.
Invert Deselects objects on the Select List and selects all
objects that were not on the Select List.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-17


Menus

"Select" Submenu Options(continued)


Option Description
By Name Selects objects by name from the current Model.
Enter the name of the desired object when prompted;
wild card characters are accepted. All objects with
that name are selected. Selecting a part of a
SubModel by name is not permitted.

To assign a name to an object, click the Object


Pull-Down Menu, select Properties, then select
Name. In an application program, call the
gmsObjNameStr( ) function.
by Properties Selects objects using one or more properties.
Displays the Select by Properties dialog window.
Refer to page 5-19.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-18


Menus

Clicking the Edit Pull-Down Menu, selecting Select and then selecting by
Properties (By Property in Motif), displays the Select by Properties window,
shown in Figure 5-11:.

Figure 5-11: "Select by Properties " window

Objects are added to the Select List by first selecting an object (i.e., the
"focus" object). Then, use the Select by Properties window to designate the
properties of the "focus" object to be used to select additional objects.
Objects are also added to the Select List without first selecting an object.
All objects having dynamic properties, renamed variables, a Userword, or a
UserData string attached to them can be selected by clicking the appropri-
ate box in the Select by Properties window. In addition, the name attached
to an object can be used for selection. Wildcard characters can be used in
the entry of the name.
When the Add to List of Selected Objects is selected, then all the objects
that match the parameters set in the Set by Properties window are append-

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-19


Menus

ed to the existing Select List. However, if the Add to List of Selected Objects
is disabled then the existing Select List is cleared and all of the objects that
match the parameters set in the Set by Properties window are added (i.e.,
the newly-selected objects replace the old Select List).

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-20


Menus

View Menu

Windows menu

Motif menu

The View Menu controls aspects of the Active Working View.


The Status Window option (Motif only) displays the Status window. Refer to
page 1-16 for a description of the Status window.
The Raise option (Motif only) brings the window of the Active Working View
to the front of all other windows.
The Refresh option redraws the Active Working View.
The Reset option resets the Active Working View to the same View and
parameter values as displayed when the Model was first opened.
The View Options option invokes the View Options window, as shown in Fig-
ure 5-12:.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-21


Menus

Figure 5-12: "View Options" window

The View Options window controls the following View features:


Set View coordinate values 2 these World Coordinate settings
allow specific x,y coordinate values to be set for the zoom/pan
operation.
Set Pan Percent
Set Boundary Percent
Set Zoom limit
Set Zoom percent
Display the Zoom factor
Save up to five preset Views
Zoom and Pan operations make temporary adjustments to SL-GMSDraws
WC-window dimensions.
The Apply button makes the current zoom or pan settings the default for the
remainder of the SL-GMSDraw session.
The Reset button undoes the collected View operations and returns the View
to its initial appearance.
The Close button closes the View Options window.

2. By default, the dimensions of the opposing corners of SL-GMSDraws Active


Working View are (0, 0) and (72, 54).

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-22


Menus

Model Pull-Down Menu


The Model Pull-Down Menu, shown in Figure 5-13:, allows the user to mod-
ify attributes of the Model.

Figure 5-13: Model Pull-Down Menu

The following table summarizes the Model Pull-Down Menu options.

"Model" Pull-Down Menu Options


Option Description
Userdata Attaches a UserData string to a Model. Displays
the Model Userdata dialog window. Refer to
page 3-28.
Userword Attaches a Userword to a Model. Displays the
Model Userword dialog window. Refer to page
3-29.
Flags Allows various flags to be set on the Model
unconditionally. Refer to page 3-30.
Dynamics Attaches a dynamic description to the Model.
Refer to page 3-29.
Properties Assigns properties to a Model. Displays the
Model Properties window. Refer to Setting
Model Properties on page 3-26.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-23


Menus

Object Pull-Down Menu


The Object Pull-Down Menu, shown in Figure 5-14:, operates on selected
objects or invokes dialogs that operate on selected objects. The Object
Pull-Down Menu provides the tools with which to create or destroy Groups.
A Group is a collection of objects. Any object that is part of a Model can
also be part of a Group. Members of a Group act as one object. For exam-
ple, an entire Group can move, change color, disappear, or be filled. A
Group can be constructed with only one part.
The three Group types Group, Fill Group, and Complex Fill Group fill
with different behaviors because their boundaries are treated differently to
denote interior and exterior when crossed with a horizontal ray. (See page
5-27 for more information.) Any Graphical Primitive can be used as parts in
a Group, Fill Group, or Complex Fill Group. Once a Group has been creat-
ed, clicking the Fill button, located in the "Fill" view of the Default Graphic
Properties window, will fill it.

Fill Group submenu

Properties submenu

Object Pull-Down Menu

Figure 5-14: Object menu structure

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-24


Menus

The following table summarizes the Object Pull-Down Menu options.

"Object" Pull-Down Menu Options

Option Description
Group Creates a Group object. Select the desired objects, then click
Group. The number of objects on the Select List changes to
"1", indicating that the selected objects have become a single
Group object.
UnGroup Ungroups objects in a Group. Select the Group object, then
click UnGroup. The number of objects on the Select List
changes from "1" (the selected Group) to as many objects as
comprised the Group.
Special Ungroup Saves the properties of a single Group and ungroups the
Group. A single Group is placed on the Select List and then the
Special Ungroup option is selected. The selected Group is
ungrouped and its parts are put on the Select List. Any
properties saved by a previous Special Ungroup are lost. After
the individual parts of the group have been edited, the Special
Regroup option is selected. The properties saved are: Name,
UserData, DynProp, Transformation matrix, Reference Point,
UserWord, object_Flags, Visibility, and Detectability.
Special Regroup Regroups the parts and restores the properties previously
saved by the Special Ungroup option to a single Group.
Fill Group Displays a submenu containing Fill Group and Complex Fill
Group options. Refer to Figure 5-14: on page 5-24 and the
description on page 5-27 for further information.
Properties Displays a submenu including Graphic, Name, Userdata,
Userword, Flags, Information, and Text options. Refer to
Figure 5-14: on page 5-24. For a detailed explanation, see
page 5-28 to page 5-30.
Visibility On Makes objects on the Select List visible.
Visibility Off Makes objects on the Select List invisible. Invisible objects are
also undetectable.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-25


Menus

"Object" Pull-Down Menu Options


(continued)

Option Description
Detect On Makes objects on the Select List detectable.
Detect Off Makes objects on the Select List undetectable. Undetectable
objects offer two benefits. First, SL-GMS does not compute the
extent of such objects, which improves display performance for
the Model. Second, undetectable objects are more difficult to
select, offering some security against modification to the
Model designer. Although undetectable objects cannot be
selected by clicking, these objects can be selected by options
in the Select submenu of the Edit Pull-Down Menu, such as
Name, or by dragging an extent rectangle around the object.
Apply Transform Applies a transformation to objects on the Select List. A
transformation is Move, Rotate, Scale, Mirror, or any
combination of these operations. Transformations create a
special object called a transformation matrix, which displays
the transformed object in its new size or orientation. When a
transformation is applied, the Points used to orient the object
when it is displayed are changed and the transformation matrix
is removed. Removing the transformation matrix is desirable
because it speeds up the display of objects and reduces the
memory required to store them.

Apply Transform has no effect on some types of objects.1


SL-GMSDraw automatically determines whether the
transformation can be applied to an objects Points.
Remove Removes a transformation from objects on the Select List.
Transform When a transformation is removed, the object is erased and
redrawn in its original location unless a transformation with
Apply Transform is applied.
Move Displays the Move window, which allows the user to enter
values for moving an object(s) in an absolute (move to Point)
or relative (move by amount) form. Refer to page 5-33.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-26


Menus

"Object" Pull-Down Menu Options


(continued)

Option Description
Scale Displays the Scale window, which allows the user to enter
values for scaling an object(s) in both the x and y directions.
Objects can also be scaled proportionally. Refer to page 5-33.
Rotate Displays the Rotate window, which allows the user to rotate the
object(s) to a desired angle. Refer to page 5-34.
Select List Displays a list of the objects on the Select List in the Select List
window. Each object is listed in the following form:
memory address : class of object <object name>

Highlighting an object listed in the Select List window


highlights the object in the Active Working View.
1. For example, if a Rectangle is rotated and Apply Transform is selected, the
transformation is not applied to the Rectangles Points. Rectangles are defined by
two opposing corners, and applying the transformation to these Points would
result in a different Rectangle, not a rotated Rectangle. Similarly, if a Circle is
unevenly scaled to create an Ellipse, the transformation cannot be applied. A
Circle is defined by its center and a Point on its edge, and applying the
transformation would result in a different Circle, not an Ellipse-shaped Circle.

Selecting the Fill Group option, shown in Figure 5-14: on page 5-24, will dis-
play the Fill Group submenu. The submenu provides two additional Group
types, as described in the following table.

"Fill Group" Submenu Options


Option Description
Fill Group Similar to Group except that SL-GMSDraw connects
the selected open objects with an invisible edge so
that they can be filled as one object.
Complex Fill Group Similar to Group except that SL-GMSDraw creates a
Group object which can be filled with respect to
multiple boundaries (such as "islands" or "holes").

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-27


Menus

Selecting the Properties option, shown in Figure 5-14: on page 5-24, dis-
plays the Properties submenu. The Properties submenu provides options to
display properties, as described in the following table.

"Properties" Submenu Options


Option Description
Graphic Displays the Default Graphic Properties window.
Name Displays the Object Name dialog window.
Userdata Displays the Object Userdata dialog window.
Userword Displays the Object Userword dialog window.
Flags Allows various flags to be set on an object
unconditionally.
Information Displays the Object Information window, which
identifies the class, name, userdata, position,
extent, and DynProp associated with an object. It
also displays the values for the fill, text, and edge
attributes.
Text Displays the Object Text dialog window.

Selecting the Graphic option of the Properties submenu displays one of the
views of the Default Graphic Properties window, described in the section
Graphic Properties on page 3-2.
Selecting the Information option of the Properties submenu displays a win-
dow that provides information about the selected object. The information
includes the class, name, position, and extent of the object. It also displays
the values of various attributes associated with the object. Figure 5-15: on
page 5-29 illustrates the information that is displayed when selecting, for
example, a Text Rectangle and then selecting the Information option of the
Properties submenu.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-28


Menus

Figure 5-15: "Object Information" window

Name Property Dialog


The section Attaching a Name to Objects on page 3-23 provides a complete
description of using the Object Name window and the purpose of assigning
names to objects.

startbutton

Figure 5-16: "Object Name" window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-29


Menus

UserData Property Dialog


The section Attaching a String to Pass to an Application (UserData) on page
3-24 provides a complete description of using the Object Userdata window
and the purpose of assigning strings to objects.

start pump test

Figure 5-17: "Object Userdata" window

UserWord Property Dialog


The section Attaching an Integer to Pass to an Application (UserWord) on
page 3-25 provides a complete description of using the Object Userword
window and the purpose of assigning integers to objects.

Figure 5-18: "Object Userword" window

Selecting the Flags option of the Properties submenu displays the Object
Flags window, as shown in Figure 5-19: on page 5-31. Flags can be set on
an object unconditionally.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-30


Menus

Figure 5-19: "Object Flags" window

"Object Flags" Options


Flag Description
Erase Flags
noerase Causes the update pass to omit erasure of any of the
objects parts before redrawing the object.
batcherase Causes all objects in a List to be erased first and the
entire List to be redrawn.
Point Flags
pts relative Forces the Points of a Polyline or Polygon (filled
ones also) to be transformed relative to the first Point
of the object; useful for objects distorted while
animated and moved around the screen due to pixel
rounding.
pts symmetric Forces an objects Points to be transformed relative
to each other; useful for objects distorted while
animated and moved around the screen due to pixel
rounding.
General Flags
dynarray Marks a Group, Model, or Instance so it passes the
index of each part down as the traversal index to be
used in Array Dynamics.
doublebuffer Enables software double buffering.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-31


Menus

"Object Flags" Options


Flag Description
repair only set on a Group; when the flag is set, if any of the
individual elements of the group are redrawn, then
the entire Group is redrawn

The pts symmetric flag is more effective than the pts relative flag for allevi-
ating distortion due to pixel rounding errors. The pts relative flag is most
effective for complex, non-symmetrical objects.
Apply accepts the changes.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-32


Menus

Scaling, moving, and rotating an object


Clicking the Object Pull-Down Menu and selecting Move displays the Move
window, as shown in Figure 5-20:.

Figure 5-20: "Move" window

The object(s) is moved by entering a double value in either the "Horizontal"


or "Vertical" text-entry box, or in both boxes. To move the object to a specif-
ic Point in the Active Working View, select Move to point, enter the horizon-
tal and vertical coordinate of the Point, and click Apply.
To move the object by a specified amount in either the horizontal, vertical,
or both directions select Move by amount. Clicking Apply moves the
object(s) by the amount entered in the "Horizontal" and "Vertical" text-entry
boxes.
Clicking the Object Pull-Down Menu and selecting Scale displays the Scale
window, as shown in Figure 5-21:.

Figure 5-21: "Scale" window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-33


Menus

An object is scaled by entering a value into the "Horizontal" and "Vertical"


text-entry boxes. An object is scaled proportionally (i.e., by the same
amount in both the horizontal and vertical directions) by selecting Scale
Proportionally. When an object is being scaled proportionally, only the "Hor-
izontal" value needs to be entered.
Clicking the Object Pull-Down Menu and selecting Rotate displays the
Rotate window, as shown in Figure 5-22:.

Figure 5-22: "Rotate" window

An object(s) is rotated by either moving the scale bar or by entering a dou-


ble value. A negative value rotates the object clockwise. To rotate the
object counterclockwise, select Rotate Counterclockwise.

NOTE: When a positive value is entered, Rotate Counterclockwise is


automatically enabled.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-34


Menus

Dynamics Pull-Down Menu

The Dynamics Pull-Down Menu is used to enter, edit, list, rename vari-
ables, and test the dynamic descriptions of objects. A detailed description
of each of these tasks is provided in the following table. The first two
options listed in the table work with one object at a time. If multiple objects
are on the Select List, use the Loop Control icons in the Main Menu bar
(refer to page 1-8) to move among the objects on the Select List.

"Dynamics" Pull-Down Menu Options


Option Description
Object Dynamic Displays the Object Dynamic Properties window which
Properties contains a text edit box in which to create and change
dynamic descriptions for an object. Edit the dynamics of the
currently selected object, then click Apply in the Object
Dynamic Properties window. Refer to Editing Dynamics on
page 4-5 for more information.
Object Renamed Displays the Object Renamed Variables window to rename
Variables variables associated with the Instances of SubModels on the
Select List. As each variable of the currently selected object
is edited, click Apply in the Object Renamed Variables window.
Refer to Rename Vars Tool on page 4-9 for more information.
Preview Options Displays the Preview Options window to preview the dynamic
descriptions of objects in the current Model. Refer to
Previewing the Dynamic Behavior of Objects on page 4-12 for
more information.
Edit Data File Displays the Edit Data File window to edit the ".dat" file that
exercises the DynProps in a Model using the Preview Options
option. Refer to Previewing the Dynamic Behavior of Objects
on page 4-12 for more information.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-35


Menus

Options Pull-Down Menu


The Options Pull-Down Menu provides the means to set SL-GMSDraw
interface preferences, as well as (re)display all the initial drawing tools win-
dows that are displayed automatically when SL-GMSDraw is first invoked.

Tools submenu
Tools submenu (Motif)
(Windows)

Options Pull-Down Menu

Figure 5-23: Options menu structure

Selecting the Tools option displays the submenu shown in Figure 5-23:.

"Options" Pull-Down Menu Options

Option Description
Tools Displays the Tools submenu which contains options for
invoking windows. More information about Create Tools, View
Tools, and Change Tools panels is provided in Chapter 2
Tools.
Grid Options ... Displays the Grid Options window containing options used to
create a grid. Drawn before the Model is created, the grid, like
graph paper, aids in the designing of a Model. Refer to Grid
Options on page 5-38.
Snap and Point Displays the Snap and Point Modes window which contains
Modes buttons for selecting the snap and point modes. Refer to Snap
and Point Modes dialog on page 5-39 for more information.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-36


Menus

"Options" Pull-Down Menu Options


(continued)

Option Description
User Preferences Displays the User Preferences window used to set
... preferences for various items which change the nature of the
Model and its display. Refer to User Preferences window on
page 5-41.
Save Resources Saves the SL-GMSDraw settings in the resource file
.gmsdrawrc. This file is saved in the following directory: 1
32-bit Windows
If the environment variable %HOME% is defined:
%HOME%
else,
%gms_home%\lib

UNIX
users HOME directory

Any existing ".gmsdrawrc" file is moved to ".gmsdrawrc0", and


any previous ".gmsdrawrc0" file is overwritten.

Refer to Saving the Editor Set-up on page 6-4 for more


information.
Tool Tips Enables/disables Tool Tips for Tool icons.
(Windows only)
1. At runtime, the Windows version of SL-GMSDraw initially searches for the
".gmsdrawrc" file in %HOME%, if the environment variable %HOME% is defined.
If a ".gmsdrawrc" file is not found or if the environment variable %HOME% is not
defined, SL-GMSDraw will search the current directory and, finally, the directory
%gms_home%\lib.

At runtime, the Motif version of SL-GMSDraw initially searches for the


".gmsdrawrc" file in the current directory, then in the HOME directory and, finally,
in the %GMS_HOME/lib directory.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-37


Menus

Grid Options window


Selecting Grid Options invokes the Grid Options window, as shown in Figure
5-24:.

Set
grid size
Set grid Set space
color between grid
points
Set grid
offset points
Select grid Turn grid on/off
line style

Figure 5-24: "Grid Options" window

The grid is used much as a piece of graph paper as a guide in designing.


The grid is either a set of horizontal and vertical lines or a set of dots at
intersections. The grid is not an object in the current Model. The grid is
drawn on top of all SL-GMS graphical objects. 3 The grid display can be
turned ON or OFF and the distance between grid intersections can be
changed both horizontally and vertically.

Grid Options
Size changes the size of the grid spacing. Use any positive
real number for the horizontal and vertical spacing between grid
intersections; if only one number is entered, it is used for both
the horizontal and vertical spacing. The number represents
Active Working View units; the default Active Working View is 72
units wide by 54 units high, regardless of the size of the display
screen or Workstation Window. The spacings can have different

3. The grid does not draw on top of Control Objects. This capability will be available
in a future release.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-38


Menus

values, for example, 2.5 units by 4 units. The default grid spacing
is 10 units by 10 units.
Divisions changes the count of the divisions or tick marks for
each single grid space: use any positive real number.
Grid On turns the display of the grid ON or OFF: the Active
Working View is cleared and the grid is either drawn or not drawn
and the objects in the Model are drawn over the grid.
Solid Lines toggles between the two grid display styles
solid lines or dots at the intersections.
Offset offsets the first grid intersection from the default. By
default, the first grid intersection is at the origin, the Point (0,0).
Color changes the color of the grid. To set the grid color, click
one of the colored boxes or enter the numeric color index in the
text entry box provided.

Snap and Point Modes dialog


Selecting Snap and Point Modes displays the Snap and Point Modes window.
The appropriate snap and point modes are selected by clicking the corre-
sponding button. When To Grid is on, the next Point picked is placed at the
nearest grid intersection. When To Gravity is on, clicking an object results
in the predefined Point nearest to the mouses location to be selected. The
Point Mode controls the Reference Point used to move, rotate, scale, or
mirror objects. The buttons that appear in the Snap and Point Modes dialog
correspond to the Point Selection Control icons located in the Main Menu
bar (refer to page 1-8).

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-39


Menus

Figure 5-25: "Snap and Point Modes" window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-40


Menus

User Preferences window


The User Preferences window, shown in Figure 5-26:, is brought up by
selecting the User Preferences option of the Options Pull-Down Menu.

Figure 5-26: "User Preferences" window

The preference options are defined in the following table.

"User Preferences" Options

Option Description
Undo/Redo Stack Sets the number of editing operations that SL-GMSDraw is
Size able to undo.
Move Delay (ms.) Sets the delay (in milliseconds) between the time the mouse
begins to move and when that motion is rendered on the
screen.
Move Dist (pixels) Sets the distance (in pixels) that a Move operation must cover
before that motion is rendered on the screen.
Keyboard Move Sets the distance (in pixels) that arrow keys move an object
Delta on the screen.
Pick Aperture Specifies the size of the mouse picking rectangle as a
percentage of the screen width.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-41


Menus

"User Preferences" Options


(continued)

Option Description
Initial W.C. to Pixel Indirectly sets the initial size of subsequently created editor
Scale windows when entering a positive non-zero value. The value
is used as the scaling factor between World Coordinates and
pixels.

One World Coordinate in the editing window will be the given


number of pixels on the screen. When used in conjunction
with the size window to model option, users can map exactly
between World Coordinates and pixels on the screen.
Size Window to Controls the behavior of Active Working View windows when
Model a Model is opened. If this control is on, SL-GMSDraw creates
a new window and sizes it automatically when a new Model
is opened.

If this control is off, SL-GMSDraw opens the new Model in the


existing window (replacing any currently displayed Model)
and sets the window dimensions to 72 x 54. If the Model falls
outside of the range of 72 x 54, the window dimensions are
set to 100 x 75 (for compatibility with Models built using
SL-Draw2).
View Crop Mode Controls the behavior of Active Working View windows when
(Crop or Scale) the windows are resized. If this control is on, SL-GMSDraw
crops (clips) the Model when the window is resized. If this
control is off, SL-GMSDraw automatically scales the Model to
fit in the resized window.
Create Single Controls the behavior of the Create Tools. If this control is on,
Objects SL-GMSDraw automatically switches to the Select Tool after
an object is created. If this control is off, SL-GMSDraw leaves
the current Create Tool enabled after an object is created,
making it easy to create multiple objects of the same type.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-42


Menus

"User Preferences" Options


(continued)

Option Description
Drag Objects Controls the appearance of objects while they are being
(Objects or Outline) dragged using the mouse. If this control is on, SL-GMSDraw
displays the entire object while it is being dragged. If this
control is off, SL-GMSDraw displays only the extent
rectangle of the object while it is being dragged. The latter
setting improves display performance when complex objects
are being dragged.
Blinking Selection Controls the appearance of the selection handles on
Handles selected objects. If this control is on, the selection handles
blink. If this control is off, the selection handles remain static.
GMS Control Resize If this control is on, SL-GMS Control Objects resize when the
Flag window is resized. If this control is off, SL-GMS Control
Objects will not resize when the window is resized.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-43


Menus

Palettes Pull-Down Menu

The Palettes Pull-Down Menu makes Palettes and SubModels available


while creating Models. Palettes are provided for the storage and placement
of objects. A Palette is a Model; the Model is displayed in a window when
selected in the Available Palettes window.
When the Available Palettes option of the Palettes Pull-Down Menu is
selected, the Available Palettes window, shown in Figure 5-27: (which allows
the selection of a Palette), is displayed. Figure 5-28: on page 5-46 shows
the six Palettes that are currently available.
The default contents of the Available Palettes window are all of the Models
in the "/PALETTES" directories found in these paths:

UNIX Systems
<current directory>
<$GMS_HOME>/work/gmsrun/PALETTES

32-bit Window Systems


<current directory>
%$GMS_HOME%\work\gmsrun\PALETTES

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-44


Menus

Figure 5-27: "Available Palettes" window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-45


Menus

Figure 5-28: Six Palettes available in SL-GMS

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-46


Menus

Once the Palette is displayed in a window, you can select any object in the
Palette Model by clicking it. Place a copy of the selected object into the
working Model by clicking the left mouse button once more in the working
Model. If the selected object from the Palette is a SubModel, the SubModel
is automatically added to the External SubModel List.

NOTE: Local SubModels by definition are available only to the Model that
contains them. Therefore, local SubModels must not be a part of
a Palette Model.

If the Available Palettes window becomes hidden, click the Available Palettes
option once again to pop it to the top.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-47


Menus

To create a Palette, set the directory to the PALETTES subdirectory of the


current working directory. Create a Model by instancing other external
SubModels or by creating objects using the Object Create Tools. Save the
Model in the PALETTES subdirectory. The Palette is now available when
creating Models in the working directory.

"Palettes" Pull-Down Menu Options

Option Description
Available Displays the Available Palettes window containing a list of palettes
Palettes from which the user can select (see descriptions of available
palettes, below.)
Available Displays the Available Submodels window from which objects can
Submodels be selected from the current directory and directories in the
SL-GMS Library paths, and placed into the Active Working View.
Local Models display first in the list.
Controls Displays the Control Objects Palette from which Button, Container,
Text Field, Scale, Scrollbar, and Option Menu objects can be
selected and placed into the Active Working View. See the
SL-GMS Control Objects Reference Manual for a description of
Control Objects.
Buttons Contains a wider selection of predefined Button objects than those
provided in the Control Objects Palette .
Containers Contains a wider selection of predefined Container objects than
those provided in the Control Objects Palette.
Text Fields Contains a wider selection of predefined Text Field objects than
those provided in the Control Objects Palette.
Scales Contains a wider selection of predefined Scale objects than those
provided in the Control Objects Palette .
Scrollbars Contains a wider selection of predefined Scrollbar objects than
those provided in the Control Objects Palette.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-48


Menus

Point Pull-Down Menu

Often, SL-GMSDraw requires a Reference Point for an object, Group, or


selected set of objects and prompts you to select one. For example, all
SL-GMSDraw operations using the Object Create Tools require a Refer-
ence Point to complete the operation. In general, an SL-GMS object may or
may not have its own Reference Point assigned. If none is assigned, one
can be set using the Set Reference Point option of the Point Pull-Down
Menu.4

"Point" Pull-Down Menu Options

Option Description
Show Reference Toggles the display of the Reference Point on and off.
Points

4. Note that a Reference Point can also be set on an object using the SL-GMS
function gmsRefPoint( ), described in Reference Point in the SL-GMS Function
Reference.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-49


Menus

"Point" Pull-Down Menu Options


(continued)

Option Description
Set Reference Sets the Reference Point on an object. The Reference Point is
Point used for the Copy, Move, Scale, or Rotate operations. If the
Reference Point is changed for an object on the Select List, the
Reference Points for all objects on the Select List are changed
simultaneously.

The default Reference Point is the objects center. For complex,


irregular objects such as Polylines or Splines, the center is
calculated by using the center of the extent Rectangle for the
object.

When objects are scaled, the center is the only Reference Point
whose use does not also result in a Move operation.

If a Reference Point is required for an operation and none


exists on an object, SL-GMSDraw creates a temporary
Operation Reference Point (see Point Pull-Down Menu on page
5-49 and the Reference Point definition in the SL-GMS
Reference).
Clear Reference Resets an objects Reference Point to its default Reference
Points Point the center of its extent.
Enter Point Displays the Enter Point window. You can enter an SL-GMS
Point by typing in two floating-point numbers (World
Coordinates), separated by a space and clicking the Apply
button.

Using the Point Pull-Down Menu


This section describes the Set Reference Point option for selecting Points to
be used with SL-GMSDraw. The Set Reference Point option allows the Ref-
erence Point used when transforming an object to be changed.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-50


Menus

The four transformation options in SL-GMSDraw are Rotate, Move, Mirror,


and Scale. The Rotate, Move, and Scale transformation options work rela-
tive to a Reference Point. (Mirror works relative to a Reference Line.)
In a Rotate operation, the purpose of the Reference Point is obvious: the
object is rotated around the Reference Point. The Reference Point is dis-
played as a Marker, along with a Reference Line used to set the angle of
rotation. In a Move operation, the object is positioned relative to the Refer-
ence Point, which is displayed as a Marker. In a Scale operation, the pur-
pose of the Reference Point is less obvious. To scale an object, all Points
defining an object are multiplied by the scaling factors. If this multiplication
is done in reference to the origin, the Points are moved closer or farther
from the origin, and the object appears to have been both scaled and
moved. By picking a Reference Point in the object, the object is not dis-
placed when the object is scaled. The Reference Point is displayed as a
Marker, along with an extent Rectangle.
It is easy to visualize the center of a Circle, and even a Rectangle. But what
about an irregular shape, such as a Closed Polyline? SL-GMS uses the
center of the extent Rectangle for determining the center of an object. An
extent Rectangle, or simply extent, is the smallest Rectangle with a hori-
zontal base that completely encloses all parts of an object. SL-GMS uses
the extent Rectangle for determining the center of objects and also for
selecting objects. Thus, the center of any object is the center of its extent
Rectangle.
The Enter Point option allows you to enter an SL-GMS Point from the key-
board. The Point is in WC-coordinates. The Point pair is entered by typing
in two floating-point numbers, separated by a space and clicking the Apply
button.

Figure 5-29: "Enter Point" window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-51


Menus

Help Pull-Down Menu

The About Gmsdraw option (About GMSDraw in Motif) displays the About
SL-GMSDRAW window, shown in Figure 5-30:. This window displays the
configuration number (i.e., the version number) of SL-GMS.

Figure 5-30: The "About SL-GMSDRAW" window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 5-52


6 Building Models

This chapter describes the process of using SL-GMSDraw to construct a


graphical user interface for an application.

Invoking the SL-GMSDraw Editor


To invoke the SL-GMSDraw program, go to your working directory and type
the program name after the system prompt.

Platform Command
Motif gmsdraw_xm
32-bit gmsdraw_mfc
Windows1
1. Refers to a platform with a 32-bit
architecture running Mircrosoft Win-
dows NT or Windows 95.

Command-line options
The following are valid command-line switches to the SL-GMSDraw pro-
gram. Option key letters can be in either lower or upper case, as the
SL-GMSDraw program makes no distinction between the two.

Option Description
-f[msgfile] read State messages from a message file

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-1


Building Models

Option Description
-i<library_path> adds a directory path for finding SubModels; any
Models that are in the <library_path> directory are
listed in the Available Submodels window
-o causes a Command Prompt window to be opened
(when the program starts up), so that startup text and
(Windows only) error messages can be viewed
-u[n] set update rate to n

Setting up the SL-GMSDraw Editor


Typing the command to invoke the SL-GMSDraw editor opens certain win-
dows in default locations and with a default set of fonts, colors, and other
settings. This section explains how to modify some of the default aspects of
the editor to meet your own preferences.
Click the Options Pull-Down Menu and select User Preferences to display
the User Preferences window. The different options are described on page
5-41. Set new preferences and click the Apply button to set the options for
this editing session. Refer to Saving the Editor Set-up on page 6-4 for infor-
mation about how to save these preferences for subsequent editing ses-
sions.

Figure 6-1: "User Preferences" window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-2


Building Models

You can change the appearance and behavior of the grid in the Active
Working View. Click the Options Pull-Down Menu and select Grid Options to
display the Grid Options window. The size, color, and manner the grid is
drawn can all be modified (refer to Grid Options window on page 5-38).
Click the Apply button to apply the changes to the grid. These changes
apply only to the current editing session.

Set
grid size
Set grid
Set space
color between grid
points
Set grid
offset points
Select grid Turn grid on/off
line style

Figure 6-2: Setting grid parameters with the "Grid Options" window

Aspects of the Active Working View in which the Model is created can also
be changed using the View Options window. Clicking the View Pull-Down
Menu and selecting View Options brings up the View Options window,
shown in Figure 6-3:.

Figure 6-3: "View Options" window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-3


Building Models

A description of the different options in the View Options window appears in


the section View Menu on page 5-21.
In addition, you can resize, move, open or close the various windows (e.g.,
Default Graphic Properties, and so on).

Saving the Editor Set-up


User preference settings and window descriptions can be saved in a file.
Click the Options Pull-Down Menu and select Save Resources to create the
".gmsdrawrc" file in the following directory:

32-bit Windows
If the environment variable %HOME% is defined:
%HOME%
else,
%gms_home%\lib

UNIX
users HOME directory

Any existing ".gmsdrawrc" file is overwritten.


At runtime, the 32-bit Windows version of SL-GMSDraw looks for the
".gmsdrawrc" file in the %HOME% directory if the environment variable
%HOME% is defined. If the environment variable %HOME% is not defined,
or if a ".gmsdrawrc" file has not been found, SL-GMSDraw looks in the cur-
rent directory and, finally, in the %gms_home%\lib directory.
At runtime, the UNIX version of SL-GMSDraw looks for the ".gmsdrawrc"
file first in the current directory, then in the HOME directory and, finally, in
the %GMS_HOME/lib directory.

Setting text font definitions


Various Text attributes can be modified using the "Text" view in the Default
Graphic Properties window. Select Properties from the Object Pull-Down
Menu, then choose Graphic. Once the Default Graphic Properties window
appears, click the Text tab to display the "Text" view.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-4


Building Models

In SL-GMS, Text is defined according to:


precision. Although most workstation types support only
precisions 0 and 1, SL-GMS supports precisions 0, 1, and 2.
font index within that precision
workstation class (if appropriate)
The thirteen fonts of the default precision, precision 0, used by SL-GMS
may be overridden by a "fontdef.dat" entry. The thirteen default fonts
appear in the text font scrollbox as TrueType fonts on a Windows platform
or when Raster is selected on a Motif platform.

Figure 6-4: "Text" view on Windows (top) and Motif (bottom)

SL-GMS reads only one "fontdef.dat" file, searching first in the current
directory and, finally, in the $GMS_HOME/lib directory. The $GMS_HOME/lib
directory contains a default "fontdef.dat" file which specifies four Hershey
fonts. The format of the "fontdef.dat" file and the fonts available for each
type of workstation are described in the chapter Text in the SL-GMS Refer-
ence.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-5


Building Models

Using the fontdef program (Windows only)


The thirteen default fonts are coded into SL-GMS. Each of the
default fonts has an index that is mapped into a font table. The
default fonts are indexed from 1 to 13, and are used even if there
is no "fontdef.dat" file. However, the "fontdef.dat" file may be
used to replace the default fonts or to add additional fonts.
The fontdef program is provided with SL-GMS (Windows only) in
the work\fonts directory. The fontdef program enumerates all
installed TrueType fonts on a given system. When the output is
redirected to a file, it generates a font definition file that contains
all available fonts.
To run the program, type:
fontdef [index starting_index]
["fonts_to_be_ignored"..] >
filename

starting_index = optional number specifying the first


index to start the list. If none is
specified, then 14 is used as the
default.

"fonts_to_be_ignored" = optional list of font family


names, separated with spaces, that
will be excluded from the generated
output file. A font name that
contains spaces must be enclosed by
double quotes (e.g., "Arial Black")

For example, to generate a "fontdef.dat" file in the current


directory that will start with index 14 and will not include any
Arial or Arial Black fonts, type the following:
fontdef index 14 Arial "Arial Black" > fontdef.dat

NOTE: The "fontdef.dat" file created above must be moved either to the
$GMS_HOME\lib directory or the working directory for your

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-6


Building Models

application. The maximum number of fonts allowed in the


"fontdef.dat" file is 1,024.

One of the thirteen default fonts can be overridden by adding an


entry for the desired font index to the "fontdef.dat" file.

Enabling Precision 0 (TrueType) font rotation


SL-GMS provides the ability to enable or disable (the default) rotation for
precision 0 (TrueType) fonts on Windows systems. Rotation for precision 0
(TrueType) fonts is enabled in SL-GMSDraw by sending the
"tprec0_rot_flag to the StandardTopState in the ".gmsdrawrc" file as shown
below:
gmsdraw_standard_top_state tprec0_rot_flag 1

The ".gmsdrawrc" file is edited before SL-GMSDraw is started. Refer to


Saving the Editor Set-up on page 6-4 for information on the use of the
".gmsdrawrc" file.

Localization of output
The output of SL-GMSDraw is localized. Output from SL-GMSDraw goes
through a localization function (refer to the section Internationalization
localization files in the SL-GMS Function Reference). The function looks for
a string in the localization file "lib/gmsl10n.txt" using a key. If the key is
found, the localized string is used, otherwise the original default string is
used.
The format of the file is a set of STRING_RESOURCE key, string pairs
grouped together by SECTION names. A sample of the "gmsl10n.txt file is
shown below:

// GMS Localization (l10n) String file


//
SECTION Default

STRING_RESOURCE GMSL10N_00000 "Custom Property Window"


STRING_RESOURCE GMSL10N_00001 "Custom Object Window"
STRING_RESOURCE GMSL10N_00002 "Custom Property Window"
STRING_RESOURCE GMSL10N_00003 "Custom Object Window"

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-7


Building Models

SL-GMSDraw uses the SECTION named "Default" (except on Japanese


Windows NT where it uses the SECTION "Japanese"). A user can thus
change the SECTION to be used for localization by editing the localization
file, renaming the SECTION they wish to use to "Default", and changing the
previous "Default" section to some other name.

Setting Color Definitions


The Default Graphic Properties window and the Grid Options window
contain color boxes that allow you to set the color of an object or the grid.
The colors that are displayed in the color boxes are defined in the file
"colordef.dat". This file associates a color index with red, green, and blue
values and an optional bitplane writemask. The format for an entry in the
"colordef.dat" file is described in the chapter entitled Color in the SL-GMS
Reference.
During its startup sequence, SL-GMSDraw looks for a "colordef.dat" file in
the current working directory. If no "colordef.dat" file is found, SL-GMS-
Draw uses its own default "colordef.dat" file located in the $GMS_HOME/lib
directory.
By default, the color panel displays 32 colors. If the "colordef.dat" file con-
tains more than 32 entries, the additional colors will be displayed following
the default colors. Use the scroll bar, displayed to the right of the color box-
es, to display the additional colors or type the color index into the Color
Index text entry box.

colors
in "colordef.dat"

Figure 6-5: Color indexes in the "Default Graphic Properties" window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-8


Building Models

Laying Out a Model


There are two basic ways to build a Model. Some developers prefer to cre-
ate the Model freestyle using the SL-GMSDraw editor. However, a simpler
method is to determine the information set you wish to display in the Model
and lay out the Model before it is actually built in the editor.
The SL-GMSDraw editor can display a grid while objects are being added
to the Model; this grid helps to ensure that the different objects are aligned
correctly. A printout of a blank grid can be used as a template to manually
draw the objects before actually building the Model in the editor.
To print a blank Model with a grid, verify that the grid is visible and set the
appropriate size (refer to page 6-3). Click the File Pull-Down Menu and
select Print on Motif systems, or Print and then the PostScript option in the
Print submenu on Windows systems. The Print Dialog window will appear,
as illustrated in Figure 6-6:.

Select
Print Grid

Select
Landscape

Figure 6-6: "Print Dialog" window

Make sure that the Print Grid and Landscape options are ON. Enter the
printer name and any other necessary parameters. Click the Print button in
the Print Dialog window.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-9


Building Models

When you are laying out the different Models, note which objects you are
using repeatedly or for more than one Model. You can create SubModels (a
Model instanced into another Model) with these objects and use them
again and again. Creating SubModels standardizes the appearance and
behavior of an object you use several times. Refer to the section Using
SubModels for Standardized Objects on page 6-14.

Building the Model


You can create Models from objects you construct, or by instancing Control
Objects, GISMOs 1 and other SubModels (either user-defined or provided
by SL-GMS). One of the advantages of Control Objects is that when they
are added to a Model, the objects are displayed as native controls. In a
Windows system, a native control means a Windows control object. In
UNIX, native control generally means X-based Motif widgets. The Control
Objects are described in the SL-GMS Control Objects Reference Manual.
This section presents the types of tools and objects used to display differ-
ent types of data and user interfaces.

1. GISMOs are SL-GMS-supplied objects that have input dynamics and optional
display dynamics (changes to the appearance of the GISMO in response to
changes in one or more application variables). The input dynamics specify
actions to be performed whenever an input event occurs. The actions may be to
call a function, highlight the object, and so on. The functions that are called can
either be one of the SL-GMS supplied functions or a user-defined function. Refer
to the chapter GISMOs in the SL-GMS Reference.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-10


Building Models

Setting Background Object and Model Size


Click the Model Pull-Down Menu and select Properties to display the Model
Properties window, as shown in Figure 6-7:.

erase
behavior color
detect
on/off
size

Figure 6-7: Setting background object properties

When a blank Model is created using the the New with Background option of
the File Pull-Down Menu, SL-GMSDraw automatically creates a non-detect-
able Filled Rectangle as the background object in the background color.
The size of the background object is set by changing the default values (72
units wide and 54 units high) in the Model Properties window.

NOTE: The size of the Model is set to the size of the background object.

A blank Model can also be created using the New option of the File
Pull-Down Menu. The first object created in the Model (typically a Filled
Rectangle) is considered the background object. When the first object is
created in the Model, the Background Detectable and Background Object
Dimensions and Origin areas are enabled. The size of the background
object can be changed by modifying the width and height values in the
Model Properties window.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-11


Building Models

By default, the lower left corner of the WC-window is defined as the Point
0,0. To change the default, modify the text entry box designating the lower
left corner of the dotted-line graphic.
The color of the background object is set by entering an integer in the
Background Color entry box that corresponds to one of the color boxes in
the Default Graphic Properties window.
In addition, setting Background Detectable to OFF (i.e.,unchecked), will
cause the background object in the current Model to become undetectable.
Setting Background Detectable to ON (i.e., checked) allows the background
object to be selected and modified.
The erase behavior of objects in the Model can also be controlled with the
Erase in Background Color setting. Refer to page 3-27 for a further descrip-
tion of the erase behavior of objects.
If you have set the size of the Model to a custom setting rather than the
default size (72 x 54 units), refer to Step 2 - Set the Size of the Model on
page 6-39 for further information.

Attaching Dynamics to an Object


In SL-GMS, dynamic behavior is added to an object by attaching a Dyn-
Prop (Dynamic Property). A DynProp consists of one or more dynamic
descriptions. The dynamic descriptions are written in a language recog-
nized by SL-GMS that specifies a change in the appearance of an object in
response to a change in an application variable, or an action to be taken in
response to input events for the object. A sample DynProp is illustrated in
Figure 6-8: on page 6-12.

When user selects object


call the function #
gms_flash( ) dynamic
call gms_flash( ) description
DynProp
If the value of the variable tanklevel tanklevel
dynamic
equals less than 90.0 <90.0 description
set the fill color (fcolor) of the fcolor noalarm
object to the color index
given by the value of the
variable noalarm

Figure 6-8: A sample DynProp

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-12


Building Models

Dynamic descriptions are further described in the section Dynamic Descrip-


tions on page 4-2. The chapter Dynamics in the SL-GMS Reference dis-
cusses the general syntax for the dynamic descriptions and the different
types of dynamic actions (changes in appearance of an object), such as
scale, fill, and position, that are available. The chapter Dynamics Reference
in the SL-GMS Quick Reference contains several tables for use in con-
structing DynProps.
To attach a DynProp to an object, select the object, click the Dynamics
Pull-Down Menu and select Object Dynamic Properties. This displays the
Object Dynamic Properties window. Type the DynProp into the Object
Dynamic Properties window, as illustrated in Figure 6-9: on page 6-13.

#
call gms_flash( )
tanklevel
<90.0
fcolor noalarm

Figure 6-9: A DynProp in the "Object Dynamic Properties" window

The section Editing Dynamics on page 4-5 describes how to type DynProps
into the Object Dynamic Properties window.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-13


Building Models

Renaming Variables
Models can be reused through instancing. Model Instances, also called
Instances or SubModels, retain the dynamic properties of the original Mod-
el. The various Instances are differentiated from the original Model by
renaming variables the driving variables are renamed to different vari-
able names.
For example, three Instances of the Text Display Control Object are placed
into a Model. The Text Display Control Object displays the value of the label
parameter. The original copy of the Text Display Control Object Model was
created with a dynamic description that displays the value of label. Howev-
er, for each of the three Instances of the Text Display Control Object, the
label parameter has been renamed to display the value of a different vari-
able. The first Instance needs to display the value of the variable volts1,
therefore, the label parameter is renamed to volts1. The second Instance
has label renamed to amps2, and the third Instance has label renamed to
volts3.
To rename variables, select an object, click the Dynamics Pull-Down Menu
and choose Object Renamed Variables. The Object Renamed Variables
option is described in the section Renaming Variables on page 4-9.

Using SubModels for Standardized Objects


The advantage of using SubModels is that the object is created only once
and saved as a Model. Each of the Instances points to the original Model. If
a change is made to the original Model, for instance, a meter Model, then
that change is automatically reflected in all meter Instances. This standard-
izes the appearance and dynamic behavior of objects.
SL-GMS provides a set of Models that are available for instancing. These
include GISMOs, Graph Models, Control Objects, and others. However, you
can save any object, or group of objects, as a Model and instance it as a
SubModel in other Models. An object (or group of objects) you create for
use as a SubModel should be created with its Reference Point at (0,0).
When a SubModel is instanced, the location of the mouse cursor will corre-
spond to the origin (0,0) of the original Model.
Similarly, create original Models you plan on using as SubModels with the
exact size and orientation required in the Models in which they are
instanced. Scaling or rotating a SubModel Instance in a Model decreases

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-14


Building Models

the performance of the Model. Refer to Building SubModels to Scale on


page 6-50 for further information.
If the Model you wish to use as a SubModel is created using the New with
Background option of the File Pull-Down Menu, then a non-detectable Filled
Rectangle is automatically created as the background object in the back-
ground color. However, the size of the Model used as a SubModel should
be only as large as is needed to contain all the parts of the Model. There-
fore, if needed, change the size of the Model using the Model Properties
window. (Click the Model Pull-Down Menu and select Properties.) Refer to
Step 2 - Set the Size of the Model on page 6-39 for further information.
To instance a SubModel in a Model, click the Palettes Pull-Down Menu and
select Available Submodels. The Available Submodels window, shown in
Figure 6-10:, is displayed. Scroll down the list of SubModels and click on
the name of the Model you wish to instance. The selected SubModel is
placed in the Active Working View by positioning the cursor in the desired
location and clicking the mouse.

Figure 6-10: "Available Submodels" window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-15


Building Models

Any Models you create for use as SubModels are placed in the SUBMODS
subdirectory of the working directory. Models placed in this directory 2
appear in the Available Submodels window.

Displaying Strings, Integers, and Real Values


The different text tools display either string characters, integers, or real val-
ues. Textual information can be either static or dynamic (changing). Static
text does not change. Examples include labels and non-dynamic numeric
values.
Dynamic text changes in response to changes in application variables.
Examples include the integer or real value of a variable or a text string that
changes (e.g., ON, OFF, INTERMEDIATE) with the value of a variable.
Static and dynamic text can be displayed by either using an Instance of the
Text Display Box or Text Display Control Objects or with an object created
with the Text Rectangle Tool in the Create Tool panel. In addition, static text
can be created using the Text Tool in the Create Tool panel

2. Models placed in the working directory also appear in the Available Submodels
window but it is good practice to create a SUBMODS subdirectory and place them
there.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-16


Building Models

To place an Instance of the Text Display or Text Display Box Control


Objects into a Model, click the Palettes Pull-Down Menu and select Text
Fields. The Available Palettes window with the "c1_txtflds" palette will
display, as shown in Figure 6-11:.

Figure 6-11: "c1_txtflds" Palette

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-17


Building Models

Text can be displayed either as a real number, integer number, or a text


string. Click the appropriate control object in the "c1_txtflds" palette, then
click again in the Active Working View at the location in the Model where
the text field is to be displayed, as shown in Figure 6-12:.

Figure 6-12: Instancing the Text Display Box Control Object

Select each Instance of the Text Display and Text Display Box Control
objects in turn, renaming the variables listed in the table below. (Refer to
Renaming Variables on page 4-9).

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-18


Building Models

Parameters Related to Text

Control Object Parameter Name


Text Display label
Test Display Box display_expr
maxchars

The Text Display Box displays the value of the display_expr parameter. The
Text Display object displays the value of the label parameter. The maxchars
parameter sets the maximum number of characters displayed.

NOTE: The Text Display and Text Display Box Instances must be scaled
to fit the maximum number of characters that are displayed.

Static text can be created by using either the Text Tool or the Text Rectan-
gle Tool (used for text displayed within a rectangular frame) on the Create
Tools panel.
For a Text Rectangle object to display dynamic text, dynamic descriptions
need to be attached to the object. Refer to the section Attaching Dynamics
to an Object on page 6-12 for further information.
The part of a dynamic description required to add dynamic text to a Text
Rectangle object follows a regular format:
stext <argument> "format-string"
The stext keyword can be followed by a variable name or an expression,
which may itself contain variable names. The format string is always sur-
rounded by double quotes.
For example:
stext var1 "%s"
displays the value of the variable var1 as a string variable and:
stext var1 "%4.0f"
displays the value of the variable var1 as an integer (four characters with
zero characters after the decimal point).

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-19


Building Models

NOTE: If the Text Rectangle object is used to display dynamic text on


other Models, then create a Model with only the Text Rectangle
object and its associated dynamic descriptions. Create the Text
Rectangle with (0,0) as its Reference Point. This Model can then
be instanced into other Models and the variables can be renamed
using the Object Renamed Variables window (refer to Renaming
Variables on page 4-9). This standardizes the appearance and
dynamic text display in the different Models.

Graphing Data Sets


SL-GMS provides a variety of Graph types. Graphs are Models that are
instanced in other Models. First, instance the Graph, then rename the vari-
ables which control scaling and labeling of the graph axes and graph traces
to constants or to other variables. You can also design your own graph
Models. The chapter in the SL-GMS Reference and the chapter The
SL-GMS Graph Library in the SL-GMS Quick Reference describe the differ-
ent types of graphs that are available, define the variables associated with
the graphs, and describe how the existing graph Models can be custom-
ized.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-20


Building Models

To instance a Graph Model, click the Palettes Pull-Down Menu and select
Available Submodels. This will display the Available Submodels window,
shown in Figure 6-13:.

Figure 6-13: "Available Submodels" window

Scroll down the list of SubModels and click on the name of the Graph Mod-
el you wish to instance. The Graph Models provided by SL-GMS are found
in the scrolling list in the /demo/graphs/GRAPHS/ directory. Place a copy of
the Graph Model in the Active Working View by clicking the mouse in the
desired location. Rename the variables of the Graph Instance by selecting
the Graph Instance, clicking the Dynamics Pull-Down Menu and selecting
Object Renamed Variables. Refer to Renaming Variables on page 4-9 for fur-
ther information.
Any Graph Model you create should be placed in the working directory or a
GRAPHS subdirectory of the working directory. Graph Models placed in
either of these two directories will appear in the Available Submodels win-
dow.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-21


Building Models

Displaying a bitmap on a button


Some Control Objects contain a label that usually consists of a formatted
string describing the purpose of the button. However, a bitmap can be dis-
played on the button instead of a text string. As an example, the Object
Create Tool buttons display a bitmap indicating the type of object the button
creates.
For further information refer to the section General Considerations in the
SL-GMS Control Objects Reference Manaul.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-22


Building Models

Creating a Menu
You can add a menu to a Model using the Option Menu Control Object. The
Option Menu button has an optional label that presents a pull-down menu
when selected. Each entry may be one of three types:
Pushbutton (appears as a string label)
Cascade (appears as a string label with a right arrow indicator
aligned flush-right)
Separator (appears as a horizontal separator line)

To place an Instance of an Option Menu into the Model, click the Palettes
Pull-Down Menu and select Controls. This brings up the Available Palettes
window and displays the Controls Palette. Select the Option Menu control,
as shown in Figure 6-14: on page 6-23.

Option Menu
Control

Figure 6-14: Selecting the Option Menu Control

Click again in the Active Working View where the Option Menu button will
appear in the Model.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-23


Building Models

The method used to define the menu entries is described in the section
Option Menu in the SL-GMS Control Object Reference Manual.

Sending Messages to States


Users may interact with the application at run-time by selecting objects on
the screen that send messages to States. The messages can display a dia-
log box, close or open a window, quit an application, and so on.
Two types of objects are used to send messages to a State: Control
Objects and GISMOs.

Control Objects
The easiest method to send messages to a State is to use one of
the Control Objects. The interface to send a message to a State
is already built into the Control Object. 3 All you need to do is
rename the appropriate variables (refer to the section Renaming
Variables on page 4-9).
Each of the Control Objects, with the exception of the Text
Display Box and the Text Display objects, can send a message
to a State. The Control Objects contain two parameters:
msg_statename and msg_strmsg.
Rename msg_statename to the name of the State which will
receive the message. msg_strmsg is the message sent to that
State. The message that is sent to the State is a string that
corresponds to the name of a method defined for that State.
If msg_statename is renamed to NULL (the default), then the
message is sent first to the current State. If the current State
does not contain a method with the same name as that of the
message string, then the State Management System passes the
message string up the State tree until a State is found with that
particular method defined in it. For example, a Model is
displayed using an Instance of the WinModState. The Model

3. Another advantage of Control Objects is that when they are added to a Model,
the objects will display as native controls. In a Windows system, a native control
means a Windows control object. In UNIX, native control generally means
X-based Motif widgets. Control Objects are described in the SL-GMS Control
Objects Reference Manual.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-24


Building Models

contains a push button which has msg_statename renamed to


NULL and msg_strmsg renamed to quit. When the push button is
clicked, the "quit" message is sent to the WinModState Instance.
This State does not contain a quit method, so the message is
passed up the State tree until a State is found that does have a
quit method defined for it. The StandardTopState has a quit
method defined, therefore, the StandardTopState executes the
quit method to terminate the application.
Two other parameters are also used when sending messages to
a State: value and value_valtype. Each method defined for a
State receives three parameters when it is called: the State id,
value, and a pointer.
For the example given above, the value and value_valtype
parameters were set to their default values because the quit
method in the StandardTopState receives value but does not
actually use it.
However, the value parameter is used by other State methods.
One example is the new_model_window( ) method of the
WinModState. For this example, a Push Button Control Object on
a Model has the following renamed variables.

Messages and Values Sent by the Push Button

Renamed Variables
msg_statename1 msg_strmsg value2

NULL "new_model_windo "sibling + \twin_position 0.5


w" 0.0"
1. Renaming the msg_statename variable to NULL indicates that the
message should be sent to the current State, which in this example is the
WinModState Instance that is displaying the Model. Since NULL is the
default value for msg_statename, it does not actually need to be re-
named.
2. "\t" is the <TAB> separator between each message-value pair.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-25


Building Models

Description of the "value" String

Parent
Model State1 State Window
Result
name (Super- name2 position
State)
sibling + NULL 0.5 0.5 Window Model State is
created under the
Backplane State
1. A value of NULL is equivalent to "the State that receives the message";
"+" is equivalent to "the direct parent State of the State that receives the
message." However, the NULL value does not need to be included in the
value string, as it is the default.
2. A value of NULL is equivalent to "system generated." However, the
NULL value does not need to be included in the value string, as it is the
default.

This push button executes the new_model_window( ) method in the Win-


ModState. The new_model_window( ) method uses the value string to get
the Model name, window position, and the Parent State name for a new
Instance of the WinModState. The section Creating Windows and Manipulat-
ing Models in the SL-GMS Examples Manual contains several examples of
value string usage.

GISMOs
A developer can build a GISMO 4 to send a message to a State.
The input dynamics of the GISMO can contain a call to a
user-defined function which contains the necessary function
calls to send a message to a State. The section State Class
Library Interface in the SL-GMS State Class Library Reference
Manual and the chapter General Application Development in the
SL-GMS Enhanced SMS Users Guide describe the functions
used to interface with the SL-GMS State Class Library.

4. The chapter GISMOs in the SL-GMS Reference and SL-GMS GISMO Library in
the SL-GMS Quick Reference describe how the GISMOs in the SL-GMS GISMO
Library are created.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-26


Building Models

The user-defined function must be added to the application


using the gmsAddUserFctn( ) function. Adding a user-defined
function to an application is described in the chapter Dynamics
in the SL-GMS Reference.

Sending data to the application


There are several ways to send data to the application by interacting with
objects on the screen.

Text Edit Box Control Object


The Text Edit Box is a rectangular area in which text can be
entered or edited. The Text Edit Box can also display the value of
a parameter set by the application.
The Text Edit Box Control Object is found in the "c1_txtflds"
palette window, shown in Figure 6-15:.

Text Edit Box


Control Objects

Text List Box


Control Object

Figure 6-15: "c1_txtflds" Palette

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-27


Building Models

Text can be entered either as a real number, integer number, or


a text string. Click the appropriate Text Edit Box Control object in
the "c1_txtflds" palette window, then click again in the Active
Working View at the location in the Model in which the text field
is to be displayed.
The Text Edit Box contains two parameters: set_variable and
display_expr. Rename the set_variable parameter to the
application variable whose value is set to the text you have
entered in the Text Edit Box. Rename the display_expr
parameter to a variable whose value is set by the application and
displayed in the Text Edit Box.
The section Text Edit Box in the SL-GMS Control Object
Reference Manual describes all of the parameters and their
corresponding data types for the Text Edit Box. Refer to the
section Renaming Variables on page 4-9 for information about
how to rename the parameters in the Text Edit Box Control
Object.

Text List Box Control Object


The Text List Box presents a list of text string choices from which
selections can be made. If necessary, scroll bars are provided to
allow you to view all available choices.
The Text List Box Control Object is found in the "c1_txtflds"
palette window, as shown in Figure 6-15: on page 6-27. The Text
List Box contains two parameters: set_variable and display_expr.
Rename the set_variable parameter to the application variable
whose value is set to the text you have selected in the Text List
Box. Rename the display_expr parameter to a variable whose
value is set by the application and is in the list of items displayed
in the Text List Box. In addition, several other parameters
specific to the Text List Box can be renamed, as shown in the
following table.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-28


Building Models

Parameters Related to the Text List Box Behavior

Parameter Name Description


selected_index index value within the list of text items that is to
be highlighted as "selected" when the list is
displayed
select_type type of selection mechanism to be used by you
top_index index value of the Text List item to be displayed
at the top of the scrolled list

The section Text List Box in the SL-GMS Control Object


Reference Manual describes all of the parameters and their
corresponding data types for the Text List Box. Refer to the
section Renaming Variables on page 4-9 for information about
how to rename the parameters in the Text List Box Control
Object.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-29


Building Models

Scale (Slider) Control Object


A Scale displays and sets a numerical value from a defined
range. The Scale Control Object is found on the "c1_scales"
palette window, as shown in Figure 6-16:.

Figure 6-16: "c1_scales" Palette

The Scale contains two parameters: set_variable and


display_expr. Rename the set_variable parameter to the
application variable whose value you have set to the value of the
Scale indicator. Rename the display_expr parameter to a
variable whose value is set by the application and determines
the position of the Scale indicator and the value displayed.
In addition, several other parameters specific to the Scale
Control Object need to be renamed. An example of the
Renamed Variables for an Instance of the Scale Control Object
is shown in the section Creating an SL-GMS Model dialog box on
page 6-38.
The section Scale (Slider) in the SL-GMS Control Object
Reference describes all of the parameters and their
corresponding data types for the Scale. Refer to the section

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-30


Building Models

Renaming Variables on page 4-9 for information about how to


rename the parameters in the Scale Control Object.

GISMOs
Four types of GISMOs can be used to send data back to an
application: TEXTENTRY ARRAY, TEXTENTRY VAR, SLIDER,
and SCROLLBOX. The chapter GISMOs in the SL-GMS
Reference and SL-GMS GISMO Library in the SL-GMS Quick
Reference describe the different GISMOs, the parameters to
rename, and their corresponding data types.

Dialog Box
A dialog box allows the values of different variables to be set. A
dialog box can contain Text Edit Boxes, sliders, buttons, and
other objects which allow you to set the value of different
variables in an application. Further information is available in the
section Creating an SL-GMS Model dialog box on page 6-38.

UserData
UserData is an arbitrary string that is attached to an object.
When the object is selected at run time, the gmsQUserData( )
function is used in the application to obtain the UserData string
of the object. The application can use the UserData string in any
manner. The section UserData Property Dialog on page 5-30
describes how to attach the UserData string to an object.

UserWord
A UserWord is an integer that is attached to an object. When the
object is selected at run time, the gmsQUserWord( ) function is
used in the application to obtain the UserWord of the object. The
application can use the UserWord integer in any manner. The
section UserWord Property Dialog on page 5-30 describes how
to attach a UserWord to an object.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-31


Building Models

Switching Models using Control Objects


The easiest way to display a new Model is to send either a
"new_model_window", "stack", or "replace" message to the Instance of the
WinModState that is presently displaying a Model. A Button Control Object
from the "c1_buttons" palette window can be used to send the message.

Figure 6-17: "c1_buttons" Palette

The following tables illustrate the variables that are renamed in the Button
object to send a "new_model_window" message to the WinModState. This
example opens a new window which displays the sibling Model.

Messages and Values Sent by the Push Button

Renamed Variables
msg_statename
1 msg_strmsg value2

NULL "new_model_window" "sibling +\twin_position 0.5 0.0"

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-32


Building Models

1. Renaming the msg_statename variable to NULL indicates that the mes-


sage should be sent to the current State, which in this example is the WinMod-
State Instance that is displaying the Model. Since NULL is the default value
for msg_statename, it does not actually need to be renamed.
2. "\t" is the <TAB> separator between each message-value pair

Description of the "value" String

Model Parent State1 State Window


Result
name (SuperState) name2 position
sibling + NULL 0.5 0.5 Window Model State is
created under the
Backplane State
1. A value of NULL is equivalent to "the State that receives the message";
"+" is equivalent to "the direct parent State of the State that receives the mes-
sage." However, the NULL value does not need to be included in the value
string, as it is the default.
2. A value of NULL is equivalent to "system generated." However, the NULL
value does not need to be included in the value string, as it is the default.

Refer to Renaming Variables on page 4-9 for information about renaming


variables. The WinModState and its methods are discussed in the
SL-GMS State Class Library Reference. The section Creating Windows
and Manipulating Models in the SL-GMS Examples Manual provides usage
examples of the three methods.

Creating a Radio Button Group


This section describes the steps to create a Radio Button group using a
Container Control Object as a parent. This behavior is consistent with Motif
standards. 5 The general procedure requires any control that is to be
grouped in a container to recognize the container as a parent container.
This is accomplished by assigning certain rename variables to each radio

5. The process for creating a Radio Button group is the same in a Windows system
but the concept of a "parent" container is not applicable.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-33


Building Models

button and to the container that groups them. Once this is done, the radio
buttons exhibit appropriate behavior automatically.

Step 1 - Place a Container Control Object

Figure 6-18: Containers Palette

To open the Containers Palette, click the Palettes Pull-Down


Menu and select Containers. Click on the container labeled
"Column" and create a copy of the Column Container by clicking
a second time in the Main Editing Window.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-34


Building Models

Step 2 - Place Radio Button Control Objects

Figure 6-19: Buttons Palette

Open the Buttons Palette from the Palettes Pull-Down Menu and
copy three Radio Button Objects to the Active Working View.
Enlarge the container so that it surrounds the radio buttons.
For a Motif platform, there is no need to space the Radio Buttons
evenly because Motif automatically arranges items grouped
within a Container. Since the Column Container was used in
Step 1, these Radio Buttons automatically arrange into a column
(once the proper rename variables have been assigned to all of
the Control Objects). Note that had a Row Container been
chosen in Step 1, Motif would have placed the Radio Buttons
into a row.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-35


Building Models

The items are not automatically arranged into a row or column


on a Windows platform. The Radio Buttons must be aligned in
the Column container using SL-GMSDraw.

Step 3 - Assign Rename Variables

Figure 6-20: "Object Renamed Variables" window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-36


Building Models

1. Select all four control objects (the container and the three
radio buttons).
2. Click the Dynamics Pull-Down Menu and select Object
Renamed Variables. The Object Renamed Variables window is
displayed.
3. Step through the Select List using the Loop Control icons in
the Main Menu bar until the container object is selected. Its
variables now appear in the Object Renamed Variables win-
dow.
4. Assign a string value to the control_name variable. This value
will correspond to the parent_name variable for each of the
three Radio Buttons. This example assigns the value
my_container.
5. Click Apply to apply the change.
6. Step through the Select List using the Loop Control icons in
the Main Menu bar until one of the Radio Button objects is
selected. Its variables now appear in the Object Renamed
Variables window.
7. Assign my_container to the parent_name variable of the
Radio Button.
8. Click Apply to apply the change. Repeat the last three steps
for the remaining Radio Buttons.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-37


Building Models

Creating an SL-GMS Model dialog box


This section describes how to create an SL-GMS Model for use as a dialog
box. Several examples of applications using dialog boxes are described in
the chapter Advanced Use of Dialogs in the SL-GMS Examples Manual.
The general procedure requires creating a Model then instancing Control
Objects and other SL-GMS objects that display information and allow you
to edit the information (if required).

Values for
Display/edit

Buttons for
apply/reset/cancel

Figure 6-21: A dialog box example

There are two basic parts to a dialog box, as shown in Figure 6-21:. The
first part allows the values of different variables to be viewed and modified.
The second part contains three buttons that send messages to the Dia-
logState: to "apply" the value changes to the application variables; to
"reset" the displayed values to what they were before any change was
made; and to "cancel" (close) the dialog box. The physical arrangement of
the values for display/edit and the buttons do not need to be the same as
those shown in Figure 6-21:.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-38


Building Models

Step 1- Lay Out the User Interface


Determine the information that will be displayed/edited in the
dialog box; different dialog boxes can display different sets of
data. Once the information set has been determined, lay out the
dialog box as it should appear and determine the types of
interactions that will be used with this information. For each data
value displayed, decide whether the dialog should have
read-only or read/write capability. Will the dialog be used for
typing in values, using a scale, or picking from a selection of
buttons?

Step 2 - Set the Size of the Model


Typically a dialog box does not fill the entire screen. Therefore,
the size of the dialog box Model needs to be set smaller than
that of the default Model size of 72 x 54 WC-units. There are two
methods available to set the Model size smaller than the default
sizze.
In the first method, the developer creates their own background
object. Click the File Pull-Down Menu and select New. Create a
filled object, typically a Filled Rectangle, as the first object in a
Model.

NOTE: The first object in the Model list is the background object.

The background object must have the same dimensions as


required for the Model because the size of the Model is set to the
size of the background object.
The second method uses the default background object. Click
the File Pull-Down Menu and select New with Background. A
blank Model is displayed, and SL-GMSDraw automatically
creates a non-detectable Filled Rectangle as the background
object in the background color. Click the Model Pull-Down Menu
and select Properties. This displays the Model Properties window,
as shown in Figure 6-22: on page 6-40.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-39


Building Models

background
color
width

height

Figure 6-22: "Model Properties" window

The size of the background object is set by changing the default


values (72 units wide and 54 units high) in the Model Properties
window.

NOTE: The size of the Model is set to the size of the background object.

Modify the Model width and height values (i.e., the background
object width and height) shown in Figure 6-22:. If the background
color of the dialog box is to be different from that of the default,
edit the default Background Color index and enter the new color
index.
When all of the appropriate Model properties have been edited,6
click the Apply button in the Model Properties window. When the
Apply button is clicked, SL-GMSDraw displays a rectangle
showing the new Model width and height in the default Model
window. Figure 6-23: on page 6-41 illustrates a Model width and
height of 40 and 30, respectively. Only the top and right side of
the rectangle are visible in Figure 6-23: on page 6-41 because
the left bottom corner of the Model is set to (0,0). The dialog box

6. The section Setting Model Properties on page 3-26 describes the different Model
properties in further detail.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-40


Building Models

information is built within this 40 x 30 area. Anything placed


outside this area is not displayed.

30

40

Figure 6-23: The Model width and height changed to 40 and 30

NOTE: Selecting the Apply as Default button instead of the Apply button
applies the background color, and on/off settings to all
subsequent Models built within the current editing session. The
background object dimensions are also applied to all subsequent
Models built using the New with Background option of the File
Pull-Down Menu within the current editing session.

There is an easy way to ensure that the dialog box Model contains all of
the objects that it should. Click the Options Pull-Down Menu and select
User Preferences. This displays the User Preferences window. Enable

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-41


Building Models

the Size Window to Model option and click Apply. Next, save the Model,
close the Model, and then reopen the Model. SL-GMSDraw redisplays
the Model in a window sized to 40 x 30, without displaying the rest of
the default area.

This must
be turned
on as shown

Figure 6-24: Model Edit Mode (New Window) selected

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-42


Building Models

Step 3 - Place Objects in the Model


Based upon the layout of the dialog box and the user interface,
place the appropriate objects in the Model. A variety of objects
have been used in this example for illustrative purposes.
The following description applies to the example shown in Figure
6-25:.

Text Display Box Scale Control Objects


Control Objects (read/write)
(read-only)

Text
Objects
(read-only)

Push Button Control Objects Radio Button


group
(read/write)

Figure 6-25: A dialog box example

The above example uses the Text Tool in the Create Tools panel
to create the text labels "Name", "Description",
"% Open", "Alarm Setpoint", and "Open/Close Valve". Text

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-43


Building Models

Display Control Objects could also have been used. These are
read-only.
Text Display Box Control Objects are used to display the value of
the valve name and description variables. These are also
read-only and the value is output as a string.
The Text Display Box Control Object is found in the "c1_txtflds"
palette window, as shown in Figure 6-26:.

Text Display Box


Control Objects

Select "String"

Figure 6-26: Selecting a Text Display Box Control Object

Click the Text Display Box that displays a "String" and place two
Instances into the Active Working View one Instance to the
right of the "Name" Text and one to the right of the "Description"
Text. Rename the display_expr parameter for these two
Instances to the variable names set by the application. For this
example, the parameters have been renamed, as shown in the
following table.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-44


Building Models

Text Display Renamed Variables


Box display_expr maxchars
Name "ValveName" 20
Description "ValveDesc" 40

Scale Control Objects are used to display the %open and alarm
setpoint values. These objects display the current value and also
allow the value to be changed. Text Edit Box Control Objects can
also be used. To allow read/write capability, rename both the
set_variable and display_expr parameters to application
variables. The display_expr parameter determines the position of
the Scale indicator and the value displayed. When the scale
indicator is moved to change the value, the set_variable renamed
variable will set to the new value. (The value of the variable is
sent to the application when the Apply button is clicked.) If only
the display_expr parameter is renamed to an application
variable, the scale indicator will be read-only.
For this example, the display_expr and set_variable parameters
are renamed, as shown below.

Renamed Variables
Scale Object
display_expr set_variable
% Open "ValvePctopen" "ValvePctopen"
Alarm Setpoint "ValveSetpt" "ValveSetpt"

In addition, several other parameters specific to the Scale


Control Object need to be renamed.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-45


Building Models

Parameters Related to the Scale Behavior

Parameter
Description
Name
min_value Minimum value of the Scale
max_value Maximum value of the Scale
decimal_point Number of places to the right of the decimal point
jump_value Fraction of the range (by default 1/10 of range)
numticks Number of tick marks
orientation1 Vertical or horizontal with minimum and maximum
at either end
1. The orientation variable is already renamed (i.e., you do not need
to rename it) for all Scale objects on the "c1_scales" Palette.

The following table shows the additional parameters specific to a


scale and their corresponding Renamed Variable that is used to
produce the scales shown in Figure 6-25: on page 6-43.

Renamed Variables for the Two Scale Instances

decimal_point jump_value max_value min_value numticks


0 1 100 0 5

The section Scale (Slider) in the SL-GMS Control Object


Reference provides a further discussion of these parameters, as
well as their data types.
A Radio Button group is created to allow the valve to be opened
and closed through this dialog box. Again, since the current
state of the valve (open or closed) can be viewed and the state
can be changed, the set_variable and display_expr parameters
are renamed to application variables. The section Creating a
Radio Button Group on page 6-33 provides further information.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-46


Building Models

Three "Integer" Push Button Control Objects from the


"c1_buttons" palette window are used to send the "apply," "reset,"
and "cancel" messages to the DialogState. The "Integer" Push
Button Control Object is used because it passes the value
parameter as an integer, and the value parameter is an integer
data type in the apply( ), reset( ), and cancel( ) methods of the
DialogState. The SL-GMS State Class Library Reference
provides further information.

Sends the
"value"
parameter
as an integer

Figure 6-27: Select button to send "value" as an integer

The following table shows the renamed variables for the three
buttons.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-47


Building Models

Messages and Values Sent by the Push Buttons

Renamed Variables
Button msg_statenam
msg_strmsg value
e1
Apply NULL "apply" NULL
Reset NULL "reset" NULL
Cancel NULL "cancel" NULL
1. Renaming the msg_statename variable to NULL indicates that the
message should be sent to the current State, which in this example is
the WinModState that is displaying the dialog box Model. However,
since the WinModState does not contain an apply, reset, or cancel
method, the message will be passed up to the DialogState which does
contain these methods. Since NULL is the default value for
msg_statename, it does not actually need to be renamed.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-48


Building Models

Optimizing Loading and Displaying a Model


This section describes the best ways to optimize the performance of Mod-
els.

Apply Transformations
Each time an object is moved, rotated, or scaled in the Model, a transfor-
mation object is attached to the object. The following example shows the
portion of the ".g" file for a polygon object that has been moved and scaled.

poly \
11.1 65.9 9.29 53.8 21.7 52.7 \
29.8 57.4 25. 63.0
transformation . move 16.5 -48.9
object
. scale 16.5 -48.9 1.46 1.75

Each time this polygon is drawn on the screen, the system must compute
each of the transformations one for the move and one for the scale.
Selecting the Apply Transform option of the Object Pull-Down Menu com-
bines transformations accumulated during editing and applies them to the
Points defining graphical objects. This speeds up the display of objects and
reduces the memory required to store them.
Here is the same polygon object after Apply Transform is done. The trans-
formation objects for the move and scale operations have been applied to
the Points defining the polygon.

poly \
32.7 66.9 30.0 45.7 48.2 43.8 \
60.0 52.0 53.0 61.8

Apply Transformation has no effect in the following cases:


Unequal scaling of Text, Text Rectangles, Circles, Pies, Sectors,
and Three-point sectors
Rotation of Rectangles
SubModel Instances

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-49


Building Models

If these types of objects must be moved, rotated, or scaled in a Model, try


to construct the object so that the Apply Transform operation can be used.
For example, if a rectangle is to be rotated, create the rectangle as a
closed polygon with four points rather than using the Rectangle Tool.

Building SubModels to Scale


SubModels should be created with the exact size and orientation required
in the Model into which they will be instanced. Significant performance
improvement can be achieved because the top-level Model (the Model into
which the SubModel has been instanced) avoids the application of scaling
and rotation transformations on its SubModels. (Remember that the Apply
Transform operation does not work on SubModels.)
Since SubModels are instanced many times in various top-level Models, a
very large increase in performance is achieved by concentrating effort on
optimizing the performance of SubModels.

Creating Filled Objects without an edge


Filled objects that do not require their edge color to change at run time can
have their edge style set to 0 (none). Not drawing the edge increases per-
formance in the drawing of a filled object by eliminating the step required to
draw the outline of the object. Refer to Edge color, style, and width on page
3-9 for information about setting an objects edge style to 0.

The M2 Filer
To achieve maximum possible screen-load performance of a top-level Mod-
el at run time, 7 the M2 filer is provided. The M2 filer provides a set of func-
tions to load and save Models in the ".m2" or contiguous filer format.
In ".m1" files, the format of the information stored is independent of the
internal memory representation of the data at runtime. Each graphical ele-
ment is stored as a separate entity; therefore, SL-GMS must parse and
reconstruct the elements as the file is read into memory.
The ".m2" format, on the other hand, contains an exact memory image of
the Model object. Using the M2 filer, the entire Model can be loaded with
one quick read, without having to parse and reconnect it, as with the nor-
mal ".m1" filer.

7. Currently SL-GMSDraw operates only on ".m1" files.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-50


Building Models

Two utilities convert files to the ".m2" format: gm2 and m1m2.
The gm2 utility converts ".g" files to ".m2" files.
gm2 <modelname>.g

The m1m2 utility converts ".m1" files to ".m2" files.


m1m2 <modelname>.m1

If there is a change to the ".g" or ".m1" version of a Model, the ".m2" for-
matted file must be recreated using the appropriate utility.
By default, the State Management System first searches for "<model-
name>.m2", followed by "<modelname>.m1". 8
It is a good practice to free ".m2" Models when they are no longer needed,
to make the best use of time and memory.

8. Model search behavior for a given State can be changed using the
gmsStM2Flag( ) function, described in the section State miscellaneous in the
SL-GMS Function Reference Manual.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-51


Building Models

Testing a Model
Using Preview
SL-GMSDraw is able to preview the dynamic behavior of a Model by apply-
ing data from a file to the objects in the Model. The data specification file
(".dat") is created with the same name as that of the Model, along with the
suffix ".dat". (For example, if the Model is named "demo1.m1", the ".dat"
file will be named "demo1.dat").
To create or edit a ".dat" file during a session, the Edit Data File window
must be invoked. This is done by clicking the Dynamics Pull-Down Menu
and selecting the Edit Data File option. Text which creates or modifies the
".dat" file can then be entered in this window. If a data file already exists for
this Model, that data file will automatically display in the Edit Data File win-
dow. Clicking the Save File button will write the file to disk. Clicking the
Open File button will display a dialog window which allows entry of the
name of a data file.

Figure 6-28: "Edit Data File " window

A ".dat" file contains variable name and value pairs, separated by a space,
one pair per line.
volts1 120

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-52


Building Models

The preview facility also recognizes other keywords in data files. The key-
words can be used to automatically generate trigonometric, incremental, or
random values for dynamic variables. The data format for a ".dat" file is
specified in the chapter Dynamics Reference in the SL-GMS Quick Refer-
ence.
The Model must be saved if it has been edited before the dynamics can be
exercised. In addition, while the Model is being previewed, it cannot be
edited or saved. After previewing, the Model is automatically reloaded so
that any changes made by the dynamic updating are discarded.
To preview the current Model, click the Dynamics Pull-Down Menu and
select Preview Options. This will display the Preview Options window, shown
in Figure 6-29:.

Figure 6-29: "Preview Options" window

Adjust the timer period (the time, in milliseconds, between dynamic


updates) using the scale indicator. Click the Start button to load the "<mod-
elname>.dat" file 9 and begin previewing the Model. Click the Stop button to
terminate the preview and reload the Model. Clicking the Pause button will
suspend dynamic updating without leaving Preview Mode but the Model
cannot be edited or saved.

NOTE: If another Model is opened while a Model is being previewed, the


newly-opened Model will begin previewing automatically.

9. If a "<modelname>.dat" file does not exist, a warning message will display and
previewing will not occur.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-53


Building Models

Using SL-GMSRun
SL-GMSRun is useful for testing user-developed Models, including the dis-
play of object dynamics. SL-GMSRun is particularly useful for prototyping
screens in the early stages of system development when the critical deci-
sions are being made about the user interface.
Without any programming, SL-GMSRun can be invoked with different com-
mand line options to:
preview a Model
select a Model at run time and preview
preview a Model and utilize zoom and pan capabilities
preview dynamic update for a Model using a "<modelname>.dat"
file
generate a PostScript file of a Model
use a command file to generate a State tree
access all of the above capabilities via a control panel
The SL-GMS Enhanced State Management provides a description of the
features of the SL-GMSRun utility.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide 6-54


A Using Active X Controls

gmsdraw_mfc is the version of SL-GMSDraw which runs on 32-bit Win-


dows platforms. It uses the Microsoft Foundation Classes (MFC).

Inserting Active X Controls


To insert an Active X control in a Model, click the Edit Pull-Down Menu and
select Insert Active X Control, as shown in the Figure A-1:. The Insert
Active X Control dialog is displayed, as shown in Figure A-2:.

Figure A-1: Insert Active X Control option selected

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide A-1


The Insert Active X Control dialog lists the controls available on your
system from which you can make your selection.

Figure A-2: Insert Active X Control dialog

Select the control to be inserted and select OK. When the control is select-
ed, it can be moved or resized using the selection handles. The control is
not active at this point; it can be activated by testing the Model using the
Preview feature (refer to Testing a Model on page 6-52).

Editing Active X Controls


Once inserted into a Model, controls can be treated the same as other
objects in the Model. When selected, a selection extent is displayed with
handles for moving and resizing. Controls can be cut or copied to the clip-
board and pasted into the current Model or into another Model opened in
the same editing session. They can be duplicated with a Ctrl-drag opera-
tion and they can be copied to the Scratch Palette and from there used in
the current Model or subsequent Models in the same editing session. Con-
trols can also be selected and grouped along with other SL-GMS objects in
the Model. They can be used in SL-GMS SubModels.

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide A-2


Index
Symbols Available Palettes Window...............5-44
Available Submodels option.............5-48
".dat" files................................4-12, 6-52
graph
viewing......................................... 5-5
adding to Model....................6-21
".gmsdrawrc" file ................3-20, 6-4, 6-7
Available Submodels window
".m1" files
example......................................6-16
about.......................................... 5-10
graph
number of objects in .................. 5-11
adding to Model....................6-21
"_SCRATCH_" Palette window........ 5-13
"colordef.dat" file................................ 6-8 B
"fontdef.dat" file.................................. 6-5
Back of All option .............................5-16
creating in Windows..................... 6-6
background object
maximum number of fonts ........... 6-7
changing........................... 3-27, 6-12
"gmsl10n.txt" file ................................ 6-7
color of ............................. 3-27, 6-12
A detectability ...................... 3-27, 6-12
in SubModel ...............................6-15
action keyword, definition .................. 4-2
setting size of Model ........ 6-11, 6-39
Active Working View ........................ 5-21
batcherase flag....................... 3-30, 5-31
raising window to front ............... 5-21
Blinking Selection Handles option....5-43
Active X control
Buttons Palette
editing
displaying ....... 5-48, 6-32, 6-35, 6-47
behavior in gmsdraw_mfc ......A-2
By Name option................................5-18
selecting.......................................A-1
By Properties option.........................5-18
testing ..........................................A-2
By Selection option ..........................5-16
Add Border button............................ 5-11
Add Init Graphics button .................. 5-12 C
Align option ...................................... 5-13
c1_buttons Palette ........ 6-32, 6-35, 6-47
alignment of Text ............................. 3-15
c1_scales Palette .............................6-30
default ........................................ 3-16
c1_txtflds Palette.................... 6-27, 6-44
All option .......................................... 5-17
displaying Text ...........................6-17
animation
Cancel button ...................................5-12
Polygon.............................3-31, 5-31
Center Mode ......................................1-9
Polyline .............................3-31, 5-31
Change Directory option ....................5-4
Apply command
Circle Tool ..........................................2-3
Dialog Window ........................... 1-17
Clear Reference Point option ...........5-50
Apply Transform option.................... 5-26
Close command
loading/display of Model
Dialog Window ...........................1-17
optimizing............................. 6-49
Close option .......................................5-4
attributes, Text ................................. 3-14
color
Available Palettes option ........5-44, 5-48
"colordef.dat" file ..........................6-8

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide i


Index
definitions default
setting .................................... 6-8 "colordef.dat" file ..........................6-8
grid ............................................. 5-39 "fontdef.dat" file ............................6-5
Color Lines button............................ 5-12 color definitions ............................6-8
command line options........................ 6-1 graphic properties ..... 3-9, 3-19, 3-21
Complex Fill Group option ............... 5-27 Model properties
configuration of SL-GMSDraw ......... 5-52 settings ....................... 3-31, 6-41
constrain text ................................... 3-19 Reference Point .........................5-50
Containers option....................5-48, 6-34 startup windows ...........................1-1
Containers Palette Text font definitions ......................6-5
displaying..........................5-48, 6-34 Default Graphic Properties window...3-3,
control objects 6-4
adding to Model default mode for transformations .......1-9
example ............................... 6-17 Delete option ....................................5-13
advantage of .............................. 6-10 Detect Off option ..............................5-26
Button Detect On option ..............................5-26
renaming variables............... 6-32 dialog boxes .....................................1-17
Containers Palette ..................... 6-34 creating with SL-GMS Model .....6-38
displaying text ............................ 6-16 sending data to application ........6-31
Radio Button group directory names
creating ................................ 6-33 non-printing characters ..............5-10
renaming variables display_expr parameter. 6-28, 6-30, 6-44
example ............................... 6-18 example......................................6-45
resizing ...................................... 5-43 Divisions button................................5-39
sending message to State doublebuffer flag .................... 3-31, 5-31
renaming variables............... 6-24 Double-clicking left mouse button ....2-18
using to switch Models............... 6-32 Drag Objects option .........................5-43
Controls option................................. 5-48 dynamic descriptions
Controls Palette definition.......................................4-2
displaying................................... 5-48 Dynamic Properties......................4-2
Copies field ...................................... 5-12 example.............................. 4-2, 6-12
Copy option...................................... 5-13 stext keyword
Copy Tool ........................................ 2-12 example................................6-19
Create Single Objects option ........... 5-42 dynamic expression
Create Tool panel ............................ 6-16 definition.......................................4-2
Cut option ........................................ 5-13 Dynamic Property Window
example......................................6-13
D dynamics
data sets, graphing .......................... 6-20 adding to object................ 5-35, 6-12
data, sending to application ............. 6-27 previewing ..................................5-35

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide ii


Index
editing data file..................... 5-35 setting style and pattern ...............3-6
Dynamics Pull-Down Menu....5-35, 6-37, Fill graphic properties.........................3-5
6-53 Fill Group option..................... 5-25, 5-27
adding dynamics to object ......... 6-13 Fill Group Submenu .........................5-27
renaming variables .................... 6-14 Filled Circle Tool ................................2-3
dynamics, previewing ...................... 6-52 Filled Closed Spline Tool ...................2-2
dynarray flag ...........................3-31, 5-31 Filled Polygon Tool.............................2-3
DynProp........................................... 6-12 Filled Rectangle Tool .........................2-3
specifying in SL-GMSDraw .......... 4-2 Fit Width setting ...............................3-19
Flags option............................ 5-28, 5-30
E font definitions ....................................6-5
edge (Line) style ................................ 3-9 maximum number ........................6-7
no edge font index, of Text...............................6-5
optimize display of Model..... 6-50 fontdef program (Windows)................6-6
valid style numbers .................... 3-10 Front of All option .............................5-16
Edge graphic properties..................... 3-9 fstyle attribute.....................................3-8
Edit Data File option ........................ 5-35
example ..................................... 6-52
G
Edit Data File window .............4-12, 6-52 GISMOs
Edit Pull-Down Menu ..............5-13, 5-16 definition.....................................6-10
editor set-up, saving .......................... 6-4 sending data to application ........6-31
efficiency in SL-GMS ..............3-10, 5-26 sending State message..............6-26
Text.............................................. 2-6 GMS Control Resize Flag option......5-43
estyle attribute ................................... 3-9
valid parameters ........................ 3-10
gmsA
ewidth attribute .................................. 3-9 gmsAddUserFctn( ) ..........................6-27
Exit option .......................................... 5-5
Export option...............................5-4, 5-5
gmsD
expressions gmsdraw_mfc............................. 6-1, A-1
in dynamic descriptions ............... 4-2 gmsdraw_xm......................................6-1
extent, selection..........................1-9, 2-9
gmsL
F gmsl10n.txt.........................................6-7
-f command line option ...................... 6-1
file names
gmsZ
length of ....................................... 5-5 Grabber Tool ....................................2-13
valid characters............................ 5-5 Graphic option..................................5-28
File Pull-Down Menu..........5-3, 6-9, 6-39 "Text" view, displaying .................6-4
fill graphing data sets............................6-20
direction ....................................... 3-6 Graphs

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide iii


Index
adding to Model ......................... 6-20 Insert Object dialog
renaming variables .................... 6-21 embedded client item
grid creating.................................3-31
color ........................................... 5-39 Invert option .....................................5-17
definition .................................... 5-38
divisions ..................................... 5-39
K
offset .......................................... 5-39 Keyboard Move Delta option............5-41
preferences
setting up ............................... 6-3
L
size ............................................ 5-38 Landscape mode..............................5-12
valid entry............................. 5-38 Line
styles.......................................... 5-39 appearance ................................3-11
turning on/off.............................. 5-39 Tool ..............................................2-2
use for Model design ................... 6-9 valid style number ......................3-10
Grid On button ................................. 5-39
Grid Options option...................5-36, 6-3
M
Grid Options window........................ 5-38 m1m2 utility ......................................6-51
Grid Size checkbox.......................... 5-38 M2 filer
Group optimize load/display of Model ...6-50
create ......................................... 5-24 Marker
definition .................................... 5-24 changing style and color ............3-21
destroy ....................................... 5-24 Marker graphic properties ................3-21
saving properties ....................... 5-25 Marker Tool ........................................2-6
single object............................... 5-24 maximum number of fonts..................6-7
Group option .................................... 5-25 menu functions by right
mouse button .............................2-18
H Menus
Help Pull-Down Menu ...................... 5-52 Dynamics ...................................5-35
Horizontal option.............................. 5-17 Edit .............................................5-13
File ...............................................5-3
I Help............................................5-52
-i command line option....................... 6-1 Model .........................................5-23
Import option...................................... 5-4 Object.........................................5-24
Import Image................................ 5-6 Options.......................................5-36
Information option ............................ 5-28 Palettes ......................................5-44
Initial W.C. to Pixel Scale option...... 5-42 Point ...........................................5-49
Insert Active X Control View ...........................................5-21
option ...........................................A-1 Merge option ......................................5-4
Insert Active X Control dialog ............A-1 Mirror option .....................................5-13
Insert Active X Control option .......... 5-14 Mirror Submenu .................................5-4

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide iv


Index
Model Dynamic Properties window.. 3-30 size, setting .... 3-26, 6-11, 6-15, 6-39
Model Flags window ........................ 3-30 testing
Model Properties window........3-26, 3-29 with Preview .........................6-52
background object ..................... 6-11 with SL-GMSRun..................6-54
description ................................. 3-26 UserData string ..........................3-28
Model size, setting ............6-11, 6-40 valid names ..................................5-5
Model Pull-Down Menu...........5-23, 6-39 mouse
Model size, setting ..................... 6-11 display windows
Model UserData window.................. 3-28 by double-clicking...........2-18
Model UserWord window................. 3-29 move delay.................................5-41
Model(s) move distance ............................5-41
adding menu .............................. 6-23 right button context menus.........2-18
background object Move Delay option ...........................5-41
changing .....................3-27, 6-12 Move Dist option ..............................5-41
detectability .................3-27, 6-12 Move option......................................5-26
color Move window ...................................5-33
background .................3-27, 6-12 Move X field .....................................5-12
control objects, using to switch .. 6-32 Move Y field .....................................5-12
default size................................. 6-12 msg_statename parameter ..............6-24
files msg_strmsg parameter ....................6-24
binary ................................... 5-10 mstyle attribute.................................3-21
name length ........................... 5-5
opening ................................ 5-10
N
valid names............................ 5-5 Name option.....................................5-28
grid New option ............................... 5-4, 6-39
laying out on........................... 6-9 New with Background option... 5-4, 6-11,
loading/display 6-39
optimizing....................5-31, 6-49 new_model_window message .........6-32
M2 filer ....................................... 6-50 new_model_window method............6-25
merging...................................... 5-10 noerase flag ........................... 3-30, 5-31
object(s) non-printing letters
displaying list of.................... 5-27 in directory names......................5-10
maximum number of ............ 5-11
opening ...................................... 5-10
O
parts, changing order of............. 5-16 -o command line option......................6-2
Points, selecting......................... 5-50 Object Dynamic Properties option.....4-5,
properties, setting ....3-26, 3-31, 5-23 5-35, 6-13
saving .................................5-4, 5-10 Object Dynamic Properties window ...4-5
as ".m1" file .......................... 5-10 Object Flags window ........................5-30
valid names............................ 5-5 Object Information window

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide v


Index
display by double-clicking .......... 2-18 Reference Point .........................5-50
Object List option ............................. 5-27 renaming variables.......................4-9
Object Name window..............3-23, 5-29 rotating ............................. 5-27, 5-34
Object Pull-Down Menu ...5-24, 6-4, 6-49 scaling ............ 2-10, 5-17, 5-27, 5-33
Object Renamed Variables option .... 4-9, select by properties ....................5-19
5-35, 6-14 selected objects, reordering .......5-16
example ..................................... 6-37 selecting .....................................5-17
Object Renamed Variables window... 4-9 transformation of ........................2-10
display by double-clicking .......... 2-18 userdata .....................................3-24
Object Userdata window.........3-24, 5-30 userword ....................................3-25
Object Userword window ........3-25, 5-30 visibility on/off.............................5-25
object(s) Offset button.....................................5-39
appearance while dragging........ 5-43 Open .g File window...........................5-5
center of..................................... 5-51 Open .m1 File option..........................5-4
control, resizing.......................... 5-43 Option Menu Control Object.............6-23
creating single/multiple .............. 5-42 Options Pull-Down Menu . 5-36, 6-2, 6-3,
delete Point................................ 2-11 6-41
detectability, setting ................... 5-26 editor set-up
display list of, in current Model .. 5-27 saving .....................................6-4
dynamics Order option .....................................5-13
adding .................................. 5-35 Order Submenu................................5-16
editing .................................... 4-5 output
flags ..................................3-30, 5-31 internationalization .......................6-7
graphical, creating ....................... 2-1 Output Orientation............................5-12
grouping..................................... 5-24
mirroring....................................... 5-4
P
move Point................................. 2-11 Palette
moving ..............................5-26, 5-33 Buttons .................... 6-32, 6-35, 6-47
in back of all ......................... 5-16 Containers........................ 5-48, 6-34
in front of all ......................... 5-16 Controls......................................5-48
naming ..............................3-23, 5-29 Scales .............................. 5-48, 6-30
order Scrollbars ...................................5-48
changing, in part List............ 5-16 Text Fields...... 5-48, 6-17, 6-27, 6-44
in Model ............................... 5-16 Palettes Pull-Down Menu5-44, 6-34, 6-35
passing control objects ............................6-17
integer to application............ 3-25 graph
string to application .............. 3-24 adding to Model....................6-21
properties Option Menu, adding..................6-23
displaying ............................. 5-28 Pan...................................................2-13
setting .................................. 5-28 Pan percent, setting .........................5-22

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide vi


Index
Pan Tool .......................................... 2-13 Properties Submenu ........................5-28
panel pts relative flag ....................... 3-31, 5-31
text alignment ...................3-15, 3-16 pts symmetric flag .................. 3-31, 5-31
part List, Model ................................ 5-16 Push Button Control Object
Paste option..................................... 5-13 example......................................6-47
Pick Aperture option ........................ 5-41 renaming variables
Point example................................6-47
in object
deleting ................................ 2-11
Q
moving ................................. 2-11 quick keys ........................................2-17
Reference Point
resetting to default ............... 5-50
R
selecting new point .............. 5-50 Radio Button group ..........................6-33
Point Mode......................................... 1-9 Raise option .....................................5-21
Point Pull-Down Menu ..................... 5-49 Rectangle Tool ...................................2-3
Polygon Tool...................................... 2-3 Redo option......................................5-13
Polyline Tool ...................................... 2-2 Reference Mode.................................1-9
Portrait mode ................................... 5-12 Reference Point ...............................2-10
PostScript option (Windows).............. 6-9 changing.....................................5-50
precision, Text ................................... 6-5 default ........................................5-50
Preview Options option.................... 5-35 resetting to default......................5-50
testing setting on Select List ..................5-50
Active X controls ....................A-2 showing ......................................5-49
Model ..........................4-12, 6-53 Refresh option..................................5-21
Preview Options window.........4-13, 6-53 Remove Transform option................5-26
previewing, dynamics ...................... 6-52 repair flag .........................................5-32
Print Background button .................. 5-12 Reset option .....................................5-21
Print button ...................................... 5-12 Reset View Tool ...............................2-15
Print Dialog window Rotate field .......................................5-12
model design Rotate option....................................5-27
template for ............................ 6-9 Rotate window..................................5-34
options rotating
description of........................ 5-11 precision 0 fonts .........................3-20
Print Grid button............................... 5-12 TrueType fonts ...........................3-20
Print HiLite button ............................ 5-12 rotating precision 0 fonts ....................6-7
Print option (Motif) ......................5-5, 6-9
Print option (Windows)....................... 5-5
S
Print to disk button ........................... 5-12 Same option .....................................5-17
Printer Name field ............................ 5-11 Save As option ...................................5-4
Properties option.....................5-25, 6-39 Save option ........................................5-4

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide vii


Index
Save Resources option.................... 5-37 selection handles
editor set-up, setting .................... 6-4 blinking .......................................5-43
Scale % field .................................... 5-12 sending data to application
Scale Control Object integer ........................................6-31
example ..................................... 6-45 string ..........................................6-31
renaming variables Set Reference Point option ..............5-50
example ............................... 6-45 uses............................................2-10
sending data to application ........ 6-30 set_variable parameter .......... 6-28, 6-30
Scale option ..................................... 5-27 example......................................6-45
Scale Relative option ....................... 5-14 Setting Views ...................................2-16
Scale window................................... 5-33 Show Reference Points option.........5-49
Scales option ................................... 5-48 single object create ..........................5-42
Scales Palette Size Window to Model option. 5-42, 6-42
displaying..........................5-48, 6-30 SL-GMSDraw
scaling objects ................................. 2-10 command line options ..................6-1
relative ....................................... 5-17 configuration...............................5-52
Scratch Palette ................................ 5-13 default startup windows................1-1
Scrollbars option .............................. 5-48 graphic editor ...............................2-1
Scrollbars Palette interface preferences
displaying................................... 5-48 setting........................... 5-36, 6-2
Sector Three Point Tool ................ 2-4 internationalized output ................6-7
Sector Tool ........................................ 2-4 invoking ........................................6-1
select preferences and set-up
all objects................................... 5-17 saving .....................................6-4
all objects not on Select List ...... 5-17 purpose ........................................1-1
by name of object ...................... 5-18 quick keys ..................................2-17
by property................................. 5-18 setting
invert .......................................... 5-17 color definitions ......................6-8
objects Text font definitions ................6-4
alternative methods.............. 5-17 setting up......................................6-2
by Extent Rectangle............. 5-51 strings, integers, real
Reference Point ......................... 5-49 displaying .............................6-16
Select by Extent icon ......................... 1-9 version........................................5-52
Select by Properties window............ 5-19 SL-GMSRun
Select List testing Models ............................6-54
invert .......................................... 5-17 Snap and Point Modes option ..........5-36
manipulation .............................. 5-13 Snap and Point Modes window........5-39
mirror objects ............................... 5-4 Solid Lines button.............................5-39
Select option .................................... 5-14 Special Regroup option....................5-25
selection extent...........................1-9, 2-9 Special Ungroup option....................5-25

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide viii


Index
Spline Tool......................................... 2-2 Text Rectangle .............................2-7
StandardTopState............................ 6-25 workstation class..........................6-5
startup windows ................................. 1-1 Text Alignment Grid .........................3-15
State messages Text Display Box Control Object
sending ...................................... 6-24 example......................................6-44
Status Window renaming variables.....................6-44
displaying................................... 5-21 example................................6-18
Status Window option ...................... 5-21 Text Display Control Object
stext keyword renaming variables
dynamic description ................... 6-19 example................................6-18
STRING_RESOURCE key ................ 6-7 Text Edit Box Control Object
Style Number, line ........................... 3-11 sending data to application ........6-27
styles of Line/Edge .......................... 3-10 Text Fields option................... 5-48, 6-17
SubModel(s) Text Fields Palette
background object ..................... 6-15 displaying ................ 5-48, 6-27, 6-44
building to scale ......................... 6-50 Text font definitions ............................6-5
placing into Model...................... 6-15 Text graphic properties ....................3-14
Reference Point ......................... 6-14 Text List Box Control Object
renaming variables .............4-9, 6-14 sending data to application ........6-28
selecting..................................... 5-48 Text option .......................................5-28
setting size of............................. 6-15 Text Rectangle .................................3-19
SUBMODS subdirectory .................. 6-16 clip text .......................................3-19
Text Rectangle object
T adding dynamics ........................6-19
Text Text Rectangle Tool ................. 2-7, 6-16
alignment ................................... 3-15 text rotation
default .................................. 3-16 enabling.............................. 3-20, 6-7
attributes .................................... 3-14 Text Tool ............................................2-7
displaying To Scratch Palette option.................5-13
dynamic................................ 6-16 Tool Tips option................................5-37
static..................................... 6-16 Tools option......................................5-36
efficiency...................................... 2-6 transformation(s)
entry, of multiple lines .................. 2-7 applying......................................5-26
fit within text rectangle ............... 3-19 example................................6-49
font index ..................................... 6-5 options........................................5-51
object removing ....................................5-26
attributes ................................ 2-8 TrueType fonts
creation .................................. 2-6 enabling rotation................. 3-20, 6-7
lines in.................................... 2-7
precision ...................................... 6-5

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide ix


Index
U View Preset Tool ..............................2-16
View Pull-Down Menu .............. 5-21, 6-3
-u command line option ..................... 6-2
Visibility On/Off options ....................5-25
Undo option ..................................... 5-13
Undo/Redo Stack Size option.......... 5-41 W
UnGroup option ............................... 5-25
Wedge Tool........................................2-5
User Preferences option .........5-37, 6-41
window
User Preferences window................ 5-41
Active Working View, raising......5-21
setting size of Model .................. 6-41
Available Palettes.......................5-44
UserData.................................3-24, 5-28
Object Name ..............................3-23
definition .................................... 3-24
Object Userdata .........................3-24
length of ..................................... 3-24
Object Userword ........................3-25
sending data to application ........ 6-31
startup ..........................................1-1
UserWord......................................... 5-28
WinModState....................................6-24
definition .................................... 3-25
workstation class
sending data to application ........ 6-31
Text ..............................................6-5
V Z
value parameter............................... 6-25
zoom
value_valtype parameter ................. 6-25
by extent.....................................2-14
Variable Reference
display zoom factor ....................5-22
definition ...................................... 4-2
in continuous ..............................2-14
variables
in once........................................2-14
renaming ...........................5-35, 6-14
out ..............................................2-15
version
out continuous............................2-15
SL-GMSDraw............................. 5-52
resetting View.............................2-15
Vertical option .................................. 5-17
set boundary percent .................5-22
View
set limit .......................................5-22
options
set percent .................................5-22
setting ...........................5-21, 6-3
Zoom In Continuous Tool.................2-14
preset
Zoom In OnceTool ...........................2-14
saving................................... 5-22
Zoom Out Continuous Tool ..............2-15
resetting ............................2-15, 5-21
Zoom Out Once Tool........................2-15
set coordinates .......................... 5-22
Zoom Rect Tool................................2-14
Tools .......................................... 2-13
zooming ............................2-14, 2-15
View Crop Mode option ................... 5-42
View GML File option......................... 5-5
View Options option........................... 6-3
View Options window................5-21, 6-3

Version 6.2a- 26 May 2006 SL-GMS Draw Users Guide x

Potrebbero piacerti anche