GLG 2.6 Release New Features and Enhancements
Zooming and Panning
Includes integrated scrollbars (controlled by the
PanEnabled attribute of the viewport) which scroll the drawing and
adjust to the drawing extent changes. Also includes integrated support
zooming and panning keystrokes with integrated ZoomTo and Fit Drawing
The zoom and pan key accelerators are controlled by the ZoomEnabled
of the viewport.
The programming API is also provided, so that the
can use custom zoom controls (buttons with custom icons, etc.)
then call the zoom methods when the zoom or pan buttons are pressed.
Integrated panning and zooming eliminates
used in the older versions of GLG to implement zoom and pan features,
provides better visual feedback.
Integrated tooltips feature enables support for
MouseOver tooltips to individual objects in the drawing.
It's done by adding the TooltipString custom
to the object. If an object (or any of its parents) has this property,
tooltip will be activated when the mouse is moved on top of the object.
The tooltip delay is controlled by the
configuration resource. A new ProcessMotion attribute of the viewport
controls the tooltips, as well and selection events and mouse highlight
A new GlgButtonTooltipTimeout configuration resource
also added to control delay of the button tooltips, which was not
Highlight on MouseOver (Custom Hot Spots)
The integrated highlight on the mouse over event
be enabled for selected objects to implement a custom "hot spot"
For example, it may be used to change line width or display an outline
the object to highlight it when the mouse moves over the object.
It's done by defining a MouseOverState resource of
The value MouseOverState resource of the object (or its closest parent)
be changed to 1 when the mouse is moved over the object, and changed
to 0 when it moves away. The MouseOverState may control any of the
attributes to achieve any custom highlighting effects.
MouseClick Feedback and Toggle
The integrated MouseClick highlight and toggle
be used to implement button press feedback (for example, flatten the
when it's clicked on with the mouse or toggle the object
Both features may be used to implement light viewport-less buttons and
with various feedbacks and visual effects.
The integrated highlight is added to an object by
a D-type resource named MouseClickState. This resource can control any
the object properties, changing them when the object is clicked on with
mouse. The resource's value will be set to 1 when the object is
with the left mouse button, and reset back to 0 when the button is
The resource can control a visual feedback of any type (attribute
object movement, etc.).
If a MouseClickToggle resource (D-type) is defined
an object, its value will be toggled between 0 and 1 every time the
is selected with the left mouse button.
Each of the MouseClickState and MouseClickToggle
can be defined on the object level or at the level of any of the
Integrated MouseClick Highlight and Toggle features
be used to implement light viewport-less buttons and toggles with
visual feedbacks and effects.
The selection model has been extended to include
new selection events. In addition to the SelectCallback, the
will also be invoked with the ObjectSelection event, providing Object
of all objects potentially selected with the mouse, in addition to
names provided by the SelectCallback. This allows the program to
selection of unnamed objects or objects with duplicate names without a
to use the TraceCallback, as it was required in the past.
The ObjectSelection event may also be generated on
mouse move events, if desired.
MouseOver and MouseClick Events
Custom MouseClick, MouseRelease and MouseOver
can be defined for individual objects, making it easier to handle
The MouseClickEvent property (S-type) can be added
objects to generate custom MouseClick events when the object is
with the mouse button (the MouseRelease event will be generated when
mouse is released).
The MouseOverEvent property of S-type can be added
objects to generate custom MouseOver events when the mouse moves on top
of the object (MouseOver event with an empty event label will also be
when the mouse moves away).
These properties can be added at a specific location
the object hierarchy, making sure that, for example, selecting any
of a composite node object will result in the selection event for the
In the past, it was accomplished by custom application code, which was
sub-objects selection to the selection of the node containing them.
The value of these event properties specifies a
event label, so that an application can define custom selection event
(for example, NodeSelection and LinkSelection events) right in the
Builder, without writing any custom code. In the Input Callback, an
can query the type of the custom event and perform different actions
on the event type. This can significantly reduce the amount of code
to handle elaborate object selection.
Set and new Controls
A new Avionics Widget Set has been added, with
for building avionics panels. The existing Control Widget Set has been
by adding windowless versions of the controls. The windowless controls
a round shape suitable for integration with instrument panels which
a custom image background.
The JPEG format support has also been added to
GLG image object to support TrueColor images. It's available in both
and Java versions of the Toolkit.
In the 2.6 release, each viewport can have its
Input, Select and Trace callbacks, which makes it easier to encapsulate
various parts of the application code. Previously, only Select and
callbacks could be used this way, while the Input callback could be
only to the top viewports and not to the children viewports.
SpanX and SpanY viewport attributes were
to allow changing the [-1000;+1000] default coordinate extent of the
The new SpanX and SpanY attributes allow better control over the
span for custom handling of viewports with non-square drawing areas.
Object and Light-Weight Viewports
The viewport's light attributes were split into a
separate Light object, which could be added to a viewport only when
decreasing the space consumed by the viewport objects.
Path Support for the Series
The Series object now allows using arbitrary
to define its path. For example, a Path and Rotate transformations can
used, while only linear transformation was allowed in the past.
User Interface Improvements
Include the following new features: automatic inversion of the control points and dragging color when
improved cloning type selection interface for various operations
keeping the drawing order when exploding objects in the Builder
keeping the zoom state when traversing down into a group
added the ">>" sign to the aliases in the resource browser
viewport font and color table editing interface change
and other features.
The Glg Bean for Java has additional properties
methods for smoother Java integration. The Input, Selection and Ready
can now be added as Java listeners. The new H and V callbacks and
were added to allow setting the initial resources of the drawing before
is displayed the first time. The H callback is invoked before the
hierarchy is setup, and V callback is invoked after hierarchy setup.
The new DrawingName property and SetParentApplet
have been added for transparent loading of drawings from either URL or
file, as well as for better bean encapsulation when it's used as a
inside another applet.
New coding examples illustrating various scenarios
the Glg Bean usage (as an applet, bean, etc.) have been added to the
The Ext suffix for the Bean's Extended API method
has been eliminated for better compatibility with the C/C++ version of
Toolkit. The old methods with the Ext suffix are still supported for
The DXF converter has been updated to handle new
and the latest versions of the AutoCAD.
Miscellaneous bug fixes and user interface
have been implemented in the new release. All bugs reported prior to
release date have been fixed and closed.