PREV NEXT

Generic Logic, Inc. www.genlogic.com


GLG Programming Reference Manual

Chapter 1 Integrating GLG Drawings into a Program 23

Creating a Widget Drawing 24

Displaying a Drawing 25

Animating a Drawing with Real-Time Data 26

Handling User Input 26

H and V Resources 27

Utilities 29

Chapter 2 Using the C/C++ version of the Toolkit 31

2.1 Displaying a GLG Drawing 31

X Windows and GLG Wrapper Widget 32

Creating the Wrapper Widget 32

Wrapper Widget Resources 33

Obtaining a Viewport Handle 37

Closing the Wrapper Widget 38

GLG Custom Control for Windows 38

Creating the GLG Custom Control 39

Setting Initial Resources 39

Obtaining a Viewport Handle 40

Closing the Custom Control 41

Messages 41

Loading and Displaying a GLG Drawing using Generic API 42

Coding Examples of Displaying and Animating a GLG Drawing 43

Compiling and running Example Programs 43

2.2 Compiling and Linking GLG Programs 43

Building GLG Demos and Examples 43

Visual Studio Projects for Windows 43

Makefiles for Unix/Linux 43

Using Constant Strings 44

Linking with the GLG Libraries 44

X Windows on UNIX/Linux 44

Windows 46

Using OpenGL in Application Executables 47

Qt and GTK Integration 48

Error Processing and Debugging 49

Default Error Handler 49

2.3 The GLG Generic API 51

Function Summary 51

Generic Program Entry Point 52

GLG Generic API Function Descriptions 52

GlgAddCallback 53

GlgAddTimeOut 54

GlgAddWorkProc 54

GlgBell 55

GlgInit 55

GlgInitLocale 57

GlgInitialDraw 57

GlgLoadWidgetFromFile 57

GlgLoadWidgetFromImage 58

GlgLoadWidgetFromObject 58

GlgMainLoop 59

GlgRand 59

GlgRemoveTimeOut 59

GlgRemoveWorkProc 60

GlgResetHierarchy 60

GlgSetupHierarchy 60

GlgSleep 61

GlgTerminate 61

2.4 Animating a GLG Drawing with Data Using the Standard API 63

Overview 63

Function Descriptions 66

GlgAlloc 66

GlgChangeObject 67

GlgConcatResNames 67

GlgConcatStrings 68

GlgCreateIndexedName 68

GlgCreateTagList 70

GlgError 71

GlgExportStrings 71

GlgExportTags 72

GlgFindFile 72

GlgFree 73

GlgGetDataType 73

GlgGetDResource 73

GlgGetGResource 74

GlgGetLParameter 75

GlgGetMajorVersion 75

GlgGetModifierState 75

GlgGetNativeComponent 75

GlgGetObjectName 77

GlgGetObjectType 77

GlgGetSelectionButton 77

GlgGetSResource 78

GlgHasResourceObject 78

GlgHasTagName 79

GlgImportStrings 79

GlgImportTags 80

GlgOnDrawMetafile 80

GlgOnPrint 81

GlgPreAlloc 81

GlgPrint 82

GlgReset 83

GlgSaveImage 83

GlgGenerateImage 85

GlgSendMessage 85

GlgSetAlarmHandler 86

GlgSetBrowserObject 87

GlgSetBrowserSelection 87

GlgSetCursor 88

GlgSetDefaultViewport 88

GlgSetDResource 89

GlgSetEditMode 90

GlgSetErrorHandler 90

GlgSetFocus 91

GlgSetGResource 91

GlgSetLParameter 92

GlgSetResourceFromObject 92

GlgSetSResource 93

GlgSetSResourceFromD 94

GlgSetTooltipFormatter 95

GlgSetZoom 96

GlgSetZoomMode 99

GlgStrClone 99

GlgUpdate 100

GlgWinPrint 100

GlgXPrintDefaultError 101

2.5 Handling User Input and Other Events 103

Callback Events 103

Attaching Callbacks to a Viewport Object 103

Adding Callbacks to a GLG Wrapper Widget 104

Selection Callback 105

Input Callback 107

Trace Callbacks 108

Hierarchy Callback 109

Message Object 110

Examples of Using Callbacks in Application Code 111

Adding callbacks 112

Processing Selected Objects using Selection Callback 112

Processing Selected Objects Using Input Callback 112

Processing Input Object Events 115

Refining Input Object Selection 117

Trace Callback examples 119

Hierarchy Callback examples 119

2.6 GLG Intermediate and Extended API 121

Overview 121

Handling GLG Objects 124

The Reference Count 124

Using Mouse Coordinates and Pixel Mapping 125

Include Files 125

Intermediate API Function Descriptions 125

GlgConstrainObject 125

GlgContainsObject 126

GlgConvertViewportType 126

GlgCreateInversedMatrix 127

GlgCreatePointArray 127

GlgCreateResourceList 127

GlgCreateSelectionMessage 129

GlgCreateSelectionNames 130

GlgCreateSelection 130

GlgDropObject 131

GlgDeleteTags 131

GlgEnableAttachmentPoints 132

GlgFindObject 132

GlgFindMatchingObjects 133

GlgFitObject 135

GlgGetAlarmObject 136

GlgGetBoxPtr 136

GlgGetDrawingMatrix 137

GlgGetElement 137

GlgGetIndex 138

GlgGetMatrixData 138

GlgGetNamedObject 139

GlgGetParent 139

GlgGetParentViewport 140

GlgGetResourceObject 140

GlgGetSize 141

GlgGetStringIndex 141

GlgGetTagObject 141

GlgInverse 142

GlgIsAt 142

GlgIsDrawable 143

GlgIterate 143

GlgIterateBack 143

GlgLayoutObjects 145

GlgLoadObject 147

GlgLoadObjectFromImage 147

GlgMoveObject 148

GlgMoveObjectBy 148

GlgPositionObject 149

GlgReferenceObject 149

GlgReleaseObject 151

GlgReorderElement 151

GlgRootToScreenCoord 152

GlgRotateObject 152

GlgSaveObject 153

GlgScaleObject 154

GlgScreenToWorld 154

GlgSetMatrixData 155

GlgSetStart 156

GlgSetEnd 156

GlgSuspendObject 156

GlgTransformObject 157

GlgTransformPoint 157

GlgTranslatePointOrigin 158

GlgTraceObject 158

GlgTraverseObjects 160

GlgUnconstrainObject 160

GlgWorldToScreen 161

Get and Set Resource Function Extension 161

Extended API Function Descriptions 163

GlgCreateObject 163

Using GlgCreateObject 164

GlgAddObjectToTop 177

GlgAddObjectToBottom 177

GlgAddObjectAt 177

GlgAddObject 178

GlgAddAttachmentPoint 180

GlgCopyObject 180

GlgCloneObject 181

GlgDeleteTopObject 182

GlgDeleteBottomObject 182

GlgDeleteObjectAt 182

GlgDeleteObject 182

GlgDeleteThisObject 184

GlgFlush 184

GlgSetAttachmentMoveMode 185

GlgSetElement 185

GlgSetResourceObject 185

GlgSetXform 186

2.7 Real-Time Chart Functions 188

Chart Functions of the Standard API 189

GlgAddAnnotation 189

GlgAddPlot 190

GlgAddTimeLine 190

GlgClearDataBuffer 191

GlgDeleteAnnotation 191

GlgDeletePlot 192

GlgDeleteTimeLine 192

GlgGetChartDataExtent 193

GlgGetNamedPlot 194

GlgGetSelectedPlot 194

GlgSetLinkedAxis 194

GlgSetLabelFormatter 195

GlgSetChartFilter 196

Chart Functions of the Intermediate API 197

GlgAddDataSampleNode 197

GlgCreateDataSampleNode 198

GlgGetNodeDataSample 198

GlgFreeDataSampleNode 198

GlgCreateChartSelection 199

GlgCreateTooltipString 200

GlgGetLegendSelection 201

GlgPositionToValue 201

2.8 GIS Object Functions 202

GIS Function Descriptions 203

GlgGISConvert 203

GlgGISCreateSelection 204

GlgGISGetDataset 205

GlgGISGetElevation 205

GlmConvert 206

2.9 GLG Installable Interface Handlers 208

Overview 208

List of Functions 209

Function Descriptions 211

GlgIHInit 211

GlgIHTerminate 211

GlgIHGlobalData 211

GlgIHInstall 211

GlgIHStart 212

GlgIHResetup 213

GlgIHUninstall 214

GlgIHUninstallWithToken 214

GlgIHUninstallWithEvent 214

GlgIHGetType 215

GlgIHGetToken 215

GlgIHCallCurrIHWithToken 215

GlgIHCallCurrIHWithModifToken 216

GlgIHCallCurrIH 216

GlgIHCallPrevIHWithToken 216

GlgIHCallPrevIHWithModifToken 216

GlgIHGetCurrIH 216

GlgIHGetFunction 216

GlgIHGetPrevIH 217

GlgIHGetPrevFunction 217

GlgIHPassToken 217

GlgIHSetIParameter 218

GlgIHSetDParameter 218

GlgIHSetSParameter 218

GlgIHSetOParameter 218

GlgIHSetPParameter 218

GlgIHSetOParameterFromD 218

GlgIHSetOParameterFromG 218

GlgIHChangeIParameter 219

GlgIHChangeDParameter 219

GlgIHChangeSParameter 219

GlgIHChangeOParameter 219

GlgIHChangePParameter 219

GlgIHGetIParameter 219

GlgIHGetDParameter 219

GlgIHGetSParameter 219

GlgIHGetOParameter 219

GlgIHGetPParameter 219

GlgIHGetOptIParameter 219

GlgIHGetOptDParameter 219

GlgIHGetOptSParameter 219

GlgIHGetOptOParameter 219

GlgIHGetOptPParameter 219

2.10 GLG C++ Bindings 221

Standard, Intermediate and Extended API Macros 221

Handling of Constant Strings 222

C++ API Files and Libraries 222

GlgClass.h 222

GlgClass.cpp 222

stdafx.h 222

Using GLG Objects 222

Automatic Referencing and Dereferencing 224

Comparison Operators 224

Using Input and Selection Callbacks 225

Miscellaneous Utility Classes 225

Programming Examples 225

List of Classes and Methods in the GLG C++ Bindings 225

GlgSessionC 225

GlgObjectC 226

GlgLinkC 239

GlgControlC (Microsoft Windows Only) 240

GlgWrapperC (X Windows Only) 241

Chapter 3 Using the ActiveX Control 245

Overview 245

GLG ActiveX Control Properties 246

General Page 246

HProperties Page 248

VProperties Page 248

DLinks Page 249

SLinks Page 249

GLinks Page 249

Dynamic Resource String Syntax 249

Persistency Support 250

GLG ActiveX Control Events 250

ActiveX Control Methods 252

Intermediate and Extended API Methods 263

GLG ActiveX Control Security 277

GLG ActiveX Control Environment Variables 277

Chapter 4 Using the Java and C# Versions of the Toolkit 279

Introduction 279

Overview 279

Class Library Files for Java and C#/.NET 285

Interfaces 286

GlgInputListener 286

GlgSelectListener 286

GlgTraceListener 287

GlgHierarchyListener 287

GlgHListener 287

GlgVListener 288

GlgReadyListener 288

GlgErrorHandler 289

GlgAlarmHandler 289

GlgLabelFormatter 290

GlgChartFilter 290

GlgTooltipFormatter 291

GlgObjectActionInterface 291

GlgGISRequestObserver 292

Enums 292

GLG Integrated Component Classes 293

GlgBean Java class 293

GlgJBean Java class 293

GlgJLWBean Java class 293

GlgControl C# class 294

Fields 294

C# Properties 295

Java Bean Properties 295

Constructors 297

Standard API Methods of GlgBean and GlgControl Containers 297

Intermediate and Extended API Methods of GlgBean and GlgControl Containers 306

GlgObject class 311

Constants 311

Standard API Methods 312

Intermediate API Methods 322

Extended API 332

Chart-Related Methods of GlgObject 333

GIS-Related Methods of GlgObject 338

GLG Utility Classes 341

GlgDouble class 342

GlgPoint class 343

GlgCube class 343

GlgMatrixData class 344

GlgHierarchyData class 345

GlgTraceData class 345

GlgEvent class (C# only) 346

GlgEventArgs class (C# only) 346

GlgInputEventArgs class (C# only) 347

GlgSelectEventArgs class (C# only) 347

GlgHierarchyEventArgs class (C# only) 347

GlgTraceEventArgs class (C# only) 348

GlgMinMax class 348

GlgDataSample class 348

GlgDataSampleExt class 349

GlgDataSampleNode Interface 350

GlgFindMatchingObjectsData class 350

GlgGISRequestData class 352

GlgLatLonPoint class 353

GlgUtmPoint class 354

GlgUtmMGRS class 354

GLG objects classes 355

Overview 355

GlgArc class 356

GlgAxis class 356

GlgBoxAttr class 356

GlgChart class 356

GlgDynArray class 357

GlgFont class 357

GlgFontTable class 357

GlgFrame class 358

GlgFunction class 358

GlgHistory class 358

GlgImage class 359

GlgLevelLine class 359

GlgLineAttr class 359

GlgList class 359

GlgLight class 360

GlgMarker class 360

GlgParallelogram class 360

GlgPlot class 360

GlgPolySurface class 361

GlgPolygon class 361

GlgPolyline class 361

GlgReference class 362

GlgRenderingAttr class 362

GlgResourceReference class 362

GlgScreen class 362

GlgSeries class 362

GlgSpline class 363

GlgSquareSeries class 363

GlgTag class 363

GlgText class 363

GlgViewport class 364

GlgXform class 364

Attribute classes 365

GlgDataPoint class 365

GlgDDataPoint class 365

GlgGDataPoint class 365

GlgSDataPoint class 365

Data Value classes 365

GlgDataValue class 365

GlgDDataValue class 365

GlgGDataValue class 365

GlgSDataValue class 366

GlgMatrix class 366

GLG Graphics Server Support Classes for ASP.NET 366

GlgHttpRequestProcessor class 366

GlgHttpRequestData class 367

Graph Layout Classes 368

Overview 368

GlgGraphNode class 368

GlgGraphEdge class 369

GlgGraphLayout class 370

Chapter 5 Using the JavaScript Version of the Toolkit 377

Introduction 377

JavaScript Library 377

JavaScript API 378

Overview 378

Using JavaScript API Methods 378

Comparing GLG Objects 379

Predefined Constants 379

Asynchronous Load 380

Additional Programming Notes 380

Deploying GLG JavaScript Library 380

JavaScript Library Layout 380

Deploying JavaScript Library in HTML 381

Windows IIS Web Server Notes 381

Debugging Version of the GLG JavaScript Library 382

Global Configuration Resources 383

Using HTML Cascading Style Sheets 383

Deploying GLG Drawings Created in Different System Locales 383

JavaScript Encodings 383

Using GLG Drawings in JavaScript 383

Chapter 6 GLG Programming Tools and Utilities 385

6.1 The Data Generation Utility 386

Command Line Arguments and Options 386

Data Set Specification 387

Data Set Options 387

Data File Format 389

6.2 GLG Script 390

Overview 390

Standard Command Set 390

# <comment> 390

set_value 390

set_tag 391

update 391

print 391

Database Record Support Commands 392

create_record 392

add_field 392

delete_record 392

read_records 393

end_read 393

read_one_record 393

Database Record Support Example 393

Extended Command Set 394

skip_if_no_resource 394

skip_if_resource 395

skip_end 395

get_value 395

get_tag 395

select_object 395

select_container 396

select_element 397

load_object 397

set_resource_object 397

reference 397

drop 397

add_custom_property 398

add_public_property 398

add_export_tag 398

add_data_tag 399

get_export_tag 399

delete_custom_property 399

delete_public_property
delete_export_tag 399

delete_data_tag 400

create 400

add_new 402

add_copy 402

copy 403

delete 403

constrain_object 404

6.3 Code Generation Utility 405

6.4 Drawing File Conversion Utility 406

6.5 C/C++ Graph Layout Component 411

Overview 411

Data Access Macros 411

Function Descriptions 413

Appendices 423

7.1 Appendix A: Global Configuration Resources 423

7.2 Appendix B: Message Object Resources 439

Generic Resources of the Message Object 439

Specific Resources of the Message Object 440

Slider Message Object 441

Knob Message Object 442

Button Message Object 443

Text Message Object 444

Spinner Message Object 445

List Message Object 445

Option Message Object 446

Menu Message Object 446

Clock and Stopwatch Message Object 447

Timer Message Object 447

Palette Message Object 448

Font Browser Message Object 448

Browser Message Object 449

Zoom Message Object 450

Custom Event Message Object 451

Command Message Object 454

Tooltip Message Object 455

UpdateDrawing Message Object 456

ImageLoad Message Object 456

TemplateLoad Message Object 457

Object Selection Message Object 457

Chart Selection Message Object 458

Chart Message Object 459

Window Message Object 459

7.3 Appendix C: GLG Object Attribute Table 460

Generic Attributes 460

Generic Attributes of Drawable objects 460

Polygon Attributes 460

Rendering Object Attributes 461

Marker Attributes 461

Text Object Attributes 461

Box Attributes Object Attributes 462

Arc Attributes 462

Parallelogram Attributes 462

Spline Object Attributes 463

Rounded Object Attributes 463

Image Object attributes 463

GIS Object attributes 464

Group and List Objects' Attributes 464

Connector Object Attributes 464

Reference Object Attributes 464

Series Object Attributes 465

Square Series Object Attributes 465

Polyline Attributes 466

Polysurface Attributes 466

Frame Object Attributes 466

Viewport Attributes 467

Screen Object Attributes 468

Light Viewport Attributes 469

Chart Object Attributes 470

Plot Object Attributes 471

Level Line Object Attributes 472

Annotation Object Attributes 472

Legend Object Attributes 472

Axis Object Attributes 473

Line Attributes Object 474

Light Object Attributes 474

Colortable Object Attributes 474

Font Table Object Attributes 474

Font Object Attributes 474

Transformation Object Attributes 475

Action Object Attributes 475

Alias Object Attributes 475

History Object Attributes 476

Data Object Attributes 476

Attribute Object Attributes 476

Tag Object Attributes 476

Function Object Attributes 477

7.4 Appendix D: Global Parameters 478


Generic Logic, Inc.
www.genlogic.com
PREV NEXT