Preface

This book provides information about creating and animating GLG drawings, using the Glg Graphics Builder and editing Glg objects. It contains the following chapters:

GLG User's Manual and Builder Reference

Introduction to GLG
An overview of the GLG Toolkit and its components.

Structure of a GLG Drawing
A description of the internal structure of a GLG drawing. The material in this and the next chapter are important for anybody who wants to edit or create a GLG drawing.

GLG Objects
A description of each of the objects that make up a GLG drawing.

Integrated Features of the GLG Drawing
A description of the integrated features of the GLG drawing such as zooming and panning, object tooltips, custom events and others.

Input Objects
A description of the interaction handlers and input objects.

Using the GLG Graphics Builder
An introduction to the use of the GLG Graphics Builder. This program is used to create, edit, and test GLG drawings.

GLG Graphics Builder Menus
A reference for the GLG Graphics Builder menus and dialogs.

Index

This guide assumes that you are conversant with the basic concepts of computer graphics programming. For a comprehensive discussion of three dimensional computer graphics, we recommend Computer Graphics: Principles and Practice , Foley, Van Dam, Feiner, and Hughes. Second edition, 1990; Addison-Wesley, Reading MA.

Please note that although the illustrations in this document represent the UNIX version of the GLG Graphics Builder, the information it contains is equally relevant to Microsoft Windows users. The two versions present the same functionality in equivalent user interfaces, with minimal, cosmetic differences caused by the different platforms.

 

 

 

GLG User's Manual and Builder Reference

 

Chapter 1 Introduction to GLG 15

Overview 15

The GLG Graphics Builder 16

OpenGL or Native Windowing System Renderer 16

The Application Program Interface 18

Displaying a Drawing 18

Animating a Drawing 18

Creating a Drawing 19

The GLG Graph and Control Widget Library 19

Programming Tools 19

Chapter 2 Structure of a GLG Drawing 21

Objects 21

Resources and Objects 22

The Attribute Object 22

Resources and Attributes 23

Supplying Data for Animation 24

Hierarchy of Objects 24

Hierarchy of Resources 24

Tags 27

Constraints 27

Graphical Objects 29

Attributes 29

Control points 30

Transformations 30

Transformations as Objects 31

Static Transformations 33

Transforming Object Points 34

Dynamic Transformations 34

The View 35

Coordinate Systems 35

Lighting 37

Input Handlers 38

Integrated Features of the GLG Drawing 39

Integrated Zooming and Panning 39

Integrated Tooltips 39

MouseOver Highlight 39

MouseClick Feedback and Toggle 39

Custom Selection Events 40

Object Selection Events 40

Input Object Events 41

Chapter 3 GLG Objects 43

Common Attributes 45

Simple Graphical Objects 47

Polygon 47

Parallelogram 48

Arc 49

Spline 50

Text 50

Marker 53

Image 54

GIS Object 55

Viewport 56

Screen 61

Advanced Graphical Objects 64

Group 64

Series 65

Square Series 67

Reference 67

Polyline 71

Polysurface 73

Connector 73

Frame 74

Non-Graphical Objects 75

Data 75

Attribute 76

History 77

Alias 78

Rendering 78

BoxAttributes 80

Colortable 81

Font Table 83

Font 84

Light Object 85

Transformation Object 86

Geometrical Transformations 86

Scalar Transformations 91

String Transformations 94

Common Attribute Transformations 95

Chapter 4 Integrated Features of the GLG Drawing 97

Integrated Zooming and Panning 97

Integrated Tooltips 97

MouseOver Highlight 98

MouseClick Feedback and Toggle 99

Custom Selection Events 100

Internationalization and Localization Support 101

I18N Support 101

Localization Support 101

Chapter 5 Input Objects 103

Input Handlers 103

Installing an Input Handler 105

Common Input Handler Resources 106

GlgSlider 106

GlgNSlider 108

GlgKnob 109

GlgButton 111

GlgNButton 112

GlgText 112

GlgNText 113

GlgSpinner 113

GlgNList 115

GlgNOption 117

GlgMenu 118

GlgBrowser and GlgFontBrowser 119

GlgPalette 120

GlgClock 121

GlgTimer 121

Native Widgets 123

Chapter 6 Using the GLG Graphics Builder 127

Creating a Drawing 127

Viewing a GLG Drawing 127

Viewing the Object Hierarchy 128

Starting and Stopping the Builder 128

GLG Graphics Builder Features 129

Stopping the GLG Graphics Builder 130

Creating a Viewport 130

Saving a Drawing 130

Drawing an Object 131

Selecting an Object 132

Editing Objects 134

Editing Attributes 134

Editing Control Points 137

Object Layout and Alignment 138

Creating Constraints 139

Constraining Similar Attributes 140

Constraining Different Attributes 141

Constraining Control Points 142

Defining Transformations 142

Transforming an Object 142

Transforming an Attribute 144

Editing Transformations 145

Deleting Transformations 145

Traversing Transformed Objects (advanced) 146

Using View and Screen Transformations of the Viewport (advanced) 146

Using Resources 146

Guidelines for Naming Resources 148

Adding and Deleting Resources 148

Using Tags 151

Adding and Deleting Tags 152

Animating a Drawing 153

Reusing Objects, Attributes, and Transformations 153

Reusing an Object 153

Marking and Replicating Transformations and Other Objects 156

Controlling the View 159

Changing the View Projection 160

Customizing the View Projection 160

Viewing Using Different Coordinate Systems 160

Changing the Viewing Area 161

Using Advanced Objects 161

Associating Objects Together 162

Generating Objects from a Template 163

Creating Animated Lines and Surfaces 165

Attaching Objects to a Frame 166

Connecting Objects with a Path 167

Defining Extended Set of Rendering and Text Box Attributes 167

Scrolling Attributes of Objects with Index-based Names 168

Rendering GIS Map Data 169

Adding Custom Properties to Objects 169

Defining Logical Names using Aliases 169

Drawing a Simple Example 170

Attribute Animation 170

Geometrical Transformation Animation 171

Creating Copies and Animating Them 172

Constraining Attributes 174

Builder Setup and Customization 174

Environment Variables 174

Builder Configuration File 175

Chapter 7 GLG Graphics Builder Menus 177

File 177

New Widget 177

New 178

Reset Drawing 178

Open 178

Open URL 179

Recent Drawings 179

Save 179

SaveAs 179

Load Object 180

Recent Objects 180

Save Object 180

Print 180

Export PostScript 181

Print Configuration 181

Save Image 182

Save Image Full 182

Export Strings 182

Import Strings 182

Export Tags 182

Import Tags 182

Exit 182

Palettes 183

Custom Objects 183

Read Palette 183

Read Directory 183

Palette Description File Format 184

Adding Custom Palettes to the Builder 185

Edit 185

Undo 185

Undo History 185

Select Multiple Objects 186

Select Rectangular Area 186

Select All 186

Cut 186

Copy 186

Paste 186

Delete 187

Define Clone Offset 187

Define Clone Transformation 187

Full Clone 188

Weak Clone 188

Strong Clone 188

Constrained Clone 188

View 189

Set View 189

Adjust View 189

Load View Transformation 190

Save View Transformation 190

Coordinate System 190

Zooming 191

Pan To 192

Traverse 192

Hierarchy Down 192

Transformation Down 192

Up 192

Set Focus 193

Main Focus 193

Select Next 193

Select Bottom 194

Edit All 194

Replace Parent's Template 195

Reset Scaling Xform 195

Arrange 195

Create Permanent Group 195

Create Temporary Group 196

Select Multiple Objects 196

Add Object to Group 196

Delete Object from Group 196

Add or Delete Object from Group 197

Select Next 197

Select Bottom 197

Select All 198

Permanent Group 198

Explode 198

Reorder 199

Inverse Polygon Points 199

Add Polygon Points 200

Layout 200

Layout Toolbox 200

Align 200

Make Same Size 201

Distribute 201

Space Evenly 202

Distribute Evenly 202

Select Anchor 202

Align Points 202

More 202

Object 202

Create 202

Edit Toolbox 213

Properties 213

Object Resources 215

All Resources 215

Tags 216

Add Dynamics 216

Edit Dynamics 217

Delete Dynamics 217

Transform Points 217

Add Static Transformation 218

Add Tooltip 219

Add MouseClick Event 219

Add MouseOver Event 219

Edit/Delete Tooltip Or Event 219

Custom Properties 220

Add Custom Property 220

Edit Custom Properties 221

Delete All Custom Properties 221

Mark Custom Properties 221

Add Marked Properties 221

Aliases 221

Add Alias 221

Edit Aliases 222

Delete All Aliases 222

Mark Aliases 222

Add Marked Aliases 222

History 222

Add History 222

Edit History 223

Delete All Histories 223

Run 223

Start 223

Stop 224

Restore Values on Stop 224

Store Run Command 224

Options 224

Draw Grid 225

Snap To 225

Save Format 225

Save Compressed 226

Show Axis 226

Selection Display 226

Attribute Clone Type 226

Paste Clone Type 227

Reference Resizing 227

Control Points Display 227

Detach Palettes 227

Scrollbars 227

Toolbar 227

Show Frame Points 228

Toolbar Print PostScript 228

Modal Dialogs 228

Display OpenGL Info 228

Save Layout 228

Introduction to GLG

Structure of a GLG Drawing

GLG Objects

Integrated Features of the GLG Drawing

Input Objects

Using the GLG Graphics Builder

GLG Graphics Builder Menus

Index