PREV NEXT

Generic Logic, Inc. www.genlogic.com


GLG Builder and Animation Tutorial

1. Using GLG Builder 9

Using GLG drawings as widgets 9

Creating a new widget 9

Menu Options for Creating a New Widget 10

Creating objects 11

Editing GLG objects 11

Selecting an Object and Changing Object Geometry 11

Object Geometry and Coordinate Systems 12

Choosing from Several Selected Objects 13

Using Undo 13

Editing Object Properties 14

Editing objects with the Edit Toolbox 15

Multiple Selection 16

Editing Polygon Attributes 17

FillColor and EdgeColor attributes 17
LineWidth and LineType attribute 17
FillType, OpenType and Shading attributes 18
PointList attribute 18
Rendering attributes 18

Defining resources for animation 18

Overview 18

Using default attribute names for animation 19

Prototyping Animation in the Builder 20

Browsing Object Resources 21

Assigning names to object attributes 22

Creating Resource Hierarchy 24

Dynamic Resource Hierarchy 27

Using Multiple Component Instances 28

Programming Example 28

Using the Viewport Object 29

Integrated Zooming and Panning 30

Using GLG Widgets and Palettes 30

Using Palettes 30

Adding Widgets to a Drawing 32

Adding Widgets to an Existing Drawing 33

Editing Widgets 33

Animating Widgets with Data Using Resources 34

Code Sample to Animate Widgets Using Resources in the Program 34
C#/.NET or Java 34
C/C++ 35
JavaScript 35
Prototyping Widgets in the Builder using Resources 36

Animating Widgets with Data Using Tags 36

Code Sample to Animate Widgets Using Tags in the Program 39
C#/.NET or Java 39
C/C++ 39
Prototyping Widgets in the Builder using Tags 39

Tag Browser, Tag Object, TagName, TagSource and TagComment 40

Custom Tag Data Browser 42

Mapping Tags in an Application at Run-Time 43

Loading Widget Drawings into the Builder 43

Saving the Drawing 43

Adding Geometrical Dynamics 44

Adding Attribute Dynamics 46

Predefined Attribute Dynamics 46

Using Stock Transformations 48

Color dynamics 49
Blinking 49
Text dynamics 51
Numerical text dynamics 51
Formatted text dynamics 52
List of strings dynamics 52
Changing attribute range 52

Editing Control Points and Attaching Control Point Dynamics 53

Adding Extended Rendering Attributes 54

Gradient Fill 54

Fill Dynamics 55

Shadows and Arrowheads 55

Text Boxes 56

Using permanent groups 56

Creating a group 56

Editing Individual Objects in a Group 56

Editing All Objects in a Group 57

Adding and Deleting Objects from a Group 57

Exploding Permanent Groups 58

Object Layout and Alignment 58

Creating Layers of Objects 59

2. Advanced Features of the GLG Builder 60

Using Constraints 60

Constraining Object Attributes 60

Using Constrained Dynamics and Marked Transformations 61

Constrained Dynamics Example 61

Using Marked Transformations 62

The Second Flavor of the Fill Dynamics 62

Defining Object Tooltips 63

Using MouseOver Highlight and MouseClick Feedback 63

Attaching Custom Events and Commands 65

Using Editing Focus 65

Changing Viewport's Font Tables 66

3. GLG Widgets and Custom Objects 67

Using Custom Object Palette 67

Custom Button 67

Custom Toggle 67

Native Button Object 68

Native Toggle Object 68

Native Slider Objects 68

3D Objects 68

Process Control Objects 69

Graph and Real-Time Chart Objects 69

Adding New Objects to the Custom Object Palette 69

4. Using GLG Drawings in a Program 70

Loading a Drawing into a C or C++ Program 70

Loading a Drawing into a Java Program 70

Loading a Drawing into a C#/.NET Program or GLG .NET Control 71

Loading a Drawing into an ActiveX Control 71

Loading a Drawing into a JavaScript Program Deployed on a Web Page 71

Supplying Data for Animation from a Program 72

Source Code Examples 72

5. Creating the Animation Example's Drawing 74

Creating a Drawing's Viewport 74
Creating a Circle Object 74
Adding Color Dynamics 74
Adding the Move Dynamics 75
Creating an Area Polygon 75
Adding Buttons 76
Testing the Tooltips 76
Using the Drawing 76

6. Using GLG Real-Time Charts 77

Editing Chart Properties in the Builder 77

Loading Charts into the Builder 77
Editing Chart Properties 77
Editing Chart Plots and Axes 78
Properties for Supplying Chart Data 78

Editing Charts Using Resources 78

Prototyping the Chart's Run-Time Behavior 79

7. Using GLG 2D and 3D Graph Widgets 80

Loading Graph Widgets into the Builder 80

Common Graph Resources 80

Data Supply Resources 80
Title resources: 80
DataGroup Resources: 80
Axis Label Resources 81

Graphs with Multiple Data Groups 81

Graph Widget Animation Examples 81

8. Using Containers and SubDrawing Objects 82

Container Object 82

Creating a Template 82
Creating a Container Object 83
Creating Container Instances 84
Editing Container's Template 84

SubDrawing Object 85

Included SubDrawing 85

Reusing a Template from the Previous Example 85
Creating a SubDrawing 85
Creating SubDrawing Instances and Editing the Template 86
Fixed Size SubDrawings 87
Rebinding Attributes of a SubDrawing 88
Using Global Attributes 89
Object Dynamics 89

File SubDrawing 89

Reusing a Template 90
Creating a SubDrawing 90
Accessing the Subdrawing's Template 91

Subdrawing File Dynamics 91

Object Dynamics 92

Creating a Template with Multiple Icons 92
Creating a Subdrawing 93
Using ObjectPath for Object Dynamics 94

Palette SubDrawing 94

SubWindow Object 96

Controlling Template Cache 96


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