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
Prototyping Widgets in the Builder using Resources 35

Animating Widgets with Data Using Tags 36

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

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

Custom Tag Data Browser 42

Mapping Tags in an Application at Run-Time 42

Loading Widget Drawings into the Builder 42

Saving the Drawing 43

Adding Geometrical Dynamics 43

Adding Attribute Dynamics 45

Predefined Attribute Dynamics 45

Using Stock Transformations 47

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

Editing Control Points and Attaching Control Point Dynamics 52

Adding Extended Rendering Attributes 53

Gradient Fill 53

Fill Dynamics 54

Shadows and Arrowheads 54

Text Boxes 55

Using permanent groups 55

Creating a group 55

Editing Individual Objects in a Group 55

Editing All Objects in a Group 56

Adding and Deleting Objects from a Group 56

Exploding Permanent Groups 57

Object Layout and Alignment 57

Creating Layers of Objects 58

2. Advanced Features of the GLG Builder 59

Using Constraints 59

Constraining Object Attributes 59

Using Constrained Dynamics and Marked Transformations 60

Constrained Dynamics Example 60

Using Marked Transformations 61

The Second Flavor of the Fill Dynamics 61

Defining Object Tooltips 62

Using MouseOver Highlight and MouseClick Feedback 62

Attaching Custom Events and Commands 64

Using Editing Focus 64

Changing Viewport's Font Tables 65

3. GLG Widgets and Custom Objects 66

Using Custom Object Palette 66

Custom Button 66

Custom Toggle 66

Native Button Object 67

Native Toggle Object 67

Native Slider Objects 67

3D Objects 67

Process Control Objects 68

Graph and Real-Time Chart Objects 68

Adding New Objects to the Custom Object Palette 68

4. Using GLG Drawings in a Program 69

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

Loading a Drawing into a Java Program 69

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

Loading a Drawing into an ActiveX Control 70

Supplying Data for Animation from a Program 70

Source Code Examples 71

5. Creating the Animation Example's Drawing 72

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

6. Using GLG Real-Time Charts 75

Editing Chart Properties in the Builder 75

Loading Charts into the Builder 75
Editing Chart Properties 75
Editing Chart Plots and Axes 76
Properties for Supplying Chart Data 76

Editing Charts Using Resources 76

Prototyping the Chart's Run-Time Behavior 77

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

Loading Graph Widgets into the Builder 78

Common Graph Resources 78

Data Supply Resources 78
Title resources: 78
DataGroup Resources: 78
Axis Label Resources 79

Graphs with Multiple Data Groups 79

Graph Widget Animation Examples 79

8. Using Containers and SubDrawing Objects 80

Container Object 80

Creating a Template 80
Creating a Container Object 81
Creating Container Instances 82
Editing Container's Template 82

SubDrawing Object 83

Included SubDrawing 83

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

File SubDrawing 87

Reusing a Template 88
Creating a SubDrawing 88
Accessing the Subdrawing's Template 89

Subdrawing File Dynamics 89

Object Dynamics 90

Creating a Template with Multiple Icons 90
Creating a Subdrawing 91
Using ObjectPath for Object Dynamics 92

Palette SubDrawing 92

SubWindow Object 94

Controlling Template Cache 94


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