Generic Logic, Inc.

GLG 3.2 Release: New Features and Enhancements

New WIdgets

Overview
OpenGL Driver Enhancements
Rounded Rectangle and Ellipse Objects
SubWindow Object
New Graphs with Enhanced Layout
Band Arc Type
New Dynamics
Editor Interface Enhancements
New Widgets
API Additions and Enhancements
Scripting Extensions
OEM Extensions
Bug Fixes

Overview

The new 3.2 release of the GLG Toolkit introduces several new object types as well as new dynamics, new arc type, new graphs and graph layout features, OpenGL driver enhancements and new OEM extensions.

The new object types include a SubWindow object, which allows an application to easily change a displayed drawing without the need for the Extended API. The SubWindow object may be used for navigation between drawings or to implement drill down functionality. 

A new Rounded object type provides a rounded rectangle functionality and is used to implement several new button widgets. An ellipse object is also added to the drawing palette.

All graph widgets have been modified to automatically maintain constant spacing for the graph's axes, labels and ticks. This feature improves graph layout when the graph is resized. A new multi-line line graph with multiple Y axes has been added to the 2D Graphs palette. All gauges with an alarm indicator have been rebuilt using a new BAND arc type for nicer rendering, and a variety of new button, toggle and menu widgets have been added to the controls and special widgets sets.

The new features also include Screen and World Offset dynamics, an ability to control cache of SubDrawings and many others.

A new OEM example demonstrates how to use the OEM extension features to add custom menu options and custom dialogs to the GLG Builder and HMI Configurator. These custom options allow the user to attach and edit predefined actions to objects.

OpenGL Driver Enhancements

The new release enables applications to take a full advantage of the OpenGL rendering while bypassing limitations of many graphics cards on the number of the OpenGL windows.

The new GLG OpenGL driver introduces a more flexible mechanism of controlling OpenGL rendering. It allows an application to combine hardware-accelerated and software OpenGL renderers to optimize the number of used hardware-accelerated OpenGL contexts. An application can prioritize OpenGL rendering, using fast hardware-accelerated renderer for windows containing a large number of dynamic objects with high update rates, while using a slower software OpenGL renderer for icon buttons and other windows with small number of objects or with infrequent updates. As a result, applications with a large number of viewports can use OpenGL for all viewports without exceeding limits of graphics cards. The new feature is supported on both Linux/Unix and Windows platforms.

The OpenGLHint attribute of the viewport object defines the OpenGL rendering priority requested by the viewport, which is mapped to either hardware or software renderer at runtime.

The runtime mapping is controlled by the GlgOpenGLHardwareThreshold and GlgOpenGLThreshold global configuration resources or corresponding command-line options, which control the type of the OpenGL renderer used by a viewport with a particular OpenGL priority hint. For example, if an application uses a small number of viewports, it can decide to use the hardware renderer for all its windows at runtime.

The GLG Builder and HMI Configurator now use software OpenGL renderer for icon buttons by default. This allows the editors to use nice OpenGL anti-aliased rendering for all icon buttons without overloading the graphics cards' OpenGL drivers. Multiple copies of the GLG editors may now be started on the same machine without exhausting the graphics card's resources.

Rounded Rectangle and Ellipse Objects

Rounded Rectangles and Ellipse

A new object was added to the Object Palette to draw rectangles with rounded corners. The corner radiuses are defined by two parameters, making it possible to render not only circular, but also elliptical curves. The object is actually a parallelogram with rounded corners: if its sides are slanted from the orthogonal position, it will render accordingly. The corner radiuses may be defined in either relative units, which scale with the object when its shape is changed, or in screen pixels to maintain a constant corner curvature.

The Rounded object may also be used to render an ellipse. A separate convenience icon was added to the Object Palette to allow the user to easily draw an ellipse.

New push and toggle buttons that use the Rounded object were added to the Controls widget set.

SubWindow ObjectScada Demo

The new SubWindow object allows to dynamically swap drawings displayed in its window, which significantly simplifies implementation of the navigation and drill-down features at run-time.

Previously, this functionality required writing code using the Extended API. Using the SubWindow object, switching the displayed drawing is done by simply changing the filename (SourcePath) property of the object, with no need for the Extended API. The SubWindow object handles all aspects of loading and displaying a new drawing.

The SubWindow object may be used to define a layout template for an application that displays multiple drawings in one window or needs to switch drawings based on user requests. The SubWindow defines the area in which the drawings will be displayed, while the drawings themselves are stored in separate files for easy editing. The drawings may be reused between several applications.

The SubWindow object is similar to a SubDrawing, extending its functionality to display a drawing inside an area defined by two control points, as oppose to a single anchor point used by a SubDrawing. The SubWindow object handles unlimited recursion: a SubWindow may contain nested SubWindows or SubDrawings inside it.

Same as a SubDrawing, a SubWindow may use bindings to control common properties of all drawings displayed in its window. For example, the bindings may define a FillColor property that will control the fill color of all loaded drawings.

The SubWindow object may also be used to render buttons and other interface elements using a single template drawing stored in a separate file. Modifications applied to the template will be reflected in all buttons that use the template. Bindings may be used to define unique Label and ButtonID for each individual button instance rendered as a SubWindow object.

Same as with SubDrawings, parameters of individual button instances may be constrained as defined by the SubWindow's CloneType parameter. The ObjectPath parameter may be used to define several drawings in one saved drawing file.

The SubWindow object is implemented using a subtype of the reference object, which now handles both SubDrawings and SubWindows. A new EnableCache parameter has been added to control the use of cache for both SubDrawings and SubWindows, to save system resources in cases when only one instance of a SubDrawing or SubWindow is displayed at a time. New options for reusing templates of SubDrawings and SubWindows were added to the Traverse menu.

A new SCADA Viewer demo provides an example of using the SubWindow object to switch drawings at runtime.

New Graphs with Enhanced LayoutMulti-axis
        Graph

All graph widgets have been redesigned to intelligently handle graph resizing. Previously, spacing of labels and axes was changed as the graph was resized. New graphs adjust the size of the graph's data area, while maintaining a constant size of the areas used by the graph's axes, resulting in a better resizing policy.

The size allocated to the graph's axes may be adjusted by either the graph widget's resources (OffsetLeft, OffsetRight, OffsetTop, OffsetBottom), or interactively by dragging the graph's DataArea with the mouse. The new behavior is implemented using the new Screen Offset transformation attached to the DataArea's control points. The old behavior may be restored by changing the OffsetType parameter of the offset transformation from Screen to World.

A new multi-line graph with multiple axes (line8.g) highlights the capabilities of the new design by automatically handling the space used by the multiple Y axes when the number of axes is changed. Other graphs with multiple axes have been modified to use the new design as well.

A new object that displays multiple Y axes has been added to the Special Widgets. The number of axes in the object is controlled by its Factor resource.

High and Low aliases were added to all graphs for convenience of editing.

Band Arc TypeArc Band

A MinRadius parameter was added to the Arc object to draw arc or circular bands contained between the outer and inner radiuses.

The new arc type helps improve rendering of gauges with alarm sectors, which were rebuilt to use the new Band arc type.

New Dynamics

New predefined Flow dynamics type for the LineType attribute was added to visualize dynamic flow of gases and liquids through pipes.

Offset DynamicsNew Offset dynamics may be used to position a control point with a specified X/Y offset relatively to another point (anchor point). The point with Offset dynamics will maintain a constant offset when the anchor point moves. The offset can be defined in either world coordinates or screen pixels. The screen pixel offset maintains a constant distance from the anchor point when the drawing is resized.

Pixel offsets may be used for implementing elaborate layouts, which contain both fixed size and resizable areas. A Resource Browser of the GLG Editor is an example of a such layout: when resized vertically, it maintains a constant height of areas at the top and bottom, and a resizable list area in the middle. Implementing such constant pixel offsets in the previous versions of the Toolkit required the use of complex constraints; now it is handled automatically by the Offset dynamics.

When a point with Offset dynamics is moved with the mouse, its offset values are automatically adjusted to reflect the new point position.

New ScreenScale dynamics can be used to maintain a constant object width or hight when the rest of the drawing is resized.

Two new parameters were added to the Path dynamics. The Offset parameter defines an initial offset and may be used as a second independent controlling parameter of the dynamics. In series, the main Factor parameter controls positions of the series' instances, and the Offset parameter may be used to move all instances together along the path while maintaining their relative positioning. A new Wrap parameter of the Path dynamics allows wrapping to the beginning of the path when the object reaches the end of the path.

Editor Interface Enhancements

The title bar of the GLG Editor window now displays the name of the current drawing. When traversing the hierarchy of SubDrawings or SubWindows, the title bar displays the name of the current subdrawing's or subwindow's drawing, as well as the hierarchy level  of nested subdrawings or subwindows.

The Mark Object and Mark List buttons were added to the Alias editing dialog to mark an alias or the whole alias list for reuse with the Object, Aliases, Add Marked Aliases menu option.

The marker used to annotate a center point of rotate and scale dynamics for the Add Dynamics dialog was changed to make it more visible. A round marker of a distinct red color is used in the new version.

The Custom Properties dialog now allows deleting the last custom property. In the previous version, it required using Object, Custom Properties, Delete All Custom Properties menu option.

The coordinate conversion has been improved to fix jumping observed  when moving large viewports with the mouse in the editor.

New WidgetsNew WIdgets

Several varieties of new button and toggle widgets that use rounded rectangles were added to the control widgets. The special widget set was extended with new menu and checkbox widgets that use the new buttons. Several new knobs with enhanced gradients were added to the control widget set. A new multi-line line graph with multiple Y axes has been added to the 2D Graphs palette.

API Additions and Enhancements

A TagEnabled property was added to the Tag object to allow an application to temporarily disable tag update at runtime.

The ScreenName attribute of a viewport was made dynamic in the new version. It may be called at any time to supply a string to be displayed in the title bar of a top-level viewport that has its own  top-level window. The ScreenName attribute provides a cross-platform way to set the title string.

The Qt bindings have been enhanced by adding the Input, Select, Trace and hierarchy setup callbacks similar to the callbacks that provide a better encapsulation of a QGlgWidget class in Qt environment. The callbacks are identical to the corresponding callbacks used in C++ and Java environments.

The GLG Java Jar has be enhanced to transparently handle both forward and backward slash separators in the path names. A backslash can be used as a separator in the subdrawing path name when the GLG editor is run on Windows. With the new jar file, drawings designed on Windows can be  deployed on Unix/Linux and on the web without any changes.

The ArrowShape attribute, that defines the shape of arrows that may drawn at the end of lines and polygons, can now define both relative and absolute arrow dimensions. Positive values of the attribute define relative values that increase proportionally with the line width of the polygon, while negative values define absolute arrow dimensions that do not change when the line width increases.

The ZoomRectangleChange and ZoomRectangleEnd subactions were added to the ZoomRectangle action message to better handle a custom ZoomTo operation.

Scripting Extensions

The GLG Script was extended to include commands for loading, copying and constraining objects, as well as a command to set individual coordinates of an XYZ point.

The script now supports ten registers which can be used as both source and destination of the script's commands. The registers can be used to store intermediate results of the script's operations and are addressed using %0, %1, ... %9 syntax. A script command can access resources of the objects stored in a register. For example, the following syntax references the DataGroup/Factor resource of the object stored in the 3rd register: %3/DataGroup/Factor

OEM Extensions

Scada Demo

The new release provides examples of custom DLLs that extend functionality of the GLG Builder and HMI Configurator to allow the user to add custom application-defined actions to objects. The DLL adds custom menu entries to the editor's main and popup menus and displays custom dialogs for editing the custom actions.

The custom DLLs use new OEM features that allow the DLLs to use the editor's data, tag and resource browsers, and demonstrates handling  application-specific logic for adding, editing, validating and deleting  custom actions.

A new SCADA Viewer demo provides an example of handling custom actions at runtime.

Bug Fixes

Timer transformation in the Java version of the API was fixed to prevent the timer from intermittent stopping under a heavy system load.

Numerical Text Input and Spinner widgets were modified to generate the ValueChange input event on losing focus only if the value has been changed the widget received input focus.