sl-draw2 referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 sl-draw2 reference...

292
SL-DRAW2 REFERENCE SL Corporation OBJECT-ORIENTED GRAPHICAL MODELING SYSTEM Version 6.0 — 21 December 1998 Part Number DRW2-981221

Upload: others

Post on 28-Feb-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 REFERENCE

SL Corporation

OBJECT-ORIENTED

GRAPHICAL MODELING SYSTEM

Version 6.0 — 21 December 1998

Part Number DRW2-981221

Page 2: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

5/3/00 v6.0

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.

SL-DRAW2 Reference

Copyright © 1998by Sherrill-Lubinski Corporation

v6.0 21 December 1998

All rights reserved. No part of this manual may be reproduced, in any form or by any means, without written permission from Sherrill-Lubinski Corporation.

All trademarks and registered trademarks mentioned in this document are property of their respective companies.

RESTRICTED RIGHTS LEGEND

Notwithstanding any agreement that may pertain to these materials, use, duplication, or disclosure by the Government is subject to restrictions as set forth in the Rights in Technical Data and Computer Software clause at FAR 52.227-19(c)(2) or of DFARS 252.227-7013(c)(1)(ii).

SHERRILL-LUBINSKI CORPORATION240 Tamal Vista Blvd., Suite 110

Corte Madera, CA 94925

Customer Support

Voice: 800-548-6881FAX: 415-927-7738email: [email protected]

Page 3: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Table of Contents

SL-DRAW2 Reference

1. Using SL-DRAW2 to Build ModelsIntroduction ..................................................................................... 1-1Invoking ........................................................................................... 1-5Command-line options ..................................................................... 1-6Editor layout .................................................................................... 1-8Exiting SL-DRAW2 ............................................................................ 1-14The SL-DRAW2 Library ..................................................................... 1-15Relinking SL-DRAW2 ........................................................................ 1-15

2. SL-DRAW2 ReferenceOverview.......................................................................................... 2-1Object Create Control Panel............................................................. 2-2Object Change Control Panel ........................................................... 2-37Status Control Panel ......................................................................... 2-65Special Buttons ................................................................................ 2-70Attribute and SubModel Control Panels ........................................... 2-72Pull-Down Menus............................................................................. 2-82SL-DRAW2 configuration files .......................................................... 2-147

3. Using Enter DynIntroduction to SL-GMS screen dynamics ........................................ 3-1Dynamic properties of objects ......................................................... 3-2Enter Dyn ......................................................................................... 3-3The General Interface ...................................................................... 3-4The “Enter Dyn” Interface Window ................................................. 3-6File formats ...................................................................................... 3-22Conditional Dynamics ...................................................................... 3-25Interface by categories ..................................................................... 3-25Examples of Conditional Dynamics ................................................. 3-28Uncontidtional Dynamics ................................................................. 3-37Interface by categories ..................................................................... 3-37Examples of Unconditional Dynamics ............................................. 3-39Input Dynamics ................................................................................ 3-43Interface ........................................................................................... 3-43Examples of Input Dynamics ........................................................... 3-45General Example — Aricraft Display ............................................... 3-47Start/Stop Button Group Dynamics .................................................. 3-48Aircraft Group icon .......................................................................... 3-56

Index

SL-DRAW2 Reference page iv6.0 21 December 1998

Page 4: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

v6.0 21 December 1998page ii SL-DRAW2 Reference

Page 5: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

List of Figures

Number Title Page

Figure 1-1. The SL-DRAW2 graphical editor with "cogen" as the current Model and with the "Move" button selected .........................1-1

Figure 1-2. The SL-DRAW2 editor with the "PALETTE" window active ..........1-4

Figure 1-3. The SL-DRAW2 editor main window .............................................1-8

Figure 1-4. Attribute and SubModel Control Panels ......................................1-11

Figure 1-5 The "Attribute Control Panel" selection buttons..........................1-12

Figure 1-6. The Pull-down Menu Bar .............................................................1-12

Figure 1-7. Special buttons ..............................................................................1-13

Figure 2-1. Reference to descriptions of SL-DRAW2 editor options..............................................................................................2-1

Figure 2-2. The "Color Attribute Control Panel" is used to change Text color .....................................................................................2-14

Figure 2-3. The "Text Attribute Control Panel" is used to change all Text attributes except for color ............................................................2-14

Figure 2-4. The "Text Alignment Grid" allows for setting the offset of Text relative to the Point chosen for positioning ................................2-15

Figure 2-5. The "Text Attribute Control Panel"...............................................2-19

Figure 2-6. Text path arrows ...........................................................................2-20

Figure 2-7. "Identify" option Box A ................................................................2-29

Figure 2-8. "Identify" option Box B ................................................................2-29

Figure 2-9. The "Set Flags" Box.......................................................................2-38

Figure 2-10. The "Enter Data:" Box for entering UserData..............................2-40

Figure 2-11. The "Enter Object Name:" Box.....................................................2-42

Figure 2-12. Special buttons ..............................................................................2-70

Figure 2-13. "Attribute" and "SubModel Control Panels" .................................2-72

Figure 2-14. The Attribute Control Panels selection buttons...........................2-72

Figure 2-15. The "Color Attribute Control Panel".............................................2-73

Figure 2-16. The "Edge Attribute Control Panel" .............................................2-75

Figure 2-17. The fill direction of objects ..........................................................2-77

Figure 2-18. The "Marker Attribute Control Panel" ..........................................2-77

Figure 2-19. The "Bitmap Attribute Control Panel" ..........................................2-78

SL-DRAW2 Reference page iiiv6.0 21 December 1998

Page 6: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Figure 2-20. The effect of the "Complement" Bitmap Write Mode .................2-79

Figure 2-21. The effect of the “And” Bitmap Write Mode ...............................2-79

Figure 2-22. The effect of the “Or” Bitmap Write Mode..................................2-80

Figure 2-23. The effect of the “Xor” Bitmap Write Mode ................................2-80

Figure 2-24. The "Text Attribute Control Panel"...............................................2-81

Figure 2-25. SL-DRAW2 Pull-Down Menus.......................................................2-82

Figure 2-26. Change Directory Scrolling Selection Box...................................2-83

Figure 2-27. The PostScript option Dialog Box A............................................2-86

Figure 2-28. The PostScript option Dialog Box B............................................2-86

Figure 2-29. The PostScript option Dialog Box C............................................2-86

Figure 2-30. Reference Grid for Pan .................................................................2-97

Figure 2-31. Reference Grid moved into position............................................2-98

Figure 2-32. Solid Reference Grid moved into position ..................................2-98

Figure 2-33. The "Working View" after panning ..............................................2-99

Figure 2-34. "Get Model" Scrolling Selection Box..........................................2-105

Figure 2-35. The default "SubModel Control Panel" — 20 boxes for SubModel icons ............................................................................................2-109

Figure 2-36. The "SubModel Control Panel" displayed when SL-DRAW2 is invoked with the "-x" option — 48 boxes for SubModel icons...........................................................................2-109

Figure 2-37. The "PALETTE SELECTION" and "PALETTE" windows of SL-DRAW2....................................................................................2-122

Figure 3-1. An animated aircraft following its visible Polygon “path” ....3-1

Figure 3-2. A sample DynProp containing two dynamic descriptions ...........3-2

Figure 3-3. The “Enter Dyn” Interface Window ...............................................3-3

Figure 3-1. “Enter Dyn” on the “Dyn” Pull-Down Menu .........................3-5

Figure 3-2. Four panels of the “Enter Dyn” Interface Window.......................3-6

Figure 3-3. Push-Buttons on Panel A................................................................3-7

Figure 3-4. Warning message ............................................................................3-8

Figure 3-5. Push-Buttons on Panel B................................................................3-9

Figure 3-6. Panel C of the “Enter Dyn” Interface Window............................3-11

Figure 3-7. Dynamics entry fields on Panel D ...............................................3-12

v6.0 21 December 1998page iv SL-DRAW2 Reference

Page 7: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Figure 3-8. List of variables available for pasting...........................................3-15

Figure 3-9. Lists of conditions and actions that can be pasted .....................3-16

Figure 3-10. Cataloged functions that can be pasted.......................................3-18

Figure 3-11. Parameter Prompt and Parameter Substitution fields .................3-19

Figure 3-12. Clicking down arrow icon to display second parameter prompt .........................................................................3-19

Figure 3-13. Constants that can be pasted .......................................................3-20

Figure 3-1. Conditional dynamics with no arguments ........................... 3-25

Figure 3-2. Conditional dynamics ...................................................................3-26

Figure 3-3. Action line for an uncataloged function ......................................3-27

Figure 3-4. Action line for a cataloged function ............................................3-28

Figure 3-5. Conditional dynamics: Action verb with no arguments..............3-30

Figure 3-6. Conditional dynamics: Action Verb with single argument..........3-32

Figure 3-7. Conditional call dynamics with four arguments..........................3-33

Figure 3-1. View of Unconditional text entry field ............................... 3-38

Figure 3-2. Action line for uncataloged function ...........................................3-38

Figure 3-3. Parameter Substitution fields ........................................................3-39

Figure 3-4. Unconditional dynamics: Action Verb and one argument..........3-40

Figure 3-5. Unconditional dynamics: Action Verb and two arguments ........3-42

Figure 3-1. View of Input text entry field ............................................. 3-43

Figure 3-2. Example Input dynamics with an uncataloged function ............3-45

Figure 3-3. Example Input dynamics with a cataloged function...................3-46

Figure 3-1. The aircraft Model before attachment of dynamics ............ 3-47

Figure 3-2. Start/Stop Input dynamics ............................................................3-49

Figure 3-3. Start/Stop button Unconditional dynamics..................................3-49

Figure 3-4. “stext” dynamics for speed, heading, and range.........................3-54

Figure 3-5. Aircraft icon...................................................................................3-56

Figure 3-6. Components of the Aircraft Icon..................................................3-56

Figure 3-7. Dynamics for the Range Circle.....................................................3-59

Figure 3-8. Dynamics for the Missile Range arc segment..............................3-63

Figure 3-9. Dynamics for the Air Speed indicator..........................................3-66

SL-DRAW2 Reference page vv6.0 21 December 1998

Page 8: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Figure 3-10. Aircraft icon dynamics ..................................................................3-67

Figure 3-11. “PREVIEW” window......................................................................3-69

Figure 3-12. “PREVIEW EDITOR” window.......................................................3-69

Figure 3-13. Preview control file: “aircraft.dat” ................................................3-71

Figure 3-14. Preview interface window............................................................3-72

v6.0 21 December 1998page vi SL-DRAW2 Reference

Page 9: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

v6.0 21 December

SL-DRAW2 Reference

How to use this manual

This manual provides information concerning the SL-DRAW2 editor. This manual should be consulted for information once the reader is familiar with the material presented in the SL-GMS Basic Tutorial and the SL-GMS Advanced Tutorial.

Terminology clarification

The steps for the examples throughout this manual often state,

Clicking a button, unless otherwise specified, refers to pressing and releasing the left mouse button. Clicking and choosing an option from a pull-down menu in the SL-DRAW2 editor refers to dragging — pressing the left mouse button on the pull-down menu name, moving the mouse over the popped-up menu, keeping the left button depressed, and then releasing the left mouse button on the desired option.

Special keys are enclosed in angle-brackets. For example,

<RETURN>

specifies entry (pressing) of the Return key; it does not specify entry of the characters "<", "R", "E", "T", "U", "R", "N", and ">".

Other programming languages

Following standard practices in software engineering, the examples in this book are presented in C, which has become the language of choice for tutorial examples in the literature. The C examples are still applicable when the functions are called in a different programming language.

Click the ... button ... Click the ... Pull-Down orMenu and choose ...

SL-DRAW2 Reference 1 1998

Page 10: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

The <non-C language> Interface Reference manuals listed in the SL-GMS Documentation table below provide information about developing applications with SL-GMS in languages otherthan C.

Where to find information about SL-GMS

Many useful documents are provided with SL-GMS:

SL-GMS Documentation

Document Title Information ProvidedDistribution

Notes

<platform name> Installation Notes

how to install SL-GMS onto the host system; platform-specific notes (e.g., special options)

supplied with each Development license, and if necessary, with each Run-time license

SL-GMS Reference Manualreference and background information for SL-GMS

supplied with each Development license

SL-GMS Function Reference Manualsyntax and description ofC library functions provided with SL-GMS

SL-DRAW2 Quick Reference Cardsingle-page locator of SL-DRAW2 options

SL-DRAW Quick Reference Cardsingle-page locator of SL-DRAW options

SL-GMS Basic Tutorial

orientation and overview of SL-GMS; how to use SL-DRAW2 to construct Models; guide to the on-line examples

SL-GMS Advanced Tutorial

how to develop applications using SL-GMS; four sample applications; advanced design considerations

Using Enter Dyn

description of enhanced graphical user interface for entering dynamics on SL-GMS objects

v6.0 21 December 19982 SL-DRAW2 Reference

Page 11: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-GMS Release Notes

new features, improvements, and bug fixes not necessarily included in the latest releases of other SL-GMS manuals

supplied with each Development license

SL-GMS PAL (Problems, Anomalies, and Limitations)

latest technical information, solutions, and Quality Assurance and Release Control (QARC) test findings to help users of SL-GMS

VAX Ada Interface Reference complete guide to coding an application in a language other than C; syntax listing of SL-GMS functions in the non-C language

optionally supplied with each Development license

VAX FORTRAN Interface Reference

VAX Pascal Interface Reference

SGI Verdix Ada Interface Reference

SUN Verdix Ada Interface Reference

ANSI-C (C++) Interface Reference

SL-GMS Upgrade Notes

procedure for upgrading applications built using an earlier version of SL-GMS to the current version of SL-GMS

SL-GMS Documentation (continued)

Document Title Information ProvidedDistribution

Notes

SL-DRAW2 Reference 3v6.0 21 December 1998

Page 12: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed
Page 13: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Chapter

v6

Ch

ap

ter 1

1

.0 21 December

Using SL-DRAW2 to Build Models

Introduction

SL-DRAW2 is a graphical modeling editor that allows developers to create custom screen objects, specify dynamic behaviors for those objects, and preview those behaviors with simulated data, all without leaving the drawing tool. Not limited to "canned" graphs or icons, this flexible tool has many features including:

• Palettes

• gravity-snap-point congruence

• snap-to-grid

• variable grid spacing and granularity

• backup and undo functions

• animation of dynamic data

• pan and zoom utilities

• multiple selection of objects (a Select List)

Figure 1-1. The SL-DRAW2 graphical editor with "cogen" as the current Model and with the "Move" button selected

73.5546.9

10.0731.6

52.9519.0

28.6946.4

42.6493.8

70.2550.0

446.3880.4 0.658.9

273.0983.0360.8

81.785.528.9

998.5

8.8

63.7

966.7

III P4 P3IV

I II P1 P2

11Cogeneration Monitoring System

MWHeat loss

OutputPower

Exchng

Input

N/Hr

Pressure kg/cm

Reading %R Values

1 2 3 4 5 6

%%%

682.5Elec Power

Generator29.85

ReservePump

724.7

Energy Flow Temp

N/Hr lit/mn ’F

Steam

Primary

Return

Heat TransferPrimarySecondaryExchangerReserve

PowerOutputDemandChange

CapacitiesPowerTransferReserve

Energy

N/Hr

Flow

lit/mn

Temp

’F

lit/min

ReserveFlow

ReserveCap

927.7200.0 900.2 129.0

418.1 581.3 78.0143.9

lit/mnTemp

’F

Return

Cycle

764.1

01

12

33

00

22

43

0 1 2 3 4 5 6 78 9 10 11 12 13 14 1516 17 18 19 20 21 22 2324 25 26 27 28 29 30 31

Fill

Line

Text

COLORS

Backgr

Edge

Text

Bitm

Mark

01

12

33

00

22

43

0 1 2 3 4 5 6 78 9 10 11 12 13 14 1516 17 18 19 20 21 22 2324 25 26 27 28 29 30 31

Fill

Line

Text

COLORS

Backgr

Edge

Text

Bitm

Mark

ConvertOrderBitmapDyn PointGroupSubModModelSelectViewSystem Palette

%

cogen

Move

(11.490, 10.905)

Select: 1

Redraw

Backup Undo

* +

Identify Copy

Escape Enter . . .

DONE

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

DELETE

Grid: 2 X 2

Snap: OFF

CENTER

Const: OFF

Mode:

SL-DRAW2 5.3a

SL-DRAW2 Reference 1-1 1998

Page 14: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using SL-DRAW2 to Build ModelsC

ha

pte

r 1

A convenient menu-driven interface is the primary tool used to design and save Models.

Select List

The Select List permits Models and objects to be grouped and edited either separately or together. The defining Points for any object can be instantly recalled and made visible. In addition, Points may be selected, added, moved, or deleted from any Model to facilitate high-precision adjustments.

Windows

SL-DRAW2 makes extensive use of overlapping windows. All functions in SL-DRAW2 are implemented with SL-SMS. SL-SMS provides for multiple concurrent States in multiple Workstation/Windows. This enables SL-DRAW2 to display a separate window for different functions. For example, clicking the Get Model option of the Model Pull-Down Menu displays a Model selection scrollbox in the MODELS window. Clicking the Get Palette option of the Palette Pull-Down Menu displays a Palette selection scrollbox in the PALETTE SELECTION window. Each of these windows can be repositioned, closed, and opened at will.

DynProp (Dynamic Property)

Any graphical attribute which can be specified from SL-DRAW2 such as changing an object’s color, position, scale, rotation, and so on, are valid actions that can be placed into the Dynamic Property, or DynProp, attached to an object. At run time, the graphical attributes of objects change in response to changes in external data specified in the DynProp. A detailed description of dynamics specification is provided in The Dynamics chapter of the SL-GMS Reference Manual.

SubModel capability

SL-DRAW2 allows Models to be reused through instancing — Model Instances, also called Instances or SubModels, retain the dynamic properties of the original Model. The various Instances are differentiated from the original by renaming variables — the driving variable is renamed to another variable name. For example, a panel of gauges could be created to represent the same process variable coming from many different sites. A gauge Model would be created with dynamic specifications driven by the variable volts. The panel Model would then be created with a collection of gauge

v6.0 21 December 19981-2 SL-DRAW2 Reference

Page 15: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

IntroductionC

ha

pter 1

Model Instances. Each of the Instances would have the volts variable renamed to another name, say volts1, volts2, and so on.

More than one variable can drive an Instance. For example, the gauge Model could have its label driven by a label variable and its alarm thresholds driven by low_limit and high_limit. Further information is provided in Chapter 2 and the SL-GMS Basic Tutorial.

Palettes

Instances of several different Models may be placed together into a Palette, as shown in Figure 1-2. This Palette can be called up at any time and one or more of the pre-defined Model symbols can be selected to use as SubModel Instances in the construction of other complex Models.

The Get Palette ... option brings up the PALETTE SELECTION window and presents for selection all Models in the "/PALETTES" directories found in these paths:1

UNIX Systems

current directory<$GMS_HOME>/demo/draw2path specified by "-i" command line option

VAX/VMS Systems

current directorygms$home:[demo.draw2]path specified by "-i" command line option

NT Systems

current directory%$GMS_HOME%\demo\draw2path specified by "-i" command line option

Text fonts

When SL-DRAW2 is initialized, the "fontdef.dat" font configuration file is implemented. A default set of fonts is automatically available, but at the user’s option this file may

1. The "options.dat" configuration file, described in section, SL-DRAW2 configuration files on page 2-147 provides information about the configuration of this path structure.

SL-DRAW2 Reference 1-3v6.0 21 December 1998

Page 16: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using SL-DRAW2 to Build ModelsC

ha

pte

r 1

be configured to override the default font settings. The Default Fonts section of the Text chapter in the SL-GMS Reference provides further information about font availability and configuration.

SL-DRAW2 colors

A ColorDef utility provided in the demo directory allows up to 231 colors2 to be defined by interactively mixing red-green-blue components. Constituent hues can also be specified by direct number selection from a complete, related color chart, or by entering numeric values for constituents. The resulting color definitions are then held in a file, "colordef.dat".

Figure 1-2. The SL-DRAW2 editor with the "PALETTE" window active

2. The maximum number of colors is platform-dependent. Some systems allow 256 while others allow up to 65,536.

NODE NAME NODE NAMENODE NAME

NODE NAME

DISK LABEL

DISK LABEL

conobject11

DISK LABEL

SC 1

SC 1

SC 1

DISK LABEL

NODE NAME

01

12

33

00

22

43

0 1 2 3 4 5 6 78 9 10 11 12 13 14 15

16 17 18 19 20 21 22 2324 25 26 27 28 29 30 31

Fill

Line

Text

COLORS

Backgr

Edge

Text

Bitm

Mark

01

12

33

00

22

43

0 1 2 3 4 5 6 78 9 10 11 12 13 14 15

16 17 18 19 20 21 22 2324 25 26 27 28 29 30 31

Fill

Line

Text

COLORS

Backgr

Edge

Text

Bitm

Mark

ConvertOrderBitmapDynPointGroupSubModModelSelectViewSystem Palette

%

site_plan9

(45.678, 23.456)

Select: 0

Redraw

Backup Undo

* +

Identify Copy

Escape Enter . . .

DONE

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

DELETE

Grid: 2 X 2

Snap: OFF

CENTER

Const: OFF

Mode:

SL-DRAW2 5.3a

MSG

SC 1

DISK LABEL

NODE NAME

NAME

net_equip Palettes DonePalette:

PALETTE

v6.0 21 December 19981-4 SL-DRAW2 Reference

Page 17: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

InvokingC

ha

pter 1

Upon initialization, SL-DRAW2 reads 256 colors into its palette from this file. These colors are used to construct displays and are automatically read by SL-GMS application programs. The present ColorDef utility can also accept colors specified by hue-saturation-intensity (HSI).

SL-DRAW2 and SL-DRAW

SL-DRAW2 with its Motif-like interface is an enhanced version of the previous editor, SL-DRAW. SL-DRAW2 is the preferred version of the editor; however, many users still use SL-DRAW. The Japanese, Korean, and other Native Language versions use the SL-DRAW editor.

Invoking

The SL-DRAW2 program is invoked by typing its name, along with desired parameters after the system prompt. The SL-DRAW2 program name and the environment necessary for proper operation of SL-DRAW2 is system-dependent and is described in the Installation Notes.

SL-DRAW2 Reference 1-5v6.0 21 December 1998

Page 18: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using SL-DRAW2 to Build ModelsC

ha

pte

r 1

Command-line options

The following are valid command-line switches to the SL-DRAW2 program. Option key letters may be in either lower or upper case, as the SL-DRAW2 program makes no distinction between -i and -I, for example.

NOTE: Workstation options are also valid command-line options.

SL-DRAW2 Command-line Options

Option Description

-a<n> set mouse pick aperture to <n>/100

-cf disable concave fill (SGI-IRISGL only)

-demo demo mode; disable query for display of Change Directory, Model, Get, and Preview windows

-e expert mode; do not ask for confirmation

-i set library path for PALETTE SELECTION and SUBMODELS windows

-q set object pop off mode to clip (turns off raster)

-r set G_WS_EXPOSE_RECT to ON (SGI-IRISGL only)

-vp<path> set Model path — directory path that SL-DRAW2 uses to find its own Models: in Unix, path must end with "/" (e.g. draw2 -vp/u/gms/my_app/draw2/ )

-x use 48-box Model for SubModels (32 boxes to hold External SubModel icons and 16 boxes to hold Local SubModel icons)

- y set all Yes/No Boxes to default to Yes

<modelname> automatically load the named Model1 at startup(if the named Model is not found, no initial Model is loaded and no error message is issued)

1. Note that full pathnames are accepted; however, Models are saved in SL-DRAW2’s current directory.

v6.0 21 December 19981-6 SL-DRAW2 Reference

Page 19: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Command-line optionsC

ha

pter 1

EXAMPLE

UNIX:

draw2 -I/usr/smith/models -x -y topmenu

VAX/VMS:

draw2x -Isys$sysdevice:[smith.models] -x -y topmenu

NT:

draw2_nt -I\usr\smith\models -x -y topmenu

This command invokes SL-DRAW2

• UNIX:with a search in the directory /usr/smith/models for Model, Project, "fontdef.dat", "colordef.dat", and "pscolordef.dat" files (after searching the current, ./GISMOS, ./GRAPHS, ./SUBMODS, ../GISMOS, ../GRAPHS, and ../SUBMODS directories)

VAX/VMS:with a search in the directory [smith.models] on the system disk for Model, Project, "fontdef.dat", "colordef.dat", and "pscolordef.dat" files (after searching the current, [.gismos], [.graphs], [.submods], [-.gismos], [-.graphs], and [-.submods] directories)

NT:with a search in the directory \usr\smith\models for Model, Project, "fontdef.dat", "colordef.dat", and "pscolordef.dat" files (after searching the current, .\GISMOS, .\GRAPHS, .\SUBMODS, ..\GISMOS, ..\GRAPHS, and ..\SUBMODS directories)

• with the 48-box Model for SubModels

• with an automatic "yes" answer to all SL-DRAW2 queries

• automatically load the Model "topmenu.m1" at startup

SL-DRAW2 Reference 1-7v6.0 21 December 1998

Page 20: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using SL-DRAW2 to Build ModelsC

ha

pte

r 1

Editor layout

This section provides strictly an overview of the SL-DRAW2 editor. A description of each button and Menu option is provided in Chapter 2.

The SL-DRAW2 editor contains Control Panels which run down the left side and across the bottom of the screen, and a menu bar with Pull-Down Menus across the top of the display.

Figure 1-3. The SL-DRAW2 editor main window

Prompts and other messages are issued to the window in which SL-DRAW2 was invoked. This window can be resized and moved so it can be viewed while the editor is being used.

SL-DRAW2 makes extensive use of dialog boxes (which are displayed if user input is required from the keyboard) and overlapping windows. For example, the Get Model option of the Model Pull-Down Menu will display a window that contains a scrollbox of all available Models in the current directory.

( 6.590, 47.154)

Select: 0

Redraw

Backup Undo

* +

Identify Copy

Escape Enter . . .

DONE

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

DELETE

Grid: 2 x 2

Snap: OFF

Const: OFF

Mode: CENTER

ConvertOrderBitmapDynPointGroupSubModModelSelectViewSystem Palette

01

12

33

00

22

43

0 1 2 3 4 5 6 78 9 10 11 12 13 14 15

16 17 18 19 20 21 22 2324 25 26 27 28 29 30 31

Fill

Line

Text

COLORS

Backgr

Edge

Text

Bitm

Mark

%

SL-DRAW2 5.3a

v6.0 21 December 19981-8 SL-DRAW2 Reference

Page 21: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Editor layoutC

ha

pter 1

The SL-DRAW2 Quick Reference card

The SL-DRAW2 Quick Reference card distributed with this manual shows all menus and buttons available in SL-DRAW2 and serves as an excellent reference while reading this chapter or Chapter 2.

Object Create Control Panel

The Object Create Control Panel selects a type of object to create. Each button in the control panel represents a different object type. For example, Text objects are created by clicking the A-Z button. Text objects are created until another object is chosen in the Object Create Control Panel, or the DONE button3 is clicked.

Instructions for creating an object appear in the window in which SL-DRAW2 was invoked. For example, if the Circle button is clicked, the instruction

... pick center of circle

appears, and after picking the first point,

... pick edge of circle

appears. The originating window should be resized and moved so that it can be viewed while using the editor.

Object Change Control Panel

The Object Change Control Panel changes objects which have already been created.

An object is selected by clicking it. The selected object blinks (or is highlighted) to indicate that it has been added to SL-DRAW2’s Select List. (The Select Pull-Down Menu also allows objects to be selected.) Once an object or List of objects is selected, a selection is made from the Object Change Control Panel by clicking a button.

The Move, Scale, Rotate, and MovePt buttons allow the user to select by motion. For example, the Move button is clicked, (if an object is not on the Select List, select one) the user clicks the object and, while holding down the mouse button, moves the object. The object is dragged to the new

3. Clicking the right mouse button is a shortcut for clicking the DONE button.

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

SL-DRAW2 Reference 1-9v6.0 21 December 1998

Page 22: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using SL-DRAW2 to Build ModelsC

ha

pte

r 1

position. Upon release, the new position of the object is selected.

Selected objects are filled by choosing Fill, objects are moved by choosing Move, and so on.

Status Control Panel

The Status Control Panel monitors or changes modes in SL-DRAW2.

The numbers appearing after the word Grid: indicate the current grid size. Clicking Grid: displays the Grid Pull-Up Menu. The Grid Pull-Up Menu is used to change the Grid size, type, visibility, and whether the Grid is displayed in front of or in back of other objects in the Model.

The current Point Snap Mode follows the word Snap:. The Point Snap Mode helps pick Points. The List of Point Snap Modes is cycled through by clicking Snap:

Const: (constraint) is active when SL-DRAW2 is waiting for a Point to be picked. Constraint can be changed to horizontal or vertical and affects the next Point picked. When a horizontal constraint is used, the next Point picked is along a horizontal line from the last Point selected or from the Reference Point. When a vertical constraint is used, the next Point picked is along a vertical line from the last Point picked or from the Reference Point.

The Mode: option, which can be set to either POINT mode or CENTER mode, affects the operations Copy, Move, Rotate, and Scale. The mode affects the operations only; it has no permanent effect on the objects. Thus, it makes no difference to an object whether it is created in POINT mode or CENTER mode. For each of the operations, a transient "operation reference point" is used; it may or may not be the Reference Point set on an object.

In CENTER mode operating on a single object, the "operation reference point" is the object Reference Point currently set on the object, if one exists; if the object has no Reference Point, its default Reference Point is used, which is the center of the rectangular extent of the object. In CENTER mode operating on a List of objects, the "operation reference point"

Grid: 2 x 2

Snap: OFF

Const:

Mode:

OFF

CENTER

v6.0 21 December 19981-10 SL-DRAW2 Reference

Page 23: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Editor layoutC

ha

pter 1

is the center of the extent of the list of objects. Individual objects’ Reference Points are not considered.

In POINT mode the "operation reference point" is determined as follows:

• single or multiple objects selected by a mouse — the "operation reference Point" is the Point in the first object in the Select List that is closest to the Point picked by the mouse on the screen

• single or multiple objects not selected by a mouse (e.g. using the All option of the Select Pull-Down Menu) — the "operation reference Point" is the first Point in the extended Point List of the first object on the Select List

An object’s permanent Reference Point has no role in POINT mode.

Attribute or SubModel Control Panels

Figure 1-4. Attribute and SubModel Control Panels

Either Attribute Control Panels or the SubModel Control Panel appear across the bottom of SL-DRAW2’s display, depending upon the activity taking place. The Attribute

Edge

Text

Bitm

Mark

Loc:

Ext:

Scale:

Angle:

1,1

0

Show SubModels

ScalingWrite Mode BITMAP

And

Or

Xor

Overwrite

Complement

None

Impulse

Size: Font: Replace

Marker Style

%

01

12

33

00

22

43

0 1 2 3 4 5 6 78 9 10 11 12 13 14 15

16 17 18 19 20 21 22 2324 25 26 27 28 29 30 31

Fill

Line

Text

COLORS

Backgr

SL-DRAW2 Reference 1-11v6.0 21 December 1998

Page 24: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using SL-DRAW2 to Build ModelsC

ha

pte

r 1

Control Panels provide control over the characteristics of the Edge lines, Text, Markers, BitMap Write, and color. They

allow either a change in the attributes of future objects to be created, or a change in the attributes of currently-selected objects. The SubModel Control Panel allows other Models to be incorporated, or instanced, into the current Model.

The Attribute Control Panels on the left overlay each other so that only one panel is visible at any time. The Attribute Control Panel selection buttons determine which Attribute Control Panel is visible.

Figure 1-5 The "Attribute Control Panel" selection buttons

The Color Attribute Control Panel on the right sets color and fill pattern attributes.

The SubModel Control Panel consists of two lists of SubModel icons, Local (Loc:) and External (Ext:). A SubModel is instanced in a Model by clicking on an icon and then clicking in the Working View to position it. The SubModel Control Panel also has two buttons for controlling the scaling and rotation of Instances. Clicking on the word Scale: allows for entry of scaling factors. The scaling factor makes the SubModel appear larger (factors greater than 1) or smaller (factors between 1 and 0) when it is created. Clicking on the word Angle: allows for entry of a rotation angle. The rotation is applied when the SubModel is instanced.

Pull-Down Menus

Figure 1-6. The Pull-down Menu Bar

The titles of the Pull-Down Menus appear in the Pull-Down Menu bar across the top of the display. The Pull-Down Menu buttons highlight when selected.

Edge

Text

Bitm

Mark

ConvertOrderBitmapDynPointGroupSubModModelSelectViewSystem Palette

v6.0 21 December 19981-12 SL-DRAW2 Reference

Page 25: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Editor layoutC

ha

pter 1

Messages

SL-DRAW2 provides a running commentary in the window in which it was invoked. This includes error messages and information relating to current activity.

Special Buttons

Figure 1-7. Special buttons

The Model Name Box, located in the top left corner, displays the name of the current Model on which SL-DRAW2 is working.

Just below the Model Name Box in the upper left corner lies the State Indicator Box. The current State of the editor is displayed in this box. This is useful when the main window or other windows have been moved in front of dialog boxes or other windows that are displayed by SL-DRAW2. For example, this box will display "Move" if the Move button has been pressed in the Object Change Control Panel, or it will display "POPUP" if a dialog box has been displayed for data entry.

Just below the State Indicator Box lies the Cursor Position Box. Upon the first loc_motion event in the Working View, the cursor position in the Working View is provided in World Coordinates (See the Display of Models — Views and Workstation./Windows of the SL-GMS Reference Manual for additional information about World Coordinates).

modelname

(18.196, 25.482)

Select: 0

Redraw

DONE

DELETE

Backup Undo

SL-DRAW2 Reference 1-13v6.0 21 December 1998

Page 26: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using SL-DRAW2 to Build ModelsC

ha

pte

r 1

The number of objects currently selected (the Select List) appears after the word Select:. Clicking on an object adds that object to the Select List. If the object is clicked again, the

object is removed from the Select List. All objects are cleared from the Select List by clicking DONE or the right mouse button.

The Redraw button refreshes SL-DRAW2’s Working View.

The following buttons are used for general control of SL-DRAW2. The Redraw button clears the Working View, redraws the grid (if it is on), redraws the current Model, and redraws any working Markers or Reference Lines. The Redraw option can always be clicked without changing SL-DRAW2 or the Model.

The Backup button "unpicks" the last Point chosen. Points are unpicked until the last Point in the object is completed. Points picked in a previously-created object cannot be backed up, that is, if a second Rectangle is started, Points cannot be backed up in the first Rectangle. The Backup option also reverses any change option except SnapPt. If a Point on which to place Text is picked, the Text (or just <RETURN>) must be entered before the picked Point can be backed up.

The Undo button reverses the last operation. Objects are undeleted if the Undo button is clicked immediately after clicking DELETE. All changes except SnapPt can be undone.

The DONE button is clicked to complete an action or to clear the Select List. The DONE button is also clicked to stop creating or changing objects, while also changing the number of selected objects to 0.

The DELETE button removes objects currently on the Select List from the Model. If acted upon immediately, deletions can be undone after one or more objects have been undeleted. A prompt appears indicating the Undo button needs to be clicked whenever objects have been deleted. Once any other button is clicked, the deletion can no longer be undone.

Exiting SL-DRAW2

The SL-DRAW2 program is exited by selecting the Quit option of the System Pull-Down Menu.

v6.0 21 December 19981-14 SL-DRAW2 Reference

Page 27: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

The SL-DRAW2 LibraryC

ha

pter 1

The SL-DRAW2 Library

The SL-DRAW2 Library uses SL-SMS, the library of functional States that make up the full SL-DRAW2 capability. This library is modularized and available for configuration and relinking in a manner that is consistent with other applications built using SL-GMS.

This means that SL-DRAW2 itself, or any subset of it, may be linked into an application program and invoked with a menu button just as any other State in an application. This powerful capability is significant to OEM users of SL-GMS. To accomplish a link to full SL-DRAW2 or to any user-defined subset, the complete binary library is made available to OEM users under special arrangement.

Relinking SL-DRAW2

Adding user-defined functions into the SL-DRAW2 editor allows the user-defined functions to be executed whenever a Model is tested using the Preview capability in the editor (see User-defined funtions in the SL-GMS Reference).

To add user-defined functions into SL-DRAW2, the editor must be relinked. Relink the SL-DRAW2 editor as illustrated below.

The SL-DRAW2 editor is relinked in the demo/draw2 subdirectory.

UNIX Systems:

make relink_draw2

NT Systems:

nmake relink_draw2

OpenVMS Systems:

@linkdraw2

SL-DRAW2 Reference 1-15v6.0 21 December 1998

Page 28: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed
Page 29: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Chapter

v6

(

(

2

.0 21 December

SL-DRAW2 Reference

C

ha

pter 2

Overview

This chapter describes the options for using the SL-DRAW2 graphic editor. Figure 2-1 shows the SL-DRAW2 editor window with references superimposed on window areas. The references shown are to specific sections in this chapter that describe the options associated with those areas.

Figure 2-1. Reference to descriptions of SL-DRAW2 editor options

01

12

33

00

22

43

0 1 2 3 4 5 6 78 9 10 11 12 13 14 15

16 17 18 19 20 21 22 2324 25 26 27 28 29 30 31

Fill

Line

Text

COLORS

Backgr

Edge

Text

Bitm

Mark

01

12

33

00

22

43

0 1 2 3 4 5 6 78 9 10 11 12 13 14 15

16 17 18 19 20 21 22 2324 25 26 27 28 29 30 31

Fill

Line

Text

COLORS

Backgr

Edge

Text

Bitm

Mark

ConvertOrderBitmapDynPointGroupSubModModelSelectViewSystem Palette

%

sample

(45.678, 23.456)

Select: 0

Redraw

Backup Undo

* +

Identify Copy

Escape Enter . . .

DONE

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

DELETE

Grid: 2 X 2

Snap: OFF

CENTER

Const: OFF

Mode:

Pull-Down Menus

ObjectCreateControlPanel

ChangeControlPanel

Object

StatusControlPanel

Attribute or SubModel Control Panels

SpecialButtons

ModelName Box

(page 2-70)

(page 2-72)

page 2-65)

(page 2-2)

(page 2-82)

page 2-37)

SL-DRAW2 Reference 2-1 1998

Page 30: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Object Create Control Panel

The Object Create Control Panel displays the different types of graphical objects which can be created using SL-DRAW2. Each object created is added to the current Model.

When a button is clicked, that button is highlighted and remains highlighted until DONE or another button is clicked. The manner in which some buttons work can also be modified by filling them. Buttons representing Circles, Rectangles, Pies, Polygons, Sectors, Three Point Sectors, and Closed Splines can create filled objects. The function of these buttons is changed by first clicking a button, then clicking Fill in the Object Change Control Panel. The button will then display a filled object and create filled objects.

Most of the objects provided in the Object Create Control Panel require that a series of Points be chosen in the Working View which define the object, such as a center Point and a Point on the radius for making Circles. The prompts for the necessary actions are displayed in the window in which SL-DRAW2 was started. The following sections provide more detail about creating the different types of objects.

Other SL-DRAW2 features are available for help in creating objects. The Point Pull-Down Menu contains options useful in choosing specific Points in a Model. Commands in the Status Control Panel turn the editor’s grid ON or OFF, constrain Points to grid intersections or to Points on other objects, and so on. These options are referred to in their appropriate sections in this chapter.

The creation of any type of object is terminated by clicking another Object Create Control Panel or Object Change Control Panel button, or the DONE button.

NOTE: Clicking the right mouse button is a shortcut for clicking the DONE button.

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

v6.0 21 December 19982-2 SL-DRAW2 Reference

Page 31: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

Polyline

Polylines add straight lines to a Model. Polylines differ from Lines in that Lines have only two Points, whereas Polylines have more than two Points connected by straight lines. A Polyline is created by choosing a starting Point, then as many additional Points as needed. A straight line is displayed between each pair of Points chosen. The Backup option backs up past the last Point in the Polyline. DONE is clicked to indicate that the last Point in the Polyline has been chosen.

EXAMPLE

Steps to Create a Polyline Object

Functional Description Steps

Select Polyline creation 1. Click the Polyline button in the Object Create Control Panel

Select the first Point 2. Move the mouse cursor to (a) and click

Select the second Point 3. Move the mouse cursor to (b) and click

Select the third Point 4. Move the mouse cursor to (c) and click

Select the fourth Point 5. Move the mouse cursor to (d) and click

Select the last Point and then terminate Polyline creation

6. Move the mouse cursor to the last point and click; then click the DONE button (or right mouse button) once to terminate the line and again to deselect Polyline creation

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

a

b

c

d

SL-DRAW2 Reference 2-3v6.0 21 December 1998

Page 32: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Polygon

Polygons add many-edged objects to a Model. Polygons (Closed Polylines) may appear as Triangles, Trapezoids, or any shape composed of straight edges. SL-DRAW2 automatically connects the first Point chosen with the last Point when DONE is clicked. Polygons can be filled.

EXAMPLE

Steps to Create a Polygon Object

Functional Description Steps

Select Polygon creation 1. Click the Polygon button in the Object Create Control Panel

Select the first Point 2. Move the mouse cursor to (a) and click

Select the second Point 3. Move the mouse cursor to (b) and click

Select the third Point 4. Move the mouse cursor to (c) and click

Additional Points can be selected, if needed.

Close the Polygon 5. Click the DONE button or the right mouse button

A Polygon appears. The first and last Point are automatically connected.

Discontinue the Polyline creation State

6. Click the DONE button or click another button in the Object Create Control Panel

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

a

b

c

d

e

v6.0 21 December 19982-4 SL-DRAW2 Reference

Page 33: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

Line

Straight Lines are created by clicking this button. Straight Lines have only two Points, unlike Polylines which may have more than two. If a third Point is picked, it is the beginning Point of the next Line. The Backup option is used to go back to the Point before the most recent Point.

EXAMPLE

Steps to Create a Line Object

Functional Description Steps

Select Line creation 1. Click the Line button in the Object Create Control Panel

Select the first Point for the beginning of the Line

2. Move the mouse cursor to (a) and click

Select the second Point for the end of the Line

3. Move the mouse cursor to (b) and click

A Line appears. Steps 2 and 3 can be repeated to create additional Lines.

Discontinue the Line creation State

4. Click the DONE button or click another button in the Object Create Control Panel

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

a b

SL-DRAW2 Reference 2-5v6.0 21 December 1998

Page 34: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Spline

Splines are created by clicking this button. SL-GMS uses the Points picked to make the smoothest appearing curved Line (the Spline) which passes through these Points. Points are connected by a Polyline as they are selected. When DONE is clicked, the Polyline is redrawn as a Spline. The section, MovePt on page 2-59, provides additional information about Splines. The BACKUP option "unpicks" the Points in the current Spline, one at a time.

EXAMPLE

Steps to Create a Spline Object

Functional Description Steps

Select Spline creation 1. Click the Spline button in the Object Create Control Panel

Select the first Point 2. Move the mouse cursor to (a) and click

Select the second Point 3. Move the mouse cursor to (b) and click

Select the third Point 4. Move the mouse cursor to (c) and click

Additional Points can be selected if needed.

Finish the Spline 5. Click the DONE button

The Polyline connecting the chosen Points is replaced by a Spline.

Discontinue the Spline creation State

6. Click the DONE button or click another button in the Object Create Control Panel

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

a

b

c

d

e

f

v6.0 21 December 19982-6 SL-DRAW2 Reference

Page 35: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

Closed Spline

Closed Splines (shapes with curved Lines) are created in the Working View by clicking this button. SL-DRAW2 connects the Points with a Polyline until DONE is clicked. Clicking DONE signals SL-DRAW2 to close (connect the end Points) the Polyline and convert it to a Closed Spline. The section, MovePt on page 2-59, provides additional information about Splines. Closed Splines can be filled.

EXAMPLE

Steps to Create a Closed Spline Object

Functional Description Steps

Select Closed Spline creation

1. Click the Closed Spline button in the Object Create Control Panel

Select the first Point 2. Move the mouse cursor to (a) and click

Select the second Point 3. Move the mouse cursor to (b) and click

Select the third Point 4. Move the mouse cursor to (c) and click

Additional Points can be selected, if needed.

Finish the Closed Spline 5. Click the DONE button

The Polyline connecting the chosen Points is replaced by a Closed Spline.

Discontinue the Closed Spline creation State

6. Click the DONE button or click another button in the Object Create Control Panel

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

a

b

c

de

f

SL-DRAW2 Reference 2-7v6.0 21 December 1998

Page 36: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Rectangle

Rectangles are created with this button by picking two opposing corners for each Rectangle. The last Point picked can be "unpicked" by clicking Backup. Rectangles can be filled.

EXAMPLE

Steps to Create a Rectangle Object

Functional Description Steps

Select Rectangle creation 1. Click the Rectangle button in the Object Create Control Panel

Select the first corner 2. Move the mouse cursor to (a) and click

Select the second corner 3. Move the mouse cursor to (b) and click

A Rectangle appears. Repeat steps 2 and 3 to create additional Rectangle objects

Discontinue the Rectangle creation State

4. Click the DONE button or click another button in the Object Create Control Panel

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

a

b

v6.0 21 December 19982-8 SL-DRAW2 Reference

Page 37: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

Pie

Pies are created by clicking this button. Pies are constructed by picking the center Point of the Pie and two Points on the circumference. The curved edges of a Pie are always drawn counterclockwise. It is necessary to pick two Points on the edge in the correct order, that is, the final Point counterclockwise from the beginning Point on the edge. If a final Point is picked that is clockwise from the second Point, it results in a Circle shape with a single wedge missing rather than a small Pie. SL-DRAW2 arranges the final Point picked so that it has the same radius as that of the first Point picked on the curved edge. Pies can be filled.

EXAMPLE

Create a Pie Object

Functional Description Steps

Select Pie creation 1. Click the Pie button in the Object Create Control Panel

Select the first Point for the center of the Pie

2. Move the mouse cursor to (a) and click

Select a Point on the curved edge of the Pie

3. Move the mouse cursor to (b) and click

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

a

b

c

SL-DRAW2 Reference 2-9v6.0 21 December 1998

Page 38: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Select the second Point on the curved edge counterclockwise from the first edge Point

4. Move the mouse cursor to (c) and click

A Pie appears. To create another Pie, steps 2, 3, and 4 can be repeated.

Discontinue the Pie creation State

5. Click the DONE button or click another button in the Object Create Control Panel

Create a Pie Object(continued)

Functional Description Steps

v6.0 21 December 19982-10 SL-DRAW2 Reference

Page 39: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

Circle

Circles are created by clicking this button. The location and size of the Circle are indicated by picking the center and a Point on the edge. The Backup option "unpicks" the last Point chosen. Circles can be filled.

EXAMPLE

Steps to Create a Circle Object

Functional Description Steps

Select Circle creation 1. Click the Circle button in the Object Create Control Panel

Select the center of the Circle

2. Move the mouse cursor to (a) and click

Select a Point on the edge 3. Move the mouse cursor to (b) and click

A Circle appears. To create another Circle, repeat steps 2 and 3.

Discontinue the Circle creation State

4. Click the DONE button or click another button in the Object Create Control Panel

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

a

b

SL-DRAW2 Reference 2-11v6.0 21 December 1998

Page 40: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Text

Text is added by clicking this button. 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. <RETURN> is entered to complete creation of a Text object.

Multiple lines of text are entered using a specified key to enter a <NEWLINE> character into a string. By default, the Escape key (<ESC>) is used to terminate the current line and start a new line when entering multiple lines of text, and the <RETURN> key terminates text entry. Thus, to enter

This is five

lines of text,

with a blank

third line.

the following is keyed in ("N" represents the "next line" key; "T" represents the "termination" key):

This is fiveNlines of text,NNwith a blankNthird line.T

The "next line" key and the "termination" key can be specified in the string codes parameter in the "options.dat" configuration file, described in the section SL-DRAW2 configuration files on page 2-147. A "double-<RETURN>" cannot be used to terminate.

Text entry and editing are done in-place. As each character is typed in from the keyboard, it appears in the Working View in the location picked for the Text object.

The attributes of the Text object most recently created can be changed until the Point for positioning the next Text object is chosen. Attributes can also be changed for all selected Text objects.

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

v6.0 21 December 19982-12 SL-DRAW2 Reference

Page 41: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

EXAMPLE

Steps to Create a Text Object

Functional Description Steps

Select Text creation 1. Click the Text button in the Object Create Control PanelThe Text Attribute Control Panel becomes visible at the bottom of SL-DRAW2’s display area.

Select the Point to position the Text

2. Move the mouse cursor to (a) and click

Enter text 3. Enter

center justified text<RETURN>

Text appears on the screen as it is being typed.

Select Text attributes 4. Select the desired Text attributes from the Text Attribute Control PanelTo create another Text object, repeat steps 2, 3, and 4.

Discontinue the Text creation State

5. Click the DONE button or click another button in the Object Create Control Panel

center justified texta

SL-DRAW2 Reference 2-13v6.0 21 December 1998

Page 42: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Changing Text Attributes

Two SL-DRAW2 Object Create Control Panel selections create Text objects. Whether Text or Filled Text Rectangles are being created, the attributes used for the Text are the same.

Text color is changed by clicking the word Text in the Color Attribute Control Panel at the bottom of the display area. The button to the right of the word Text will be highlighted. To avoid changing fill or edge color, the buttons to the right of the words Fill and Line must be unselected (unhighlighted). The Text color is then changed by clicking one of the color boxes in the Color Attribute Control Panel. The colored box to the right of the word Text then appears in the selected color.

Figure 2-2. The "Color Attribute Control Panel" is used to change Text color

Text attributes changed with the Text Attribute Control Panel are: alignment, height, font, precision, content, and path (direction).

Figure 2-3. The "Text Attribute Control Panel" is used to change all Text attributes except for color

01

12

33

00

22

43

0 1 2 3 4 5 6 78 9 10 11 12 13 14 1516 17 18 19 20 21 22 2324 25 26 27 28 29 30 31

Fill

Line

Text

COLORS

Backgr

color boxesfillstyleboxes

fillinterior

boxesattributeselection

Size: Font: Replace

TextAlignment

Grid

heightbuttons

fontstyle

buttons

contentbutton

pathbuttons

v6.0 21 December 19982-14 SL-DRAW2 Reference

Page 43: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

The Text Attribute Control Panel has seven active regions: alignment, Size:1 (using keyboard), S (height using cycling), Font: (using keyboard), F (font using cycling), Replace (replacing Text content), and two arrows to change the Text path (direction of Text). In many ways these attributes work similarly to color. For example, all Text objects created after changing one of these attributes are created with the current attribute. To change a Text object’s attribute, the object is first selected, then the attribute in the Text Attribute Control Panel is changed.

Text alignment sets the offset of Text relative to the Point chosen for positioning the Text object. The Text Alignment Grid in the Text Attribute Control Panel is a grid with 15 intersections and with a mark showing the current alignment. The vertical lines in the grid represent the left edge, center, and right edge of the Text extent. The horizontal lines 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. The alignment is changed by moving the mouse to an intersection and clicking. A mark appears at the nearest intersection. The height of capital letters is the same as that of the letter A.

Figure 2-4. The "Text Alignment Grid" allows for setting the offset of Text relative to the Point chosen for positioning

1. In SL-DRAW2, Size and S refer to Text height.

Topleft center right

5

4

3

1

2

1 2 3

top

cap

half

base

bottom

SL-DRAW2 Reference 2-15v6.0 21 December 1998

Page 44: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

The following example aids in understanding Text alignment. A grid is set up and the Snap: option of the Status Control Panel is set to GRID. Snap-to-grid forces the selected Points to grid intersections. A different Text alignment is set for each Text object created.

EXAMPLE

Steps to Experiment with Text Alignment

Functional Description Steps

Select grid size and turn grid on

1. Click Grid in the Status Control Panel and choose Size from the Grid Pull-Up Menu

A dialog box is displayed.

2. Enter

10 10 <RETURN>

3. Click Grid in the Status Control Panel and choose On/Off from the Grid Pull-Up Menu

A 10 x 10 grid is displayed.

default alignment

top-left alignment

base-center alignment

bottom-right alignment

v6.0 21 December 19982-16 SL-DRAW2 Reference

Page 45: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

Select Snap-to-Grid 4. Click Snap: in the Status Control Panel until the word GRID appears to the right of Snap:

Select Text creation 5. Click the Text button in the Object Create Control Panel

Increase size of text 6. Click the S button in the Text Attribute Control Panel twice

Create a Text object with default alignment with the words "default alignment"

7. Move the mouse cursor to the top of the Working View and click

A working Mark appears at a Grid intersection.

8. Enter

default alignment<RETURN>

Text entry is done in-place. As each character is typed from the keyboard it appears in the Working View at the location picked for the Text object.

Create a Text object with top-left alignment with the words "top-left alignment"

9. Move the mouse below the first Text object and click

10. Enter

top-left alignment<RETURN>

Text entry is done in-place. As each character is typed from the keyboard it appears in the Working View at the location picked for the Text object.

11. Click the upper left corner of the Text Alignment GridThe Text object changes alignment to its top left corner.

Steps to Experiment with Text Alignment(continued)

Functional Description Steps

SL-DRAW2 Reference 2-17v6.0 21 December 1998

Page 46: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

By using the Grid Pull-Up Menu and Snap-to-Grid, Text was positioned at the SL-DRAW2 editor’s grid intersections. Next, four different Text alignments were used. The Text alignment determined which Point in the Text object was attached to the Point selected for Text placement in the Working View, in this example, a grid intersection.

Create a Text object with base-center alignment with the words:"base-center alignment"

12. Move the mouse below the last Text object and click

13. Enter

base-center alignment<RETURN>

Text entry is done in-place. As each character is typed from the keyboard it appears in the Working View at the location picked for the Text object.

14. Click the base-center of the Text Alignment GridThe Text object changes alignment to its base-center.

Create a Text object with bottom-right alignment with the words "bottom-right alignment"

15. Move the mouse cursor below the last Text object and click

16. Enter

bottom-right alignment<RETURN>

Text entry is done in-place. As each character is typed from the keyboard it appears in the Working View at the location picked for the Text object.

17. Click the lower-right corner of the Text Alignment GridThe Text object changes alignment to its right edge.

Discontinue the Text creation State

18. Click the DONE button or click another button in the Object Create Control Panel

Steps to Experiment with Text Alignment(continued)

Functional Description Steps

v6.0 21 December 19982-18 SL-DRAW2 Reference

Page 47: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

It is advisable to use half-center alignment whenever Filled Text Rectangles are created. Using half-center alignment positions Text precisely in the center of the Rectangle.

Figure 2-5. The "Text Attribute Control Panel"

The Size: button of the Text Attribute Control Panel, when clicked, displays a dialog box for entry of a decimal height value. The default Text height is 1.5 units. By entering a larger value, the selected Text, or newly created Text, is drawn larger. Smaller values make Text smaller. Some fonts exist only in predefined heights, and SL-DRAW2 selects the font height closest to the requested height. When Text height is changed, characters are changed proportionately and do not appear distorted or stretched.

The S button allows a sequence of Text heights to be cycled through. Rather than entering a decimal value for the height, one of the preset heights is chosen. The Text heights that are displayed each time the S button is clicked are defined by the text_heights option in the "options.dat" file.

Font: allows a font style to be selected through an index which is entered from the keyboard. The F button appears in a different font style each time the button is clicked. The font and precision pairs that are displayed each time the F button is clicked are defined by the fonts option in the "options.dat" file. The Default Fonts section of the Text chapter in the SL-GMS Reference chapter provides further information about font availability.

The Replace button allows the content to be replaced in a selected Text object(s). The Text object to be changed is first selected, then Replace is clicked. Next, <BACKSPACE> is entered to backspace over the text to be changed and the new text is typed in from the keyboard (text is edited-in-place). Text is replaced on a per-object basis; if several Text objects

Size: Font: Replace

TextAlignment

Grid

heightbuttons

fontstyle

buttons

contentbutton

pathbuttons

SL-DRAW2 Reference 2-19v6.0 21 December 1998

Page 48: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

are selected, the user is prompted to replace Text in the order in which the objects were selected.

Clicking the two arrows in the Text Attribute Control Panel changes the path — the direction in which Text is written, of Text objects currently on the Select List. Two choices are available: left-to-right (top arrow) and top-to-bottom (bottom arrow). The default path is left to right.

Figure 2-6. Text path arrows

When the diamond GISMO next to the <down> arrow is clicked, all subsequent Text objects that are created will display vertically. When the diamond GISMO next to the <horizontal> arrow is clicked, all subsequent Text objects that are created will display horizontally.

left to right top to bottom

texttext

v6.0 21 December 19982-20 SL-DRAW2 Reference

Page 49: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

Filled Text Rectangle

Filled Text Rectangles are created by clicking this button. Filled Text Rectangles are filled Rectangles with Text written on top of them. It is faster to erase and redraw Filled Text Rectangles than it is to erase and redraw ordinary Text. Filled 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 relatively slow operation for most graphical workstations. Text in Filled Text Rectangles is deleted by erasing the filled Rectangle, a much faster operation.

Filled Text Rectangles are created by picking the two opposing corners for the Rectangle and entering Text followed by <RETURN>.

Multiple lines of text are entered using a specified key to enter a <NEWLINE> character into a string. By default, the Escape key (<ESC>) is used to terminate the current line and start a new line when entering multiple lines of text, and the <RETURN> key terminates text entry. Thus, to enter

This is five

lines of text,

with a blank

third line.

the following is keyed in ("N" represents the "next line" key; "T" represents the "termination" key):

This is fiveNlines of text,NNwith a blankNthird line.T

The "next line" key and the "termination" key can be specified in the string codes parameter in the "options.dat" configuration file, described in section SL-DRAW2 configuration files on page 2-147. A "double-<RETURN>" cannot be used to terminate.

Text entry and editing are done in-place. As each character is typed in from the keyboard it appears in the Working View in the location picked for the Text object.

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

SL-DRAW2 Reference 2-21v6.0 21 December 1998

Page 50: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

The attributes of the Text can be changed with the Text Attribute Control Panel, as described in the section Changing Text Attributes on page 2-14.

The attributes of the Rectangle; such as edge style and width, edge color and fill color, can also be changed as described in the sections, Edge Attribute Control Panel on page 2-75 and Color Attribute Control Panel on page 2-73.

NOTE: SL-DRAW2 does not prevent Text from appearing outside of a Filled Text Rectangle. Text appearing outside the Filled Rectangle is not erased when Text inside the Rectangle is changed. It is important that a large enough Filled Text Rectangle be used.

EXAMPLE

Voltage Graphs

a

b

x

x

v6.0 21 December 19982-22 SL-DRAW2 Reference

Page 51: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

Steps to Create a Filled Text Rectangle Object

Functional Description Steps

Select Filled Text Rectangle creation

1. Click the Filled Text Rectangle button in the Object Create Control Panel

Select Attributes 2. Choose the desired Text attributes from the Text Attribute Control Panel, and adjust the fill color and text color for the Filled Text Rectangle with the Color Attribute Control Panel

Select the first corner 3. Move the mouse cursor to (a) and click

Select the second corner 4. Move the mouse cursor to (b) and click

A Filled Rectangle appears.

Enter text 5. Enter

Voltage Graphs<RETURN>

Text entry is done in-place. As each character is typed from the keyboard it appears in the Working View at the location picked for the Filled Text Rectangle object. To create another Filled Text Rectangle object, steps 3, through 5 can be repeated.

Discontinue the Filled Text Rectangle creation State

6. Click the DONE button or click another button in the Object Create Control Panel

SL-DRAW2 Reference 2-23v6.0 21 December 1998

Page 52: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Sector

Sectors are created by clicking this button. Sectors are curved Lines taken from the edge of a Circle and are created by picking its center and beginning and ending Points on the curved edge. SL-DRAW2 arranges for the final Point picked to have the same radius as the first edge Point. Sectors can be filled.

Sectors are always drawn counterclockwise. It is necessary to pick two Points on the edge in the correct order, that is, the final Point counterclockwise from the starting Point on the edge.

EXAMPLE

Steps to Create a Sector Object

Functional Description Steps

Select Sector creation 1. Click the Sector button in the Object Create Control Panel

Select the center of the Sector

2. Move the mouse cursor to (a) and click

Select the first Point on the curved edge

3. Move the mouse cursor to (b) and click

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

a

b

c

v6.0 21 December 19982-24 SL-DRAW2 Reference

Page 53: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

Select the second Point on the curved edge counterclockwise from the first Point

4. Move the mouse cursor to (c) and click

A Sector is drawn between the two Points b and c. To create another Sector, steps 2, 3, and 4 can be repeated.

Discontinue the Sector creation State

5. Click the DONE button or click another button in the Object Create Control Panel

Steps to Create a Sector Object(continued)

Functional Description Steps

SL-DRAW2 Reference 2-25v6.0 21 December 1998

Page 54: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Three Point Sector

Three Point Sectors are created by clicking this button. Three Point Sectors (also called Sector3s) are curved Lines taken from the edge of a Circle. Unlike ordinary Sectors, Three Point Sectors are constructed by picking three Points on the curved edge. SL-DRAW2 creates the sector which best fits the three Points picked. Three Point Sectors may be filled.

The Backup option deletes Points and adjusts the Sector until it is satisfactory. Three Point Sectors are always drawn counterclockwise. The second and third Points must be picked counterclockwise from the first Point.

EXAMPLE

Steps to Create a Three Point Sector Object

Functional Description Steps

Select Three Point Sector creation

1. Click the Three Point Sector button in the Object Create Control Panel

Select the first end Point of the Sector

2. Move the mouse cursor to (a) and click

Select the second Point on the Sector counterclockwise from the first Point picked

3. Move the mouse cursor to (b) and click

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

a

b

c

v6.0 21 December 19982-26 SL-DRAW2 Reference

Page 55: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

Select the third Point on the curved edge counterclockwise from the other Points picked

4. Move the mouse cursor to (c) and click

A Sector appears in place of the marks. To create another Three Point Sector, steps 2, 3, and 4 can be repeated.

Discontinue the Three Point Sector creation State

5. Click the DONE button or click another button in the Object Create Control Panel

Steps to Create a Three Point Sector Object(continued)

Functional Description Steps

SL-DRAW2 Reference 2-27v6.0 21 December 1998

Page 56: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Marker

Markers are created by clicking this button. Markers are small characters used to indicate positions of single Points. Markers are used while constructing objects to help in placement. They are created by picking Points in the Working View.

The Backup option "unpicks" one or all Markers created since the Marker button was clicked. The created Markers are treated as a single object until DONE is clicked, at which time each Marker then becomes an individual object.

The style of Marker created is set in the Marker Attribute Control Panel, as described on page 2-77.

EXAMPLE

Steps to Create a Marker Object

Functional Description Steps

Select Marker creation 1. Click the Marker button in the Object Create Control Panel

Select the Point for a Marker 2. Move the mouse cursor to (a) and click

A Marker appears. To create another Marker, step 2 can be repeated.

Discontinue the Marker creation State

3. Click the DONE button or click another button in the Object Create Control Panel

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

a

b

c

d

v6.0 21 December 19982-28 SL-DRAW2 Reference

Page 57: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

Identify

The Identify button displays a window that provides the class, name, position, and extent of an object. It also displays the values for various attributes associated with an object.

The figure below illustrates the Identify box (Box A) that is displayed by selecting a Filled Text Rectangle and clicking the Identify Button.

Figure 2-7. "Identify" option Box A

Clicking the Details button in the Identify Box A displays the Identify Box B, shown in the figure below.

Figure 2-8. "Identify" option Box B

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

Identify ObjectClass: G_TRectEName:

Extent:

(6.074, 62.763)Location:

(17.809, 65.150)

23.470

4.773

Done Escape

Details

7tcolor:1.5height:

path:

font:

prec:

1

1

0

align: 2 3

4fcolor:1fstyle:

finter:

fdir:

1

0

7ecolor:1estyle:

ewidth: 1

TEXT

FILL

EDGE

Donefpercent: 100.0

Filled? YES

SL-DRAW2 Reference 2-29v6.0 21 December 1998

Page 58: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Copy

Copies of an object are created by clicking the Copy button. Once the objects are selected, SL-DRAW2 outlines them with an echo rectangle and positions an X type Marker showing the Reference Point for the copy. The Reference Point indicates where the copied objects appear in relation to the Point picked. After making each copy, a button in the Object Change Control Panel modifies the new copy.

EXAMPLE

Steps to Copy an Object

Functional Description Steps

Select object(s) 1. Click the object(s) to copy (a)The number of objects selected is reported after the word Select:

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

500.0 mA 500.0 mA

a b

v6.0 21 December 19982-30 SL-DRAW2 Reference

Page 59: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

EXAMPLE

To create the ticks in the following "timer" Model — a clock marked by ticks every 30 degrees — a combined Copy/Rotate operation can be performed:

Create a copy of the object(s)

2. Click the Copy button in the Object Change Control PanelThe object(s) are outlined and a reference Marker appears (a).

3. Pick a Point for the copy (b)

The copy appears and is added to the Select List.

4. Optionally use the Object Change Control Panel and change the new copy

To create additional copies, steps 3 and 4 can be repeated.

Discontinue the Copy State 5. Click the DONE button or click a button in the Object Create Control Panel

Steps to Copy an Object(continued)

Functional Description Steps

SL-DRAW2 Reference 2-31v6.0 21 December 1998

Page 60: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Steps to Create the Tick Marks in the timer Model

Functional Description Steps

Create a small vertical line at the 12 o’clock position

1. Click the Line button of the Object Create Control Panel

2. Click the Point Pull-Down Menu and choose Find Point

3. Move the mouse cursor to a point on the edge of the "timer" circle at the 12 o’clock position and click

4. Move the mouse cursor to the end position of the Line object and click

A vertical line will be displayed.

Change the Reference Point of the Line object to be the center of the Circle object

5. Click the Point Pull-Down Menu and choose Change Ref The Line object is outlined.

6. Click the Point Pull-Down Menu and choose Find Center

7. Click the edge of the Circle

A reference Marker will appear at the center of the Circle.

Copy the Line object 8. Click the Copy button in the Object Change Control Panel

Select the cloning Point to be the center of the Circle

9. Click the Point Pull-Down Menu and choose Same Point

Rotate the copy 30 degrees 10. Click the Rotate button in the Object Change Control PanelA Reference Line appears.

11. Click the Enter button in the Object Create Control Panel

12. Enter

30<RETURN>

The copy of the Line object is drawn with the Line object being copied temporarily invisible.

v6.0 21 December 19982-32 SL-DRAW2 Reference

Page 61: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

Clear the Select List and terminate the Copy State

13. Click the DONE button twice

Refresh the Working View 14. Click the Redraw button

All tick marks are displayed.

Create additional tick marks 15. Select the most recently created tick mark

16. Repeat steps 8 through 15 until all tick marks are created

Steps to Create the Tick Marks in the timer Model (continued)

Functional Description Steps

SL-DRAW2 Reference 2-33v6.0 21 December 1998

Page 62: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Escape

The Escape button discontinues the current State; for example, if Rename Vars is selected and several objects are on the Select List, clicking the Escape button ends the Rename Variables State (the RENAMED VARIABLES window for the next object on the Select List is not displayed).

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

v6.0 21 December 19982-34 SL-DRAW2 Reference

Page 63: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Create Control PanelC

ha

pter 2

Enter

The Enter... button enters a Point or a scaling factor from the keyboard. This option is also used to enter an angle for rotation rather than picking a Point relative to the Reference Line.

The default WC-window size of SL-DRAW2’s Working View is from (0, 0) to (100, 75). A Point pair is entered by entering two numbers, separated by a space, and <RETURN>. The first number should be in the range of 0 to 100, the second number from 0 to 75. Larger or smaller numbers cause the Point to fall outside the WC-window and, therefore, to be invisible unless Zoom Out or Pan is used.

EXAMPLE

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

(10, 10)

(20, 20)

x

x

SL-DRAW2 Reference 2-35v6.0 21 December 1998

Page 64: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Steps to Create a Rectangle Object using Enter...

Functional Description Steps

Create a Rectangle object with the coordinates (10, 10), (20, 20)

1. Click the Rectangle button in the Object Create Control Panel

2. Click the Enter... button in the Object Create Control PanelA dialog box is displayed.

3. Enter

10 10<RETURN>

A space or a comma can be used to separate the two numbers.

4. Click the Enter... button in the Object Create Control PanelA dialog box is displayed.

5. Enter

20 20<RETURN>

A space or a comma can be used to separate the two numbers.

Discontinue the Rectangle creation State

6. Click the DONE button or click a button in the Object Create Control Panel

v6.0 21 December 19982-36 SL-DRAW2 Reference

Page 65: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

Object Change Control Panel

The buttons on the Object Change Control Panel modify objects on the Select List. Clicking on an object adds that object to the Select List. If the object is clicked again, the object is removed from the Select List. All objects are cleared from the Select List by clicking DONE. Once a change option is initiated, changes are made until DONE is clicked.

Most of the change options can be immediately undone. Examples are Fill and UnFill selected objects and AddPt (add a Point) and DelPt (delete a Point). The four transformations Rotate, Move, Mirror, and Scale are undone by using the Remove Xform (Remove Transform) option of the Convert Pull-Down Menu. The SnapPt and MovePt buttons cannot simply be undone — MovePt must be used to undo the changes.

NOTE: Clicking the right mouse button is a shortcut for clicking the DONE button.

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

SL-DRAW2 Reference 2-37v6.0 21 December 1998

Page 66: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Flags

The Flags button allows various flags to be set on an object unconditionally. To use this feature, the object is selected and the Flags button is then clicked. A Set Flags Box is displayed which contains RADIO GISMOs to select the desired flags.

Figure 2-9. The "Set Flags" Box

The flags are defined in the following table.

Object Flags

Flag Definition

noerase cause the update pass to omit erasure of any of the object’s parts before redrawing the object

batcherase cause all objects in a List to be erased first and then the entire List to be redrawn

pts relative force 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

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

Done Escape

Set Flags

doublebuffer

dynarray

pts symmetric

pts relative

Reset

batcherase

noerase

v6.0 21 December 19982-38 SL-DRAW2 Reference

Page 67: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

The pts symmetric flag is more effective than the pts relative flag for alleviating distortion due to pixel rounding error. The pts relative flag is most effective for complex, non-symmetrical objects.

The Reset button restores the original value of the flags before changes were made. Done accepts the changes and exits the Set Flags dialog box. Escape accepts the settings of the flags and, exits the Set Flags Box, and drops out of the set flag loop before all the objects on the Select List are accessed.

pts symmetric force an object’s Points to be transformed relative to each other; useful for objects distorted while animated and moved around the screen due to pixel rounding

dynarray mark 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 enable software double buffering

Object Flags(continued)

Flag Definition

SL-DRAW2 Reference 2-39v6.0 21 December 1998

Page 68: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

UData

UserData is added to objects by clicking the Udata button. UserData is an arbitrary string used by an application program in any way desired. UserData must be less than 200 characters in length.2

UserData is added to objects by first clicking the objects, adding them to the Select List. Next, the UData button is clicked and the Enter Data: Box is displayed.

Figure 2-10. The "Enter Data:" Box for entering UserData

SL-DRAW2 outlines each object in the Select List, one at a time, requests UserData, then outlines the next object until everything on the Select List is assigned some data. When an object is selected which already has data, the UserData is displayed in the Enter Data: dialog box. As each object is outlined, the user can

• enter new data followed by <RETURN> (or clicking Accept in the Enter Data: Box)

• click the NoChange button in the Enter Data: Box to leave the data unchanged

• click the Remove button in the Enter Data: Box to delete data, or

• click the Escape button in the Enter Data: Box to exit before traversing the remainder of the selected objects.

2. Application programs can attach UserData up to 16,384 characters through the gmsUserData( ) function; the SL-DRAW2 interface limits the entry to 200 characters. The limits within SL-DRAW2 will probably be increased when line editing of the UserData becomes available on all supported platforms.

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

Enter Data:

Accept Remove NoChange Escape

v6.0 21 December 19982-40 SL-DRAW2 Reference

Page 69: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

EXAMPLE

Steps to Add UserData to an Object

Functional Description Steps

Select object(s) 1. Click the object(s) whose UserData is be added to or changed

Bring up the Enter Data: Box to add/change UserData

2. Click the UData button in the Object Change Control PanelThe Enter Data: Box appears with the current UserData string in the data field.

Enter UserData for the outlined object from the keyboard

3. Enter

startmotor

4. Click the Accept button in the Enter Data: Box or enter <RETURN>

5. Repeat steps 3 and 4 for the remainder of the objects selected;Click the Escape button in the Enter Data: Box to exit before traversing the remainder of the selected objects.

Faster

Next

Query

Start

Enter Data:

Accept Remove NoChange Escape

startmotor

SL-DRAW2 Reference 2-41v6.0 21 December 1998

Page 70: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Name

Names are added to objects by clicking the Name button. Names are characters entered from the keyboard and can be used to select objects (using the Select Pull-Down Menu). The Name button can also be used to step through the objects on the Select List, seeing each object outlined in the order it was selected. Names can also be used by application programs to locate particular objects within Models.

Naming objects is done by either selecting the objects to name before selecting Name or by clicking Name and then selecting the objects. The Enter Object Name: Box is displayed.

Figure 2-11. The "Enter Object Name:" Box

Either way, SL-DRAW2 outlines the object to be named and displays that object’s current name (if there is one) in the Enter Object Name: Box. As each object is outlined, the user can

• enter a new name followed by <RETURN> (or clicking Accept in the Enter Object Name: Box)

• click the NoChange button in the Enter Object Name: Box to leave the name unchanged

• click the Remove button in the Enter Object Name: Box to delete the name, or

• click the Escape button in the Enter Object Name: Box to exit before traversing the remainder of the selected objects.

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

Enter Object Name:

Accept Remove NoChange Escape

v6.0 21 December 19982-42 SL-DRAW2 Reference

Page 71: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

Naming objects has two purposes:

1. it allows objects to be selected by name (e.g., for selection of invisible or non-detectable objects), and

2. it allows objects to be found by an application program.

Names may be any collection of alphanumeric characters and must begin with a letter. Most of the objects used in SL-DRAW2 have names, however, those names are parts of different Models and do not produce any conflicts. The SL-GMS reserved words listed in Appendix F of the SL-GMS Reference cannot be used as names.

EXAMPLE

Steps to Add a Name to an Object

Functional Description Steps

Select object(s) 1. Click the object(s) to add or change a name

Accept Remove NoChange Escape

Enter Object Name:

startbutton

Faster

Next

Query

Start

SL-DRAW2 Reference 2-43v6.0 21 December 1998

Page 72: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Bring up the Enter Object Name: Box to add/change a name

2. Click the Name button in the Object Change Control PanelThe Enter Object Name: Box appears with the current name string in the data field.

Enter a name for the outlined object from the keyboard

3. Enter

startbutton

4. Click the Accept button in the Enter Object Name: Box or enter <RETURN>

5. Repeat steps 3 and 4 for the remainder of the objects selected;Click the Escape button in the Enter Object Name: Box to exit before traversing the remainder of the selected objects.

Steps to Add a Name to an Object(continued)

Functional Description Steps

v6.0 21 December 19982-44 SL-DRAW2 Reference

Page 73: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

Fill

The Fill button fills selected objects. Objects in the Select List are usually filled with the fill color and style currently selected in the Color Attribute Control Panel.

The Fill button can also change Object Create Control Panel buttons. If a button used for creating closed objects is clicked and Fill is selected, the Object Create Control Panel button creates filled objects. The UnFill button reverses this behavior.

EXAMPLE

Steps to Fill an Object

Functional Description Steps

Fill an object 1. Click the object(s) to be filled

2. Optionally change the current fill color and style (b)

3. Click the Fill button (c)

The objects are displayed as filled (d).

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

01

12

33

00

22

43

SL-DRAW2 Reference 2-45v6.0 21 December 1998

Page 74: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

EXAMPLE

Steps to Change the Circle Create Button to a Filled Circle Create Button

Functional Description Steps

Change the Circle create button to a Filled Circle create button

1. Click the Circle button in the Object Create Control Panel (a)

2. Click the Fill button (b)

The Circle button now appears filled (c) and will create Filled Circle objects

a b

c

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

Identify Copy

Escape Enter . . .

A-Z

A-Z

* +

v6.0 21 December 19982-46 SL-DRAW2 Reference

Page 75: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

Unfill

The UnFill button unfills selected objects.

EXAMPLE

Steps to Unfill an Object

Functional Description Steps

Unfill an object 1. Click the object(s) to unfill (a)

2. Click the Unfill button (b)

The objects are displayed as unfilled (c).

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

SL-DRAW2 Reference 2-47v6.0 21 December 1998

Page 76: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Rotate

The Rotate button rotates selected objects. 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 Change Ref option of the Point Pull-Down Menu.

When the Rotate button is clicked, a dashed Reference Line appears with its left end at the Reference Point. The angle to rotate the selected objects is chosen by:

• clicking a Point relative to the Reference Point and Reference Line

• entering a specific angle using the Enter... option

• clicking the object and, while holding down the mouse button, moving the object relative to the Reference Line, and releasing the mouse button when the new position of the object is selected

A positive angle rotates an object counterclockwise and a negative angle rotates an object clockwise. Clicking DONE terminates the Rotate State.

When an object is rotated, a Transformation object is added to that object. The Transformation object contains information used to display the object at its new position. When SL-GMS displays an object using a Transformation object, it takes longer than if the object does not include a Transformation object. The transformation can be applied to the object’s Points by using the Apply Xform option of the Convert Pull-Down Menu. It is advisable to use the Apply Xform option on all objects in a Model to improve efficiency of the display.

Rotation, combined with copying, is often useful in Model creation and is shown in the EXAMPLE on page 2-31.

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

v6.0 21 December 19982-48 SL-DRAW2 Reference

Page 77: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

EXAMPLE

Sample steps to Rotate an Object

Functional Description Steps

Select object(s) to rotate 1. Click the object(s) you wish to rotate

Select Rotate 2. Click the Rotate button

A Reference Line appears (a).

Select rotation angle 3. Click a Point relative to the Reference Point and line (b)

The object(s) rotate around the Reference Point (c).

Discontinue the Rotate State

4. Click DONE to stop picking rotation angles

(reference line)

(reference point)

(picked point)

(a)

(b)

(c)

SL-DRAW2 Reference 2-49v6.0 21 December 1998

Page 78: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Move

The Move button moves selected objects. When the Move button is clicked, an extent Rectangle appears around the objects to be moved. The extent Rectangle displays the four corners that mark the extent of the object(s) being moved. A mark then appears which indicates the Reference Point used for moving the selected objects. This Reference Point can be changed by using the Change Ref option of the Point Pull-Down Menu.

The selected objects are moved by clicking the Point where the Reference Point is desired. The Move button also allows select-by-motion. For example, an object is selected, the Move button is clicked, and, while holding down the mouse button, the object is dragged to the new position. Upon release, the new position of the object is selected.

Clicking DONE terminates the procedure and the Move State.

When an object is moved, a Transformation object is added to that object. The Transformation object contains information used to display the object at its new position. When SL-GMS displays an object using a Transformation object, it takes longer than if the object does not include a Transformation object. The transformation can be applied to the object’s Points by using the Apply Xform option of the Convert Pull-Down Menu. It is advisable to use the Apply Xform option on all objects in a Model to improve efficiency of the display.

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

v6.0 21 December 19982-50 SL-DRAW2 Reference

Page 79: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

EXAMPLE

Sample steps to Move an Object

Functional Description Steps

Select object(s) to move 1. Click the object to move

Move the object 2. Click the Move button

3. Click the new Reference Point for the object

The object is displayed at the new position.

Discontinue the Move State 4. Repeat step 3 or click DONE to quit

SL-DRAW2 Reference 2-51v6.0 21 December 1998

Page 80: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Mirror

The Mirror button rotates and moves selected objects so they appear as a mirror image of the original objects. To mirror objects, the objects to mirror are first selected then the Mirror button is clicked. Next, a Reference Line is created by clicking twice to pick two Points. The user can also pick just the first Point, and use the HORIZ and VERT constraint options of the Const: button in the Status Control Panel to select the second Point. Horizontal constraint creates a perfectly horizontal Reference Line, and vertical constraint creates a perfectly vertical Reference Line.

When an object is mirrored, a Transformation object is added to the mirrored object. The Transformation object contains information used to display the object at its new position. When SL-GMS displays an object using a Transformation object, it takes longer than if the object does not include a Transformation object. The transformation to the object’s Points can be applied using the Apply Xform option of the Convert Pull-Down Menu. It is advisable to use the Apply Xform option on all objects in a Model to improve display efficiency.

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

v6.0 21 December 19982-52 SL-DRAW2 Reference

Page 81: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

EXAMPLE

Steps to Mirror an Object

Functional Description Steps

Select object(s) to mirror 1. Click the object(s) to mirror

Mirror the object 2. Click the Mirror button

3. Click to pick the first end of the Reference Line (a)

4. Click to pick the second end of the Reference Line (b), or use horizontal or vertical constraint to pick the second end

The selected object(s) are erased and reappear mirrored.

Discontinue the Mirror State 5. Repeat steps 3 and 4, or click DONE

SL-DRAW2 Reference 2-53v6.0 21 December 1998

Page 82: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Scale

The Scale button scales objects. Scaling makes objects larger or smaller. By default, scaling is equal, that is, objects are evenly scaled in the X and Y directions. The UnEqual option can be chosen from the Scale:3 button in the Status Control Panel so that objects are distorted as they are scaled. For example, if a Circle is scaled unevenly, an Ellipse is created.

Objects are scaled by clicking to add them to the Select List, then clicking the Scale button. The objects are surrounded by a dashed border. A solid border appears, which represents the scaling factor. The scaling factor is chosen by moving the solid border inside the dashed border and clicking to make the objects smaller, or clicking outside the dashed border to make the objects larger. The Scale button also allows select-by-motion. For example, the object is Selected, the Scale button is clicked, and, while holding down the mouse button, the object is made smaller or larger, according to the position of the cursor. Upon release, the new scale of the object is selected.

Clicking Done terminates the Scale State.

The scale is set to unequal by clicking the Scale: button in the Status Control Panel until UNEQUAL appears to the right of the button. An unequal scaling in only the horizontal or vertical direction is done by clicking the Scale: button in the Status Control Panel until either the word HORIZ or VERT appears to the right of the Scale: button.

Scaling factors can be entered from the keyboard by selecting the Enter... button in the Object Create Control Panel after selecting Scale from the Object Change Control Panel. It is sufficient to enter only the X scale factor for the Scale change operation. If only the X scale factor is entered, it is used as the Y scale factor as well.

An object is scaled around its Reference Point, which is the center of the object’s extent by default. The Reference Point is changed by using the Change Ref option of the Point Pull-Down Menu.

3. The Scale: button replaces the Const: button in the Status Control Panel when the Scale button in the Object Change Control Panel has been selected for an object.

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

v6.0 21 December 19982-54 SL-DRAW2 Reference

Page 83: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

When an object is scaled, a Transformation object is added. The Transformation object contains information used to display the object in its new aspect. When SL-GMS displays an object using a Transformation object, it takes longer than if the object does not include a Transformation object. The transformation to the object’s Points can be applied by using the Apply Xform option of the Convert Pull-Down Menu. It is advisable to use the Apply Xform selection on all objects in a Model to improve display efficiency.

EXAMPLE

SL-DRAW2 Reference 2-55v6.0 21 December 1998

Page 84: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Steps to Scale an Object

Functional Description Steps

Select object(s) to scale 1. Click the object(s) you wish to scale

Scale the object 2. Click the Scale button

A dashed border and Reference Marker appears.

3. Click inside the border to make the object(s) smaller, or outside the border to make them larger

The object appears larger or smaller.

Discontinue the Scale State 4. Repeat step 3, or click DONE to stop scaling

v6.0 21 December 19982-56 SL-DRAW2 Reference

Page 85: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

SnapPt

The SnapPt button snaps Points of the selected objects to the nearest grid intersection. Grid intersections are set by clicking the Grid: option in the Status Control Panel, selecting Size from the Grid Pull-Up Menu, and entering the grid size as described in the section Status Control Panel on page 2-65. The Points defining the selected objects are moved to the nearest grid intersection whether or not the grid is visible. The grid is made visible by clicking Grid: in the Status Control Panel and selecting On/Off from the Grid Pull-Up Menu. Since the process of snapping Points is automatic, there is very little control over which intersection the Points will snap. A snap Point change cannot be undone.

EXAMPLE

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

(all points snap to grid)

SL-DRAW2 Reference 2-57v6.0 21 December 1998

Page 86: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Steps to Snap an Object to the Nearest Grid Intersection

Functional Description Steps

Select object(s) to change 1. Click the object(s) to change

Move the object’s Points to the nearest grid intersection

2. Click the SnapPt button

The object is erased and redisplayed with new Points.

Discontinue SnapPt State 3. Click the DONE button

v6.0 21 December 19982-58 SL-DRAW2 Reference

Page 87: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

MovePt

The MovePt button changes one or more Points defining a selected object. Only one object at a time may be selected. If several objects are selected, only the first is affected. When MovePt is clicked, the Points defining the selected object are marked with X-style Markers. The desired Point is selected by clicking it. The other Markers disappear. The selected Point is then moved by clicking in the Working View and the object is redrawn. New positions can be picked until DONE is clicked.

Points on Sectors, Three Point Sectors, Pies, or Text cannot be moved.

With Spline objects, MovePt allows the defining Points (the Points defining the Spline object) or the control Points4 to be moved. When a Spline object is selected, and MovePt is clicked, the Mode: word of the Status Control Panel changes to Spline: followed by one of four available options: AUTO, NONE, LINE, and CONT. The way in which a Spline: option affects the MovePt operation is summarized below.

4. In SL-GMS, Spline objects consist of a series of Bezier splines, each with two control Points.

Options for Spline: Word of Status Control Panel

"Spline:" Option Description

AUTO control Points are automatically calculated by SL-DRAW2 so that the Spline curvature is continuous; control Points do not appear because they cannot be moved by the user

NONE no constraints on movement of control Points

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

SL-DRAW2 Reference 2-59v6.0 21 December 1998

Page 88: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Each time a Spline: option is clicked (cycled), the MovePt button must be clicked again to display the marks for the Points that can be moved.

EXAMPLE

LINE constrain control Point selection so that control Point picked remains colinear with the corresponding defining Point and opposite control Point

CONT constrain control Point selection so that control Point opposite to control Point picked is colinear with picked Point and the corresponding defining Point; the distance of the opposite control Point to the defining Point remains constant

Options for Spline: Word of Status Control Panel

(continued)

"Spline:" Option Description

movement of picked Point constrained to this line

control point picked

control point picked

opposite control Point moved

a

b

v6.0 21 December 19982-60 SL-DRAW2 Reference

Page 89: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

Steps to Move an Object’s Points

Functional Description Steps

Select object(s) to change 1. Click the object(s) to change

Move the Point 2. Click the MovePt button

Markers appear at defined Points.

3. Click the Point to be moved (a)

Other Markers disappear.

4. Click the new position for the Point being moved

The object is redrawn (b).

5. Repeat step 4 if needed to correctly position Point, then click DONEMarkers reappear at the defining Points. To move additional Points, steps 3, 4, and 5 can be repeated.

Discontinue MovePt State 6. Click the DONE button

SL-DRAW2 Reference 2-61v6.0 21 December 1998

Page 90: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

AddPt

The AddPt button adds Points to objects. Points are added only to Polylines or Splines — all other objects have a preset number of Points.

Points are added by clicking an object and then clicking the AddPt button. Markers appear at the Points used to define the Polyline or Spline. Either the end Point is picked or two consecutive Points are picked. If the end Point is picked, Points are added beyond it. If the Polyline or Spline is closed, the Points are added between the end Point chosen and the other end Point, and the object remains closed. If two consecutive (adjacent) Points are picked, the added Points are placed between these two Points. The Backup option deletes the Points added until DONE is clicked. Clicking DONE terminates the procedure.

EXAMPLE

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

b

a

c

v6.0 21 December 19982-62 SL-DRAW2 Reference

Page 91: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Object Change Control PanelC

ha

pter 2

Steps to Add a Point to an Object

Functional Description Steps

Select object to change 1. Click the object to which a Point is to be added

Add a Point to the object 2. Click the AddPt button

Markers appear at the defining Points.

3. Click two consecutive Points, (a) and (b), or click an end Point twice

All other Markers disappear.

4. Click the position for the new Point being added

A Point appears and the object is redrawn.

5. Repeat step 4 if needed to correctly position Point, then click DONEMarkers reappear at the defining Points. To add additional Points, steps 3, 4, and 5 can be repeated.

Discontinue the AddPt State 6. Click the DONE button

SL-DRAW2 Reference 2-63v6.0 21 December 1998

Page 92: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

DelPt

The DelPt button deletes Points from Polylines or Splines. Points are deleted by clicking an object and then clicking the DelPt button. The defining Points for the object are marked and Points are deleted until DONE is clicked. As a Point is removed, that object is redrawn. The Backup option replaces the last Point deleted and Undo restores all deleted Points.

EXAMPLE

Steps to Delete a Point from an Object

Functional Description Steps

Select object to change 1. Click the object to have a Point removed from it

Delete a Point from the object

2. Click the DelPt button

Markers appear at the defining Points.

3. Click the Point to delete

The object is redrawn without the Point. To delete additional Points, step 3 can be repeated.

Discontinue the DelPt State 4. Click the DONE button

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

(deleted point)a

v6.0 21 December 19982-64 SL-DRAW2 Reference

Page 93: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Status Control PanelC

ha

pter 2

Status Control Panel

The Status Control Panel monitors or changes modes in SL-DRAW2.

The Grid: option of the Status Control Panel aids in constructing Models. The grid is used much as a piece of graph paper — as a guide in designing.

The numbers appearing after the word Grid: indicate the current grid size. Clicking Grid: displays the Grid Pull-Up Menu. This Pull-Up Menu modifies the grid used while constructing objects.

The grid is either a set of horizontal and vertical lines or a set of dots at intersections. The grid, either lines or dots, is not an object in the current Model. By default, the grid is drawn first and other objects drawn over it. The display of the grid can temporarily be pushed in front of the objects so that the grid is not obscured by filled objects. The grid display can be

Grid Pull-Up Menu Options

Option DescriptionLine/Dot change the grid type: there are two grid types:

lines and dots at the intersections

Front/Back display the grid in front of or in back of the objects in the current Model; if the grid is currently in front of other objects, the grid again becomes part of the background when the objects are redrawn

On/Off turn the display of the grid ON or OFF: the Working View is cleared and the grid is either drawn or not drawn and the objects in the Model are drawn over the grid

Size... change the size of the grid spacing: any positive real number is used 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 spacings can have different values, for example, 2.5 units x 4 units; the default grid spacing is 2 units x 2 units

Offset offset the first grid intersection: by default, the first grid intersection is at the origin, the Point (0, 0). This option has not yet been implemented.

Angle change the grid angle: This option has not yet been implemented.

Grid: 2 x 2

Snap: OFF

Const:

Mode:

OFF

CENTER

SL-DRAW2 Reference 2-65v6.0 21 December 1998

Page 94: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

turned ON or OFF and the distance between grid intersections changed both horizontally and vertically by different distances. A dialog box pops up to enter the numbers for the grid size. Grid sizes are positive real numbers, and if only a single number and a <RETURN> are entered, SL-DRAW2 uses this number for both the width and height of the grid. The number represents Working View units; the default Working View is 100 units wide by 75 units high, regardless of the size of the display screen or Workstation Window.

The List of Point Snap Modes is cycled through by clicking Snap:. Point Snap mode can have three different values: OFF, GRID, or GRAV. By default, the Point Snap Mode is OFF.

Although the grid is useful by itself, it is much more powerful when the Status Control Panel is set to Snap: GRID. Snapping to grid forces every Point picked to be moved to the nearest grid intersection. Snapping works whether the grid is visible or not, and always works with the current grid size.

When GRAV is on, clicking a Point on or very near an object results in a predefined Point on the object. For example, if the corner of a Rectangle is picked, the Point at the corner is used while creating the object. GRAV (short for gravity) helps pick Points to connect objects together. Switching gravity ON causes the Point selection to snap to the closest predefined Point of an object. The section Point Pull-Down Menu on page 2-126 provides a description about predefined Points.

Snapping helps pick the same or similar Points while building objects. The Find Point option in the Point Pull-Down Menu also accomplishes the same action. The power of snapping manifests itself when arranging a number of objects in rows and columns. By choosing the appropriate grid size and turning on Snap: to GRID, objects are quickly positioned in neat rows and columns. In the following example, a keypad is created by instancing the Model button at grid intersections using snap.

v6.0 21 December 19982-66 SL-DRAW2 Reference

Page 95: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Status Control PanelC

ha

pter 2

EXAMPLE

Steps to Use Grid: and Snap: to Arrange Objects

Functional Description Steps

Clear the Working View 1. Click the Model Pull-Down Menu and choose Clear Parts

Select grid size 2. Click the Grid: button in the Status Control Panel and choose Size in the Grid Pull-Up Menu

3. Enter

12 12 <RETURN>

The grid size in the Status Control Panel changes to 12 x 12.

Display grid 4. Click the Grid: button in the Status Control Panel and choose On/Off in the Grid Pull-Up Menu

A 12 x 12 grid is displayed in the Working View.

Select snap-to-grid 5. Click Snap: in the Status Control Panel until the word GRID appears to the right of Snap:

SL-DRAW2 Reference 2-67v6.0 21 December 1998

Page 96: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

An array of buttons was quickly created in the form of a keypad by setting the grid size appropriately and turning on Snap: to GRID. The grid size can also be changed to add more constrained objects to new grid intersections. By turning off GRID snapping (clicking Snap: in the Status Control Panel until the word OFF appears to the right of Snap:), other objects can be created in the same Model that would not be constrained to grid intersections.

Const: (constraint) is active when SL-DRAW2 is waiting for a Point to be picked. Constraint can be changed to HORIZ or

Bring up the window for instancing SubModels

6. Click the SubMod Pull-Down Menu and choose Get Local1

The SUBMODELS window, which contains a scrollbox of all available SubModels, pops up.

Place an icon of the button Model into the Local SubModels List

7. Choose the word button from the scrollbox

The button SubModel Instance is added to the Local SubModels List.

8. Click the Done button in the SUBMODELS window

Select the button icon for instancing

9. Select the symbol of the button in the Local SubModels List

Place an instance of button into the current Model

10. Move the mouse near a grid intersection and click

The button SubModel Instance appears, centered at the grid intersection.

Place eleven additional Instances of button into the current Model

11. Create eleven more buttons by clicking near the grid intersections in a 3 x 4 matrix

Exit the instancing of the button Model

12. Click the DONE button or the right mouse button to discontinue the Model Instancing State

1. If the Model button is not in the scrollbox, it must first be built using the steps in the EXAMPLE in the section Steps to Create and Save a button Model on page 2-112.

Steps to Use Grid: and Snap: to Arrange Objects(continued)

Functional Description Steps

v6.0 21 December 19982-68 SL-DRAW2 Reference

Page 97: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Status Control PanelC

ha

pter 2

VERT and affects the next Point picked. When a horizontal constraint is used, the next Point picked is along a horizontal line from the last Point selected or from the Reference Point. When a vertical constraint is used, the next Point picked is along a vertical line from the last Point picked or from the Reference Point. The mode of Constraint is set to OFF after the Point is picked.

When the Scale button is clicked in the Object Change Control Panel, the Const: option changes to Scale:. Scale: may be EQUAL, UNEQUAL, HORIZ (horizontal), or VERT (vertical). The EQUAL (the default) is used to scale objects evenly, without distortion. The UNEQUAL scale is used to scale objects unevenly, thereby distorting them.

The Mode: option is used to control the Reference Point used when transforming (moving, rotating, scaling, or mirroring) objects. This option ignores any Reference Point set for an object with the Change Ref option of the Point Pull-Down Menu. The Mode: option may be either CENTER or POINT. CENTER mode means that selected objects are moved, rotated, or otherwise transformed relative to an object’s center, which is the default mode. POINT mode uses the predefined Point on an object nearest to the Point selected. Predefined Points are explained in the section Point Pull-Down Menu on page 2-126.

When a Spline object is selected, and MovePt is clicked, the Mode: word of the Status Control Panel changes to Spline:, followed by one of four available options: AUTO, NONE, LINE, and CONT. The section MovePt on page 2-59 provides additional information.

Grid: 2 x 2

Snap: OFF

Const:

Mode:Spline: CENTERAUTO

OFF

SL-DRAW2 Reference 2-69v6.0 21 December 1998

Page 98: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Special Buttons

Figure 2-12. Special buttons

The Model Name Box, located in the top left corner, displays the name of the current Model in the Working View.

Just below the Model Name Box in the upper left corner lies the State Indicator Box. The current State of the editor is displayed in this box. Display of the current editor State is useful when the main window or other windows have been moved in front of dialog boxes or other windows that are displayed by SL-DRAW2. For example, this box displays "Move" if the Move button is pressed in the Object Change Control Panel, or it displays "POPUP" if a dialog box is displayed for data entry.

Just below the State Indicator Box in the upper left corner lies the Cursor Position Box. Upon the first loc_motion event in the Working View, the cursor position in the Working View is provided in World Coordinates (The Display of Models — Views and Workstation/Windows chapter of the SL-GMS Reference provides additional information about World Coordinates).

The number of objects currently selected (the Select List count) appears after the word Select:. Clicking an object adds that object to the Select List. If the object is then clicked again, the object is removed from the Select List. All objects are cleared from the Select List by clicking DONE or the right mouse button. Options selected in the Select Pull-Down Menu affect the display of the Select List count.

The Redraw button clears the Working View, redraws the grid (if it is on), redraws the current Model, and redraws any

modelname

(18.196, 25.482)

Select: 0

Redraw

DONE

DELETE

Backup Undo

v6.0 21 December 19982-70 SL-DRAW2 Reference

Page 99: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Special ButtonsC

ha

pter 2

working Markers or Reference Lines. The Redraw option can always be clicked without changing SL-DRAW2 or the Model.

The Backup button "unpicks" the last Point chosen. Points are unpicked until the last Point in the object is completed. Points picked in a previously-created object cannot be backed up, that is, if a second Rectangle is started, Points cannot be backed up in the first Rectangle. The Backup option also reverses any change option except SnapPt. If a Point for Text placement is picked, the Text (or just <RETURN>) must be entered before the picked Point can be backed up.

The Undo button reverses the last operation. Objects are undeleted if the Undo button is clicked immediately after clicking DELETE. All changes except SnapPt can be undone.

The DONE button is used to complete an action or to clear the Select List. Clicking the right mouse button is the same as clicking the DONE button.

The DELETE button removes objects currently on the Select List from the Model. If acted upon immediately, deletions may be undone after one or more objects have been deleted. A prompt appears indicating that the Undo button needs to be clicked whenever objects have been deleted. Once any other button is clicked, the deletion can no longer be undone.

SL-DRAW2 Reference 2-71v6.0 21 December 1998

Page 100: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Attribute and SubModel Control Panels

Figure 2-13. "Attribute" and "SubModel Control Panels"

The Attribute Control Panels allow changes to be made in the attributes of selected objects. Control panels are provided to modify color, text, markers, and edge characteristics. The SubModel Control Panel allows other Models to be incorporated (instanced) into the current model. These control panels overlay the bottom of the SL-DRAW2 editor display, depending upon the current activity.

The four Attribute Control Panels shown on the left of Figure 2-13 overlay each other so that only one panel is visible at a time. The Attribute Control Panel selection buttons allow the user to select the desired control panel.

Figure 2-14. The Attribute Control Panels selection buttons

Edge

Text

Bitm

Mark

Loc:

Ext:

Scale:

Angle:

1,1

0

Show SubModels

ScalingWrite Mode BITMAP

And

Or

Xor

Overwrite

Complement

None

Impulse

Size: Font: Replace

Marker Style

%

01

12

33

00

22

43

0 1 2 3 4 5 6 78 9 10 11 12 13 14 15

16 17 18 19 20 21 22 2324 25 26 27 28 29 30 31

Fill

Line

Text

COLORS

Backgr

Edge

Text

Bitm

Mark

v6.0 21 December 19982-72 SL-DRAW2 Reference

Page 101: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Attribute and SubModel Control PanelsC

ha

pter 2

SubModel Control Panel

The SubModel Control Panel, shown at the bottom portion of Figure 2-13, consists of two lists of SubModel icons, Local (Loc:) and External (Ext:). A SubModel is instanced in a Model by clicking on an icon and then clicking in the Working View to position it. The SubModel Control Panel also has two buttons for controlling the scaling and rotation of Instances. Clicking on the word Scale: allows for entry of scaling factors. The scaling factor makes the SubModel appear larger (factors greater than 1) or smaller (factors between 1 and 0) when it is created. Clicking on the word Angle: allows for entry of a rotation angle. The rotation is applied when the SubModel is instanced.

Color Attribute Control Panel

Figure 2-15. The "Color Attribute Control Panel"

The Color Attribute Control Panel, shown in Figure 2-15, sets color and fill pattern attributes of selected objects. On the left of the panel are TOGGLE GISMOs representing the four different types of color attributes: fill color (Fill), edge color (Line), Text color (Text), and background color for the current Model (Backgr). The Fill color button also controls Marker color. Each of these buttons is toggled ON (button is highlighted) or OFF (button is unhighlighted) by clicking. When the button for a color attribute is ON, the button is highlighted. More than one color attribute button can be ON at once.

Each of the color cells in the default color palette of the Color Attribute Control Panel has the number of the color shown in the color cell. The fill patterns also have number designations within them.

01

12

33

00

22

43

0 1 2 3 4 5 6 78 9 10 11 12 13 14 1516 17 18 19 20 21 22 2324 25 26 27 28 29 30 31

Fill

Line

Text

COLORS

Backgr

color boxesfillstyleboxes

fillinterior

boxesattributeselection

SL-DRAW2 Reference 2-73v6.0 21 December 1998

Page 102: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

The color boxes (patterned, in the case of monochrome workstations) are buttons used to select a color. When one of these buttons is clicked, the colored rectangle to the right of the highlighted toggle button, and any objects selected, change to the color of the button.

Clicking the COLORS button, on the left side of the Color Attribute Control Panel, displays a 256 color palette. Any of the 256 colors that are not defined in the "colordef.dat" file appear white. When one of the color buttons is clicked in the 256 color palette, the colored rectangle to the right of the highlighted toggle button, and any objects selected, change to the color of the button. Clicking the back button in the 256 color palette will re-display the default color palette.

The six boxes on the far right of the Color Attribute Control Panel are buttons which set the fill interior (finter) and the fill pattern or style (fstyle). Each of the six buttons has two numbers in it. The top number is the fill style and the bottom number is the fill interior. For example, the first button (which is the default) has fstyle 0 (plain) and finter 1 (solid).

If the button with finter 0 (hollow fill interior) 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 finter 0 can be selected by clicking its interior, whereas, an object that is unfilled can only be selected by clicking on its edge.

The other two fill interiors are:

pattern without transparent quality (finter 2), and

pattern with transparent quality (finter 3).

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 Appendix C of the SL-GMS Reference.

v6.0 21 December 19982-74 SL-DRAW2 Reference

Page 103: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Attribute and SubModel Control PanelsC

ha

pter 2

Edge Attribute Control Panel

Figure 2-16. The "Edge Attribute Control Panel"

The Edge Attribute Control Panel is the visible control panel by default. The Edge (Line) Style (estyle) and Width (ewidth) is changed by moving the cursor to the desired style or width and clicking. Only one button for style and one button for width is selected at a time. The edge style represented by a blank button in the Edge Attribute Control Panel, line style 0, is used to create invisible-edge objects. For example, a Rectangle can be created and filled and the edge can have line style 0 so that it is not drawn. Not drawing the edge increases performance in the drawing of filled objects (by skipping the step required to draw the outline of the object).

SL-GMS edge styles

SL-DRAW2 allows selection of five different edge styles (estyle). They are, from top to bottom in Figure 2-16: estyle 0, 1, 2, 3, and 4.

However, SL-GMS has 27 different Line styles. To use an edge style other than 0 through 4, the estyle command for the object must be changed in the ".g" file.

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 two

2N Line style N with each cycle lengthened by a factor of two

%

edge edge fill

fill percent

style width direction

SL-DRAW2 Reference 2-75v6.0 21 December 1998

Page 104: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

For example,

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

Because of the half and twice relationships, apparent overlap exists among some of the Line styles; for example, 3 and 28 are very similar.

Clicking the % button displays a dialog box which allows the fill percent of objects currently selected to be changed. Fill percent affects the amount that any arbitrary polygon5 is filled, beginning at one of the four sides.

CommandLine

Appearance

estyle 2 . . . . . . . . . . . .

estyle 12 .........................

estyle 22 . . . . . . .

Summary of Valid Line Styles forthe SL-GML "estyle" Command

Style Numbers

DescriptionApproximate Appearance

1 11 21 solid _________________

2 12 22 dot, dot2, dotx2 . . . . . . . . . . . . . . . . . .

3 13 23 dashed, dashed2, dashedx2 __ __ __ __ __ __ __

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 ____ _ _ ____ _ _ __

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

v6.0 21 December 19982-76 SL-DRAW2 Reference

Page 105: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Attribute and SubModel Control PanelsC

ha

pter 2

Figure 2-17. The fill direction of objects

The fill direction is changed by clicking the partially filled Rectangle. The first time this button is clicked, all selected objects assume the "current" fill direction shown by the button. Subsequently, each time the fill direction button is chosen, the icon changes to indicate the next fill direction in a cycle of four fill directions. Objects on the Select List also change their fill direction.

Marker Attribute Control Panel

Figure 2-18. The "Marker Attribute Control Panel"

Clicking Mark in the Attribute Control Panel selection buttons displays the Marker Attribute Control Panel. This control panel sets the default Marker style or changes the Marker style of selected Markers. Clicking a button highlights that button and unhighlights the previously-selected button.

Marker Style

SL-DRAW2 Reference 2-77v6.0 21 December 1998

Page 106: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Bitmap Attribute Control Panel

Figure 2-19. The "Bitmap Attribute Control Panel"

Clicking Bitm in the Attribute Control Panel selection buttons displays the Bitmap Attribute Control Panel. This control panel sets the Bitmap Write Mode. The Bitmap Write Mode is also called the Raster Operation Mode.6 The panel contains five buttons, under the words Write Mode, which establish how a Bitmap is drawn on top of the image of an existing Model. Note that the resulting image and color per pixel depend upon the hardware color map current at the time of the Bitmap operation.

The Bitmap Write Mode determines which raster operation is performed between each pixel in the source (the Bitmap that is being drawn on top of an existing Model) and each corresponding pixel of the destination7 (the region of the existing Model being overwritten).

The Overwrite Mode replaces the destination with the image created by the source Bitmap. This is the default Mode.

The Complement Mode replaces the destination with the complement of the source Bitmap, that is, each bit of the source is inverted and the resulting pixel values replace the pixel values of the destination region. An example of the Complement Mode on a single pixel of an eight-plane screen is shown in Figure 2-20.

6. Raster Operation Modes are described in the SL-GMS Function Reference.7. If the Bitmap does not cover the entire Working View, the destination is

that portion of the Model that is covered by the Bitmap.

ScalingWrite Mode BITMAP

And

Or

Xor

Overwrite

Complement

None

Impulse

v6.0 21 December 19982-78 SL-DRAW2 Reference

Page 107: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Attribute and SubModel Control PanelsC

ha

pter 2

Figure 2-20. The effect of the "Complement" Bitmap Write Mode

The And Mode performs the AND raster operation between corresponding pixels of the source Bitmap and the destination region of the Model. An example of the And Mode is shown in Figure 2-21.

Figure 2-21. The effect of the “And” Bitmap Write Mode

source(Bitmap)

destination(existing pixel value ofcurrent contents of screen)

ComplementBitmap Write Mode

new pixel value(new contents of screen)

10

01

00

1

1

00

01

11

0

1

01

11

00

01

source(Bitmap)

destination(existing pixel value ofcurrent contents of screen)

AndBitmap Write Mode

new pixel value(new contents of screen)

10

01

00

1

1

00

01

11

0

1

10

00

10

00

SL-DRAW2 Reference 2-79v6.0 21 December 1998

Page 108: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

The Or Mode performs the OR raster operation between corresponding pixels of the source Bitmap and the destination region of the Model. An example is shown in Figure 2-22.

Figure 2-22. The effect of the “Or” Bitmap Write Mode

The Xor Mode performs the "Exclusive or" raster operation between each pixel of the source Bitmap and destination region of the Model. An example is shown in Figure 2-23.

Figure 2-23. The effect of the “Xor” Bitmap Write Mode

source(Bitmap)

destination(existing pixel value ofcurrent contents of screen)

OrBitmap Write Mode

new pixel value(new contents of screen)

10

01

00

1

1

00

01

11

0

1

11

00

11

11

source(Bitmap)

destination(existing pixel value ofcurrent contents of screen)

XorBitmap Write Mode

new pixel value(new contents of screen)

10

01

00

1

1

00

01

11

0

1

01

00

01

11

v6.0 21 December 19982-80 SL-DRAW2 Reference

Page 109: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Attribute and SubModel Control PanelsC

ha

pter 2

The Bitmap Attribute Control Panel is also used to scale a Bitmap already in the Working View. The algorithm uses a point-sampling method to scale the raster image.

Two buttons are found under the word Scaling in the Bitmap Attribute Control Panel. The button labeled None sets the G_BTM_NO_TRANS flag for a Bitmap; the button labeled Impulse sets the G_BTM_TRANS_IMPULSE flag for a Bitmap. Both buttons also set the modal Bitmap flag attribute.

If the Identify button is pressed when a Bitmap object is on the Select List, a dialog box pops up showing attributes common to the Graphical Primitive class. If the Details button (on the IDENTIFY Dialog Box) is then pressed, another box pops up. This second box shows the state of the BitMapflag attribute on the Bitmap object.

Text Attribute Control Panel

Figure 2-24. The "Text Attribute Control Panel"

Text alignment, height, font, content, or path of a Text object are changed by clicking tokens in this control panel. The section Changing Text Attributes on page 2-14 documents the Text Attribute Control Panel in detail.

Bitmap Flags

Flag Definition

G_BTM_NO_TRANS do not transform the Bitmap object

G_BTM_TRANS_IMPULSE transform the Bitmap object using an impulse-sampling filter

Size: Font: Replace

TextAlignment

Grid

heightbuttons

fontstyle

buttons

contentbutton

pathbuttons

SL-DRAW2 Reference 2-81v6.0 21 December 1998

Page 110: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Pull-Down Menus

This section documents options available in the Pull-Down Menus of SL-DRAW2.

Figure 2-25. SL-DRAW2 Pull-Down Menus

ConvertOrderBitmapDynPointGroupSubModModelSelectViewSystem Palette

Get Model . . .

Merge Model . . .

Clear Parts

Clear Submods

Save Model

Save as . . .

GSave Model

Save & Quit

Create Local

Get Local

Save Local

Loc<-->Ext

Get External . . .

Remove

Show Get Palette . . . Group

FillGroup

Complex FillGroup

UnGroup

Close Group

Close Obj

Open Obj

Change Ref

Find Center

Find Point

Same Point

Reset Ref

Origin (0, 0)

ConvertOrderBitmapDynPointGroupSubModModelSelectViewSystem Palette

Enter Dyn . . .

Edit Dyn . . .

Rename Vars . . .

Show Vars

Preview . . .

Screen Preview

Get Bitmap . . .

Wr Extent . . .

Wr S List . . .

Wr View . . .

Wr Screen . . .

Front of . . .

Back of . . .

Front of All

Back of All

Select

Explode

Make Spline

Remove Xform

Apply Xform

Vis On

Vis Off

Detect On

Detect Off

ConvertOrderBitmapDynPointGroupSubModModelSelectViewSystem Palette

Change Dir . . .

Version . . .

Dump

Redirect Out . . .

PostScript . . .

Quit

Defaults

Select List

Views

Models

Get Defaults . . .

Save Defaults . . .

Save as . . .

Save & Quit

Descend

All

Invert

Model

By Extent

By Name

Same Type

Same Color

Dynamics

Hilite On/Off

Zoom In

Zoom Out

Zoom

Zoom Prev

Pan

Pan to 0

Z/P Workst

Z/P Reset

Z/P Set

Window

v6.0 21 December 19982-82 SL-DRAW2 Reference

Page 111: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

System Pull-Down Menu

The System Pull-Down Menu changes the current working directory, produces debugging output about the objects created, sends error output to a file, and quits SL-DRAW2. It also produces PostScript output of the Working View or all Views.

The Change Dir option displays the DIRECTORIES window, a scrolling selection box that lists any subdirectories within the current directory, any parallel directories, and the parent directory. Any directory can be selected by clicking it. The directory name can also be typed in from the keyboard, but it must not contain dashes, blanks, <ESCAPE>, or other non-printing characters.

Figure 2-26. Change Directory Scrolling Selection Box

Change Dir . . .

Version . . .

Dump

Redirect Out . . .

PostScript . . .

Quit

Defaults

Reset Done/u/gms/demo/draw2

Enter:

./..

./GISMOS

./PALETTES

./SUBMODS

../airports

../batelle

../colordef

../dialog

../diverse

../dmstest

../draw2

DIRECTORIES

SL-DRAW2 Reference 2-83v6.0 21 December 1998

Page 112: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

"System" Pull-Down Menu Options

Option DescriptionChange Dir... change SL-DRAW2’s current working directory:

display the DIRECTORIES window that contains a scrollbox that allows selection of any subdirectory within the current directory, parallel directory, or parent directory; directory names can be entered from the keyboard but must not contain dashes, blanks, <ESCAPE>, or other non-printing characters; after changing the current working directory, the Model Pull-Down Menu displays Models in the new directory and files are stored there (unless other directories are specified)

Version... display a window that shows the version number and release date of SL-GMS that is currently running

Dump produce debugging information about objects which are currently on the Select List: clicking this option displays a menu to select debugging information for the Select List, Views, or Models; dump output indicates the type of object, its Points, and its attributes; a complete description of dump format is provided in the section The Memory Dump Utility in the Debugging Utilities chapter of the SL-GMS Reference

Redirect Out send the output of Dump option and the Show Vars option of the Dyn Pull-Down Menu to a file: the name of the file to be used for output, followed by <RETURN> are entered; to stop redirecting output, this option is used a second time and <RETURN> entered without a filename. (Note to programmers: This option also causes the redirection of error messages sent to standard error port.)

v6.0 21 December 19982-84 SL-DRAW2 Reference

Page 113: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

PostScript prints a Model in Standard Encapsulated PostScript file (EPSF)1 format from SL-DRAW2: several optional parameters can be entered to control the contents of the PostScript output file that is produced; valid parameters are described in the SL-GMS Reference, Text chapter, in the section SL-GMS PostScript Options; an example is shown below

Defaults allow for retrieval and saving of default settings for the SL-DRAW2 editor: this option is currently implemented with data files that can be edited to change the default settings for SL-DRAW2 (the section SL-DRAW2 configuration files on page 2-147 provides additional information)This option is not yet implemented

Quit exit SL-DRAW2

1. The output of the SL-GMS release 4.0e PostScript facility conforms to the Adobe Standard for "Encapsulated PostScript File" Format — Version 3.0, in accordance with Appendix G — Document Structuring Conventions — Version 3.0, Section G.4 — Document Structure Rules, and Appendix I — Guidelines for Specific Operators,

of the Adobe publication PostScript Language Reference Manual, Second Edition.

"System" Pull-Down Menu Options(continued)

Option Description

SL-DRAW2 Reference 2-85v6.0 21 December 1998

Page 114: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Steps to produce a PostScript file from SL-DRAW2

To print a Model in Standard Encapsulated PostScript File (EPSF) format from SL-DRAW2, the PostScript option of the System Pull-Down Menu is used. The dialog boxes involved in creating a PostScript output file are:

Figure 2-27. The PostScript option Dialog Box A

Figure 2-28. The PostScript option Dialog Box B

Figure 2-29. The PostScript option Dialog Box C

The first dialog box to appear (Box A) assumes that the aa2 Model is in the Working View.

Enter PostScript Output File Name, and optional parameters:

Accept Cancel

aa2

Yes No

"aa2.ps" exists -- overwrite?

OK

Hit Shift-Right Mouse Button to output work view to a PostScript file

v6.0 21 December 19982-86 SL-DRAW2 Reference

Page 115: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Creating a PostScript file using no options

In the simplest possible case, with a Model named aa2 for example, the name aa2 appears in the Model name space. The next steps are:

The purpose of this seemingly complex sequence is to permit greater versatility in what may be "photographed" for PostScript output. Suppose the user wants to create PostScript output for all of SL-DRAW2, including the appearance of the Model Pull-Down Menu with the Clear Parts option highlighted. After starting up SL-DRAW2, the following sequence will provide the output:

Steps to Save the Working View to a PostScript File on Disk using No Options

(Named Model in Working View)

Functional Description Steps

Enter PostScript interface State

1. Click the PostScript option of the System Pull-Down Menu

Box A appears with aa2 as PostScript output File Name.

Confirm default entry inBox A

2. Click the Accept button or enter<RETURN>

Box C appears.

Follow instructions in Box C 3. While holding down the <SHIFT> key, click the right mouse button

The PostScript file "aa2.ps" has been created. A message to that effect is displayed in the window in which SL-DRAW2 was started.

4. Click the OK button or the right mouse button

(The OK button is outlined by a thick-lined black rectangle, indicating that it is the default choice and will therefore be automatically selected by clicking the right mouse button.)

SL-DRAW2 Reference 2-87v6.0 21 December 1998

Page 116: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Steps to Create Postscript Output for All of SL-DRAW2, Including the Model Pull-Down Menu with the Clear

Parts Option Highlighted(No Model in Working View)

Functional Description Steps

Enter PostScript interface State

1. Click the PostScript option of the System Pull-Down Menu

Box A appears with draw_postscript as PostScript output File Name.

Enter the "all" (multi-View) option

2. Enter<SPACE>-aafter the draw_postscript file name

Note: the <SPACE> before the "-a" is required.

Confirm entry in Box A 3. Click the Accept button or enter<RETURN>

Box C appears.

Close Box C 4. Click the OK button or the right mouse button

Display the Model Pull-Down Menu and highlight the Clear Parts option

5. Click the Model Pull-Down Menu — press and continue to hold the left mouse button on the Clear Parts option; do not release the left mouse button

Send the current State of SL-DRAW2 to PostScript output

6. While continuing to hold the left mouse button, press and hold down the <SHIFT> key and click the right mouse button

The file "draw_postscript.ps" is created.

End the PostScript-create session

7. Release the <SHIFT> key and the mouse button

v6.0 21 December 19982-88 SL-DRAW2 Reference

Page 117: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Options available for saving a PostScript file

If a Model does not yet have a name, the name draw_postscript appears in the name space of Box A. A click of the left mouse button with the cursor on the Cancel button, or a click of the right mouse button with the cursor in any position cancels that name and makes Box A disappear.

If the Model has a name, for example, aa2, it appears in the name space. If the desired name is aa2, Accept or <RETURN> creates the PostScript file named "aa2.ps".

If the desired name is aa2tt,

tt

is entered and Accept is clicked (or <RETURN> is entered); the output file name is "aa2tt.ps".

If the desired name is xyz, the aa2 must be backspaced over and

xyz

entered and Accept clicked (or <RETURN> entered).

NOTE: The "text cursor" is invisible in Box A but is effectively positioned immediately after the last character of the displayed name, and thereafter faithfully follows the action.

After Accept is clicked (or <RETURN> is entered), if a PostScript file by that name exists, the user is informed by Box B, which offers the option to "overwrite" or not. If not, the No button is clicked; if yes, the Yes button or the right mouse button is clicked.

Several option parameters are available — if any are desired, they must be entered on the command line in Box A before Accept is clicked (or <RETURN> is entered).

SL-DRAW2 Reference 2-89v6.0 21 December 1998

Page 118: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

SL-GMS PostScript options

The following options affect the contents of the PostScript output file and usually the appearance of the printed output. If an option is entered on the command line, the effect is as described.

PostScript options

Option Description

-op Output orientation is portrait mode.

-ol Output orientation is landscape mode. (This is the default.)

-s<S> (S may be real) Set scale factor to S percent. (0 < S <=100,100 is default.) The x and y dimensions are reduced by the specified percentage.

-x<N> (N an integer) If N is positive, displace the PostScript output display to the right by N (a + sign is not needed), to the left if negative, for both portrait and landscape modes.

-y<N> (N an integer) If N is positive, displace the PostScript output display upward by N (a + sign is not needed), downward if negative, for both portrait and landscape modes.

-r<A> (A an integer) Rotate the image for the output by A degrees. If A is positive, rotate counterclockwise; if negative, clockwise. This applies to both landscape and portrait modes. Rotates around (0, 0) which is the lower left corner of the Working View. The default orientation (no rotation) is landscape. Often, translation parameters (-x and -y) must be given along with the rotation parameter so that the View is not clipped off the page.

-c <string> (Note the space after -c) Insert "string" as a "comment" in the PostScript file in the line beginning with "%Cmd Line/Comment:". In a PostScript file, any line beginning with a single "%" sign is a comment line and is ignored by the PostScript processor; a line beginning with "%%" is meaningful to it. A definition of the "default" comment and the effect of -c upon it is provided below.

-l (lower case L) Colored lines of width <= 1.0 are changed to black by default; if -l is set, the color is not changed in those cases.

-a Output all Views (multiple Views). For example, when used while in SL-DRAW2, output all that appears within its outermost boundaries to the PostScript file.

v6.0 21 December 19982-90 SL-DRAW2 Reference

Page 119: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

.

Note that each time a PostScript output file is created, all options are re-initialized to their defaults.

-b Outline the PostScript output with a thin-lined black rectangle. The rectangle is drawn at the outer limits of the output. The border becomes an integral part of the output — it will be displaced, scaled, and so on, just as the rest of the output.

-i Put "initgraphics" in PostScript file.

-f<N>1 (N a hexadecimal number) Modify the PostScript output to include %%Preview information so that it can be imported by FrameMaker. Valid values are described in the table, Valid Hexadecimal Values for the -f option on page -91

-p set coordinate range of one pixel

-w set maximum dc x coordinate

-h set maximum dc y coordinate

1. In earlier versions, -f3 (SL-DRAW) and -f1 (SL-DRAW2) were valid options.These options have been superseded with -f.

Valid Hexadecimal Values for the -f option

Value Description-f0x1 include an 80 x 24 dummy previewing rectangle, used by

document layout applications, such as FrameMaker, to view the picture as it is being imported

-f0x2 "no clip"

-f0x4 Output all Views (multiple Views). For example, when used while in SL-DRAW2, output all that appears within its outermost boundaries to the PostScript file.

-f0x20 Put "initgraphics" in PostScript file.

-f0x40 Control how the bounding box information is actually calculated. By default, the bounding box includes the extent of the View in which the Model is being displayed.Thus, by default, the bounding box for a picture being created from the Working View will include the entire Working View. The "-f0x40" option indicates that the bounding box is NOT to include the View extent, but only the parts of the Model that are within the viewing area. The bounding box dimensions will be the extent of all the objects in the current working Model (clipped, of course, to the View's extent).

PostScript options(continued)

Option Description

SL-DRAW2 Reference 2-91v6.0 21 December 1998

Page 120: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

In portrait mode the "11 inch" dimension is vertical; in landscape mode it is horizontal.

Suppose for a Model named aa2 the entered options are

-s50 -x360 -y270

As soon as <RETURN> is entered, the PostScript output file is created; it has the name "aa2.ps". After this file is sent to the PostScript printer, the printed image will be in landscape mode, scaled by 50% (the x and y dimensions of the image are reduced by half). The origin of the display will now be in the center of the printed PostScript output, in both the x and y directions. (If -ol had also been on the command line, the image would also be in landscape mode.)

As seen, the default filename is that of the displayed Model with a suffix of ".ps" rather than ".m1". If the user desires a different file name, it must be entered preceding the list of "-" parameters. For example,

aa2_test -s50 -x360 -y270

will create a PostScript output file with the name "aa2_test.ps". If the modification to the file name appears after any of the "-" parameters, it is ignored.

If -op had been included in the above command line, the result would be in portrait mode with a displacement of the output image by 270 in the horizontal (x) direction and 360 in the vertical (y) direction.

The output image is first scaled and displaced as specified. Then it is rotated about its own origin by the specified amount. For example,

aa2_test -s50 -x360 -y270 -r10

will cause the display of the example above to be rotated counterclockwise by 10 degrees. If

-r-10

were specified, the rotation would be 10 degrees clockwise. The effect of the rotation is the same in both landscape and portrait modes. The angle of rotation can be any value between 0 and +360 or between 0 and -360.

v6.0 21 December 19982-92 SL-DRAW2 Reference

Page 121: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Suppose the Model is aa2 and the user enters on the command line only

-c This is a comment

Then in file "aa2.ps", immediately after the "%%EndProlog" line, will appear the SL-GMS comment line:

% CmdLine/Comment: This is a comment

If the Model is aa2 and the user enters on the command line

aa2_test -s50 -x360 -y270

then in the file "aa2_test.ps" the comment line will contain the SL-GMS default comment, namely,

% CmdLine/Comment: aa2_test -s50 -x360 -y270

On the other hand, if -c is entered along with other parameters, only the -c comment will appear in the SL-GMS comment line in the PostScript file. For example,

aa2_TEST -s50 -c Trying scale of 50% -x360 -y270

will result in

% CmdLine/Comment: Trying scale of 50%

SL-DRAW2 Reference 2-93v6.0 21 December 1998

Page 122: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

For the -f (or -f1) options, the following lines are added to the PostScript file:

%%BoundingBox: 0 0 80 24 # just before %%EndComments

%%BeginPreview: 80 24 1 24 # just after %%EndComments

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

% FF0000000000000000FF

% FF0000000000000000FF

% FF0000000000000000FF

% FF0000000000000000FF

% FF0000000000000000FF

% FF0000000000000000FF

% FF0000000000000000FF

% FF0000000000000000FF

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

% FFFFFFFFFFFFFFFFFFFF

%%EndPreview

initgraphics # as the first active PS command

The cliprect commands are not put in the PostScript file.

v6.0 21 December 19982-94 SL-DRAW2 Reference

Page 123: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

View Pull-Down Menu

The View Pull-Down Menu controls aspects of the Working View. For example, the user can zoom in on a portion of a Model by using the Zoom option.

Zooming makes objects in the Working View appear larger or smaller. Panning moves all objects in the Model left or right, up or down. Changes made by zooming or panning are not permanent and are not saved with the Model. These operations move the WC-window overlooking the Model. It is as if the Model is fixed in position, but the WC-window is moved up or down (to zoom) and right or left (to pan).

Objects in a Model can be created and changed after zooming or panning. It should be mentioned that line widths and some Text do not grow larger or smaller when zoom is used because the Workstation may not handle scaling Text or Line widths appropriately.

The Z/P Reset option restores the window to its original location, and Z/P Set fixes the window in its current location. The Window option sets the WC-window of the Working View by using Point coordinates.

"View" Pull-Down Menu Options

Option DescriptionZoom In zoom in, that is, move the WC-window closer so that objects

in the Working View appear larger: only objects in the middle of the Working View are visible after zooming in; the Z/P Reset option undoes the zoom or zooms back out; the dimensions of the zoom are automatically determined by SL-DRAW2

Zoom Out zoom out, that is, move the WC-window farther away so that objects in the Working View appear smaller: the Z/P Reset option undoes the zoom or zooms back in; the dimensions of the zoom are automatically determined by SL-DRAW2

Zoom zoom in on a particular region in the Working View: a prompt appears asking the user to select two corners for the zoom Rectangle and the user clicks two opposing corners around the region in which to zoom; SL-DRAW2 adjusts the Rectangle so that it fits into the Working View, then it displays the objects in this Rectangle; the adjustment prevents the distortion of objects that would occur if the aspect ratio of the Rectangle chosen is not 3 to 4

Zoom In

Zoom Out

Zoom

Zoom Prev

Pan

Pan to 0

Z/P Workst

Z/P Reset

Z/P Set

Window

SL-DRAW2 Reference 2-95v6.0 21 December 1998

Page 124: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Zoom Prev enable the Working View "zoom" to return to the State following the previous "zoom" operation

Pan pan or move the WC-window over the Model: the user is asked to pick a Point for the new center and after the Point is picked, the Model is redrawn in the new WC-window; the Z/P Reset option undoes the pan; the section Panning on page 2-97 provides additional information

Pan to 0 pan to (0, 0), the Point in the lower left corner of the Working View: Panning to 0 is often used to create a Model for use as a SubModel (the user pans to 0 before any parts are created so that these parts have the Point (0, 0) as their center); the Z/P Reset option undoes the pan; the section Steps to Change the WC-window using Pan to 0 on page 2-102 provides additional information

Z/P Workst zoom in; provide for Models to be used in a window the same size as the one used for SL-DRAW2; to provide for the current Model’s parts to be the same size as they would be if the Working View were full-screen size (number of pixels of entire screen), enlarge the SL-DRAW2 window to full screen and then click Z/P Workst; the center of the zoom is prompted for in the window from which SL-DRAW2 was started

Z/P Reset undo any zoom or pan: the WC-window is returned to its starting position unless Window or Z/P Set has been used

Z/P Set make the current zoom or pan "permanent" until SL-DRAW2 is restarted; the WC-window position is not saved when a Model is saved

Window change the WC-window dimensions of SL-DRAW2’s Working View: by default, the dimensions are the opposing corners (0, 0) and (100, 75); Zoom Out makes the dimensions larger, and Zoom In makes the dimensions smaller; panning is accomplished by adding offsets to both the x and/or y coordinates; changing the WC-window dimensions of SL-DRAW2’s Working View is for SL-GMS experts only; the Zoom or Pan option makes temporary adjustments to SL-DRAW2’s WC-window dimensions; direct changes to SL-DRAW2’s WC-window dimensions by using Z/P Reset cannot be undone

"View" Pull-Down Menu Options(continued)

Option Description

v6.0 21 December 19982-96 SL-DRAW2 Reference

Page 125: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Panning

Pan is used to move the WC-window so that it is centered over any Point currently within the WC-window. The Enter... button in the Object Create Control Panel can also be used to enter the Point that is to become the new WC-window center.

Clicking the Pan option displays a Reference Grid in the Working View, as shown in Figure 2-30.

Figure 2-30. Reference Grid for Pan

To pan the WC-window of the Working View so that the top left corner of the top square is moved to the top left corner of the Working View, the Reference Grid is moved, as shown in Figure 2-31.

SL-DRAW2 Reference 2-97v6.0 21 December 1998

Page 126: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Figure 2-31. Reference Grid moved into position

Another mouse click causes a solid Reference Grid to be displayed. The solid Reference Grid can then be positioned so that the upper left corner of the grid is at the upper left corner of the View, as shown in Figure 2-32.

Figure 2-32. Solid Reference Grid moved into position

Once the solid Reference Grid is in position, the mouse is clicked once more. The position of the WC-window changes,

v6.0 21 December 19982-98 SL-DRAW2 Reference

Page 127: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

and the objects in the Working View appear as shown in Figure 2-33.

Figure 2-33. The "Working View" after panning

DONE is then clicked twice to end Pan.

In the following example the user will practice changing the WC-window position by first creating two working Lines as axes at the origin. (The Lines are not necessary for changing the WC-window, but merely supply reference axes which better exhibit the WC-window’s current status.) The WC-window position is then changed by using the View Pull-Down Menu, Pan to 0 option so that the origin becomes the center of the Working View.

SL-DRAW2 Reference 2-99v6.0 21 December 1998

Page 128: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

EXAMPLE

Steps to Create Two Lines to Serve as Reference Axes

Functional Description Steps

Create a vertical line with one end at the origin (0, 0)

1. Click the Line button in the Object Create Control Panel

2. Click the Point Pull-Down Menu and choose Origin (0, 0)

3. Click the Const: button in the Status Control Panel until the word VERT appears to the right of the button

4. Move the mouse cursor halfway up the Working View and clickA vertical line appears.

Before Panning

(0,0)

v6.0 21 December 19982-100 SL-DRAW2 Reference

Page 129: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

The above steps created two Lines which represent the positive x and y axes centered at the origin, Point (0, 0). Other methods could have been used to create these Lines, for example, the Enter... button in the Object Create Control Panel to enter each end Point for the Lines.

Four different methods were used for creating the end Points of the lines in the example above. First, the Origin (0, 0) option in the Point Pull-Down Menu specified the first end Point at the origin. Next, the Const: button was clicked until the VERT constraint option was selected so a vertical line was created. Next, the Find Point option of the Point Pull-Down Menu found the same Point which was used to begin the first Line (the origin again). Finally, the HORIZ option of the Const: button (horizontal constraint) created a horizontal Line.

The origin in the Working View is now moved by changing the WC-window into the Working View. The Pan to 0 option of the View Pull-Down Menu realigns the WC-window so that the origin (0, 0) Point is in the center of the Working View.

Create a horizontal line with the same starting Point as the vertical line

5. Click the Point Pull-Down Menu and choose Find Point

6. Move the mouse near the lower left corner of the Working View and click

7. Click the Const: button in the Status Control Panel until the word HORIZ appears to the right of the button

8. Move the mouse cursor halfway across the screen to the right and clickA horizontal line appears.

Discontinue the Line creation State

9. Click the DONE button or the right mouse button

Steps to Create Two Lines to Serve as Reference Axes

(continued)

Functional Description Steps

SL-DRAW2 Reference 2-101v6.0 21 December 1998

Page 130: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Changing the WC-window of the Working View with thePan to 0 selection makes it possible to see any Model which is constructed around the origin.

Steps to Change the WC-window using Pan to 0

Functional Description Steps

Change the WC-window of the SL-DRAW2 Working View so that (0, 0) lies in the center (rather than in the lower left corner, which is the SL-DRAW2 default)

1. Click the View Pull-Down Menu and choose Pan to 0The reference axes are redisplayed in the center of the Working View.

Before Panning

After Window Changed by Pan

(0,0)

(0,0)

v6.0 21 December 19982-102 SL-DRAW2 Reference

Page 131: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Select Pull-Down Menu

The Select Pull-Down Menu manipulates the Select List. The Select List is used when objects are changed or deleted in SL-DRAW2. 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" Pull-Down Menu Options

Option DescriptionDescend permit the selection of objects within Groups:

highlight Rectangle shows on descended selections; a part of a SubModel Instance cannot be picked; each time Descend is chosen, a number in parentheses in the Select: status indicates how deep within Groups an object can be selected — the default level is 0; a level of 1 permits selecting objects within Groups, a level of 2 allows selecting an object which is inside of a Group which is inside of another Group, and so on; clicking the Select: button reduces the selection depth; this option is often used for applying DynProps within a Group; the Move operation can be performed on parts selected by the Descend option; the following operations can be done provided the parts are not contained in a Group having a Transformation Matrix — Copy, Rotate, Scale, Mirror, MovePt, DelPt, AddPt, the Change Ref option of the Point Pull-Down Menu, or the Group option of the Group Pull-Down Menu

All select all objects in the current Model

Invert deselect objects on the Select List and select all objects not already on the Select List

Model allow the current Model to be added to the Select List

By Extent select the objects that are displayed entirely within a Rectangle, called the extent; the user is prompted to pick two Points in opposing corners of a Rectangle that completely surround the desired objects to select; even undetectable objects are selected this way; any objects selected are added to the existing Select List

Descend

All

Invert

Model

By Extent

By Name

Same Type

Same Color

Dynamics

Hilite On/Off

SL-DRAW2 Reference 2-103v6.0 21 December 1998

Page 132: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

By Name select objects by name from the current Model: the user is prompted for the name of the desired object to add to the Select List; objects are named by using the Name button in the Object Create Control Panel, or in an application program with the gmsObjNameStr( ) function; selecting a part of a SubModel by name is not permitted

Same Type select all objects, even undetectable ones, with the same graphical Primitive type as the last object selected: for example, if an object selected is a Circle, and Same Type is selected, all objects which are Circles are added to the Select List; if a Model Instance is the last object on the Select List and the Same Type option is clicked, Same Type selects only those Instances having the same SubModel name

Same Color select all objects, even undetectable ones, with the same color as the last object selected (i.e., selects all objects for which gmsQColor( ) returns the same value as it does for the selected object); for example, if the last object selected has a red edge color and Same Color is selected, all objects in the Model with the edge color of red are also added to the Select List

Dynamics select only objects, even undetectable ones, with DynProps (Dynamic Properties): the Select List is cleared and only objects in the Model with DynProps are put on the Select List

Hilite On/Off with Hilite On, selected objects have a highlight Rectangle visible

"Select" Pull-Down Menu Options(continued)

Option Description

v6.0 21 December 19982-104 SL-DRAW2 Reference

Page 133: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Model Pull-Down Menu

The Model Pull-Down Menu gets, saves, clears, or merges Models. When Get Model or Merge Model is clicked, the MODELS window, which contains a scrollbox of all available Models in the current directory, is displayed. One of these Models is selected by clicking the Model’s name or entering the name of the desired Model.

Figure 2-34. "Get Model" Scrolling Selection Box

When a Model is saved (without using a directory path) using either the Save or Save as... option of the Model Pull-Down Menu, the list of Model names in the MODELS window automatically updates and displays the name of the new Model. Selecting the Get Model and the Merge Model options of the Model Pull-Down Menu updates the list of Model names in the MODELS window if a new Model has been added to the directory from outside of the SL-DRAW2 editor.

Models are saved as files by using SL-DRAW2 or by an application which uses SL-GMS. Each Model file has 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

Get Model . . .

Merge Model . . .

Clear Parts

Clear Submods

Save Model

Save as . . .

GSave Model

Save & Quit MODELS

Enter:

Get Model DoneMerge Model

enginetestmodzoomtest

SL-DRAW2 Reference 2-105v6.0 21 December 1998

Page 134: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

SL-DRAW2. An ".m1" file cannot be created if the Model contains more than 16,000 objects.

For compatibility with all supported platforms, file names should not exceed fourteen characters. Model names should be ten characters or less to allow for valid extensions of ".g", ".m1", ".i", ".ps", ".m2", and ".dat".

The characters in the Model name can be alphabetic, numeric, or underscore {A-Z, a-z, 0-9,_ }. Model names must not contain dashes, blanks, <ESCAPE>, or other non-printing characters. Names of Models cannot be an SL-GMS-reserved word. SL-GMS-reserved words are listed in Appendix F of the SL-GMS Reference.

SL-DRAW2 reads from a full path name file when the Get Model option of the Model Pull-Down Menu is used but saves files locally when the Save option of the Model Pull-Down Menu is used. A full path name may be entered to save a file other than in the local directory using the Save As... option of the Model Pull-Down Menu.

NOTE: The Get Model option of the Model Pull-Down Menu will display the following error message:

unable to find Model Instance <name>

if any of the SubModels, contained in the Model being loaded, cannot be found in the directories of the SL-GMS Library path described on page 2-110. Use the -I (or -i) command line option of SL-DRAW2 to include the directory paths where the SubModels are located.

v6.0 21 December 19982-106 SL-DRAW2 Reference

Page 135: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

"Model" Pull-Down Menu Options

Option DescriptionGet Model... release the current Model: display the MODELS

window, which contains a scrollbox of all available Models in the current directory; a Model name in the MODELS window is clicked to load the Model into the Working View; a prompt is displayed asking permission to free the current Model before retrieving another (unless SL-DRAW2 has been invoked with the -y option — the section Command-line options on page 1-6 provides additional information); a Model name may be entered from the keyboard — any directory or system specification may be entered, followed by the Model’s name and <RETURN>; a Model is displayed after a Model is loaded by SL-DRAW2; the Model’s name appears in the Model Name Box located in the top left corner — the name which appears in this box is used by default when the current Model is saved

Merge Model... add the parts of a Model to the current Model: the name appearing in the Model Name Box 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

Clear Parts remove the current Model’s parts: the name of the current Model is deleted in the Model Name Box; if the current Model has any SubModels, these Models remain on the SubModels List; to clear the SubModels List, the Clear Submods option is used

Clear Submods clear the List of SubModels: each SubModel added to the current Model is added to either the List of the local or external SubModels; clearing this List makes these SubModels unavailable to the current Model without adding these Models to a SubModels List again; the Clear Parts option permits removal of the parts while leaving the SubModels for the construction of the next Model; to remove everything from the current Model select both Clear Parts and Clear Submods

Save Model save the current Model using the name shown in the Model Name Box: this name is the same as when Get Model was used to read the Model; if SL-DRAW2 is started and a Model is not retrieved, a dialog box is displayed requesting the Model name

SL-DRAW2 Reference 2-107v6.0 21 December 1998

Page 136: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Save as ... save a Model using a different name: a dialog box is displayed requesting the name under which SL-DRAW2 will save the current Model; any directory or system specification may be entered, followed by the Model’s name and <RETURN>; SL-DRAW2 follows the same conventions used by the operating system for specifying directories; SL-DRAW2 appends the ".m1" suffix to the Model’s name after the name is entered

GSave Model create an ASCII version of the current Model in SL-GML (".g") format: the ".g" format of Model files are portable between machine architectures; SL-GML or the gm1 program distributed in the bin directory are used to convert ".g" files back into their binary format

Save & Quit save the current Model and quits SL-DRAW2: the name shown in the Model Name Box as the Model’s file name is used or a dialog box is displayed asking for which name to use; this option both saves the current Model and ends the SL-DRAW2 session

"Model" Pull-Down Menu Options(continued)

Option Description

v6.0 21 December 19982-108 SL-DRAW2 Reference

Page 137: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

SubMod Pull-Down Menu

The SubMod Pull-Down Menu manipulates the Local and External SubModels Lists. It allows SubModel Instances to be inserted into the current Model. When any of the buttons are clicked in the SubMod Pull-Down Menu, the SubModel Control Panel appears across the bottom of SL-DRAW2’s display. Icons representing local and external SubModels appear in small boxes in this control panel. Customized icons can be created, as described in the section Creating customized SubModel icons on page 2-120. The default SubModel Control Panel provides 20 slots for SubModel icons; a 48-slot SubModel Control Panel is provided when SL-DRAW2 is invoked with the -x option. The section Command-line options on page 1-6 describes the -x option of SL-DRAW2 further.

Figure 2-35. The default "SubModel Control Panel" — 20 boxes for SubModel icons

Figure 2-36. The "SubModel Control Panel" displayed when SL-DRAW2 is invoked with the "-x" option — 48 boxes for SubModel icons

The External SubModels List is labeled with Ext: or E, and the Local SubModels List is labeled with Loc: or L. A SubModel is added to the Local SubModels List by clicking the Get Local option. Clicking the Get External option adds a SubModel to the External SubModels List.

The Get External and Get Local options both cause the SUBMODELS window, which contains a scrollbox of all available SubModels, to be displayed. Clicking one of the SubModels listed in the SUBMODELS window adds the SubModel to the appropriate SubModels List.

Create Local

Get Local

Save Local

Loc<-->Ext

Get External . . .

Remove

Show

Loc:

Ext:

Scale:

Angle:

1,1

0

Show SubModels

L:

E:Scale:

Angle:

1,1

0

Show SubModels

SL-DRAW2 Reference 2-109v6.0 21 December 1998

Page 138: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

The SubModels that are displayed in the SUBMODELS window are from the following directories:

UNIX Systems

<current directory><current directory>/GISMOS<current directory>/GRAPHS<current directory>/SUBMODS$GMS_HOME/demo/gismos/GISMOS$GMS_HOME/demo/graphs/GRAPHS$GMS_HOME/demo/models/SUBMODS

VAX/VMS Systems

<current directory>[<current directory>.GISMOS][<current directory>.GRAPHS][<current directory>.SUBMODS]gms$home:[demo.gismos.GISMOS]gms$home:[demo.graphs.GRAPHS]gms$home:[demo.models.SUBMODS]

NT Systems

<current directory><current directory>\GISMOS<current directory>\GRAPHS<current directory>\SUBMODS%$GMS_HOME%\demo\gismos\GISMOS%$GMS_HOME%\demo\graphs\GRAPHS%$GMS_HOME%\demo\models\SUBMODS

and in paths specified with the -i command-line option.

A SubModel is added to the current Model by clicking an icon in one of the Lists and positioning it in the Working View. The Point picked in the Working View is where SL-DRAW2 puts the (0, 0) coordinate of the SubModel.

NOTE: When the Create Local option of the SubMod Pull-Down Menu is used to save a SubModel, SL-DRAW2 first moves all of the selected objects so that their center of extent is (0, 0), and then saves the objects as a SubModel.

The SubModel Control Panel also features two buttons for controlling the scaling and rotation of Instances. The desired scaling factors can be entered by clicking Scale:. It is

v6.0 21 December 19982-110 SL-DRAW2 Reference

Page 139: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

sufficient to enter only the x scale factor for Scale:. If only the x scale factor is entered, it is used as the y scale factor as well. The scaling factor makes the SubModel appear larger (factors greater than 1) or smaller (factors between 0 and 1) when it is instanced. Clicking Angle: allows a rotation angle to be entered. This rotation is applied when the SubModel is instanced.

"SubModel" Pull-Down Menu Options

Option DescriptionShow display the SubModel Control Panel

Create Local make a local SubModel by using the parts currently on the Select List: copies of these parts are automatically collected into a Model; a dialog box appears requesting a name for the local SubModel; the original parts are not disturbed; the SubModel is added to the Local SubModels List but it is not saved; the Save Local option is used to save to an ".m1" file

Get Local read in an ".m1" Model file and adds it to the Local SubModels List: the SUBMODELS window, which contains a scrollbox of all available SubModels, is displayed and a Model name is clicked or the name of the Model is entered (any directory or system specification may be entered, followed by the Model’s name and <RETURN>); an icon of the Model appears in the Local SubModels List

Save Local save a local SubModel as a ".m1" Model file: the Save Local button is clicked, then the icon in the Local SubModels List to be saved is clicked; once a local SubModel is saved as a Model, it can be edited or used as an external SubModel in another Model; the name used when this SubModel was originally created is the name used for the Model file

Loc<-->Ext switch SubModels between the Local and External SubModels Lists: if the SubModel is on the Local SubModels List, it is also saved as an ".m1" Model file; if the SubModel is on the External SubModels List, a copy of its parts is added to the current Model; the disk copy of the SubModel is not affected by switching from the External to Local SubModels List

SL-DRAW2 Reference 2-111v6.0 21 December 1998

Page 140: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Making Models to use as SubModels

The following example describes how to create a Model to be used as a SubModel. The Model to be created will be a modular button of the type used in keypads and will consist of three parts: a square base, the button’s shadow, and the button’s face.

EXAMPLE

Get External... add Models to the External SubModels List: the SUBMODELS window, which contains a scrollbox of all available SubModels, is displayed; one of these Model names is clicked or the name of the Model is entered (any directory or system specification can be entered, followed by the Model’s name and <RETURN>); an icon of the Model appears in the External SubModels List

Remove remove SubModels from either of the SubModels Lists by clicking the icon of the SubModel(s) to remove; Instances of the SubModel(s) removed are also deleted from the current Model

Steps to Create and Save a button Model

Functional Description Steps

Change the WC-window of SL-DRAW’2 Working View so that (0, 0) lies in the center (rather than in the lower left corner, which is SL-DRAW’2 default)

1. Click the View Pull-Down Menu and choose Pan to 0

"SubModel" Pull-Down Menu Options(continued)

Option Description

v6.0 21 December 19982-112 SL-DRAW2 Reference

Page 141: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Create a Rectangle object with the coordinates (-5, 5), (5, -5)

2. Click the Rectangle button in the Object Create Control Panel

3. Click the Enter... button in the Object Create Control Panel

4. Enter

-5 5 <RETURN>

A space or a comma can be used between the numbers.

5. Click the Enter... button in the Object Create Control Panel

6. Enter

5 -5 <RETURN>

A space or a comma can be used between the numbers.

Select Filled Circle creation 7. Click the Circle button in the Object Create Control Panel

8. Click the Fill button in the Object Change Control Panel

Select fill color 9. Be certain that only the Fill button in the Color Attribute Control Panel is enabled; click color 7 in the Color Attribute Control PanelThe Fill box changes to color 7.

Find the center of the Rectangle object and use it as the center Point of the Circle object

10. Click the Point Pull-Down Menu and choose Find Center

11. Move the mouse cursor to the Rectangle and select it

Find a Point on the edge of the Rectangle object and use it as the edge of the Circle object

12. Click the Point Pull-Down Menu and choose Find Point

13. Move the mouse to the middle of one of the Rectangle’s sides and click

A Filled Circle is displayed within the Rectangle.

Steps to Create and Save a button Model(continued)

Functional Description Steps

SL-DRAW2 Reference 2-113v6.0 21 December 1998

Page 142: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Using the keyboard to enter the coordinates of the corners of the Rectangle guaranteed a square centered around the origin. Next, a Circle was created using Find Center to make the center of the Circle identical to the center of the Rectangle. Find Point was then used to pick the center of an edge of the square which marked the end Point of the Circle’s radius so the Circle fit exactly within the square. Making a copy of the Circle assured that the next Circle was the same size as the original, and by using a horizontal constraint, the second Circle was slightly offset from the first along the horizontal axis. Saving the Model created a Model file, "button.m1", which can be included in other Models.

Discontinue the Circle creation State

14. Click the DONE button or the right mouse button

Create a copy of the Circle object and offset it a little to the left of center of the first Circle

15. Click the Copy button in the Object Create Control Panel

16. Click Const: in the Status Control Panel, until the word HORIZ appears

17. Move the mouse cursor slightly to the left of the selected Filled Circle’s center and click

Change the fill color of the copy to color 0

18. Click color 0 in the Color Attribute Control PanelThe Fill box and the fill color of the Circle change to color 0.

Discontinue the Copy State 19. Click the DONE button or the right mouse button

Save the button Model 20. Click the Model Pull-Down Menu and choose Save Model

21. Enter

button<RETURN>

Steps to Create and Save a button Model(continued)

Functional Description Steps

v6.0 21 December 19982-114 SL-DRAW2 Reference

Page 143: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down Menus

v6.0 21

Ch

ap

ter 2

NOTE: When a SubModel is instanced, the location of the mouse cursor in the Working View corresponds to the origin (0, 0) of the original Model. Using the mouse to make an Instance of an external SubModel created with its Reference Point at a location other than the origin (0, 0) is sometimes difficult because the placement of the Instance is limited to the relative offset of the cursor. A workaround is to use the Enter ... option to enter the desired location for the Instance.

Instancing SubModels — local versus external

In the following example, two Models will be created that use Instances of the button Model already created in the section Making Models to use as SubModels on page 2-112. In one Model, the "button" will be used as a local SubModel, in the other it will be used as an external SubModel. The button Model will then be changed,8 showing the effect the changes have on the two Models.

EXAMPLE

8. If an external SubModel Instance needs different attributes from those of the original Model, dynamics should be attached to the original Model.

Steps to Instance button as a local SubModel in the Model testLocal

Functional Description Steps

Clear the Working View to prepare for a new Model

1. If the button Model is in the Working View, click the Model Pull-Down Menu and choose Clear Parts

Bring up the window for instancing SubModels

2. Click the SubMod Pull-Down Menu and choose Get Local The SUBMODELS window, which contains a scrollbox of all available SubModels, pops up.

Loc:

Ext:

Scale:

Angle:

1,1

0

Show SubModels

SL-DRAW2 Reference 2-115 December 1998

Page 144: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Place an icon of the button Model into the Local SubModels List

3. Click the word button from the SUBMODELS window

An icon of the button Model is added to the Local SubModels List in the SubModel Control Panel

4. Click the Done button in the SUBMODELS window

Select the button icon for instancing

5. Click the button icon in the Local SubModels List

Place an Instance of button into the current Model

6. Move the mouse cursor to position the button SubModel and click

The button SubModel is displayed with its origin at the mouse click Point.

Exit the instancing of the button Model

7. Click the DONE button or the right mouse button to discontinue the Model Instancing State

Save the testLocal Model 8. Click the Model Pull-Down Menu and choose Save as...

9. Enter

testLocal<RETURN>

Steps to Instance button as a local SubModel in the Model testLocal

(continued)

Functional Description Steps

v6.0 21 December 19982-116 SL-DRAW2 Reference

Page 145: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

The two new Models, testLocal and testExt, each contain the same SubModel: button. If the Model button is changed and saved again, testExt will display the changed "button", while the "button" in testLocal will appear unchanged.

Steps to Instance button as an external SubModel in the Model testExt

Functional Description Steps

Clear the Working View to prepare for a new Model

1. Click the Model Pull-Down Menu and choose Clear Parts

Move the button Model from the Local SubModels List to the External SubModels List

2. Click the SubMod Pull-Down Menu and choose Loc<->Ext

3. Click the button icon in the Local SubModels List

The button icon is erased and redisplayed in the External SubModels List

Select the button icon for instancing

4. Click the button icon in the External SubModels List

Place an Instance of button into the current Model

5. Move the mouse cursor to position the button SubModel and click

The button SubModel is displayed with its origin at the mouse click Point.

Exit the instancing of the button Model

6. Click the DONE button or the right mouse button to discontinue the Model Instancing State

Save the testExt Model 7. Click the Model Pull-Down Menu and choose Save as...

8. Enter

testExt<RETURN>

Loc:

Ext:

Scale:

Angle:

1,1

0

Show SubModels

SL-DRAW2 Reference 2-117v6.0 21 December 1998

Page 146: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Steps to Change the button Model

Functional Description Steps

Place the button Model into the Working View

1. Click the Model Pull-Down Menu and choose Get ModelThe MODELS window pops up.

2. Click the word button in the MODELS window

Modify the Rectangle object 3. Select the Rectangle by clicking the left mouse button on its edge

The Select: count changes to 1.

4. Click the Scale button in the Object Change Control Panel

5. Move the mouse cursor to a position outside the Rectangle and click

The Rectangle appears larger.

Save the button Model 6. Click the Model Pull-Down Menu and choose Save Model

button Modelbefore change after change

Modelbutton

v6.0 21 December 19982-118 SL-DRAW2 Reference

Page 147: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Steps to Examine the testLocal Model

Functional Description Steps

Place the testLocal Model into the Working View

1. Click the Model Pull-Down Menu and choose Get Model

2. Click the word testLocal in the MODELS window

The testLocal Model is displayed and the "button" appears unchanged.

SL-DRAW2 Reference 2-119v6.0 21 December 1998

Page 148: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

In both testLocal and testExt, the "button" appears as a Model Instance. The entire Model Instance can be selected, but not an individual part of the "button." If the user wishes to change the button’s shadow to another color, for example, the original Model must be changed. In order to change the Model where it is instanced, the Model can be exploded, as described in Exploding Models on page 2-145.

Creating customized SubModel icons

A SubModel icon is used in the Local and External SubModels Lists to pictorially represent the Models in the Lists. A SubModel icon is simply the entire Model which it represents, scaled-down to the size of the box in the SubModels Lists. If this Model is complex, it takes a long time to draw and may be difficult to recognize. In addition, the Model may contain Text which does not scale, resulting in the printing of this Text outside the tiny box borders of the SubModels Lists. An icon for a complex Model can be customized.

A customized SubModel icon is built with the origin at its center. The SubModel icon should contain as few objects as possible to simply sketch out the Model it represents. Short Text labels can also be used to identify it. The Model is then saved using an underscore followed by the same name as the Model for which it serves as an icon. For example, the customized SubModel icon for the Model "switcher.m1" would be named "_switcher.m1".

NOTE: The names of icons (Model names preceded by underscores) do not appear in the MODELS window. To retrieve a Model whose

Steps to Examine the testExt Model

Functional Description Steps

Place the testExt Model into the Working View

1. Click the Model Pull-Down Menu and choose Get Model

2. Click the word testExt in the MODELS window

The testExt Model is displayed and the "button" appears with the larger Rectangle.

v6.0 21 December 19982-120 SL-DRAW2 Reference

Page 149: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

name begins with an underscore, the name of the Model must be entered using the keyboard.

SL-DRAW2 Reference 2-121v6.0 21 December 1998

Page 150: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Palette Pull-Down Menu

The Palette Pull-Down Menu makes Palettes available while creating Models. Palettes are provided for the storage and placement of objects. A Palette is a Model; the Model is displayed in the PALETTE window when selected in the PALETTE SELECTION window.

Clicking the Get Palette button displays the PALETTE SELECTION and PALETTE windows to allow an object to be selected from a Palette and put into the Working View.

Figure 2-37. The "PALETTE SELECTION" and "PALETTE" windows of SL-DRAW2

The contents of the PALETTE SELECTION window are specified by the palette_path option in the "options.dat" file. The palette_path option specifies which Palette Model names will appear in the PALETTE SELECTION window and whether Palette Model names will include directory paths. The section SL-DRAW2 configuration files on page 2-147 describes the valid values for the palette_path option.

Get Palette . . .

Done

PALETTE SELECTION

/u/m40_slave/demo/draw2/PALETTES/buttons

/u/m40_slave/demo/draw2/PALETTES/hbargraphs

/u/m40_slave/demo/draw2/PALETTES/linegraphs

/u/m40_slave/demo/draw2/PALETTES/palette1

/u/m40_slave/demo/draw2/PALETTES/palette2

/u/m40_slave/demo/network/PALETTES/net_equip

MSG

SC 1

DISK LABEL

NODE NAME

NAME

net_equip Palettes DonePalette:

PALETTE

v6.0 21 December 19982-122 SL-DRAW2 Reference

Page 151: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

The default contents of the PALETTE SELECTION window are all Models in all of the "/PALETTES" directories found in these paths:

UNIX Systems

<current directory><$GMS_HOME>/demo/draw2

VAX/VMS Systems

<current directory>gms$home:[demo.draw2]

NT Systems

<current directory>%$GMS_HOME%\demo\draw2

and any path specified with the "-i" command line option

To create a Palette, the user changes directory to the PALETTES subdirectory of the current working directory. A Model is then created by instancing other external SubModels or by creating objects using the Object Create Control Panel. Once the Model is saved, the Palette is available while creating Models in the working directory.

Once in the PALLETTE window, any object in the Palette Model can be selected by clicking the left mouse button. A copy of the selected object is placed into the working Model by clicking the left mouse button once more. If the selected object from the Palette is a SubModel, when copied, 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.

When the Get Palette option of the Palette Pull-Down Menu is clicked, the PALETTE SELECTION and PALETTE windows are active. If either window becomes hidden, they both are popped in front by clicking on the Get Palette option of the Palette Pull-Down Menu once again.

SL-DRAW2 Reference 2-123v6.0 21 December 1998

Page 152: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

The Palettes button in the PALETTE window reactivates the PALETTE SELECTION window.

"Palette" Pull-Down Menu Option

Option DescriptionGet Palette... display the PALETTE SELECTION and PALETTE

windows to allow objects to be selected from a Palette and put into the Working View

v6.0 21 December 19982-124 SL-DRAW2 Reference

Page 153: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Group Pull-Down Menu

The Group Pull-Down Menu creates or destroys Groups. A Group is a collection of objects. Any object that is a part of a Model can also be a part of a Group. Members of a Group act as one object. For example, an entire Group can move, change color, disappear, or be filled. A Group can be constructed with only one part.

The different Group types, Group, FillGroup, and Complex FillGroup, fill with different behaviors because their boundaries are treated differently to denote interior and exterior when crossed with a horizontal ray. Any Graphical Primitive can be used as parts in a Group, FillGroup, or Complex FillGroup. Once created, the Fill button of the Object Change Control Panel fills it.

"Group" Pull-Down Menu Options

Option Description

Group create a Group object; the desired objects are selected, the Group option is chosen, and the number of objects on the Select List changes to 1, indicating that the selected objects have become a single Group object

FillGroup similar to Group except that SL-DRAW2 connects the selected open objects with an invisible edge so that they can be filled as one object

Complex FillGroup similar to Group except that SL-DRAW2 creates a Group object which can be filled with respect to multiple boundaries (such as "islands" or "holes")

UnGroup dissolve a Group: the Group is clicked, then the UnGroup option is chosen; the Select List changes from one object (the selected Group) to as many objects as were in the Group

Close Group set the closed attribute on a Group created with either the Group or FillGroup options: the closed attribute cannot be set on a Group created with the Complex FillGroup option

Close Obj set the closed attribute on an object, and can be applied to any open object such as Polylines, Splines, Sectors, and so on

Open Obj reset the closed attribute on an object to 0, and can be applied to any closed object such as Polygons, Closed Splines, Closed Sectors, and so on

Group

FillGroup

Complex FillGroup

UnGroup

Close Group

Close Obj

Open Obj

SL-DRAW2 Reference 2-125v6.0 21 December 1998

Page 154: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Point Pull-Down Menu

Often, SL-DRAW2 requires a Reference Point for an object, Group, or a selected set of objects and prompts the user to select one. For example, all SL-DRAW2 operations in the Object Create Control Panel require a Reference 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, it can be set by using the Change Ref option of the Point Pull-Down Menu.9

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

"Point" Pull-Down Menu Options

Option DescriptionChange Ref set the Reference Point on an object: if the

Reference Point is changed on a Select List, the Reference Points for the objects are changed all at once and a message is issued to indicate that the operation was successful (when DONE is executed to clear the Select List); the default Reference Point is the object’s 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; for scaling objects, the center is the only Reference Point used which does not also move the objects being scaled; the Reference Point is used for the Copy, Move, Scale, or Rotate options of the Object Change Control Panel; if no Reference Point exists on an object when it is required for an operation, SL-DRAW2 creates a temporary Operation Reference Point (see Reference Point definition in the Glossary of the SL-GMS Reference)

Find Center find the center Point of an object: the Find Center option for Circles, Pies, and Sectors results in selection of the identical center Point used when these objects were created; this option also finds the center of the extent for all other objects

Change Ref

Find Center

Find Point

Same Point

Reset Ref

Origin (0, 0)

v6.0 21 December 19982-126 SL-DRAW2 Reference

Page 155: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Find Point find the predefined Point nearest the Point on the object picked: for Polylines, Lines, and Splines, the predetermined Points are identical to the Points used when these objects were created; Circles have predetermined Points at the 12, 3, 6, and 9 o’clock positions; Rectangles have predetermined Points at all four corners and at the mid-Point of each of the sides; Sectors and Pies have predetermined Points at the center, the end Points of the Sector, and the middle of the Sector

Same Point reuse the same Point used in a previous operation within the current object creation State (once the object creation State is exited, the Point "history" is lost): for example, Same Point reuses the center Point of a Circle as the center of the next Circle, or reuses the second Point in the Circle, representing the radius, as the radius of the next Circle; makes identically-sized Rectangles by picking the first Point and using this option to provide a constant offset for the second Point; used with Pies and Sectors to find the same center or end Point

Reset Ref reset an object’s Reference Point to its default Reference Point — the center of its extent

Origin (0, 0) select the origin as a response to a Point query in any of the SL-DRAW2 operations

"Point" Pull-Down Menu Options(continued)

Option Description

X

X

X

X

X

X

X X

X X

X X

X

X X X

X

XXX

X

SL-DRAW2 Reference 2-127v6.0 21 December 1998

Page 156: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Using the "Point" Pull-Down Menu

This section highlights three special methods for selecting Points to be used with SL-DRAW2:

• the Change Ref option allows changing the Reference Point used when transforming an object;

• the Find Center option provides the center of an object; and

• the Find Point option picks a predefined Point from an object’s extended Point List.

The four transformation options in SL-DRAW2 are Rotate, Move, Mirror, and Scale. The Rotate, Move, and Scale transformation options work relative to a Reference Point. The object is transformed relative to its Reference Point. (Mirror works relative to a Reference Line.)

In rotation, the purpose of the Reference Point is obvious — the object is rotated around the Reference Point. The Reference Point is displayed as a Marker along with a Reference Line by which to choose the angle of rotation. In moving, the object is positioned relative to the Reference Point, which is displayed as a Marker.

In scaling, the purpose 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 displaced when the object is scaled. The Reference Point is displayed as a Marker, along with an extent Rectangle.

The next example illustrates the effect of Reference Point location on scaling by changing the Reference Point with Change Ref and scaling two equivalent objects by the same scaling factor. An object will be created, copied, and then the Enter... option with Scale will be used to produce the identical scaling on both objects. Before scaling the second object, Change Ref changes the Reference Point for the second object.

v6.0 21 December 19982-128 SL-DRAW2 Reference

Page 157: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

EXAMPLE

Steps to Experiment with Scaling and the Reference Point

Functional Description Steps

Select Pie creation 1. Click the Pie button in the Object Create Control Panel

Create a Pie object 2. Use the mouse to create a Pie on the left of the Working View

3. Click DONE or the right mouse button

Create a copy of the Pie object

4. Click the Copy button in the Object Create Control Panel

5. Move the mouse to the right of the first shape and click

Discontinue the Copy State and clear the Select List

6. Click DONE, or the right mouse button, twice

SL-DRAW2 Reference 2-129v6.0 21 December 1998

Page 158: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Scale the left Pie object 7. Select the left Pie

8. Click the Scale button in the Object Change Control PanelAn extent Rectangle appears around the selected Pie, with a Marker at the center.

9. Click the Enter... button in the Object Create Control Panel

10. Enter

.5 .5<RETURN>

The Pie appears half as large and at the same position.

Discontinue the Scale State and clear the Select List

11. Click DONE, or the right mouse button, twice

Scale the right Pie using a Point near the origin (0, 0) as its Reference Point

12. Select the Pie on the right

13. Click the Scale button in the Object Change Control Panel

14. Click the Point Pull-Down Menu and choose Change Ref

15. Move the mouse near the origin and click

A Reference Point mark appears near the origin.

16. Click the Enter... button in the Object Create Control Panel

17. Enter

.5 .5<RETURN>

A second Pie appears half as large and is moved toward the Reference Point.

18. Click DONE or the right mouse button

Steps to Experiment with Scaling and the Reference Point(continued)

Functional Description Steps

v6.0 21 December 19982-130 SL-DRAW2 Reference

Page 159: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Using a Reference Point other than the center is not uncommon. It is important to understand what the Reference Point is and how it works with transformation options. As another example, the user will learn how to change the Reference Point to rotate one object around another. First the Find Center and Find Point selections will be used to create this example.

EXAMPLE

SL-DRAW2 Reference 2-131v6.0 21 December 1998

Page 160: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Steps to Create a Dial

Functional Description Steps

Select Circle creation 1. Click the Circle button in the Object Create Control Panel

Select the center Point of the Circle object

2. Move the mouse to the center of the Working View and click

Select a Point on the outside edge of the Circle object

3. Move the mouse to the top edge of the Working View and click

A large Circle appears.

Create a small Circle object with its center Point the same as that of the large Circle

4. Click the Point Pull-Down Menu and choose Same PointA Marker appears at center of the large Circle.

5. Move the mouse a short distance from the marker and click

A small Circle appears inside the larger one.

Discontinue the Circle creation State

6. Click DONE, or the right mouse button, twice

Select Polygon creation 7. Click the Polygon button in the Object Create Control Panel

Create the dial hand (a Polygon with one side connecting the edges of the two Circles objects)

8. Click the Point Pull-Down Menu and choose Find Point

9. Move the mouse to the top of the small Circle and click

A Marker appears exactly at the top of small Circle.

10. Click the Point Pull-Down Menu and choose Find Point

11. Move the mouse to the top of the large Circle and click

A Line extends exactly to the top of large Circle.

v6.0 21 December 19982-132 SL-DRAW2 Reference

Page 161: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

A Model was created that resembles a dial. Using Find Point selected Points exactly at the top of each Circle for the dial’s hand. The Same Point option allowed use of the same Point used when creating the previous Circle. (The Find Center option could also have been used to pick the Point that was the center of the large Circle.) The following steps will rotate the hand around the small Circle.

EXAMPLE

Create the dial hand (a Polygon with one side connecting the edges of the two Circles objects) (continued)

12. Move the mouse down slightly and to the left and click

13. Move the mouse slightly to right and click

14. Click DONE or the right mouse button

SL-DRAW2 closes the Polyline.

Discontinue the Polygon creation State

15. Click DONE or the right mouse button

Steps to Create a Dial(continued)

Functional Description Steps

SL-DRAW2 Reference 2-133v6.0 21 December 1998

Page 162: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

By default, an object is rotated around a Reference Point that is within or on an object. The Reference Point was changed with Change Ref so one object could be rotated around another. The Find Center option made it easy to pick the Point that is the center of the small Circle.

It is easy to visualize the center of a Circle, and even a Rectangle. But what about an irregular shape, like the Closed Polyline used as a hand? SL-GMS uses the center of the

Steps to Rotate one Object around another

Functional Description Steps

Be certain the Polygon object is selected

1. With the steps performed in the previous table, the Polygon object (the hand) should currently be on the Select List and the Select: count should be 1; if not, click the hand to select it

Change the Reference Point of the hand to the center of the small Circle object

2. Click the Point Pull-Down Menu and choose Change RefAn extent Rectangle appears around the hand, with the Reference Point in the center.

3. Click the Point Pull-Down Menu and choose Find Center

4. Select the smaller Circle

A Reference Point appears in the center of the small Circle, with a Reference Line for rotation.

Select Rotate 5. Click the Rotate button in the Object Change Control Panel

A Reference Line appears.

Rotate the hand around the Reference Point

6. Move the mouse to different locations around center and click

The hand is rotated around the small Circle.

Discontinue the Rotate State

7. Click DONE or the right mouse button

v6.0 21 December 19982-134 SL-DRAW2 Reference

Page 163: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

extent Rectangle for choosing the center of an object. An extent Rectangle, or simply extent, is the smallest Rectangle, with a horizontal 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 Find Point option produces a Point selection as if the mouse had been clicked exactly on the edge of an object. The Find Point option does not indicate just any Point on an object’s edge, only certain predefined Points. Any of the Points used while creating a Polyline may be chosen with Find Point, as may the end Points of a Line. The corners of Rectangles, the center of each of a Rectangle’s sides, and the center of the Rectangle may be picked. The three Points describing a Pie can also be picked. On Circles and Sectors, the end Points of Sectors, the center, and the four cardinal Points (North, South, East, and West, where North is up) on Circles are also predefined Points. Examples of the predefined Points appear in the section Find Point on page 2-127.

Being able to pick these Points exactly makes the creation of some Models much simpler. For example, creating boxes and Circles and joining them together with Lines, as in a flow chart or organization hierarchy chart, is easily accomplished with Find Point.

SL-DRAW2 may be put into a "Find Point Mode" by turning on gravity. Gravity is turned ON by clicking the word next to Snap: in the Status Control Panel. The GRAV selection turns on snapping to one of the predefined Points in an

SL-DRAW2 Reference 2-135v6.0 21 December 1998

Page 164: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

object. When gravity is ON and an object is clicked, the predefined Point nearest to the mouse’s location is picked. Having gravity ON is exactly like choosing Find Point rather than picking a Point. Gravity has no effect when Points which are not on objects are picked.

The following example illustrates how to create Lines between boxes by using gravity.

EXAMPLE

Steps to use Gravity to Connect Boxes

Functional Description Steps

Change the size of the grid and display it

1. Click the Grid Pull-Up Menu and choose Size

2. Enter

5 5<RETURN>

3. Click the Grid Pull-Up Menu and choose On/Off

Select Snap-to-grid 4. Click the Snap: button in the Status Control Panel until GRID appears to the right of the button

Select Filled Text Rectangle creation

5. Click the Filled Text Rectangle button in the Object Create Control Panel

Select center alignment for text

6. Click the center of the Text Alignment Grid in the Text Attribute Control Panel

v6.0 21 December 19982-136 SL-DRAW2 Reference

Page 165: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Create a Filled Text Rectangle object with the text "President"

7. Pick two Points for the first box

8. Enter

President<RETURN>

Create a Filled Text Rectangle object with the text "Vice Pres."

9. Pick two Points below and to the left

10. Enter

Vice Pres.<RETURN>

Discontinue the Filled Text Rectangle State and clear the Select List

11. Click DONE, or the right mouse button, twice

Create a copy of the "Vice Pres." box using horizontal constraint

12. Select the "Vice Pres." box

13. Click the Copy button in the Object Create Control Panel

14. Click the Const: button in the Status Control Panel until HORIZ appears to the right of the button

15. Move the mouse to right of the "Vice Pres." box and click

Discontinue the Copy State 16. Click DONE or the right mouse button

Steps to use Gravity to Connect Boxes(continued)

Functional Description Steps

SL-DRAW2 Reference 2-137v6.0 21 December 1998

Page 166: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

In the example above, Find Point could also have been used before picking each end Point for the Lines.

Create lines between the boxes using Gravity

17. Click the Snap: button in the Status Control Panel until GRAV appears to the right of the button

18. Click the Line button in the Object Create Control Panel

19. Move the mouse to bottom of the "President" box and click

20. Move the mouse to the top of the "Vice Pres." box and click

A Line appears between two boxes, neatly centered.

21. Move the mouse to bottom of the "President" box and click

22. Move the mouse to the top of the other "Vice Pres." box and click

A Line appears between two boxes, neatly centered.

Discontinue the Line creation State

23. Click DONE or the right mouse button

Steps to use Gravity to Connect Boxes(continued)

Functional Description Steps

v6.0 21 December 19982-138 SL-DRAW2 Reference

Page 167: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Dyn Pull-Down Menu

With the exception of selecting objects with dynamics using the Select Pull-Down Menu, everything done with dynamics involves options in the Dyn Pull-Down Menu. This Pull-Down Menu is used to enter, edit, list, rename variables, or test the dynamic descriptions of objects. A detailed description about how to use each of these items is provided in the Dynamics chapter of the SL-GMS Reference.

The first four options listed in the table below work with the objects currently in the Select List.

"Dyn" Pull-Down Menu Options

Option Description

Enter Dyn... bring up a menu series in the ENTER DYNAMICS window and displays in the DYNAMIC PROPERTY window, the dynamic descriptions being created: by clicking buttons and entering requested information, dynamic descriptions are created for each of the objects on the Select List; clicking Done in the ENTER DYNAMICS window exits from these menus; further information is provided in the manual Using Enter Dyn

Edit Dyn... edit dynamic descriptions associated with the objects on the Select List: bring up the DYNAMIC PROPERTY window which contains a scrollbox in which to create/change dynamic descriptions for an object; clicking Done in the DYNAMIC PROPERTY window exits the Edit Dyn mode

Rename Vars... rename variables associated with dynamic properties of SubModels: bring up the RENAMED VARIABLES window which contains a scrollbox to rename variables associated with the Instances of SubModels on the Select List

Show Vars show variable names referenced in the selected objects listed in alphabetical order: the List of variable names is sent to the standard error output, and can be sent to a file by using the Redirect Out option of the System Pull-Down Menu

Preview... preview the dynamic descriptions of objects in the current Model: brings up the PREVIEW window

Screen Prev perform a screen preview of the dynamic descriptions of objects in the current Model: this option is not currently implemented

Enter Dyn . . .

Edit Dyn . . .

Rename Vars . . .

Show Vars

Preview . . .

Screen Preview

SL-DRAW2 Reference 2-139v6.0 21 December 1998

Page 168: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Bitmap Pull-Down Menu

The Bitmap Pull-Down Menu gets or writes Bitmaps. Bitmaps are exact copies of the dots (pixels) used to create a display on the Workstation’s screen. The ability to manipulate Bitmaps may not be available on all Workstations (the Installation Notes provide additional information). On some Workstations, displaying a Bitmap is faster than displaying the objects in the same area as the Bitmap. Bitmaps are sometimes used as a means for printing a screen image.

Bitmaps are saved as files with the file extension ".i". Bitmap files are raster files, and are binary; that is, they cannot be read or edited except by translating programs. When SL-DRAW2 gets a Bitmap file, it adds it to the Model according to the Bitmap Write Mode, set with the Bitmap Attribute Control Panel (additional information is provided in the section Bitmap Attribute Control Panel on page 2-78).

SL-DRAW2 expects to find a Bitmap file with an extension of ".i" or ".bmp" (Windows NT only). If a bitmap produced by an X utility has “.xwd” as an extension, the file must be renamed to have the “.i” extension.

A Bitmap larger than the default Working View can be saved by increasing the size of the Working View, choosing the Window option of the View Pull-Down Menu, and creating the Bitmap using the Wr View... option of the Bitmap Pull-Down Menu.

For compatibility with all supported platforms, file names should not exceed fourteen characters. Bitmap names should be ten characters or less to allow for a valid extension of ".i". The characters in the Bitmap name are chosen from alphabetic, numeric, or underscore {A-Z, a-z, 0-9,_ }. Bitmap names must not contain dashes, blanks, <ESCAPE>, or other non-printing characters.

Names of Bitmaps cannot be an SL-GMS-reserved word. SL-GMS-reserved words are listed in Appendix F of the SL-GMS Reference.

Get Bitmap...

Wr Extent...

Wr S List...

Wr View...

Wr Screen...

v6.0 21 December 19982-140 SL-DRAW2 Reference

Page 169: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

"Bitmap" Pull-Down Menu Options

Option DescriptionGet Bitmap... read a Bitmap file and adds the Bitmap as an object

in the current Model: bring up the BITMAPS window containing a scrollbox with the names of the Bitmap files in the current1 directory; a Bitmap file is selected by clicking its name and then choosing the location of the lower left corner of the Bitmap; the Bitmap Write Mode combines the image contained in the Bitmap with the image already displayed on the screen; the Overwrite Mode replaces the current image with the Bitmap; the other modes use logical operations to combine each pixel of the display with the Bitmap; the Done button is clicked in the BITMAPS window to exit the Get Bitmap State

1. Bitmap files are searched for only in the current directory.

Wr Extent... write a Bitmap of an extent Rectangle: the extent is picked by choosing two opposing corners after selecting this option; everything within the Rectangle defined by these corners is saved in a raster file; the user is prompted for the name of the raster file; SL-DRAW2 appends the extension ".i" to the filename

Wr S List... write a Bitmap of the objects on the Select List: SL-DRAW2 briefly displays the smallest Rectangle which fits around the objects on the Select List, the extent, then prompts the user for a filename; SL-DRAW2 appends the extension ".i" to the filename

Wr View... write a Bitmap of the entire Working View: SL-DRAW2 prompts the user for the filename and appends the ".i" extension automatically

Wr Screen... write a Bitmap of the entire SL-DRAW2 display, including the Control Panels: SL-DRAW2 prompts the user for the filename and appends the ".i" extension automatically

SL-DRAW2 Reference 2-141v6.0 21 December 1998

Page 170: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Order Pull-Down Menu

The Order Pull-Down Menu controls the order of objects in the current Model’s part List. The order of objects affects how objects are displayed. Objects are added to the Model’s part List in the order created. The first object in a Model’s part List is displayed first, and the last object is displayed last. It should be noted that objects displayed later overwrite those displayed earlier. The Order Pull-Down Menu presents several methods for changing the order of objects in the Model’s part List.

"Order" Pull-Down Menu Options

Option Description Front of ... move the objects on the Select List in front of the

object selected: the objects to move are first selected, Front of ... is clicked, then the "placement" object is selected

Back of ... move the objects on the Select List in back of the object selected: the desired objects are first selected, Back of ... is clicked, then the "placement" object is selected

Front of All move 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 Model’s part List

Back of All move 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 Model’s part List

Select reorder only the objects on the Select List: The first object on the Select List remains in its original position in the Model’s part List, followed by the remaining objects in the Select List; when objects are added to the Select List, they are added in the order in which they are clicked (this order is verified by using the Name button and entering <RETURN> to step through the Select List); when the Select List is set, Select is clicked

Front of . . .

Back of . . .

Front of All

Back of All

Select

v6.0 21 December 19982-142 SL-DRAW2 Reference

Page 171: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down Menus

v6.0 21

Ch

ap

ter 2

Convert Pull-Down Menu

The Convert Pull-Down Menu converts objects on the Select List. SubModels are converted to copies of their parts, Polylines are converted to Splines and transformations are removed from objects, or transformations are applied to objects permanently. The visibility and detectability of objects can be turned on and off.

"Convert" Pull-Down Menu Options

Option DescriptionExplode explode a SubModel into copies of its parts: when

a Model is used as a SubModel, an Instance object refers to the SubModel and establishes its position in the current Model; many Instance objects may refer to the same SubModel; exploding a SubModel makes copies of its parts, adds these parts to the current Model, and removes the Instance object; these copies are no longer associated with the SubModel and may be modified

Make Spline make Splines from the Polylines on the Select List: one or more Polylines are added to the Select List and this option entered; the selected Polylines are erased and redrawn as Splines; no reciprocal function undoes this conversion

Remove Xform remove a transformation from objects on the Select List: a transformation is a 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 removed, the object is erased and redrawn in its original location unless a transformation with Apply Xform is applied

Apply Xform apply a transformation to objects on the Select List: a transformation is a 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; on some objects Apply Xform has no effect;1 SL-DRAW2 automatically determines whether the transformation can be applied to an object’s Points

Explode

Make Spline

Remove Xform

Apply Xform

Vis On

Vis Off

Detect On

Detect Off

SL-DRAW2 Reference 2-143 December 1998

Page 172: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

Vis On make objects on the Select List visible

Vis Off make objects on the Select List invisible; invisible objects are also undetectable

Detect On make objects on the Select List detectable

Detect Off make objects on the Select List undetectable; although undetectable objects cannot be selected by clicking, these objects are selected by using options in the Select Pull-Down Menu, such as By Name or By Extent

1. For example, if a Rectangle is rotated and Apply Xform is chosen, the transformation is not applied to the Rectangle’s Points. Rectangles are defined by two opposing corners, and applying the transformation to these Points results in a different Rectangle, not a rotated Rectangle. Similarly, if a Circle is unevenly scaled to get 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.

"Convert" Pull-Down Menu Options(continued)

Option Description

v6.0 21 December 19982-144 SL-DRAW2 Reference

Page 173: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Pull-Down MenusC

ha

pter 2

Exploding Models

The method in SL-DRAW2 which allows parts of a Model Instance to be selected is called exploding a Model. Exploding an Instance creates copies of the instanced Model’s parts at the location where the Model was instanced. The parts can then be selected individually and modified.

The parts of a Model Instance that have just been exploded appear in the Select List. By selecting the Group option of the Group Pull-Down Menu the parts can be grouped together so that they function as one object. These parts can also be placed back into a local SubModel by using the Create Local option of the SubModel Pull-Up Menu.

EXAMPLE

This example assumes that the button Model has been created by the steps given in the section Making Models to use as SubModels on page 2-112.

Steps to Explode a Model

Functional Description Steps

Bring up the window for instancing SubModels

1. Click the SubModel Pull-Up Menu and choose Get Local The SUBMODELS window which contains a scrollbox of all available SubModels pops up.

Plan an icon of the button Model into the Local SubModels List

2. Click the word button from the scrollbox

The button Model is added to the Local SubModels List.

3. Click the Done button in the SUBMODELS window

Select the button icon for instancing

4. Click the button icon in the Local SubModels List

SL-DRAW2 Reference 2-145v6.0 21 December 1998

Page 174: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

The button Model is no longer instanced in the current Model, rather, each of its parts exists in the current Model and may be selected individually and modified.

Place an Instance of button into the current Model

5. Move the mouse cursor to position the button SubModel and click

The button SubModel is displayed with its origin at the mouse click Point.

6. Click the DONE button or the right mouse button

Explode the Instance of the button Model

7. Click the Convert Pull-Down Menu and choose ExplodeThe Select: count changes to 3.

Clear the Select List 8. Click DONE or the right mouse button

The Select: count changes to 0.

Select one part of the "button"

9. Select part of the "button"

The Select: count changes to 1. Each part of the "button" can be chosen with a corresponding increase in the Select: count.

Steps to Explode a Model (continued)

Functional Description Steps

v6.0 21 December 19982-146 SL-DRAW2 Reference

Page 175: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 configuration filesC

ha

pter 2

SL-DRAW2 configuration files

At initialization, SL-DRAW2 reads four files that hold configuration option parameters. SL-DRAW2 creates the features and appearance of the user-interface environment according to these parameters. The parameters establish initial appearance and operating features, such as size and position of windows, availability of certain menus and capabilities, and grid size and type. The option files can be modified using a standard text editor.

The table below shows the option file names and the types of parameters that each sets.

The SL-DRAW2 option files must be in a single directory path. The path can be set by the environment variable GMS_D2_PATH, by the modelpath parameter in the "options.dat" file, or it can be left at the default value:

UNIX

<$GMS_HOME>/demo/draw2

VAX/VMS

gms$home:[demo.draw2]

NT

%$GMS_HOME%\demo\draw2

SL-DRAW2 Option Files

Option File Name Types of Parameters Specified

options.dat control the initial state of SL-DRAW2; includes parameters such as the initial state of the grid, which attribute menu is initially visible, the number of SubModels to be used, the initial state of the Fill, Line, and Text buttons in the Color Attribute Control Panel, and the width of the Model Get window

attributes.dat specify the initial values of attributes for objects created in SL-DRAW2; attributes include edge color, style and width; fill color, style, direction, and percent-fill; text color, and font, precision, alignment, and height

positions.dat specify the initial size/position parameters for windows and dialog boxes used by SL-DRAW2

views.dat define the Views in the SL-DRAW2 main window

SL-DRAW2 Reference 2-147v6.0 21 December 1998

Page 176: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

When SL-DRAW2 begins, it looks for the file "options.dat" in the following paths, respectively:

1. the current path

2. the path given in GMS_D2_PATH

3. in the default path

If "options.dat" is found and contains a modelpath parameter, that path is used; otherwise, if there is a path in GMS_D2_PATH, it is used, otherwise the default value is used.

The table below describes each of the options contained in the file "options.dat". The default (and other valid values) are listed for each of the options.

"options.dat" file

Option Names Default Definition

modelpath UNIX Systems:<$GMS_HOME>/demo/draw2

VAX/VMS Systems:gms$home:[demo.draw2]

NT Systems:%$GMS_HOME%\demo\draw2

set the directory path in which SL-DRAW2’s Models, and ".dat" files are to be found; an example is:UNIX:modelpath /work/custom_draw

VAX/VMS:modelpath [work.custom_draw]

NT:modelpath \work\custom_draw

string_codes ff0d (XK_Return)ff1b (XK_Escape)

set the control keycodes for keyboard entry of text strings; the first parameter is the string terminating character, and the second is the <NEWLINE> character; the codes are X keycodes, and should represent control codes rather than printable ASCII characters; if the two parameters are identical, the given keycode is the <NEWLINE> character, and two consecutive <NEWLINE>s cause string termination; an example to set the terminating character to <RETURN> and the <NEWLINE> to function key <F1> is:stringcodes ff0d ffbe

v6.0 21 December 19982-148 SL-DRAW2 Reference

Page 177: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 configuration filesC

ha

pter 2

banner_name "SL-DRAW2 <Version>" set the name to be displayed in the main window banner; an example is:banner_name CUSTOM_DRAW

icon_name SL-DRAW2 set the name to be displayed in the main window icon; an example is:icon_name C_DRAW

palette_path DEMO specify which Palette Models will appear in the PALETTE SELECTION window and whether Palette Model paths will be shown: valid values are<path name>adds this path to the

palette-paths list; if<path name> contains"(<env var>)" — anenvironment variableenclosed in parentheses— then (<env var>) isreplaced by the value of theenvironment variable

PALETTES adds the PALETTESsubdirectory of the currentdirectory to the palette-pathslist

NO PATH shows Palette Models withoutpaths (the default)

SHOW PATHshows Palette Models withpaths

DEMO shows Palette Model namesin selected directories withfull paths, as done in previous"demo" versions ofSL-DRAW2; this optionoverrides all previous"palette_path" options; anyfollowing palette_path linecancels the DEMO option.

There can be many palette_path lines — they are processed in order; an example is:palette_path (GMS_HOME)/lib/toolspalette_path NO PATHpalette_path PALETTES

hidden_var __ (two underscore characters)

string containing a variable name prefix: dynamic variable names prefixed by this string will not appear in the SL-DRAW2 RENAMED VARIABLES window; example:hidden_var HID

"options.dat" file(continued)

Option Names Default Definition

SL-DRAW2 Reference 2-149v6.0 21 December 1998

Page 178: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

fonts 1,0 2,0 3,0 4,0 1,1 2,1 string containing a list of font and precision index pairs separated by commas or blanks; controls the font precision pairs cycled through by clicking the F button in the Text Attribute Control Panel

text_heights 1, 1.5, 2, 3, 4, 5 string containing a list of Text heights separated by commas or blanks; controls the Text heights cycled through by clicking the S button in the Text Attribute Control Panel

pick_aperture .8 specify the size of the mouse picking rectangle as a percent of the screen width

hilite_all 1 control the highlighting for selected objects; the Hilite On/Off button toggles this flag;0 only the current target object is

highlighted1 all selected objects are highlighted

reset_constraint 1 control the constraints set by the Const: button;0 the constraints stay until reset by the

user1 the constraints are reset when the

current operation is completed

autodraw 2 control the drawing of objects that are under other objects that have been changed;0 the Working View is updated (only the

changed objects are redrawn)1 the entire Working View is redrawn2 the changed objects are redrawn, and

the Working View is redrawn clipped tothe extent of the previous location ofthe changed objects

point_mode 0 set SL-DRAW2’s Point Mode;0 CENTER1 POINT

submodel_count 20 specify the number of SubModels to be used;20 or fewer = Model that allows 20 SubModelsgreater than 20 = Model that allows 48 SubModels

"options.dat" file(continued)

Option Names Default Definition

v6.0 21 December 19982-150 SL-DRAW2 Reference

Page 179: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 configuration filesC

ha

pter 2

auto_attribute_menu 1 control the selection of the Attribute Control Panel to appear at the bottom of the main window;0 Attribute Control Panel changes only

when manually changed by the user1 Attribute Control Panel

corresponding to the first selectedobject appears

auto_zp_reset 1 control zoom and pan reset;0 zoom and pan reset only when

manually changed by the user1 zoom and pan automatically reset to

the initial values whenever one of thefollowing operations occurs: GetModel, Merge Model, and Clear Parts

long_model_names 0 control the width of the MODELS window displayed by the Get Model and Merge Model options of the Model Pull-Down Menu;0 narrow window1 wide window

yes_no_default 0 control the default response to yes/no boxes (the default response is taken when the right mouse button is clicked);0 No1 Yes

expert_mode 0 control whether yes/no boxes are displayed;0 display yes/no boxes1 do not display yes/no boxes

(automatically answer "Yes" to all questions)

demo_mode 1 control whether SL-DRAW2 asks if the user wants to start with windows visible for Change Directory, Model Get, and Preview;0 do not ask user1 ask user

grid_color 22 initial color of the grid; can be set to any color in the Color Attribute Control Panel

grid_size 2 2 control the horizontal and vertical spacing (granularity) between grid intersections; can be any positive real number and the spacings can have different values

"options.dat" file(continued)

Option Names Default Definition

SL-DRAW2 Reference 2-151v6.0 21 December 1998

Page 180: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

grid_type 1 type of grid displayed;0 dotted lines1 solid lines

grid_on 0 control whether the grid is visible when SL-DRAW2 is initialized;0 not visible1 visible

grid_front 0 control whether the grid is drawn in front of or in back of other objects in the Model;0 in back of other objects1 in front of other objects

line_color_button_state 1 control the initial state of the Line color button in the Color Attribute Control Panel;0 not selected1 selected

fill_color_button_state 1 control the initial state of the Fill color button in the Color Attribute Control Panel;0 not selected1 selected

text_color_button_state 0 control the initial state of the Text color button in the Color Attribute Control Panel;0 not selected1 selected

edge_attribute_menu 1 control the initial state of the Edge button1 in the Attribute Control Panel;0 not selected1 selected

text_attribute_menu 0 control the initial state of the Text button1 in the Attribute Control Panel;0 not selected1 selected

mark_attribute_menu 0 control the initial state of the Mark button1 in the Attribute Control Panel;0 not selected1 selected

bitmap_attribute_menu 0 control the initial state of the Bitm button1 in the Attribute Control Panel;0 not selected1 selected

1. Only one of the following buttons can be selected: Edge, Text, Mark, or Bitm.

"options.dat" file(continued)

Option Names Default Definition

v6.0 21 December 19982-152 SL-DRAW2 Reference

Page 181: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 configuration filesC

ha

pter 2

The table below describes each of the options contained in the file "attributes.dat". The options in this file control the initial attribute values for objects created in SL-DRAW2. The default (and other valid values) are listed for each of the options.

"attributes.dat" File

Option Name Default Definition

ecolor 7 edge color; can be any color in the Color Attribute Control Panel

estyle 1 edge style;0 no edge1 solid2 - 4 dotted or dashed (workstation-dependent)

ewidth 1.0 edge width; any real number

fcolor 4 fill color of filled objects; can be any color in the Color Attribute Control Panel

fstyle 1 fill-pattern style of filled objects; workstation-dependent and only has meaning if finter is 2 or 3

finter 1 fill style of filled objects;0 hollow1 solid2 pattern without transparent quality3 pattern with transparent quality

fdir 0 fill direction of filled objects;0 fill from bottom1 fill from left2 fill from top3 fill from right

fpercent 100.0 fill percent of fill objects; a real number in the range of 0 to 100

tcolor 7 Text color; can be any color in the Color Attribute Control Panel

bcolor 0 background color; the default value of "0" is the only value implemented at this time

SL-DRAW2 Reference 2-153v6.0 21 December 1998

Page 182: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

height 1.5 Text height; a real number used in conjunction with the font attribute; if the height entered is greater than that allowed for the selected font, the closest acceptable height for that font (that is lower than the height value asked for) is used

path 1 Text path;1 left-to-right horizontal2 top-to-bottom vertical

font 1 Text font; integer value, workstation- dependent

prec 0 Text precision (type);0 raster1 Hershey2 vector

align 2 3 Text alignment which corresponds to the grid displayed in the Attribute Control Panel — first number is the column number in the grid and can be any number from 1 to 3, the second number is the row number in the grid and can be any number from 1 to 5 — some examples are shown below;2 3 center1 5 lower left corner3 5 lower right corner1 5 upper right corner1 1 upper left corner

mcolor 7 Marker color; can be any color in the Color Attribute Control Panel

mstyle 1 Marker style;1 a period2 a plus sign3 an asterisk4 the letter o5 the letter x

msize 1.0 Marker size; the default value of "1.0" is the only value implemented at this time

"attributes.dat" File(continued)

Option Name Default Definition

v6.0 21 December 19982-154 SL-DRAW2 Reference

Page 183: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 configuration filesC

ha

pter 2

rastop 3 raster operation mode for Bitmap and Mask objects;1 AND3 overwrite6 XOR7 OR12 complement

closed 0 closed object;0 not closed1 closed

filled 0 filled object;0 not filled1 filled

"attributes.dat" File(continued)

Option Name Default Definition

SL-DRAW2 Reference 2-155v6.0 21 December 1998

Page 184: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

The table below describes each of the options contained in the file "positions.dat". The options in this file control the initial size and position parameters for the windows and dialog boxes in SL-DRAW2. The defaults are listed for each of the options.

Each line in the file contains five or six items: a name string, to indicate the window or dialog box; the x-position of the window or box origin; the y-position of the window or box origin; the width of the window or box; the height of the window or box; and an optional aspect ratio (main window only).

The name string is the name of the Model used in the window or dialog box. The origin is the lower-left corner of the window or box. The size/position parameters are given as factors of the main window width. If one of the width or height parameters is 0, it is calculated from the other parameter and the Model’s aspect ratio. The Model may be of any size, but it must have its lower-left corner at World Coordinates (0, 0). "main" refers to the main window, and the parameters are factors of the screen extent width.

"positions.dat" File

ModelName

x y Width HeightAspectRatio

Purpose

main .16 .04 .83 .0 .75 specifies the position and dimensions of the main window

bitmapbox .15 .075 .3 .225 specifies the position and dimensions of the scrolling selection box displayed by the Get Bitmap option of the Bitmap Pull-Down Menu

dynenter -.10 .3975 .45 .3375 specifies the position and dimensions of the ENTER DYNAMICS window; displayed by the Enter Dyn option of the Dyn Pull-Down Menu

v6.0 21 December 19982-156 SL-DRAW2 Reference

Page 185: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 configuration filesC

ha

pter 2

dynbox -.12 -.08 .6 .45 specify the position and dimensions of the DYNAMIC PROPERTY window; displayed by the Edit Dyn option of the Dyn Pull-Down Menu

renbox -.12 -.08 .6 .45 specify the position and dimensions of the RENAMED VARIABLES window; displayed by the Rename Vars option of the Dyn Pull-Down Menu

prevopts .205 -.08 .3 .0 specify the position and dimensions of the Preview Options Dialog Box; displayed by the Preview option of the Dyn Pull-Down Menu

prevedit .52 -.08 .0 .2625 specify the position and dimensions of the PREVIEW EDITOR window; displayed by the Preview option of the Dyn Pull-Down Menu

modelbox -.175 -.08 .0 .48 specify the position and dimensions of the scrolling selection box used for Model names with fewer than 20 characters; displayed by both the Get Model and the Merge Model options of the Model Pull-Down Menu

modelbox1 -.175 -.08 .0 .48 specify the position and dimensions of the scrolling selection box for Model names with greater than 20 characters; displayed by both the Get Model and the Merge Model options of the Model Pull-Down Menu

"positions.dat" File(continued)

ModelName

x y Width HeightAspectRatio

Purpose

SL-DRAW2 Reference 2-157v6.0 21 December 1998

Page 186: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

palscroll -.05 -.08 .53 .3975 specify the position and dimensions of a scrolling selection box; displayed by the Get Palette option of the Palette Pull-Down Menu

palframe .495 -.08 .5 .4167 specify the position and dimensions of the Model used to display the SubModels contained in a Palette; displayed by the Get Palette option of the Palette Pull-Down Menu

submodbox -.175 .1875 .48 .45 specify the position and dimensions of a scrolling selection box; displayed by the Get Local and Get External options of the SubMod Pull-Down Menu

dirbox -.175 .3775 .0 .45 specify the position and dimensions of a scrolling selection box; displayed by the Change Dir option of the System Pull-Down Menu

stmonitor .79 .35 .2 .45for SL internal use only

debugbox .25 .40 .14 .30

dumpbox .25 .50 .12 .21 specify the position and dimensions of the menu displayed by the Dump option of the System Pull-Down Menu

setflags .007 .353 .16 .25 specify the position and dimensions of the Set Flags box; displayed by the Flags button

identbox .2 0. .745 .145 specify the position and dimensions of the Identify box; displayed by the Identify button

"positions.dat" File(continued)

ModelName

x y Width HeightAspectRatio

Purpose

v6.0 21 December 19982-158 SL-DRAW2 Reference

Page 187: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 configuration filesC

ha

pter 2

ident_bitm .33 .001 .210 .135 specify the position and dimensions of the Identify Details box; displayed by the Details button in the Identify box when a Bitmap object is selected

ident_mark .33 .001 .135 .135 specify the position and dimensions of the Identify Details box; displayed by the Details button in the Identify box when a Marker object is selected

ident_text .33 .001 .205 .135 specify the position and dimensions of the Identify Details box; displayed by the Details button in the Identify box when a Text object is selected

ident_trec .33 .001 .395 .135 specify the position and dimensions of the Identify Details box; displayed by the Details button in the Identify box when a Text Rectangle object is selected

ident_edge .33 .001 .280 .135 specify the position and dimensions of the Identify Details box; displayed by the Details button in the Identify box when either a Polyline, Polygon, Line, Spline, Closed Spline, Rectangle, Pie, Sector, Three Point Sector, or Circle is selected

ident_fill .33 .001 .205 .135 specify the position and dimensions of the Identify Details box; displayed by the Details button in the Identify box when either a Fill Group or a Complex Fill Group object is selected

"positions.dat" File(continued)

ModelName

x y Width HeightAspectRatio

Purpose

SL-DRAW2 Reference 2-159v6.0 21 December 1998

Page 188: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

notifybox .4 .56 .40 .125 specify the position and dimensions of a box used to present information with the user clicking the OK button to acknowledge; displayed by various options

yesnobox .30 .18 .40 .125 specify the position and dimensions of a box that allows the user to answer Yes or No to a question; displayed by various options

yesnobox1 .20 .38 .40 .125 specify the position and dimensions of a box that allows the user to answer Yes or No to a question; displayed by the Save button in the PREVIEW EDITOR window

ynbox_exit .5 .60 .40 .125 specify the position and dimensions of a box that allows the user to answer Yes or No to a question; displayed by the Quit option of the System Pull-Down Menu

stringbox .20 .01 .31 .125 specify the position and dimensions of a box used to input text strings;position on the screen depends upon the Model; used by various options

stringbox1 .65 .2 .31 .3

stringbox2 .60 .01 .31 .125

stringbox3 .60 .22 .31 .125

strbox_nam .2 .01 .43 .125 specify the position and dimensions of a box used to input a Text string; displayed by the Name button

strbox_ps .2 .01 .74 .125 specify the position and dimensions of a box used to input a Text string; displayed by the PostScript option of the System Pull-Down Menu

"positions.dat" File(continued)

ModelName

x y Width HeightAspectRatio

Purpose

v6.0 21 December 19982-160 SL-DRAW2 Reference

Page 189: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 configuration filesC

ha

pter 2

strbox_red .2 .01 .43 .125 specify the position and dimensions of a box used to input a Text string; displayed by the Redirect Out option of the System Pull-Down Menu

strbox_ud .2 .01 .74 .125 specify the position and dimensions of a box used to input a Text string; displayed by the UData button

strbox_win .2 .01 .37 .125 specify the position and dimensions of a box used to input a Text string; displayed by the Window option of the View Pull-Down Menu

"positions.dat" File(continued)

ModelName

x y Width HeightAspectRatio

Purpose

SL-DRAW2 Reference 2-161v6.0 21 December 1998

Page 190: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

SL-DRAW2 ReferenceC

ha

pter

2

The "views.dat" file defines the Views in the SL-DRAW2 main window. Each line contains a View name followed by eight real numbers giving the four parameters for gmsWinXy( ) and the four parameters for gmsPrtXY( ). The order of the lines in this file determines the order in which the Views are defined, and consequently the View priorities. At the present time, "views.dat" cannot be changed by the user. The ability to modify the "views.dat" file will be implemented in a future release. The table below shows the View names and their parameters.

"views.dat" File

View Name gmsWinXy( ) gmsPrtXY( )

v_back 0. 0. 100. 75. .0 .0 1.0 .75

v_clean 0. 0. 100. 75. .18 .10 .992 .709

v_cons 0. 0. 100. 75. .18 .10 .992 .709

v_work 0. 0. 100. 75. .18 .10 .992 .709

v_topmenu 0. 0. 17. 75. .0 .0 .17 .75

v_barmenu 0. 0. 83. 3. .17 .72 1.0 .75

v_lowmenus 0. 0. 83. 9. .17 .0 1.0 .09

v_at1menu 0. 0. 55. 9. .45 .0 1.0 .09

v_at2menu 0. 0. 29. 9. .17 .0 .45 .09

v_submodlist 0. 0. 83. 9. .17 .0 1.0 .09

v6.0 21 December 19982-162 SL-DRAW2 Reference

Page 191: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Chapter

v

3

6.0 1 Septembe

Using Enter Dyn

C

ha

pter 3

Figure 3-1. An animated aircraft following its visible Polygon “path” 1

Introduction to SL-GMS screen dynamics

The aim of SL-GMS screen dynamics is to establish a one-to-one correspondence between events affecting objects on the workstation screen and events in a real-time or simulated environment. In the example screen shown in Figure 3-1, the filled triangle (Polygon), representing an aircraft, is “animated” across the map along a closed Polygon path. This visualization of a real-world process can be based on actual positional data of such an aircraft. Movement of the “aircraft” along the path is accomplished through actions which specify changes to be applied to the graphical representation in response to changes in application variables.

1. The development of this dynamic Model is described step-by-step in the SL-GMS Basic Tutorial.

Using Enter Dyn 3-1r 1998

Page 192: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

SL-GMS actions include:

• dynamic changes to standard graphical attributes, such as color, fill percent, and line thickness

• transformation of position, scale, or rotation angle

• rewriting of text strings to show current data

• function calls to produce structural changes to objects through the dynamic redefinition of points that compose the object

• substitution of icons based upon value of a variable or expression

• animation of graphs by representing dynamic changes to variables, scaling limits, colors, etc.

• user-defined function calls initiated by real-world or simulated events

Dynamic properties of objects

Figure 3-2. A sample DynProp containing two dynamic descriptions

Dynamic properties are expressed in lines of text which associate variables and conditions to actions that are to be performed by an object, as shown in Figure 3-2. The set of text lines comprising the dynamics for a particular object (or Group2) is called the dynamic description. The dynamic description is text 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. The dynamic description text must, of course, meet the syntax requirements of SL-GMS. A DynProp (Dynamic

2. Two or more objects can be grouped together using the Group Pull-Down Menu feature of SL-DRAW2. The Group is then treated as a single object.

var5= vlow:vhigh

fcolor B

#call gms_flash( )

dynamic

dynamic

description

description

DynProp(collection of all

associated with anobject)

dynamic descriptions

v6.0 1 September 19983-2 Using Enter Dyn

Page 193: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Properties) is all of the dynamic descriptions attached to an object.

Refer to the SL-GMS Reference Manual for examples of Dynamic Actions and a full discussion of DynProp syntax.

Once the DynProp is completed, it is submitted to the system. If accepted by the system, it is attached to the object. If the DynProp contains errors, the system rejects it, and the developer can simply edit the DynProp text before resubmitting it.

Enter Dyn

The Enter Dyn option of the Dyn Pull-Down Menu provides a convenient method for the creation and modification of dynamic descriptions attached to a selected object. Dynamic descriptions can be modified with Enter Dyn, whether they were created previously with Enter Dyn or Edit Dyn.

When Enter Dyn is invoked from the Dyn Pull-Down Menu, the Interface Window is displayed in the Enter Dynamics window, as shown in Figure 3-2.

Figure 3-3. The “Enter Dyn” Interface Window

Object/Part Name:

Dynamics Type:

AddDelete

ClearAllRestore

Done Escape

Accept

<ObjectName> Object Type: TRect

Input Unconditional Conditional

ActionsConditions FunctionsVariables

No errorsFindNext

Constants Abort

ReadWrite

Lines: Errors: Dynamics:Show

File:

Enter Dynamics

Using Enter Dyn 3-3v6.0 1 September 1998

Page 194: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

As seen in the three diamond button types to the right of the label, “Dynamics Type:”, the Enter Dyn Interface Window permits the entry of Input, Unconditional, and Conditional dynamic descriptions for the current object selected. These three buttons are mutually exclusive, so only one will be active at a time.

Input Type Dynamic actions are invoked by the system when the user makes any input to the object in the operational workstation window. Actions in Unconditional dynamic descriptions are executed whenever any variable reference in an object’s DynProp changes. Actions in Conditional dynamic descriptions are executed whenever testing of any logical expression results in TRUE after reading the value of a variable reference.

The user interface with the Enter Dyn Interface Window is described in the next section.

The General Interface

Selection of the Enter Dyn option of the Dyn Pull-Down Menu, shown in Figure 3-1Figure 3-3, brings up the powerful Enter Dyn Interface Window. The Interface Window includes fields for variables, for conditions on a variable, and for actions to be performed when the condition is met.

All the fields can be filled in a point-and-click fashion from popup lists. Each field may have an associated expression, which may be filled from a catalog provided by SL-GMS, from the user's own list of reusable expressions, or from the keyboard.

Once the dynamics script is completed, it is submitted to the system. If accepted by the system, a dynamic description is attached to the currently-selected object. If it contains errors, the system rejects it with an indication of the error’s location.

v6.0 1 September 19983-4 Using Enter Dyn

Page 195: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Figure 3-1. “Enter Dyn” on the “Dyn” Pull-Down Menu

The following steps are an example of how to activate the Enter Dyn tool in SL-DRAW2:

1. Invoke the SL-DRAW2 graphic editor on the user’s workstation.

2. Load the graphic Model to be animated into the Working View.

3. Select the object (or set of objects) whose dynamics are to be created or changed.

NOTE: The alternative method is to perform step 4. before performing this step. When step 4. is performed first, only one object can be selected.

4. Click on the Dyn Pull-Down Menu at the top of the SL-DRAW2 Window and select Enter Dyn.

5. Observe the appearance of the Enter Dyn Interface Window, as shown at the bottom of Figure 3-1.

6. Move the cursor into the Enter Dyn Interface Window to activate it.

TANK VALVE

CLOSE VALVE

OPEN VALVE

test_enterdyn3

(66.554, 74.889)

Select: 0

Redraw

Backup Undo

* +

Identify Copy

Escape Enter . . .

DONE

Flags UData Name

Fill UnFill

Rotate Move

Mirror Scale

SnapPt MovePt

AddPt DelPt

DELETE

Grid: 2 x 2

Snap: OFF

Const: OFF

Mode: CENTER

ConvertOrderBitmapDynPointGroupSubModModelSelectViewSystem Palette

01

12

33

00

22

43

0 1 2 3 4 5 6 78 9 10 11 12 13 14 15

16 17 18 19 20 21 22 2324 25 26 27 28 29 30 31

Fill

Line

Text

COLORS Backgr

Edge

Text

Bitm

Mark

COLORS%

Enter Dyn . . .

Edit Dyn . . .

Rename Vars . . .

Show Vars

Preview . . .

Screen Preview

Object/Part Name:

Dynamics Type:

AddDelete

ClearAllRestore

Done Escape

Accept

<ObjectName> Object Type: TRect

Input Unconditional Conditional

ActionsConditions FunctionsVariables

No errorsFindNext

Constants Abort

ReadWrite

Lines: Errors: Dynamics:Show

File:

Enter Dynamics

Using Enter Dyn 3-5v6.0 1 September 1998

Page 196: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

The “Enter Dyn” Interface Window

Figure 3-2. Four panels of the “Enter Dyn” Interface Window

Figure 3-2 shows the Enter Dyn Interface Window with four panels, A, B, C, and D, indicated. No matter which Dynamics Type is selected in Panel D, the user is presented with active text entry fields that facilitate the entry of dynamic descriptions for the current object selected. The four possible text entry fields are shown in Figure 3-2:

• Variable Expressions

• Condition/Conditional Expressions

• Action/Action Expressions

• Parameter/Parameter Substitution

In practice, some of the text entry fields shown in panel D will not be visible, depending on the type of dynamics and the type of action required.

Object/Part Name:

Dynamics Type:

AddDelete

ClearAllRestore

Done Escape

Accept

<ObjectName> Object Type: <ObjectType>

Input Unconditional Conditional

Action ExpressionAction (i of n)

Variable Expression (i of n)

Conditional ExpressionCondition (i of n)

Parameter SubstitutionParameter (i of n)

ActionsConditions FunctionsVariables

<ParamPrompt>

ErrorNo errors

FindNext

Constants Abort

ReadWrite

Lines: Errors: Dynamics:Show

File:

nel A

nel B

nel C

nel D

v6.0 1 September 19983-6 Using Enter Dyn

Page 197: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Panel A

Placed in line on the top row of the Enter Dyn Interface Window, Panel A holds eight push buttons. Figure 3-3 summarizes the function of each push button.

The first five buttons on the left bring up fixed or scrolling lists of “pastable” items. A pastable item is a string that can be selected with a mouse click from a displayed text file and then pasted into a text entry field. See Entering dynamics via the pasting lists on page 3-14 for further explanation of this procedure.

The last three buttons exit or complete the scripting.

Figure 3-3. Push-Buttons on Panel A

Brings up a scroll list ofuser constants defined inthe file "usrcon.dat"

Brings up a scroll list ofuser variables defined inthe file "usrvar.dat"

Brings up a fixed list ofconditional symbols

Brings up a fixed list ofaction verbs

Brings up a scroll list offunctions defined in thecatalog file: "fcncat.dat"

Done EscapeActionsConditions FunctionsVariablesConstants Abort

Abandons furtherprocessing. Warning: Loses data if incomplete.

Terminates processing on current object ifcomplete

= Done + Don’t processany more objects

Using Enter Dyn 3-7v6.0 1 September 1998

Page 198: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Abort button

If a modified dynamics description has not been saved (using the Accept button, as described in the section Panel B on page 3-9), clicking the Abort button results in the display of the warning message shown in Figure 3-4.

Figure 3-4. Warning message

Click the Accept or the Write button to save the dynamics description. Otherwise, click the Abort button again to abandon changes made to the object’s dynamics description and to abandon the Enter Dyn session for the current object.

Done button

Clicking the Done button signals the end of the Enter Dyn process associated with the current object, if a modified dynamics description has been saved. If the save has not been completed, the warning message shown in Figure 3-4 appears and the user is given the opportunity to save.

Escape button

Clicking the Escape button signals the end of the current Enter Dyn session. If a modified dynamics description has been saved with the Accept button, the Enter Dyn session is terminated. If the dynamics description has not been saved, the warning message shown in Figure 3-4 appears. Clicking the Escape button again terminates the current session and drops out of the dynamics editing loop before any additional selected objects (if any) are edited.

WARNING! Dynamics may be lost.Hit Accept to accept, Write to save in a file,Abort, Done, or Escape to abandon changes.

v6.0 1 September 19983-8 Using Enter Dyn

Page 199: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Panel B

Placed in line on the second row from the top of the Enter Dyn Interface Window, Panel B consists of four regions:

• Lines

• Errors

• Dynamics

• File

Figure 3-5 summarizes the function of each region and push button.

Figure 3-5. Push-Buttons on Panel B

Lines region

The “Lines:” region contains buttons for operating on the lines of the dynamics description. Operations include adding, deleting, restoring lines, and clearing all lines.

The Add button provides a new blank line to the currently selected text entry field so the user can add to the current dynamics description. This permits the extension of the dynamics description to multiple variables, multiple conditions per variable, and multiple actions per condition.

The Delete button deletes the current line of the currently selected text entry field.

Adds a line to focusedcategory and one line toeach subcategory

Deletes the line in focused category and ALL subcategory lines

Restores lines justdeleted. Insensitiveotherwise

Submits the dynamics tothe system.If error free, adds DynPropto object

Error Signal.Top light red: Error.Bottom light green: OK

Visible when OK

Focuses on the nextfield containing a syntaxerror

AddDelete

ClearAllRestore

AcceptErrorNo errors

FindNext Read

WriteLines: Errors: Dynamics:

ShowFile:

Clears the parts of alldynamics

Brings up a scroll textof the dynamics

User can save dynamicsto a file

User can retrievedynamics from a file

Visible when in error.Reports error count anddetection

Using Enter Dyn 3-9v6.0 1 September 1998

Page 200: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

The Clear All button removes all dynamics associated with the current object. The Restore button reinstates those lines just deleted or cleared. Once any new dynamics description entry is started, the Restore button is disabled.

Errors region

The “Errors:” region contains the “Error” (red) and “No errors” (green) signal lights and the Find Next button to search for the location of the next logical error in the dynamics description. If a syntax error is made when the user completes an entry into a text entry field, the “Error” signal light will turn red and report the number of errors found. Otherwise, the signal light is green to indicate no errors. When multiple errors exist the Find Next button is used to search for and highlight the next error to give the user the opportunity to correct it.

Dynamics region

The “Dynamics:” region contains the Accept button to submit the dynamics description to the system for verification and the Show button to list in a separate scrollable window the dynamics description3 for the currently selected object. The “Show” list is non-editable; the user can only select from it. If a dynamics text entry field in Panel D is in focus (selected to receive dynamics text), its corresponding line in the dynamics description “Show” list is highlighted. If a line in the dynamics description is clicked, it becomes highlighted and shifts focus to the text entry field closest to the line highlighted.

File region

The “File:” region holds the Write button and the Read button. The Write button allows the user to write the dynamics description developed for the current object to the current disk directory , under the file name “draw2.dy1”. The Read button allows the user to read the same file name from the current directory without any prompting.

NOTE: Only one file per model can be written to the current directory on disk and only with the name, “draw2.dy1”. No prompting is given for the file name.

3. Each text entry field that comprises the dynamic description is listed on a separate line in the scrollable window displayed by the Show button.

v6.0 1 September 19983-10 Using Enter Dyn

Page 201: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Panel C

Panel C, shown in Figure 3-6, is third from the top of the Enter Dyn Interface Window. It accepts no input of any kind. Displayed is the selected object type and the object name (or “unnamed”). Object type is displayed in terms of its formal class name, stripped of superfluous prefixes and suffixes.

Figure 3-6. Panel C of the “Enter Dyn” Interface Window

Displays name of part(if named)

Informal description ofobject, based on itsformal classname

Object/Part Name: <ObjectName> Object Type: <ObjectType>Panel C

Using Enter Dyn 3-11v6.0 1 September 1998

Page 202: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Panel D

Figure 3-7. Dynamics entry fields on Panel D

Figure 3-7 shows Panel D, the bottom panel of the Enter Dyn Interface Window. The actual dynamics text is expressed in this panel. Regardless of dynamics type, the user interacts with the steppable lines to create and modify the dynamics description. Along the top row is a set of mutually exclusive radio buttons by which the user selects the dynamics type to be created or modified. If the currently selected object on the SL-DRAW2 Model has no dynamics attached to it, none of the radio buttons appears depressed and none of the steppable lines below it are visible.

When any dynamics have been attached, a series of indented steppable category lines appear below the Dynamics Type buttons. Each indented steppable line is provided to hold a specific category of a dynamics description. Line stepper buttons are provided at the front of each line, one pointing up and one pointing down.

A line is stepped up or down in its category by clicking the up or down Line Stepper button, as required. The position of a

Parameter Category. Visible only when Action Category calls a cataloged function

Displays Parameter Prompt for cataloged function

Action Category. Shows 0, 1 or 2 expression fields depending on action verb

Condition Category. Visible only for "Conditional" dynamics

Variable Category. Visible only for "Conditional" dynamics

Line Stepper.Steps category linesup or down

Reports line number (i)of total lines (n) incategory

Dynamics Type: Input Unconditional Conditional

Action ExpressionAction (i of n)

Variable Expression (i of n)

Conditional ExpressionCondition (i of n)

Parameter SubstitutionParameter (i of n)

<ParamPrompt>

One or none of theDynamics Type radiobuttons will be depressed Text edit/entry field (tef). User types here or pastes a selection.

Background is dark when in focus (accepting input).Borders turn red when focus changes if syntax error detected.

v6.0 1 September 19983-12 Using Enter Dyn

Page 203: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

line in its category is displayed above the category text entry field in the form:

(i of n)

where i is the i-th current line of text out of a total of n lines for that category.

When the Add button on Panel B (Figure 3-5 on page 3-9 ) is clicked, one line is added to that category and to each of the text entry fields associated with that category. The line number and line count increase by one unit and present the user with a new blank field to be filled in by selection of an item from a pasting list and/or by keyboard entry.

When the Delete button on Panel B is clicked, the current line in the category and all text entry fields associated with the category are deleted. The line number and count of the current category decrease by one unit.

Special Key bindings

The following apply when entering dynamics text into the text entry fields:

• Hitting the <RETURN> or <ENTER> key completes the entry for the current text entry field and causes the text entry field to be deselected.

• The <TAB> key causes focus to shift from the current text entry field to the next one.

• The <TAB> key in combination with the <SHIFT> key causes focus to shift from the current text entry field to the previous one.

• The <UP> arrow key is equivalent to hitting the UP ARROW icon on a category line stepper; i.e., it causes the next higher line of that category to be displayed.

• The <DOWN> arrow key is equivalent to hitting the DOWN ARROW icon on a category line stepper; i.e., it causes the next lower line of that category to be displayed.

Using Enter Dyn 3-13v6.0 1 September 1998

Page 204: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Entering dynamics via the pasting lists

The form of dynamics entry is determined by the dynamics type, selected with a radio button. Text may be keyed in or selected from pasting lists. The following lists are available for the user to paste from:

The file search path for the user-supplied “.dat” files is the same as for Model files. The search path is described in the SL-GMS Reference Manual.

Available Pasting Lists

List FilePanel A button

User-defined Variables User’s “usrvar.dat” file Variables

Action Verbs Provided by SL-GMS Actions

Conditional Symbols Provided by SL-GMS Conditions

Cataloged Functions User’s “fcncat.dat” file Functions

User-defined Constants User’s “usrcon.dat” file Constants

v6.0 1 September 19983-14 Using Enter Dyn

Page 205: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Variables List

The scrolling Variables List holds the variable names to be used in the Variable Expression entry field and other variable references in Enter Dyn text entry fields.

Figure 3-8. List of variables available for pasting

The list is defined in a user-created file called “usrvar.dat”. An example is shown on the left side of Figure 3-8. The right side of Figure 3-8 shows the corresponding scrolling Variables List, as it appears to the user. See also the discussion of the file format in section User-defined variables on page 3-23. A variable reference may be encountered in any of the expressions. Clicking on an item in this list will additively paste the selection after the last character in the text entry field currently in focus.

Done

button on Panel Abrings up a windowed

version of:

Variables

alpha

beta

gamma delta

"usrvar.dat" file User Variables scroll list

alpha

beta

gamma delta

First column of fileappears as a pastable

in scroll list

Using Enter Dyn 3-15v6.0 1 September 1998

Page 206: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Conditional Symbols List

Provided by SL-GMS and shown on the left side of Figure 3-9, the Conditional Symbols List holds symbols used in constructing the Condition category text entry field. Clicking on an item in this list causes focus to shift to the Conditional Symbol and replaces the Conditional Symbol and possibly the Conditional Expression, also.

Figure 3-9. Lists of conditions and actions that can be pasted

Action Verbs List

Provided by SL-GMS and shown in Figure 3-9, the Action Verbs List holds dynamics actions used in Conditional and Unconditional dynamics. Clicking on an item in this list places the item in the Action Verb text entry field in focus.

NOTE: Any dynamic action that has a permanent flag in SL-DRAW2 should not be used in Dynprops; the flag should be set in SL-DRAW2 instead. The Batcherase action, which is not

Marker

Arc/Circle

Text

Fill

SpecialXforms

Edge

move

movex

detect

vis

redraw

userdata

userword

scaley

scalex

scale

rotate

movey

call stext

talign

tprec

tfont

tpath

tcolor

theight

ecolor

estyle

ewidth

filled

fpercent

fdir

finter

fstyle

fcolor radius

arclength

startangle

mcolor

mstyle

Done=

!=

>=

<=

>

<

= *

EqualsNot equalGreater than or equalLess than or equalGreater thanLess than

Has any value

Done

Conditional Symbols List

Action Verb List

Replaces conditionalsymbol AND conditionalexpression

Replaces only the conditional symbol

Any of these replaces theaction verb

ActionsConditions

button on Panel Abrings up a windowed

version of:

button on Panel Abrings up a windowed

version of:

v6.0 1 September 19983-16 Using Enter Dyn

Page 207: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

available in SL-DRAW2, was available in SL-DRAW only because the capability of setting the Batcherase flag did not exist.

Using Enter Dyn 3-17v6.0 1 September 1998

Page 208: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Cataloged Functions List

The Cataloged Functions List holds the names of functions which have been “cataloged” by the user for convenient access through Enter Dyn. An example of a Cataloged Functions List and of the corresponding source text file, “fcncat.dat,” is shown in Figure 3-10.

Figure 3-10. Cataloged functions that can be pasted

The file “fcncat.dat” must be provided by the user in a format which contains in ASCII text lines:

• the name of the function

• argument count

• the list of parameter prompts

The details of the file format are provided in the section Cataloged functions on page 3-22.

Done

button on Panel Abrings up a windowed

version of:

Functions

my_function()

sys_funct()

user_cb()

"fcncat.dat" file Cataloged Functions scroll list

my_function() 3 color type mode

sys_funct() 4 option pos scale size

user_cb() 2 XLOC YLOC

First column of fileappears as a pastable

in scroll list

Second column containscount (> 0) of

function arguments Remaining columns(blank separated)contain ParameterPrompts for eachargument of the

function

v6.0 1 September 19983-18 Using Enter Dyn

Page 209: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Figure 3-11. Parameter Prompt and Parameter Substitution fields

A Parameter Prompt is a user-provided string displayed to the left of the Parameter Substitution entry field, as shown in Figure 3-11. It serves as a reminder to the user of the content of the parameter that the user is prompted to enter. When the user enters the Action word call in the Action text entry field and then clicks on an item in the Cataloged Functions List, the function name clicked is automatically written into the Action Expression. Next, the Parameter text entry field is displayed with the parameter prompt displayed in the Parameter field to prompt the user to enter the parameter value in the Parameter Substitution field. As each parameter is completed, the user clicks the DOWN ARROW icon to bring up the prompt for successive parameters until all have been entered.

Figure 3-12. Clicking DOWN ARROW icon to display second parameter prompt

Constants List

The Constants List holds the constant names to be used in any of the Expression entry fields in Enter Dyn. The list is defined in a user-created file called “usrcon.dat” with format as shown in Figure 3-13. See also the discussion of the file format in section User-defined constants on page 3-24.

call my_function()

Action Ex ressionAction (1 of 1)

Parameter Substitution

color

Parameter (1 of 3)

call my_function()

Action Ex ressionAction (1 of 1)

Parameter Substitution

type

Parameter (2 of 3)

Using Enter Dyn 3-19v6.0 1 September 1998

Page 210: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Figure 3-13. Constants that can be pasted

A constant reference may be encountered in any of the expressions. Clicking on an item in this list will additively paste the selection after the last character in the text entry field currently in focus.

Error checking

Once the text has been entered in a text entry field, it will be analyzed for syntax errors upon refocusing. Refocusing occurs when the user performs one of the following actions:

• defocuses by hitting the <RETURN>/<ENTER> key

• steps a line up or down

• clicks on another text entry field

• keys to the next (previous) text entry field with <SHIFT> <TAB> key(s)

• clicks the Abort button in Panel A

• clicks the Add, Accept, or File: Write buttons in Panel B

Done

button on Panel Abrings up a windowed

version of:

Constants

MY_INTEGER

MY_DOUBLE

"MY_STRING" anything

MY_INTEGER 256

MY_DOUBLE 1234.6

"MY_STRING" anything

"usrcon.dat" file

First column of fileappears as a pastable

in scroll list

VarDefines an integerbecause there isNO decimal point

VarDefines a doublebecause there ISa decimal point

No VarDefines.These are simply

pastables

User Constants scroll list

v6.0 1 September 19983-20 Using Enter Dyn

Page 211: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Error checking is performed in a limited context sense. Enter Dyn checks for situations such as unbalanced or missing parentheses, blank spaces between alphanumeric characters, etc. A blank line is considered an error only in the context of the whole dynamics description. The user may leave a text entry field blank and return to it later.

Upon hitting Accept, context-specific error checking is carried out, according to which category of dynamics has been entered.

Condition category lines

Upon hitting Accept, Condition category lines are checked for improper use of the asterisk in the conditional expression. The only allowed combination is “=” (conditional symbol) followed by “*” (conditional expression). For example, the combination

< *

is not valid.

In addition, Condition category lines are checked for proper use of the range operator. An action expression with a range, i.e., contains the range operator “:”, can exist only in Conditional dynamics and only if there is a corresponding range in the conditional expression. For example, the following is valid:

v = a : b movex c : d

because the conditional expression, a:b, has a range and the action expression, c:d, has a range.

However, the following is not valid:

v = 1 movex c : d

because the conditional expression, 1, does not contain a range but the action expression, c:d, does.

If there are no contextual errors (“No errors” and green light on Error Signal), the dynamics description is submitted to the system. In the unlikely event that the system finds an error after the “No errors” report, the Error Signal will simply say “Error” without a count.

NOTE: If “Error” is displayed without a count, please inform SL Customer Support.

Using Enter Dyn 3-21v6.0 1 September 1998

Page 212: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

File formats

This section describes the format of files which produce user-modifiable pasting lists.

Cataloged functions

The function catalog resides in the file named “fcncat.dat”. It contains function names, parameter counts, and parameter prompts. Each line describes one function, where the format is free with one or more blanks separating each item:

function_name count prompt1 prompt2 ... promptN

and where:

function_name is the name of the call function

count is the integer number of parameters (arguments)the function takes

prompti is the i-th prompt; there will be count of these.

In the following example, the function catalog contains just three functions, one per line as shown, and the second function has four parameters.

function name count prompts

my_function( ) 3 color type mode

sys_function( ) 4

user_cb( ) 2 XLOC YLOC

option pos scale size

v6.0 1 September 19983-22 Using Enter Dyn

Page 213: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

User-defined variables

The user variable names reside in the file named “usrvar.dat”. It contains variable names only, with a free format and one variable per line. Thus the format, per line, is:

variable-name1

variable-name2

.

.

.

variable-nameN

where:

variable-namei is the name of the variable.

The format is free, with a single variable per line.

In the following example, there are four user-defined variable names:

alpha

beta

gamma

delta

Using Enter Dyn 3-23v6.0 1 September 1998

Page 214: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

User-defined constants

User constants are defined in the file named “usrcon.dat”. Each line of this file defines a constant. There are one or two entries per line, where the first entry is the name of the constant and the second optional entry is its data-type value: integer or double. The format is free, with one or more blanks separating each item:

constant_name constant_value

where:

constant_name is the name of the constant

constant_value is the value of the integer or double data type. If not present, constant_name is taken to be a string or a constant. If the constant_value contains a decimal point, its variable type is defined to be a double data type; otherwise, lacking a decimal point, it is defined as an integer.

In the following example, MY_INT_A is an integer with value 256; MY_DBL_X is of data type double with value 1234.5. The remaining items are not defined as variables but act as strings or string constants which can be pasted by the user:

MY_INT_A 256

MY_DBL_X 1234.5

“MY_STRING”

SOME_STRING_CONSTANT

v6.0 1 September 19983-24 Using Enter Dyn

Page 215: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Conditional Dynamics

Conditional dynamics associate actions or animations of graphical objects with logical tests, such as:

if (A > 10), then fill color is redif ( (B/100) < 1), then text color is greenif (C not equal 0), then move object up 5 unitsif (gamma_1 > 2), then redraw objectif (v = 1), then call my_function(my_arg_1)if (gamma_1 > 2), then edge color of object is f

The last three dynamics descriptions are given as examples in this chapter.

Interface by categories

When the user clicks the Conditional radio button on Panel D of the Enter Dyn Interface Window, the user is presented with three categories of text entry fields to be filled in:

• Variable Category

• Condition Category

• Action Category

Figure 3-1. Conditional dynamics with no arguments

Object/Part Name:

Dynamics Type:

AddDelete

ClearAllRestore

Done Escape

Accept

(unnamed) Object Type: Circ

Input Unconditional Conditional

redraw

Action ExpressionAction (1 of 1)

v

Variable Expression (1 of 1)

> 2

Conditional ExpressionCondition (1 of 1)

ActionsConditions FunctionsVariables

No errorsFindNext

Constants Abort

ReadWrite

Lines: Errors: Dynamics:Show

File:

Using Enter Dyn 3-25v6.0 1 September 1998

Page 216: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Variable category

Figure 3-2. Conditional dynamics

The first steppable set of lines is labeled Variable Expression, as shown in Figure 3-2. This set of lines contains the variable or variable expression which is the basis for the conditions and actions which follow. The user may enter a variable expression from the keyboard and/or paste from the Variables List.

Condition category

The second steppable set of lines is labeled Conditional Expression. For each variable expression there can be one or more conditions. This dependency is denoted by the indentation of the Condition Category and by placing it under the Variable Category.

The Condition line contains two fields: the Condition test symbol followed by the Conditional Expression. For the Condition Symbol field (whether blank or non-blank), the user may enter a conditional symbol from the keyboard or paste one from the Conditional Symbols List (Figure 3-9 on page 3-16 , left). For the Conditional Expression field (whether blank or non-blank), the user may enter a Conditional Expression from the keyboard or, optionally, compose one consisting of keystrokes combined with selections from a Variables List.

v6.0 1 September 19983-26 Using Enter Dyn

Page 217: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Action category

The third steppable set of lines is labeled Action Expression. For each Condition Expression there can be one or more Actions. This dependency is denoted by the indentation of the Action Expression line and by placing it under the Condition Expression line.

The Action Expression line consists, at least, of an Action Verb (first field). If the action takes arguments, the Action Verb is followed by one or two additional fields. Most Action Verbs take a single argument.

For the Action field (whether blank or non-blank), the user may either enter an Action Verb from the keyboard or select an Action Verb from the Action Verbs List (Figure 3-9 on page 3-16 , right).

For the Action Expression field (whether blank or non-blank), the user may enter an action expression from the keyboard, or, optionally, compose an expression consisting of keystrokes combined with selections from the Variables List.

The call Action Verb is used in conjunction with a function. There are two kinds of functions: cataloged and uncataloged. If the function is uncataloged, the function, along with its parameters, is placed in the single Action Expression field adjacent to the Action Verb text entry field.

An example of the Action line for an uncataloged function is shown in Figure 3-3.

Figure 3-3. Action line for an uncataloged function

If the function is available in the Cataloged Functions List, just the name of the function appears in the Action Expression field adjacent to the Action Verb. The parameters are separately displayed in the Parameter category described in the next section.

Using Enter Dyn 3-27v6.0 1 September 1998

Page 218: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Parameter category

This fourth steppable set of lines is labeled Parameter Substitution, as shown in Figure 3-4. The first field (uneditable--called the Parameter Prompt) displays a symbolic name, prompt, keyword, etc., as stored in the Function Catalog file “fcncat.dat”, to assist the user in filling in the parameter list of the function. The parameter substitution is made in the adjacent text entry field via keyboard or a pasting list.

Figure 3-4. Action line for a cataloged function

Examples of Conditional Dynamics

Examples of Panel D with the Conditional Dynamics type are shown in this section. There will be three or four incrementally scrollable text lines.

Action Verb with no arguments

A user has selected an object in a Model and wants to force that object to be redrawn, whenever the variable, gamma_1, is greater than two. In pseudo-code the expression looks like this:

if (gamma_1 > 2), then redraw object

There are two ways to create this Panel D entry. One way is to manually key in all of the conditional dynamics. The other method is to use the cataloged lists so that the user can select from a choice of variables, conditions, and actions.

v6.0 1 September 19983-28 Using Enter Dyn

Page 219: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Manual entry

Manual entries to Enter Dyn are made, as shown in Figure 3-5 on page 3-30 , by executing the following steps:

Steps to manually enter a dynamics description into an Enter Dyn window

Functional Description Steps

Specify Conditional Dynamics

1. Click the Conditional radio buttonObserve the display of the three text entry fields:– Variable Expression – Conditional Expression– Action Expression

Focus on Variable Expression

2. In the Variable Expression field enter:gamma_11

1. Steps 2. through 5. can be done in any order as long as all information is entered.

Focus on the Condition fields 3. Click the Condition Symbol field and enter>

4. Click the Conditional Expression field and enter: 2

Focus on the Action fields 5. Click on the Action Verb field and enter: redraw

Accept the dynamics 6. Click Accept in the Enter Dyn Interface Window

Using Enter Dyn 3-29v6.0 1 September 1998

Page 220: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Figure 3-5. Conditional dynamics: Action verb with no arguments

v6.0 1 September 19983-30 Using Enter Dyn

Page 221: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Entry selection from cataloged lists

When the cataloged list method is used, the user is prompted by a choice of variables, conditions, and actions, as follows:

Steps using catalog lists to enter a dynamics description into an Enter Dyn window

Functional Description Steps

Specify Conditional Dynamics

1. Click the Conditional radio buttonobserve the display of the three text entry fields:– Variable Expression – Conditional Expression– Action Expression

Focus on Variable Expression

2. Click the Variables button on Panel AObserve a choice of variables listed in a scrolling catalog list in the User Variables window.

Click on the variable, gamma_1, in the User Variables windowObserve that gamma_1 appears in the Variable Expression field.

Focus on the Condition fields 3. Click the Condition Symbol field and then click the Conditions button on Panel AObserve a choice of condition symbols in the Conditions window.

4. Click on the “greater than” symbol (>) in the Conditions windowObserve that the “greater than” symbol (>) appears in the Condition Symbol field.

5. Click the Conditional Expression field and enter:2

Focus on the Action fields 6. Click on the Action Verb field and then click the Actions button on Panel AObserve a choice of action symbols in the Action Verbs window.

7. Click redraw in the Action Verbs windowObserve that redraw appears in the Action Verb field.

Accept the dynamics 8. Click Accept in the Enter Dyn Interface Window

Using Enter Dyn 3-31v6.0 1 September 1998

Page 222: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Action Verb with one argument

A user has selected an object in a Model and wants to force the edge color of that object to change to a value of f, whenever the variable, gamma_1, is greater than two. In pseudo-code the expression looks like this:

if (gamma_1 > 2), then ecolor(f) object

The entries shown in Figure 3-6 in Enter Dyn Panel D will establish this functionality.

Figure 3-6. Conditional dynamics: Action Verb with single argument

As before, there are two ways to create this Panel D entry: Either manually enter conditional dynamics or use the cataloged lists so that the user has a choice of variables, conditions, and actions. The only procedural difference between this example and the previous is that the Action Expression contains the variable f.

Object/Part Name:

Dynamics Type:

AddDelete

ClearAllRestore

Done Escape

Accept

(unnamed) Object Type: Circ

Input Unconditional Conditional

ecolor f

Action ExpressionAction (1 of 1)

gamma_1

Variable Expression (1 of 1)

> 2

Conditional ExpressionCondition (1 of 1)

ActionsConditions FunctionsVariables

No errorsFindNext

Constants Abort

ReadWrite

Lines: Errors: Dynamics:Show

File:

v6.0 1 September 19983-32 Using Enter Dyn

Page 223: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Call Action with parameters

A user has selected an object in a Model and wants to call text_function_D( ), whenever the variable, v, is equal to 1. In pseudo-code the expression looks like this:

if (v =1), then call text_function_D (ds1_alpha,ds2_alpha,ds3_alpha,ds4_alpha)

The entries shown in Figure 3-6 on Enter Dyn Panel D will establish this functionality.

Figure 3-7. Conditional call dynamics with four arguments

Done

text_function_A()text_function_B()text_function_C()text_function_D()text_function_E()text_function_F()inst_function_A()inst_function_B()inst_function_C()inst_function_D()inst_function_E()inst_function_F()edge_function_A()edge_function_B()edge_function_C()edge_function_D()edge_function_E()edge_function_F()gms_function_A()gms_function_B()gms_function_C()gms_function_D()

Done

ds1_alphads2_alphads3_alphads4_alphabetabetaprimebetadoubleprimegammagamma_1gamma_2deltaepsilonzetathetaiotakappalambdamunuxiomicronpi

Using Enter Dyn 3-33v6.0 1 September 1998

Page 224: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

The procedural difference between this example and the two previous is that the Action Expression has a function call in it. Use the action and functions cataloged lists, as shown in the following table.

Steps using a Function action catalog list with an Enter Dyn window

Functional Description Steps

Specify Conditional Dynamics

1. Click the Conditional radio buttonobserve the display of the three text entry fields:– Variable Expression – Conditional Expression– Action Expression

Focus on Variable Expression field

2. In the Variable Expression field enter:v

Focus on the Condition fields 3. Click the Condition Symbol field; if the Conditions window is not visible, then click the Conditions button on Panel A

4. Click on the “equals” symbol (=) in the Conditions windowObserve that the “equals” sign (=) appears in the Condition Symbol field

5. Click the Conditional Expression field and enter: 1

v6.0 1 September 19983-34 Using Enter Dyn

Page 225: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Focus on the Action fields 6. Click on the Action Verb field; if the Action Verbs window is not visible then click the Actions button on Panel A

7. Click call in the Action Verbs windowObserve that the call Action Verb appears in the Action Verb field.

8. Click the Action Expression field

9. Click the Functions button on Panel AObserve the choice of functions in the Cataloged Functions window.

10. Click text_function_D( ) in the Cataloged Functions windowObserve the display of the Parameter Substitution entry field.

Focus on the Parameter Substitution field for the first parameter text_argD1

11. Click on the Parameter Substitution field

12. If the User Variables window is not visible then click the Variables button on Panel A

13. In the User Variables window, click on ds1_alphaObserve that ds1_alpha appears in the Parameter Substitution field.

Focus on the Parameter Substitution field for the second parameter

14. Click the down arrow in the Parameter Field to display the second parameterThe title of the Parameter field will display “Parameter(2 of 4)”.

15. In the User Variables window, click on ds2_alphaObserve that ds2_alpha appears in the Parameter Substitution field.

Steps using a Function action catalog list with an Enter Dyn window

(Continued)

Functional Description Steps

Using Enter Dyn 3-35v6.0 1 September 1998

Page 226: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Focus on the Parameter Substitution field for the third parameter

16. Click the down arrow in the Parameter Field to display the third parameterThe title of the Parameter field will display “Parameter(3 of 4)”.

17. In the User Variables window, click on ds3_alphaObserve that ds3_alpha appears in the Parameter Substitution field.

Focus on the Parameter Substitution field for the fourth parameter

18. Click the down arrow in the Parameter Field to display the fourth parameterThe title of the Parameter field will display “Parameter(4 of 4)”.

19. In the User Variables window, click on ds4_alphaObserve that ds4_alpha appears in the Parameter Substitution field.

Accept the dynamics 20. Click Accept in the Enter Dyn Interface Window

Steps using a Function action catalog list with an Enter Dyn window

(Continued)

Functional Description Steps

v6.0 1 September 19983-36 Using Enter Dyn

Page 227: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Uncontidtional Dynamics

Unconditional dynamics associate actions or animations of graphical objects with any change to any of the variables in an Action Expression. Examples in pseudo code are:

if ( A ) changes, then fill color is A+1

if ( C ) changes, then move(C/20)

if ( x ) changes or ( y ) changes, then move( ((x+1) /2), ( | y| ) ) ;

if ( a ) changes, then rotate(a – 90)

The last two dynamics descriptions are given as examples in this chapter.

Interface by categories

When the user clicks the Unconditional radio button on Panel D of the Enter Dyn Interface Window, the user is presented with only one category of text entry field to be filled in:

• Action Category

Figure 3-1 on page 3-38 shows the initial Action Category text entry field. Unlike the Conditional dynamic description, there are no Variable or Condition Categories. Instead, the user sees an asterisk (*), followed by the Action Expression text entry field.

Action category

The steppable set of lines is labeled Action Expression. The Action Expression line consists, at least, of an Action Verb (first field). If the action takes arguments, the Action Verb is followed by one or two additional fields. Most Action Verbs take a single argument.

Using Enter Dyn 3-37v6.0 1 September 1998

Page 228: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

For the Action Verb field (whether blank or non-blank), the user may enter an Action Verb from either the keyboard or by selecting an Action Verb from the Action Verbs List (Figure 3-9 on page 3-16 , right).

Figure 3-1. View of Unconditional text entry field

For the Action Expression field (whether blank or non-blank), the user may enter an action expression from the keyboard, or, optionally, compose an expression consisting of keystrokes combined with selections from the Variables List.

The call Action Verb is used in conjunction with a function. There are two kinds of functions: cataloged and uncataloged. If the function is uncataloged, the function, along with its parameters, is placed in the single Action Expression field adjacent to the Action Verb text entry field.

An example of the Action line for an uncataloged function is shown in Figure 3-2.

Figure 3-2. Action line for uncataloged function

v6.0 1 September 19983-38 Using Enter Dyn

Page 229: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Parameter category

If the function is available in the Cataloged Functions List, just the name of the function appears in the Action Expression field adjacent to the Action Verb. The parameters are separately displayed in the Parameter category text entry field.

Figure 3-3. Parameter Substitution fields

This steppable set of lines, shown in Figure 3-3, is labeled Parameter Substitution. The first field, labeled Parameter (1 of 1) in Figure 3-3, is called the Parameter Prompt. It is uneditable and displays a symbolic name, prompt, keyword, etc., as stored in the Function Catalog file, to assist the user in filling in the parameter list of the function. The parameter substitution is made in the adjacent text entry field, labeled Parameter Substitution, via the keyboard or a pasting list.

Examples of Unconditional Dynamics

Examples of Panel D with the Unconditional Dynamics type are shown in this section.

Action verb with one argument

A user has selected an object in a Model and wants to force that object to be rotated, whenever the variable a changes. In pseudo-code the expression looks like this:

if ( (value of a) changes),then rotate(a – 90) object

Using Enter Dyn 3-39v6.0 1 September 1998

Page 230: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

The entries shown in Figure 3-6 on Enter Dyn Panel D will establish this functionality.

Figure 3-4. Unconditional dynamics: Action Verb and one argument

There are two ways to create this Panel D entry. One way is to manually key in the dynamics shown by performing the steps in the following table:

Steps to manually enter a dynamics description into an Enter Dyn window

Functional Description Steps

Specify Unconditional Dynamics

1. Click the Unconditional radio buttonObserve the display of the asterisk row followed by the Action Expression.

Focus on the Action fields 2. In the Action Verb field enter:rotate

3. Click on the Action Expression field and enter:(a - 90)

Accept the dynamics 4. Click Accept in the Enter Dyn Interface Window

v6.0 1 September 19983-40 Using Enter Dyn

Page 231: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

This completes the manual method of Unconditional Dynamics entry through Enter Dyn.

The other method is to use the cataloged lists demonstrated in the steps of the following table:

Action verb with two arguments

A user has selected an object in a Model and wants to force the object to move, according to certain parametric equations for the x and y coordinates, whenever a variable changes in those parametric equations.

Suppose the coordinates change according to the following functions:

X = ( (x + 1) / 2 )

Y = | y | (the absolute value of variable y)

Steps to automatically enter portions of a dynamics description into an Enter Dyn window

Functional Description Steps

Specify Unconditional Dynamics

1. Click the Unconditional radio buttonObserve the display of the asterisk row followed by the Action Expression

Focus on the Action fields 2. If the Action Verbs window is not visible, then click on the Actions button inPanel A.Observe the choice of actions in the Action Verbs window.

3. Click rotate in the Action Verbs windowObserve that the rotate Action Verb appears in the Action Verb field.

4. Click on the Action Expression field and enter:(a - 90)

Accept the dynamics 5. Click Accept in the Enter Dyn Interface Window

Using Enter Dyn 3-41v6.0 1 September 1998

Page 232: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

As before, there are two ways to create this Panel D entry. The first way is to manually key in the unconditional dynamics; the second way is to use a cataloged list so that the user can make the choice of action prompted by the items. The only procedural difference between this example and the previous is that the Action Expression has two variables and two expressions, one for each coordinate.

The entries shown in Figure 3-6 on Enter Dyn Panel D will establish this functionality.

Figure 3-5. Unconditional dynamics: Action Verb and two arguments

v6.0 1 September 19983-42 Using Enter Dyn

Page 233: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Input Dynamics

Input dynamics associate operator input with function calls that respond to or process the input events to any object with input dynamics. Examples are:

• Operator clicks a radio button

• Operator completes text entry

• Operator clicks a Pull-Down menu item

Interface

When the user clicks the Input radio button on Panel D of the Enter Dyn Interface Window, the user is presented with only one category of text entry field to be filled in:

• Call Action Category

Unlike the Conditional dynamic description, there are no Variable or Condition Categories. Instead the user sees a cross-hatched symbol (#), followed by the call Action Expression text entry field, as shown in Figure 3-1.

Figure 3-1. View of Input text entry field

Call action category

The steppable set of lines is labeled Action Expression. The Action Expression line consists of a fixed call Action Verb

Using Enter Dyn 3-43v6.0 1 September 1998

Page 234: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

(first field) followed by a field provided to hold the function name and arguments.

For the Action Expression field (whether blank or non-blank), the user may either enter the function name and arguments from the keyboard, or select a function from the Function List.

There are two kinds of functions: cataloged and uncataloged. If the function is uncataloged, the function, along with its arguments, must be manually keyed into the Action Expression field.

An example of the Action line for an uncataloged function is shown in Figure 3-2 on page 3-45 .

If the required function is available in the Cataloged Functions List, the user clicks the Functions button on Panel A to display the Functions catalog list. Then the function name on the catalog list is selected to insert it into the action expression. When the function is selected, only the name of the function appears in the Action Expression field adjacent to the Action Verb. The parameters are separately displayed in the Parameter category described below.

Parameter category

This steppable set of lines is labeled “Parameter Substitution.” The first field (uneditable--called the “Parameter Prompt”) displays a symbolic name, prompt, keyword, as stored in the Function Catalog file “fcncat.dat”, to assist the user in filling in the parameter list of the function. The parameter substitution is made in the adjacent text entry field via keyboard or a pasting list.

v6.0 1 September 19983-44 Using Enter Dyn

Page 235: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Examples of Input Dynamics

Examples of Panel D with the Input Dynamics type are shown in this section.

Uncataloged function

A user has selected a button object in a Model and wishes to call an uncataloged function to process the change in status of the button. In pseudo-code the expression looks like this:

if (input = TRUE), then call edge_function_B(alpha, beta)

The entries shown in Figure 3-2 were keyed into Enter Dyn Panel D to establish this functionality. Note that with the entry of uncataloged functions, the parameters must be entered in the Action Expression along with the function name.

Figure 3-2. Example Input dynamics with an uncataloged function

Cataloged function

A user has selected a button object in a Model and wants to call a cataloged function to process the change in status of the button. In pseudo-code the expression looks like this:

if (input = TRUE), then call edge_function_B(theta, phi)

Using Enter Dyn 3-45v6.0 1 September 1998

Page 236: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

The entries shown in Figure 3-3 were entered into Enter Dyn, Panel D to establish the input action function and its first argument, theta. Note that with the selection of a cataloged function, the user is prompted in a separate text entry field for the proper number of parameters by Enter Dyn.

Figure 3-3. Example Input dynamics with a cataloged function

v6.0 1 September 19983-46 Using Enter Dyn

Page 237: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

General Example — Aricraft Display

This example will be used to show how to attach dynamics to a Model, using Enter Dyn and other SL-DRAW2 features, and how to execute the Model using the Dyn Preview Mode. Shown in Figure 3-1 is the aircraft Model before any dynamics have been attached. The Model consists of three parts:

• Start/Stop Button Group

• Sliders with associated Text Rectangles

• Aircraft Group icon in the Rectangle on the left

Figure 3-1. The aircraft Model before attachment of dynamics

Input and Unconditional dynamic controls will be attached to the Start/Stop Button Group. These controls will give this button group the capability to enable and disable the other dynamics of the Model.

Unconditional dynamic text will be attached to the Text Rectangles to display the current values set in the corresponding Sliders, above.

Conditional and Unconditional dynamic attributes will be attached to the four components of the Aircraft Group icon to permit visual recognition of aircraft speed, missile range, and detection range, based on the current values set in the corresponding control sliders. Finally, Conditional dynamics will be attached to the Aircraft Group to control and display the aircraft heading, based on the Heading slider setting.

Speed Heading Rang

Stop

Star

Using Enter Dyn 3-47v6.0 1 September 1998

Page 238: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Start/Stop Button Group Dynamics

The Start/Stop Button Group are two Instances of the ms_button Model. The Instances are created in the Working View by clicking the Get External option of the SubMod Pull-Down Menu. The SL-GMS Reference Manual provides a description of the steps used to instance SubModels into a Model and to rename their variables. Rename the variables for the two Instances as follows:

RenamedVars for Instance #1

buttonlabel :: “Stop”

edge_width :: 2

text_height :: 2

RenamedVars for Instance #2

buttonlabel :: “Start”

edge_width :: 2

text_height :: 2

The procedure shown in the following table describes the step needed to create the Start/Stop Button Group dynamics.

Steps to create dynamics for the Start/Stop Button Group with an Enter Dyn Window

Functional Description Steps

Clear the Select List 1. Click the right mouse button twiceThe Select: count changes to 0.

Create Start/Stop button Group

2. Click the “Stop” button, then click the “Start” buttonThe Select: count changes to 2.

3. Click the Group Pull-Down Menu and select GroupThe Select: count changes to 1.

Invoke Enter Dyn 4. Click the Dyn Pull-Down menu and choose Enter DynObserve the display of the Enter Dyn Interface Window.

Specify Input Dynamics 5. Click the Input radio button

v6.0 1 September 19983-48 Using Enter Dyn

Page 239: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Ch

ap

ter 3

Note the variable Onflag used in both Start/Stop dynamics. When the Stop button is highlighted, Onflag = 0; when the Start button is highlighted, Onflag = 1. This flag will be used later, in effect, to block or allow the input values from the sliders and the corresponding dynamics of the Aircraft Group icon.

Figure 3-2. Start/Stop Input dynamics

Figure 3-3. Start/Stop button Unconditional dynamics

Focus on the Action fields 6. In the Action Expression field entergms_radio_var(1, &Onflag, 1)

Window should now appear as shown in Figure 3-2 on page 3-49 .

Accept the dynamics 7. Click Accept

Note: If an error was found by the Enter Dyn expression checker, the red “Errors:” light appears and the Action Expression is outlined in red. After corrections are made, click Accept again.

Specify Unconditional Dynamics

8. Click the Unconditional radio button

Focus on the Action fields 9. Click the Actions button on Panel AObserve a choice of action symbols in the Action Verbs window.

10. Click call in the Action Verbs window

11. Click the Action Expression field

12. Entergms_hilite_vis_var(&Onflag)

Window should now appear as shown in Figure 3-3 on page 3-49 .

Accept the dynamics 13. Click Accept

14. Click the Done radio button in Panel AThe Enter Dyn Interface Window disappears.

Steps to create dynamics for the Start/Stop Button Group with an Enter Dyn Window

(Continued)

Functional Description Steps

Using Enter Dyn 3-49v6.0 1 September 1998

Page 240: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

v6.0 1 September 19983-50 Using Enter Dyn

Page 241: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Control Sliders and Text RectanglesC

ha

pter 3

Control Sliders and Text Rectangles

The sliders are three Instances of the m_slidev Model. They can be instanced into the Model either using the SubMod Pull-Down Menu or the Palette Pull-Down Menu (the m_slidev Model is on the sliders Palette). Refer to the SL-GMS Reference Manual for a description of the steps used to instance SubModels into a Model and to rename their variables.

A variable with minimum and maximum values has been named and defined for each slider, according to the purpose served by the sliders. Rename the variables for each of the three Instances of m_slidev as shown below:

RenameVars for Instance #1 (Speed)

max :: air_max_speed

min :: 0.

var :: air_speed

RenameVars for Instance #2 (Heading)

max :: 359.

min :: 0.

var :: air_heading

RenameVars for Instance #3 (Range)

max :: air_max_range

min :: 0.

var :: air_detection

A Filled Text Rectangle has been placed beneath each slider label. These rectangles are designed to provide the dynamic display of the current setting on the corresponding slider or, more specifically, the value of the variable defined for the slider.

SL-GMS provides the stext action tool to display dynamic text data. Assignment of the stext action to each Filled Text Rectangle can be accomplished with Enter Dyn. Perform the procedure described in the following step table to establish the dynamics for the Filled Text Rectangles.

Using Enter Dyn 3-51v6.0 1 September 1998

Page 242: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Steps to create dynamics for the Filled Text Rectangles with an Enter Dyn Window

Functional Description Steps

Clear Select List by deselecting all objects

1. Click Done or the right mouse button twiceThe Select: count changes to 0.

Create Select List of the three Filled Text Rectangles

2. Select the three Filled Text Rectangles in order, left (Speed) to right

Invoke Enter Dyn 3. Click the Dyn Pull-Down menu and choose Enter Dyn.Observe the display of the Enter Dyn Interface Window. The first selected Filled Text Rectangle (Speed) is automatically addressed.

Specify Unconditional Dynamics

4. Click the Unconditional Radio buttonAction text entry fields appear.

Focus on the Action fields 5. Click the Actions button on Panel AObserve a choice of action symbols in the Action Verbs window.

6. Click stext in the Action Verbs windowObserve the appearance of “stext” in the Action Verb field.

Note that the window automatically adds another text entry field beneath the initial Action Expression field to accommodate entry of two expressions; one for the numeric expression to be evaluated and one for the display format of the text to be displayed.

7. Click the top Action Expression field

8. Enter:(air_speed * Onflag)

9. Click the bottom Action Expression field

10. Enter:“%5.0f”

Window should now appear as shown in the top box of Figure 3-4 on page 3-54 .

v6.0 1 September 19983-52 Using Enter Dyn

Page 243: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Control Sliders and Text RectanglesC

ha

pter 3

Accept the Speed Filled Text Rectangle dynamics

11. Click Accept and then Done in the Enter Dyn Interface WindowThe second Filled Text Rectangle selected (Heading) is addressed.

Specify Unconditional Dynamics

12. Click the Unconditional radio button

Focus on the Action fields 13. Click stext in the Action Verbs windowObserve the appearance of “stext” in the Action Verb field.

14. Click the top Action Expression field

15. Enter:(air_heading * Onflag)

16. Click the bottom Action Expression field

17. Enter:“%5.0f”

Window should now appear as shown in the middle box of Figure 3-4 on page 3-54 .

Accept the Heading Filled Text Rectangle dynamics

18. Click Accept and then Done in the Enter Dyn Interface WindowThe third Filled Text Rectangle selected (Range) is automatically addressed.

Specify Unconditional Dynamics

19. Click the Unconditional radio button

Steps to create dynamics for the Filled Text Rectangles with an Enter Dyn Window

(Continued)

Functional Description Steps

Using Enter Dyn 3-53v6.0 1 September 1998

Page 244: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Figure 3-4. “stext” dynamics for speed, heading, and range

Focus on the Action fields 20. Click stext in the Action Verbs windowObserve the appearance of “stext” in the Action Verb field.

21. Click the top Action Expression field

22. Enter:(air_detection * Onflag)

23. Click the bottom Action Expression field

24. Enter:“%5.0f”

Window should now appear as shown in the lower box of Figure 3-4 on page 3-54 .

Accept the Range Filled Text Rectangle dynamics and discontinue the Enter Dyn State

25. Click Accept and Done in the Enter Dyn Interface WindowThe Enter Dyn Interface Window disappears.

Steps to create dynamics for the Filled Text Rectangles with an Enter Dyn Window

(Continued)

Functional Description Steps

v6.0 1 September 19983-54 Using Enter Dyn

Page 245: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Control Sliders and Text RectanglesC

ha

pter 3

Panel Dstext Speed

Panel Dstext Heading

Panel Dstext Range

Using Enter Dyn 3-55v6.0 1 September 1998

Page 246: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Aircraft Group icon

The objective is to assign dynamics to the individual parts of the Aircraft icon, shown in Figure 3-5, so that the air detection range circle, the air speed indicator, and the aircraft heading indicator will respond to the real-time dynamic control of the corresponding sliders. Figure 3-6 shows the ungrouped parts of the aircraft group icon. The individual parts of the Aircraft icon are then grouped together and dynamics are attached to the Group.

Figure 3-5. Aircraft icon

Figure 3-6. Components of the Aircraft Icon

The following table provides the steps needed to create the Aircraft Group Dynamics.

air detectionrange circle

missile range envelope

air speed indicator

aircraft heading indicator

v6.0 1 September 19983-56 Using Enter Dyn

Page 247: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Control Sliders and Text RectanglesC

ha

pter 3

Air detection range dynamics

This section describes the steps to attach the dynamics to the air detection range circle so that the range circle will respond to the setting on the Range slider.

Steps to create dynamics for the air detection range circle with an Enter Dyn Window

Functional Description Steps

Clear Select List by deselecting all objects

1. Click Done or the right mouse button twiceThe Select: count changes to 0.

Create Select List of the Aircraft Group

2. Select the four members of the Aircraft Group in order, left (Circle object) to right as shown in Figure 3-6 on page 3-56 The Select: count changes to 4.

Invoke Enter Dyn 3. Click the Dyn Pull-Down menu and choose Enter DynObserve the display of the Enter Dyn Interface Window. The first object selected (Circle) is addressed.

Specify Conditional Dynamics

4. Click the Conditional Radio buttonObserve the display of the three text entry fields:– Variable Expression – Conditional Expression– Action Expression

Focus on the Variable Expression

5. Click the Variables button on Panel AObserve a choice of variable symbols in a scrolling catalog list in the User Variables window.

6. If the variable, air_detection, is in the User Variables window, click on it to enter it into the Variable Expression field; otherwise, enter:air_detection

Using Enter Dyn 3-57v6.0 1 September 1998

Page 248: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Focus on Conditional fields 7. Click the Condition Symbol field and then click the Conditions button on Panel AObserve a choice of condition symbols in the Conditions window.

8. Click on the “equals” symbol (=) in the Conditions window.

9. Click the Conditional Expression field and enter:0 : air_max_range

Focus on the Action fields 10. Click on the Action Verb field and then click the Actions button on Panel AObserve a choice of action symbols in the Action Verbs window.

11. Click scale in the Action Verbs window

12. Click on the Action Expression field and enter the following expression:(1. * Onflag) : (2. * Onflag)

The Enter Dyn Interface Window should now appear as shown in the top frame of Figure 3-7 on page 3-59 .

Add another Conditional dynamic description

13. Click the Variable Expression field

14. Click the Add button on Panel BObserve the display of a second set of Conditional dynamics fields.

Focus on the Variable Expression

15. If the variable, air_speed, is in the catalog list in the User Variables window, click on it to enter it into the Variable Expression field; otherwise, enter:air_speed

Steps to create dynamics for the air detection range circle with an Enter Dyn Window

(Continued)

Functional Description Steps

v6.0 1 September 19983-58 Using Enter Dyn

Page 249: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Control Sliders and Text RectanglesC

ha

pter 3

Figure 3-7. Dynamics for the Range Circle

Focus on Conditional fields 16. Click on the Condition Symbol field

17. Click on the “equals” symbol (=) in the Conditions window.

18. Click the Conditional Expression field and enter:*

The “*” indicates any changed value.

Focus on the Action fields 19. Click on the Action Verb field

20. Click redraw in the Action Verbs windowObserve that the Action Expression field disappears, as it is not needed for the redraw Action Verb.

Accept the Circle dynamics description

21. Click Accept and Done in the Interface WindowThe second object (Missile Range) is addressed.

Steps to create dynamics for the air detection range circle with an Enter Dyn Window

(Continued)

Functional Description Steps

Using Enter Dyn 3-59v6.0 1 September 1998

Page 250: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

v6.0 1 September 19983-60 Using Enter Dyn

Page 251: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Control Sliders and Text RectanglesC

ha

pter 3

Missile range dynamics

This section describes the steps to attach the dynamics to the missile range arc segment so that the range arc segment will be redrawn whenever the setting on the Speed or Range slider is changed.

Steps to create dynamics for the missile range envelope with an Enter Dyn Window

Functional Description Steps

Specify Unconditional Dynamics

1. Click the Unconditional radio button

Focus on the Action fields 2. Click vis in the Action Verbs windowObserve the appearance of “vis” in the Action Verb field.

3. Click the Action Expression field

4. Enter the following numeric expression:(air_arm * Onflag)

Window should now appear as shown in the top frame of Figure 3-8 on page 3-63 .

Specify Conditional Dynamics

5. Click the Conditional radio button

6. Enter the following into the Variable Expression field:air_speed

7. Click on the Condition Symbol field and click on the “equals” symbol (=) in the Conditions window

8. Click the Conditional Expression field and enter:*

9. Click on the Action Verb field and click redraw in the Action Verbs windowWindow should now appear as shown in the middle frame of Figure 3-8 on page 3-63 .

Using Enter Dyn 3-61v6.0 1 September 1998

Page 252: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Add a second Conditional description

10. Click the Variable Expression field and click Add in Panel B

11. Enter the following into the Variable Expression field:air_detection

12. Click on the Condition Symbol field and click on the “equals” symbol (=) in the Conditions window

13. Click the Conditional Expression field and enter:*

14. Click on the Action Verb field and click redraw in the Action Verbs windowWindow should now appear as shown in the bottom frame of Figure 3-8 on page 3-63 .

Accept Missile Range dynamics

15. Click Accept and Done in the Enter Dyn Interface WindowThe third object (Air Speed) is addressed

Steps to create dynamics for the missile range envelope with an Enter Dyn Window

(Continued)

Functional Description Steps

v6.0 1 September 19983-62 Using Enter Dyn

Page 253: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Control Sliders and Text RectanglesC

ha

pter 3

Figure 3-8. Dynamics for the Missile Range arc segment

Using Enter Dyn 3-63v6.0 1 September 1998

Page 254: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Air speed indicator dynamics

This section describes the steps to attach the dynamics to the air speed indicator so that the indicator will respond to the setting on the Speed slider.

Steps to create dynamics for the air speed indicator with an Enter Dyn Window

Functional Description Steps

Specify Conditional Dynamics for air_speed

1. Click the Conditional Radio button

Focus on the Variable Expression

2. If the variable, air_speed, is in the User Variables window, click on it to enter it into the Variable Expression field; otherwise, enter:air_speed

Focus on Conditional fields 3. Click on the Condition Symbol field

4. Click on the “equals” symbol (=) in the Conditions window.

5. Click the Conditional Expression field and enter:0. : air_max_speed

Focus on the Action fields 6. Click on the Action Verb field

7. Click scaley in the Action Verbs window

8. Click on the Action Expression field and enter the following expression:(1. * Onflag) : (10. * Onflag)

The Enter Dyn window should now appear as shown in the top frame of Figure 3-9 on page 3-66 .

Focus on the Variable Expression

9. Click on the Variable Expression field

Add two more Conditional dynamic descriptions

10. Click the Add button in Panel B

11. Enter the following into the Variable Expression field:air_arm

12. Click on the Condition Symbol field

v6.0 1 September 19983-64 Using Enter Dyn

Page 255: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Control Sliders and Text RectanglesC

ha

pter 3

Add two more Conditional dynamic descriptions (continued)

13. Click on the “equal” sign (=) in the Conditions window

14. Click the Conditional Expression field and enter:*

15. Click the Action Verb field and click redraw in the Action Verbs windowThe Enter Dyn window appears as shown in the middle frame of Figure 3-9 on page 3-66 .

16. Click the Variable Expression field

17. Click the Add button in Panel B

18. Enter the following into the Variable Expression field:air_detection

19. Click the Condition Symbol Field and click the “equal” sign (=) in the Conditions window

20. Click the Conditional Expression field and enter:*

21. Click the Action Verb field and click redraw in the Action Verbs windowThe Enter Dyn window appears as shown in the bottom frame of Figure 3-9 on page 3-66 .

Accept the dynamics for the Air Speed Indicator

22. Click Accept and Done on Panel BObserve that Enter Dyn automatically addresses the last component of the Aircraft Icon Group, the Aircraft Heading Indicator. No dynamics are associated with this object.

Discontinue the Enter Dyn State

23. Click the Done radio button in the Enter Dyn Interface Window. The Enter Dyn Interface Window disappears.

Steps to create dynamics for the air speed indicator with an Enter Dyn Window

(Continued)

Functional Description Steps

Using Enter Dyn 3-65v6.0 1 September 1998

Page 256: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Figure 3-9. Dynamics for the Air Speed indicator

v6.0 1 September 19983-66 Using Enter Dyn

Page 257: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Control Sliders and Text RectanglesC

ha

pter 3

To control the heading of the Aircraft Group icon, all four components of the icon must be assembled, as shown in Figure 3-5 on page 3-56 . The four components are grouped together into one object. With the group still selected, any dynamic description attached to it will affect all four members of the group as one logical object.

To group the aircraft objects together and to specify the dynamics for the Aircraft Group icon, perform the steps given in the following step table.

Figure 3-10. Aircraft icon dynamics

Steps to enter the Aircraft Group Icon dynamics description into the Model

Functional Description Steps

Group the aircraft objects into one object

1. With the steps performed in the previous tables, the aircraft objects should still be selected; if not, select the objects from left to right as shown in Figure 3-6 on page 3-56 The Select: count is 4.

2. Click the Group Pull-Down Menu and select GroupThe Select: count changes to 1.

Using Enter Dyn 3-67v6.0 1 September 1998

Page 258: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Invoke Enter Dyn 3. Click the Dyn Pull-Down menu and choose Enter Dyn.Observe the display of the Enter Dyn Interface Window shown in Figure 3-2 on page 3-49 .

Specify Conditional Dynamics

4. Click the Conditional radio buttonObserve the display of the three text entry fields.

Focus on Variable Expression

5. Click the Variables button on Panel AObserve a choice of variables listedin a scrolling catalog list in the User Variables window.

6. If the variable, air_heading, is in the User Variables window, click on it to enter it into the Variable Expression field; otherwise, enter:air_heading

Focus on the Condition fields 7. Click the Condition Symbol field

8. Click the Conditions button on Panel AObserve a choice of condition symbols in the Conditions window.

9. Click on the “equals” symbol (=) in the Conditions window

10. Click the Conditional Expression field and enter:0. : 359.

Focus on the Action fields 11. Click on the Action Verb field

12. Click the Actions button on Panel AObserve a choice of action symbols in the Action Verbs window.

13. Click rotate in the Action Verbs window

14. Click the Action Expression field and enter:(air_heading * Onflag)

Steps to enter the Aircraft Group Icon dynamics description into the Model

(Continued)

Functional Description Steps

v6.0 1 September 19983-68 Using Enter Dyn

Page 259: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Previewing the ModelC

ha

pter 3

The dynamic description for the Aircraft Display is complete. Save and reload the Model to initialize it.

Previewing the Model

To see the Model in operation, use the Preview option. Click the Dyn Pull-Down menu and select Preview to display the PREVIEW window, shown as it appears initially in Figure 3-11.

Figure 3-11. “PREVIEW” window

Enter into the Filename (.dat) field the name of the Preview Control file, aircraft, and click Edit. The PREVIEW EDITOR window appears, as shown in Figure 3-12.

Figure 3-12. “PREVIEW EDITOR” window

Accept the Aircraft Icon Group dynamics and discontinue the Enter Dyn State

15. Click Accept and Done in Panel BThe Enter Dyn Interface Window disappears.

Steps to enter the Aircraft Group Icon dynamics description into the Model

(Continued)

Functional Description Steps

Using Enter Dyn 3-69v6.0 1 September 1998

Page 260: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

v6.0 1 September 19983-70 Using Enter Dyn

Page 261: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Previewing the ModelC

ha

pter 3

Click Insert in the PREVIEW EDITOR window and enter the control text shown in Figure 3-13. Click Save and Done in the PREVIEW EDITOR window to complete the entry.

Figure 3-13. Preview control file: “aircraft.dat”

To preview the Model, set an Update Period (.1 seconds, for example) into the PREVIEW window and click Go.

air_heading 0.

air_arm 1.

air_speed 0.

air_detection 0.

air_max_speed 200.

air_max_range 300.

Onflag 0

Using Enter Dyn 3-71v6.0 1 September 1998

Page 262: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Using Enter DynC

ha

pte

r 3

Moving the sliders before clicking the Start button results in no change to the aircraft group icon. Click the Start button and the Model resembles Figure 3-14. Whatever settings are in place on the Speed, Heading, and Range sliders, they are immediately reflected in the aircraft group icon. Click Stop and the controlled icon returns to its initial status. The Filled Text Rectangles beneath the sliders reflect the current setting of the corresponding slider.

Figure 3-14. Preview interface window

v6.0 1 September 19983-72 Using Enter Dyn

Page 263: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

Symbols"options.dat" file

banner_name line ..................2-149demo_mode .......................... 2-151fonts line .................................2-19hidden_var line ...................... 2-149modelpath line ........... 2-147, 2-148palette_path line .................... 2-122string codes parameter ............2-12,

.......................2-21, 2-148.dat files

attributes.dat ............... 2-147, 2-153options.dat 2-12, 2-21, 2-147, 2-148positions.dat ............... 2-147, 2-156views.dat .................... 2-147, 2-162

.g filescreation of in SL-DRAW2 ........ 2-108

.m1 filesmaximum number of objects .. 2-106suffix of ................................. 2-105

<DOWN> arrow key .......................3-13<ENTER> key .................................3-13<RETURN> key ...............................3-13<SHIFT><TAB> key ........................3-13<TAB> key .....................................3-13<UP> arrow key ..............................3-13“.dat” files .......................................3-14“draw2.dy1” ....................................3-10“fcncat.dat” ...................3-14, 3-18, 3-22“usrcon.dat” ...........................3-14, 3-24“usrvar.dat” ............................3-14, 3-23

Numerics48-box Model

SubModel Control Panel .............1-6

AAbort button .....................................3-8Accept button ..........................3-8, 3-10Action Category ..............................3-25Action Expression ...........................3-19Action Verbs List ....................3-14, 3-16Action word “call” ...........................3-19action, dynamic

definition of ...............................3-1Ada programming language

applying to C on-line examples .....1Reference manual .........................3

Add button ..............................3-9, 3-13adding Points ..................................2-62AddPt .............................................2-37aircraft Model ..................................3-47align attribute ................................2-154all views, PostScript ........................2-90And, Bitmap Write Mode

definition .................................2-79example ...................................2-79

Angle ..............................................2-65animation

Polygon ...................................2-38Polyline ...................................2-38relative transformation of points 2-39

ANSI-C (C++) Interface Reference ...........3apply transformation .....................2-143Apply Xform .................................2-143array of buttons, creating ................2-68ASCII save of Models ....................2-108Attribute Control Panel ...........1-11, 2-72auto_attribute_menu .....................2-151auto_zp_reset ................................2-151autodraw ......................................2-150

BBack of ... .....................................2-142Back of All ....................................2-142Backgr ............................................2-73Background ....................................2-73Backup button .......................1-14, 2-71banner_name line

"options.dat" file .....................2-149Batcherase ......................................3-17batcherase flag ................................2-38bcolor attribute .............................2-153binary library ..................................1-15binary Model files .........................2-105Bitmap

Bitmap Attribute Control Panel .2-78definition ...............................2-140flags .........................................2-81names ....................................2-140Pull-Down Menu ....................2-140saving ....................................2-140scaling .....................................2-81

SL-GMS Reference page X-iv6.0 21 December 1998

Page 264: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

valid names for ...................... 2-140Write Mode ...................2-78, 2-141

And ..................................2-79Complement .....................2-78Or ....................................2-80Overwrite .........................2-78Xor ...................................2-80

BitMap Write ..................................1-12bitmap_attribute_menu ................. 2-152bitmapbox Model .......................... 2-156BitMapflag ......................................2-81border

PostScript output ......................2-91button object ..................................3-45Buttons

AddPt ......................................2-62Circle .......................................2-11Const .......................................1-10Copy .......................................2-30Delete .............................1-14, 2-71Done .......................................1-14Move .......................................2-50MovePt .............................1-9, 2-59Redraw ....................................1-14Rotate ...............................1-9, 2-48Scale .................................1-9, 2-54Three Point Sector ...................2-26Undo .......................................1-14

CC library function reference .................. 2C++ programming language

applying to C on-line examples ..... 1Reference manual ......................... 3

Call Action Category .......................3-43Cataloged Functions List .........3-14, 3-18CENTER Mode ................................2-69center, of object ............................ 2-135Change Dir ............................2-83, 2-84change options ...............................2-37Change Ref ..........................2-48, 2-126Circle

object creation .........................2-11Circle button ...................................2-11Clear All button ..............................3-10Clear Parts ...........................2-88, 2-107Clear Submods .............................. 2-107

page X-ii SL-GMS Reference

clear the Select List ..........................1-14click (mouse), definition of ..................1Close Group .................................2-125Close Obj ......................................2-125closed attribute .............................2-155Closed Spline button .........................2-7color ...............................................1-12

chart ..........................................1-4HSI ............................................1-5number ....................................2-73palette

256 colors .........................2-74default ..............................2-73

Color Attribute Control Panel ..........2-73ColorDef utility .................................1-4colordef.dat files ...............................1-4command-line options ......................1-6Complement, Bitmap Write Mode

defintion ..................................2-78example ...................................2-78

Complex FillGroup .......................2-125concave fill (SGI-IRISGL) ...................1-6Condition Category ................3-21, 3-25Conditional

Dynamic descriptions .................3-4Dynamics, example ..................3-28Expression ...............................3-16

Conditional Symbols .......................3-16List .................................3-14, 3-16

Const: button .........................1-10, 2-68Constants List ..................................3-19constraint .............................2-52, 2-101

horizontal ................................2-68vertical .....................................2-69vertical and horizontal ..............1-10

contraintsvertical and horizontal ..............1-10

Control Panels ...................................1-8conversion

of Model files .........................2-108Convert Pull-Down Menu .....2-37, 2-143Copy button ....................................2-30

combined with Rotate ..............2-31copy of SubModel’s parts ..............2-145Create Local .......................2-111, 2-145creating graphical objects ..................2-2

v6.0 21 December 1998

Page 265: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

current Model .................................1-13cursor position ................................1-13Cursor Position Box ...............1-13, 2-70Customized icons .......................... 2-109customizing

SubModel icons .....................2-120

Ddebugbox Model ...........................2-158debugging output ...........................2-83default

Attribute Control Panel .............2-75dialog box parameters ........... 2-156Mode .......................................2-69Point Snap Mode .....................2-66Reference Point .............2-54, 2-126scale ........................................2-69Window dimensions ................2-96window parameters ...............2-156

Defaults optionSystem Pull-Down Menu ..........2-85

DELETE button ......................1-14, 2-71Delete button ...........................3-9, 3-13delete Points ...................................2-64deleting objects ......................1-14, 2-71DelPt ..............................................2-37DelPt button ...................................2-64demo mode ......................................1-6demo_mode

in "options.dat" file ................ 2-151Descend ....................................... 2-103destination

raster operations ......................2-78Details button, Identify option 2-29, 2-81Detect Off ..................................... 2-144Detect On ..................................... 2-144dialog boxes .....................................1-8

configuration ......................... 2-156dirbox Model ................................ 2-158DIRECTORIES window ...................2-83directory names

non-printing letters in .....2-83, 2-84documentation

distributed with SL-GMS ................ 2DONE

button ............................1-14, 2-71Done button .....................................3-8doublebuffer flag ............................2-39

v6.0 21 December 1998

draw the grid ..................................1-14draw2 program .................................1-7draw2_nt program .............................1-7draw2x program ...............................1-7dump

Dump utility ............................2-84format ......................................2-84

Dump Sel List .................................2-84dumpbox Model ...........................2-158Dyn Pull-Down Menu ...................2-139Dynamic

action, definition of ....................3-1descriptions

Dynamic Properties .............3-2descriptions, definition of ...........3-2graphical objects ........................3-1properties ..................................3-2

Dynamic actionsconditional .................................3-4Input type ..................................3-4unconditional .............................3-4

Dynamic Property .............................1-2Dynamics ......................................2-104

region ......................................3-10dynarray flag ...................................2-39dynbox Model ...............................2-157dynenter Model .............................2-156DynProp ...........................................1-2

definition ...................................1-2specifying in SL-DRAW2 .............3-2syntax ........................................3-3

Eecolor attribute ..............................2-153edge (Line) style .............................2-75

valid style numbers ..................2-75Edge Attribute Control Panel ...........2-75Edge lines .......................................1-12edge_attribute_menu .....................2-152edges, invisible ...............................2-75Edit Dyn .......................................2-139editor ................................................1-8Editor configuration files ...............2-147editor State .....................................2-70efficiency

SL-GMS Reference page X-iii

Page 266: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

of SL-GMS ....2-48, 2-50, 2-52, 2-55, 2-75, 2-143

Text .........................................2-21Ellipse ............................................2-54Enter ..............................................2-35Enter Data: Box ..............................2-40Enter Dyn ..................................... 2-139

activation ...................................3-5Interface Window ......................3-3Interface Window, Panel A .........3-7Interface Window, Panel B .........3-9Interface Window, Panel C .......3-11Interface Window, Panel D ......3-12SL-DRAW2 .................................3-3

Enter Object Name: Box ..................2-42entering scaling factors ....................2-54EPSF ...............................................2-86equal scaling ...................................2-69error output to a file .......................2-83Errors ...............................................3-4

checking ..................................3-21region ......................................3-10

Escape ............................................2-34Escape button ...................................3-8estyle attribute .....................2-75, 2-153estyle command, valid parameters to 2-75ewidth attribute ...................2-75, 2-153Example Input dynamics .................3-46exiting ............................................1-14exiting SL-DRAW2 ...........................2-85expert mode .....................................1-6expert_mode ................................ 2-151Explode ........................................ 2-143exploding

Models ................................... 2-145SubModels into parts ............. 2-143

Ext labelSubModel Control Panel ......... 2-109

extent Rectangle .......2-50, 2-103, 2-141External SubModel List ..................2-109

F-f1 option, PostScript output ............2-91-f3 option, PostScript output ............2-91fcolor attribute .............................. 2-153fdir attribute .................................. 2-153file

page X-iv SL-GMS Reference

configuration of editor ...........2-147name length ...........................2-106

file conversion".g" to ".m1" ...........................2-108

File region ......................................3-10fill

attributeObject Create Control Panel 2-45

direction ..................................2-77percent ....................................2-76setting style and pattern ...........2-74

Fill button .......................................2-45fill color (fcolor) ............................2-153fill pattern attributes ........................1-12fill_color_button_state ...................2-152filled attribute ...............................2-155Filled Text Rectangle button ............2-21FillGroup ......................................2-125Find Center ........................2-114, 2-126Find Next button .............................3-10Find Point

center ....................................2-114Mode .....................................2-135option ................2-66, 2-101, 2-135Point Pull-Down Menu ...........2-127

finter attribute ......................2-74, 2-153Flags

Object Change Control Panel ...2-38Flags button ....................................2-38font

attribute .................................2-154default set ..................................1-3height ......................................2-19Text .........................................2-19

fontdef.dat fileusing .........................................1-3

fonts line, "options.dat" file ..2-19, 2-150FORTRAN programming language

applying to C on-line examples .....1Reference manual .........................3

fpercent attribute ...........................2-153Front of ... .....................................2-142Front of All ...................................2-142Front/Back ......................................2-65fstyle attribute ......................2-74, 2-153Function

catalog .....................................3-22

v6.0 21 December 1998

Page 267: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

Function List ...................................3-44

GG_BTM_NO_TRANS flag .................2-81G_BTM_TRANS_IMPULSE flag .........2-81G_WS_EXPOSE_RECT

setting .......................................1-6Get Bitmap ................................... 2-141Get Defaults .................................. 2-124Get External... ............................... 2-112Get Local ...................................... 2-111Get Model

Model Pull-Down Menu ......... 2-105Get Palette option ......................... 2-122GISMOS directory .............................1-7gm1

program ................................. 2-108GMS_D2_PATH ............................. 2-147graphical editor .................................1-1graphical objects ...............................2-2Graphical Primitive class .................2-81GRAPHS directory .............................1-7graphs directory ................................1-7GRAV, Point Snap Mode .................2-66gravity .......................................... 2-135

definition ............................... 2-136Point snapping .........................2-66

green light ......................................3-21grid

changing size ......................... 2-136current size status ....................1-10defined ....................................2-65granularity ............................. 2-151Grid: option .............................2-57in SL-DRAW2 ...........................2-65intersections ............................2-57reference .................................2-97sizes, valid entry ......................2-66snap ........................................2-66spacing .................................. 2-151using SnapPt ............................2-57visible ......................................2-57

Grid, Text Alignment ......................2-15grid_color ..................................... 2-151grid_front ...................................... 2-152grid_on ......................................... 2-152grid_size ....................................... 2-151

v6.0 21 December 1998

grid_type ......................................2-152Group

create ....................................2-125definition ...............................2-125destroy ..................................2-125single object ..........................2-125

groupas one logical object ................3-67

Group Pull-Down Menu ................2-125GSave Model ................................2-108

Hhalf-center alignment, Text ..............2-19height attribute ..............................2-154height of window or box ..............2-156height, Text ....................................2-19

default .....................................2-19hidden_var line

"options.dat" file .....................2-149Hilite On/Off in SL-DRAW2 ...........2-104hilite_all ........................................2-150horizontal constraint ...............1-10, 2-68

I-i command-line option .....................1-7

SUBMODELS window ............2-110icon_name line, "options.dat" file ..2-149icons .............................................2-120ident_bitm Model ..........................2-159ident_edge Model .........................2-159ident_fill Model .............................2-159ident_mark Model .........................2-159ident_text Model ...........................2-159ident_trec Model ...........................2-159identbox Model .............................2-158Identify button .......................2-29, 2-81IDENTIFY Dialog Box .....................2-81Impulse button ...............................2-81Input dynamics ...............................3-43Installation Notes, description of ..........2Instance, definition of .......................1-2Invert option .................................2-103invisible edge objects ......................2-75

Llanguages, non-C .................................1layout of buttons and Menus .............1-8

SL-GMS Reference page X-v

Page 268: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

library .............................................1-15binary ......................................1-15path ...........................................1-6

Line ................................................2-73appearance ..............................2-76button .......................................2-5object creation ...........................2-5style number ............................2-75

line count .......................................3-13line number ....................................3-13Line Stepper buttons .......................3-12Line/Dot option ..............................2-65line_color_button_state ................. 2-152lines in Text objects ........................2-12Lines region ......................................3-9Loc;SubModel

local ...................................... 2-109Loc<-->Ext .................................... 2-111loc_motion event ............................2-70Local SubModel List ...................... 2-109long_model_names ....................... 2-151

Mmain window Model .....................2-156Make Spline .................................. 2-143manual method ...............................3-41manuals

distributed with SL-GMS ................ 2Marker ..........................1-12, 2-73, 2-77

definition .................................2-28object creation .........................2-28style, changing .........................2-77

Marker Attribute Control Panel ........2-77Marker button .................................2-28mcolor attribute ............................ 2-154Merge Model ................................ 2-105Mirror button ..................................2-52mirror image ...................................2-52Mirror transform

undo .......................................2-37Mode option ..........................1-10, 2-69Model ................................ 2-105, 2-128

adding to Select List ...............2-103binary file .............................. 2-105exploding ................... 2-143, 2-145maximum number of objects .. 2-106

page X-vi SL-GMS Reference

merging .................................2-107Name Box .......................1-13, 2-70part list ..................................2-142path setting ................................1-6printing a copy ........................2-86printing in EPSF format ............2-86save .......................................2-107

as .g file ..........................2-108as .m1 file .......................2-108

Save As... ...............................2-108save problem .........................2-106valid names for ......................2-106

Model Instance objectdefinition of ...............................1-2

Model option ................................2-103Model path .......................................1-6Model Pull-Down Menu ................2-105modelbox Model ...........................2-157modelbox1 Model .........................2-157modelpath line

"options.dat" file ..........2-147, 2-148MODELS window ..........................2-105mouse

click, definition of .........................1mouse pick aperature ........................1-6Move button ............................1-9, 2-50Move transform

undo ........................................2-37MovePt ...........................................2-37MovePt button .........................1-9, 2-59

undo ........................................2-37msize attribute ..............................2-154mstyle attribute .............................2-154

NName button ...................................2-42names

of Bitmapsvalid names for ...............2-140

of Models ..............................2-106of objects

defined .............................2-42purposes ...........................2-43requirements for ...............2-43steps .................................2-43

noerase flag ....................................2-38None button ...................................2-81

v6.0 21 December 1998

Page 269: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

non-printing lettersin directory names ..........2-83, 2-84

notifybox Model ...........................2-160number of color ..............................2-73number of objects currently selected 1-14

Oobject

center of ................................ 2-135changing ....................................1-9cloning ....................................2-30creation .....................................1-9dragging ....................................1-9dynamic graphical ......................3-1filling .......................................2-45graphical ...................................2-2grouping .........................1-2, 2-125move .........................................1-9naming ....................................2-42order in part List .................... 2-142rotate .........................................1-9scale ..........................................1-9Select List ...................................1-9selecting within group ........... 2-103selection ....................................1-9unfilling ...................................2-45UserData, adding .....................2-40

Object Change Control Panel ....1-9, 2-2, ................................................2-37

Object Create Control Panel ..............1-9fill attribute in ..........................2-45

Object Flags ....................................2-38object pop off mode .........................1-6object with Dynamic Properties ..... 2-104OEM users ......................................1-15Offset .............................................2-65On/Off ...........................................2-65Open Obj ..................................... 2-125options

attributes.dat ............... 2-147, 2-153options.dat .................. 2-147, 2-148positions.dat ............... 2-147, 2-156PostScript .................................2-90views.dat .................... 2-147, 2-162

Options Pull-Down Menu ............. 2-142Or, Bitmap Write Mode

definition .................................2-80

v6.0 21 December 1998

example ...................................2-80order of objects .............................2-142Order Pull-Down Menu .................2-142Origin (0,0) option ........................2-127output, redirecting ..........................2-84overview ...........................................1-8Overwrite Mode ............................2-141Overwrite, Bitmap Write Mode

definition of .............................2-78

PPAL Document, description of ..............3Palette ..........................................2-122

definition of ...............................1-3Get Palette option ......................1-2PALETTE SELECTION window ..1-2,

2-122Pull-down Menu ........................1-2

Palette Pull-Down Menu ................2-122PALETTE SELECTION window ......2-122palette_path line

"options.dat" file ..........2-122, 2-149palframe Model .............................2-158palscroll Model .............................2-158Pan ........................................2-95, 2-96pan

definition .................................2-95moving the origin with .............2-97

Pan to 0 ..........................................2-96Panel A .............................................3-7Panel B .............................................3-9Panel C ...........................................3-11Panel D ..........................................3-12Parameter

Prompt ...........................3-19, 3-28Substitution ............3-19, 3-28, 3-39

part List, Model .............................2-142Pascal programming language

applying to C on-line examples .....1Reference manual .........................3

pasting lists .....................................3-22path

Model Save problem ..............2-106path attribute ................................2-154path, Text .......................................2-20

default .....................................2-20pick_aperture ................................2-150Pie

SL-GMS Reference page X-vii

Page 270: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

filling .........................................2-9Object creation ..........................2-9

Pie button .........................................2-9Point

delete ......................................2-64pick exactly ...........................2-135predefined .................. 2-127, 2-135remove ....................................2-64selecting

Change Ref .....................2-128Find Center .....................2-128Find Point ....................... 2-128

Snap Mode .....................1-10, 2-66POINT Mode ..................................2-69Point Pull-Down Menu .........2-66, 2-142Point Snap Modes ...........................2-66point_mode .................................. 2-150point-and-click ..................................3-4Points ........................................... 2-101Polygon

object creation ...........................2-4Polygon button .................................2-4Polyline ..........................................2-62

definition ...................................2-3object creation ...........................2-3

Polyline button .................................2-3popup scrolling lists ..........................3-4PostScript

file creation command in comment ..............2-93

options ...........................2-86, 2-90Output all Views ......................2-90output files ..............................2-86

all views ...........................2-88left-right displacement .......2-90no options ........................2-87option parameters .............2-89rotate image ......................2-90up-down displacement ......2-90

PostScript option"System" Pull-Down Menu ........2-85

predefined Point ................ 2-127, 2-136prevedit Model ............................. 2-157Preview option ....................2-139, 3-69prevopts Model ............................. 2-157programming languages ....................... 1pts relative flag ...............................2-38pts symmetric flag ...........................2-39

page X-viii SL-GMS Reference

Pull-Down Menus ..................1-12, 2-82

Qqueries, setting "yes" as answer to all 1-7Quick Reference card ........................1-9Quit option .....................................1-14Quit, SL-DRAW ...............................2-85

R-r parameter ......................................1-6RADIO GISMO ................................2-38range expression .............................3-21range operator ‘:’ .............................3-21raster files .....................................2-140Raster Operation Mode ...................2-78

And .........................................2-79Complement ............................2-78Or ............................................2-80Overwrite ................................2-78Xor ..........................................2-80

raster operations .............................2-78rastop attribute ..............................2-155Read button ....................................3-10Rectangle

object creation ...........................2-8Rectangle button ...............................2-8Red Errors

light .........................................3-49Redirect Out ...................................2-84redirecting output ...........................2-84Redraw button ................................1-14Reference Axes

creating ..................................2-100reference grid

panning ...................................2-97solid, panning ..........................2-98

Reference Line ................................2-52Reference Point .....................2-48, 2-54,

..........................2-69, 2-126, 2-131default ...................................2-126set on Select List ....................2-126with transformation ................2-131

Release Notes, description of .................3Remove ........................................2-112remove transformation ..................2-143Remove Xform .....................2-37, 2-143Rename Vars .................................2-139renaming variables ............................1-2

v6.0 21 December 1998

Page 271: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

renbox Model ............................... 2-157Repl Text ........................................2-19replace Text ....................................2-19reserved words, SL-GMS ..... 2-106, 2-140Reset button, Set Flags Box .............2-39Reset Ref ...................................... 2-127reset_constraint ............................. 2-150Restore button ................................3-10reversing any change ......................1-14Rotate button ...........................1-9, 2-48

combined with Copy ...............2-31Rotate the image

PostScript output ......................2-90Rotate transform

undo .......................................2-37rotation

SubModel .....................1-12, 2-111rotation angle .................................1-12running under

NT .............................................1-7UNIX .........................................1-7VAX/VMS ..................................1-7

SSame Color ................................... 2-104Same Point ................................... 2-127Same Type .................................... 2-104Save & Quit

Model Pull-Down Menu ......... 2-108Save As...

Model Pull-Down Menu ......... 2-108Save Local .................................... 2-111Save Model ................................... 2-107saving Models

as .g file ................................. 2-108as .m1 file .............................. 2-105path problem ......................... 2-106to use as SubModels .............. 2-112

scalesubmodel .................................2-73

Scale button .............................1-9, 2-54Scale transform

undo .......................................2-37scaling

Bitmap .....................................2-81equal .......................................2-69factors ...................1-12, 2-35, 2-54

v6.0 21 December 1998

factors, entering in SL-DRAW2 ..2-54horizontal ................................2-69objects .....................................2-54SubModels ...............................1-12unequal ..........................2-54, 2-69vertical .....................................2-69

Screen Prev ...................................2-139search path

setting of ...................................1-7Sector

definition .................................2-24object creation .........................2-24Three-point ..............................2-26

Sector — Three Point button ...........2-26Sector button ..................................2-24Sector3s ..........................................2-26Select ............................................2-142select ............................................2-104

all objects ..............................2-103Attribute Control Panel .............1-12by Extent Rectangle ...............2-103by motion ..................................1-9by name of object ..................2-104by same color ........................2-104by same type of object ...........2-104color hue ...................................1-4display select count ..................1-14invisible objects .......................2-43Model for display ...................2-105Model from Palette .....................1-3non-detectable objects .............2-43object from PALETTE .............2-122object to change ........................1-9object type to create ...................1-9object within group ................2-103objects by Extent Rectangle ....2-135objects, alternative methods ...2-103parts of exploded Model ........2-145Points ....................................2-128Reference Point ......................2-126using Find Point option ..........2-135with constraint .........................1-10

Select List ...............................1-14, 2-37clearing ....................................2-37conversion of objects .............2-143manipulation ..........................2-103usage .........................................1-2

SL-GMS Reference page X-ix

Page 272: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

Select Pull-Down Menu ................. 2-103select-by-motion ....................2-50, 2-54selecting for display ...................... 2-105selecting Points ............................. 2-128selection depth ............................. 2-103Set Flags Box ..................................2-38set Reference Point ....................... 2-126setflags Model ............................... 2-158SGI Verdix Ada Interface Reference ........3Show ............................................ 2-111Show button ...................................3-10Show Vars .................................... 2-139Single object Groups .....................2-125Size ................................................2-65size

Text .........................................2-19SL-DRAW ..........................................1-5SL-DRAW2

Copy button ............................2-30editor window ...........................2-1graphic editor ............................2-1invoking ....................................1-5Option Files ...........................2-147Quick Reference Card ......................2relinking ..................................1-15running ......................................1-5setting control keycodes ......... 2-148setting main window banner .. 2-149setting main window icon ...... 2-149setting Model search path ...... 2-148starting up .................................1-5

SL-DRAW2 Library ..........................1-15SL-GMS

SL-GMS Advanced Tutorial ..............2SL-GMS Basic Tutorial .....................2SL-GMS Function Reference .............2SL-GMS Reference .............................2

SL-GMS actions .................................3-2snap ...............................................1-10

to grid .....................................2-66snapping Points ..............................2-57SnapPt button .................................2-57

undo .......................................2-37source

raster operations ......................2-78Special Buttons ......................1-13, 2-70Special Key bindings .......................3-13

special keys .........................................1Spline .............................................2-62

Closed Spline Object creation .....2-7object creation ...........................2-6

Spline button ....................................2-6State Indicator Box .................1-13, 2-70State of the editor ............................1-13Status Control Panel ........................1-10steppable line .................................3-12stmonitor Model ............................2-158strbox_nam Model ........................2-160strbox_ps Model ...........................2-160strbox_red Model ..........................2-161strbox_ud Model ...........................2-161strbox_win Model .........................2-161string codes parameter

"options.dat" file ...2-12, 2-21, 2-148stringbox Model ............................2-160stringbox1 Model ..........................2-160stringbox2 Model ..........................2-160stringbox3 Model ..........................2-160Style Number, line ..........................2-76styles, Line/Edge .............................2-75SubMod Pull-Down Menu .............2-109submodbox Model ........................2-158SubModel

capability ...................................1-2definition of ...............................1-2how to make .........................2-112icon .........................................1-12

customizing ....................2-120Instance

scale of ...........................2-110instancing .....................1-12, 2-115List ........................................2-109rotate .......................................2-73rotation ..................................2-111scale ........................................2-73

SubModel Control Panel 1-11, 2-72, 2-73setting of 48-box Model ......1-6, 1-7

submodel_count ...........................2-150SUBMODELS window ...................2-109

directories listed .....................2-110SUBMODS directory ..........................1-7submods directory ............................1-7SUN Verdix Ada Interface Reference .......3System Pull-Down Menu .................2-83

page X-x SL-GMS Reference v6.0 21 December 1998

Page 273: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

Ttcolor attribute .............................. 2-153Text .......................................1-12, 2-73

default fonts ..............................1-3default height ..........................2-19default path .............................2-20direction of writing ..................2-20efficiency .................................2-21Filled Text Rectangle ................2-21fonts .................................1-3, 2-19half-center alignment ...............2-19height ......................................2-19multiple line entry ....................2-12object attributes .......................2-12object creation .........................2-12path .........................................2-20size ..........................................2-19Zoom ......................................2-95

Text Alignment Grid .......................2-15Text Attribute Control Panel ............2-81Text button, in SL-DRAW2 ..............2-12text cursor, invisible ........................2-89Text Rectangle ................................3-51

creation ...................................2-23text_attribute_menu ...................... 2-152text_color_button_state ................. 2-152text_heights line, "options.dat" file ..2-19,

..............................................2-150Three Point Sector

creation ...................................2-26timer Model ....................................2-32transformation .............2-48, 2-50, 2-143

apply ..................................... 2-143transformation matrix .................... 2-143transformation options ..................2-128transparent quality ..........................2-74

UU Data button .................................2-40Unconditional

Dynamic description ..................3-4Dynamics ........................3-37, 3-39radio button .............................3-37

undelete .........................................1-14underscore .................................... 2-120Undo button ..........................1-14, 2-71unequal scaling ......................2-54, 2-69UnFill button .........................2-45, 2-47

v6.0 21 December 1998

UnGroup ......................................2-125unpicking points .............................1-14Upgrade Notes Document

description of ................................3UserData

adding to objects .....................2-40definition .................................2-40

UserData button ..............................2-40User-defined

Constants .................................3-14Functions list ............................3-14Variables List ............................3-14

Vv_at1menu ....................................2-162v_at2menu ....................................2-162v_back ..........................................2-162v_barmenu ....................................2-162v_clean .........................................2-162v_cons ..........................................2-162v_lowmenus .................................2-162v_submodlist .................................2-162v_topmenu ...................................2-162v_work .........................................2-162Variable

Expression ...............................3-15List ..........................................3-15

Variable Category ............................3-25VAX Ada Interface Reference ..................3VAX FORTRAN Interface Reference .........3VAX Pascal Interface Reference ..............3Version option ................................2-84vertical constraint ...................1-10, 2-69View

definition ...............................2-162View Pull-Down Menu .............2-95

Vis On/Off ....................................2-144visible

grid ..........................................2-57

WWC-window ....................................2-35width of window ..........................2-156window ............................................1-2

default WC-window size ..........2-35DIRECTORIES ..........................2-83height ....................................2-156overlapping ...............................1-8

SL-GMS Reference page X-xi

Page 274: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

PALETTE SELECTION .....1-2, 2-122position ................................. 2-156size ........................................ 2-156SL-DRAW2 editor .......................2-1SUBMODELS ......................... 2-109width ..................................... 2-156Window option

View Pull-Down Menu ......2-96Working View

saving to PostScript file ............2-87SL-DRAW2 ............................. 2-141

World Coordinates ..........................1-13Wr Extent ..................................... 2-141Wr S List ....................................... 2-141Wr Screen ..................................... 2-141Wr View ....................................... 2-141write Bitmap ................................. 2-140Write button ...................................3-10

X-x command-line option .............1-6, 1-7-x option ...................................... 2-109X scale factor ..................................2-54X type Marker .................................2-30Xor, Bitmap Write Mode

defintion ..................................2-80example ..................................2-80

Y-y command-line option ....................1-7Y scale factor ..................................2-54yes, setting as answer to all queries ...1-7yes_no_default .............................. 2-151yesnobox Model ...........................2-160yesnobox1 Model ......................... 2-160ynbox_exit Model ......................... 2-160

ZZ/P Reset ........................................2-96Z/P Set ...........................................2-96Z/P Workst .....................................2-96Zoom .............................................2-95zoom

definition .................................2-95Zoom In .........................................2-95Zoom Out .......................................2-95Zoom Prev ......................................2-96

page X-xii SL-GMS Reference v6.0 21 December 1998

Page 275: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

SL-GMS Reference page X-xiiiv6.0 21 December 1998

Page 276: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

page X-xiv SL-GMS Reference v6.0 21 December 1998

Page 277: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

v6.0 21 December 1998

SL-GMS Reference page X-xv
Page 278: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

page X-xvi SL-GMS Reference

v6.0 21 December 1998
Page 279: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

SL-GMS Reference page X-xviiv6.0 21 December 1998

Page 280: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

page X-xviii SL-GMS Reference

v6.0 21 December 1998
Page 281: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

v6.0 21 December 1998

SL-GMS Reference page X-xix
Page 282: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

page X-xx SL-GMS Reference

v6.0 21 December 1998
Page 283: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

v6.0 21 December 1998

SL-GMS Reference page X-xxi
Page 284: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

page X-xxii SL-GMS Reference

v6.0 21 December 1998
Page 285: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

v6.0 21 December 1998

SL-GMS Reference page X-xxiii
Page 286: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

page X-xxiv SL-GMS Reference

v6.0 21 December 1998
Page 287: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

SL-GMS Reference page X-xxvv6.0 21 December 1998

Page 288: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

page X-xxvi SL-GMS Reference

v6.0 21 December 1998
Page 289: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

v6.0 21 December 1998

SL-GMS Reference page X-xxvii
Page 290: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

page X-xxviii SL-GMS Reference

v6.0 21 December 1998
Page 291: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

v6.0 21 December 1998

SL-GMS Reference page X-xxix
Page 292: SL-DRAW2 Referencesldownloads.sl.com/docs/c++dev/6.2x/pdffiles/drw2/drw2.pdf2 SL-DRAW2 Reference v6.0 21 December 1998The  Interface Reference manuals listed

Index

page X-xxx SL-GMS Reference v6.0 21 December 1998