This chapter contains descriptions of each of the widgets in the GLG Widget Library. The description of each widget contains information about how to use that widget. You may also want to consult Using the GLG Widgets.
The Process Control Objects are not listed in this chapter. Refer to Process Control Objects of Using the GLG Widgets for the list of common resources of the process control objects.
To test each widget, you can use the GLG Graphics Builder to show a graph in action. The entry point for each graph is listed in the section. As an example, a widget might contain the following entry points:
$Widget/XLabelGroup/EntryPoint
If the listed default data range is between 0 and 1, then the widget can be animated with the datagen program as follows:
$datagen d 0 1 "$Widget/DataGroup/EntryPoint" s 0 0 "$Widget/XLabelGroup/EntryPoint"For information on the datagen utility program, please see the Guide to GLG . Some of the widgets are equipped with a resource called $DatagenString that contains the suggested command to use for testing the widget. When you use the GLG Graphics Builder to animate a widget, this string will automatically appear in the Run dialog box as the command line.
This chapter also describes the resources belonging to each widget. Because there is a lot of duplication between the widgets, the resources are grouped into "sets," and the descriptions below just list the sets used by each widget. For lists of the resources that make up the resource sets, see GLG Widget Resource Sets.
The Bar Graph is used to display one set of data as an arrangement of vertical bars. The height of a bar corresponds to the value of the data it represents. The Signed Bar Graph is the same thing, but data samples may have negative values as well as positive. The Histogram Graph is similar to the Bar Graph, but bars do not have gaps between them.
The Horizontal Bar Graph displays one set of data in 2D as horizontal bars. The horizontal dimension of a bar corresponds to the value of a data sample. This graph is the same as the Bar Graph, except that the bars are horizontal. The graph resources are the same too, with the only distinction that X and Y prefixes are swapped.
The Symmetrical Bar Graph displays one set of data in 2D as vertical bars centered around X axis. The height of a bar corresponds to the value of the data it represents. This is not the same as a Signed Bar Graph. The height of a bar above the X axis is the same as it's depth below it; it is symmetrical.
The Packed Bar Graph displays several sets of data in 2D in clusters or "packs" of vertical bars. One pack of bars contains one sample of data from each of the included data sets (represented by data groups). The height of each bar corresponds to the value of its data sample.
The Stacked Bar Graph displays several sets of data in 2D as stacked vertical bars. This is comparable to a packed bar graph except that the bars that make up each cluster are placed on top of each other. Each bar, composed of a pack of several smaller bars, contains one iteration of data from each data set. The height of every component of a stack corresponds to the value of its data sample. The total height of a stack is equal to the sum of the heights of the individual components. The range of the graph is equal to the range of the sum of the individual components. This means that the sum of all values corresponding to one stack should be less than or equal to the range of the graph.
The Step Graph displays one set of data in 2D as a step line. The height of a step corresponds to the value of a data sample.
The Filled Step Graph is the same as the Step Graph (see page 44), but with a filled line.
The Horizontal Step Graph displays one set of data in 2D as a step line. The horizontal position of a step corresponds to the value of its data sample. This graph is the same as the Step Graph (see page 44), but is rotated on its side.
The Horizontal Filled Step Graph displays one set of data in 2D as a vertical step line. The horizontal position of a step corresponds to the value of a data sample. This graph is the same as the Filled Step Graph (see page 45), but is rotated on its side.
The Multiline Step Graph displays multiple sets of data in 2D as step lines. The height of a step corresponds to the value of a data sample.
The graph's entry points are as follows:
$Widget/XLabelGroup/EntryPoint
The default data range is between 0 and 1. The default number of data groups is two.
To animate just one of the data groups, use this resource in place of the above data entry point:
$Widget/DataGroupOne/DataGroup<num>/EntryPoint
Use the number of the desired data group in place of <num> , as in $Widget/DataGroupOne/DataGroup3/EntryPoint . Remember to set the number of data groups to 1.
The Filled Multiline Step Graph is the same as the Multiline Step Graph (see page 47), but with a filled step line.
The graph's entry points are as follows:
$Widget/XLabelGroup/EntryPoint
The default data range is between 0 and 1. The default number of data groups is two.
To animate just one of the data groups, use this resource in place of the above data entry point:
$Widget/DataGroupOne/DataGroup<num>/EntryPoint
Use the number of the desired data group in place of <num> , as in $Widget/DataGroupOne/DataGroup3/EntryPoint . Remember to set the number of data groups to 1.
The Line Graph displays one set of data in 2D as a polyline with marker objects identifying each data value. The Y coordinate of a polyline point corresponds to the value of a data sample. Markers may be switched off if desired.
The Filled Line Graph is the same as the Line Graph, but with a filled line. The Line Segment Graph is also similar, but the segments of the polyline may have different colors, widths and line types.
A Point Graph is simply a Line Graph without the lines. Only the markers are displayed.
These four graphs are versions of the graphs on page 49 equipped to display data from multiple data sets. They have multiple lines and multiple Y axes with which to chart them.
These graphs' entry points are as follows:
$Widget/XLabelGroup/EntryPoint
The default data range is between 0 and 1. The default number of data groups is two.
To animate just one of the data groups, use this resource in place of the above data entry point:
$Widget/DataGroupOne/DataGroup<num>/EntryPoint
Use the number of the desired data group in place of <num> , as in $Widget/DataGroupOne/DataGroup3/EntryPoint . Remember to set the number of data groups to 1.
The XY Line Graph displays one set of (X,Y) data pairs in 2D as a polyline with markers identifying each data pair. The markers may be switched off if desired. The X and Y coordinates of the polyline's points correspond to X and Y values of the input data pairs. The XY Point Graph is the same as the XY Line Graph, but only the markers are displayed. The XY Graph is also known as a scatter graph.
These two graphs are versions of the graphs on page 51 equipped to display data from multiple data sets. There is only one set of axes with this graph, so the various data sets should have the same data range. For different data ranges, see page 53.
The entry points for these graphs are as follows:
$Widget/DataGroupOne/XEntryPoint
$Widget/DataGroupOne/YEntryPoint
The default data range is between -1 and 1. The default number of data groups is two.
To animate just one of the data groups, use these resource in place of the above data entry points:
$Widget/DataGroupOne/DataGroup<num>/XEntryPoint
$Widget/DataGroupOne/DataGroup<num>/YEntryPoint
Use the number of the desired data group in place of <num> , as in $Widget/DataGroupOne/DataGroup3/EntryPoint . Remember to set the number of data groups to 1.
The Multiaxis Multiline XY Graph displays several sets of (X,Y) data pairs in 2D as polylines with markers identifying each data pair. Markers may be switched off if desired. The X and Y coordinates of the polyline's points correspond to X and Y values of data pairs. The graph has several axes to display different sets of data in different ranges. See page 51 for the single data set version of this graph.
The graph's entry points are as follows:
$Widget/DataGroupOne/XEntryPoint
$Widget/DataGroupOne/YEntryPoint
The default data range is between -1 and 1. The default number of data groups is two.
To animate just one of the data groups, use these resource in place of the above data entry points:
$Widget/DataGroupOne/DataGroup<num>/XEntryPoint
$Widget/DataGroupOne/DataGroup<num>/YEntryPoint
Use the number of the desired data group in place of <num> , as in $Widget/DataGroupOne/DataGroup3/EntryPoint . Remember to set the number of data groups to 1.
The Polar Line Graph displays one set of data in 2D in polar coordinates as a polyline with markers at each data value. The value of the data sample controls the radial distance of the polyline's point from the center of the graph. Markers may be switched off if desired.
The Polar Filled Line Graph is the same as the Polar Line Graph, but with a filled line. The Polar Line Segment Graph is also similar, but the segments of the polyline may have different colors, widths and line types.
The Polar Point Graph is the same as the Polar Line Graph, but displays just the markers.
The Multiline Polar Graph displays several sets of data in 2D in polar coordinates as polylines with markers at each data value. The value of the data sample controls the radial distance of the polyline's point from the center of the graph. Markers may be switched off if desired. This is a multiline version of the graph on page 54.
The entry points for these graphs are as follows:
$Widget/DataGroupOne/EntryPoint
The default data range is between -1 and 1. The default number of data groups is two.
To animate just one of the data groups, use these resource in place of the above data entry points:
$Widget/DataGroupOne/DataGroup<num>/EntryPoint
Use the number of the desired data group in place of <num> , as in $Widget/DataGroupOne/DataGroup3/EntryPoint . Remember to set the number of data groups to 1.
XY Polar Line Graph: Displays one set of data pairs in 2D in polar coordinates as a polyline with markers identifying each data value. One value of a pair controls the angle and the other controls the radial distance of the polyline's point from the center of the graph. Markers may be switched off if desired.
The Multiline Polar XY Graph is a multiple data set version of the Polar XY Graph described on page 56.
The graph's entry points are as follows:
$Widget/DataGroupOne/AngleEntryPoint
$Widget/DataGroupOne/RadiusEntryPoint
The default radius data range is between 0 and 1, while the angle spans between 0 and 360. The default number of data groups is two.
To animate just one of the data groups, use these resources in place of the above data entry points:
$Widget/DataGroupOne/DataGroup<num>/AngleEntryPoint
$Widget/DataGroupOne/DataGroup<num>/RadiusEntryPoint
Use the number of the desired data group in place of <num> , as in $Widget/DataGroupOne/DataGroup3/AngleEntryPoint . Remember to set the number of data groups to 1.
The Pie Chart displays one set of data in 2D as arc segments. The pie may be displayed "exploded" by shifting the segments. The Oval Pie Graph is the same as the Pie Chart, but with an oval outline.
The Combination Graph is a Bar Graph Widget with a Multiset Line Graph overlaid on top of the bars.
The Stock Graphs are used to show current and past values of a data series. In addition to displaying current data with a line or marker, a stock graph can show the range of data over one or two given time periods. There are two stock graphs. The simpler graph, stock2.g , displays a marker at some "current" value, and can display a high and low limit with a vertical line behind that marker. The more complex stock graph, stock1.g , displays a multiset line graph with bars and lines to display two different sets of limit information in the background.
All the graphs in this group display one set of data as an array of 3D objects. The height of an object corresponds to the value of its data sample. The 3D Signed Bar displays negative values as well as positive. The difference between the other graphs is only the shape of the objects representing the data. The Pyramid Graph uses little pyramids, and the Cylinder Graph uses cylinders and so on.
These graphs are multiset variations of that graphs described on page 61.
The entry points for these graphs are as follows:
$Widget/XLabelGroup/EntryPoint
The default data range is between 0 and 1. The default number of data groups is two.
To animate just one of the data groups, use this resource in place of the above data entry point:
$Widget/DataGroupOne/DataGroup<num>/EntryPoint
Use the number of the desired data group in place of <num> , as in $Widget/DataGroupOne/DataGroup3/EntryPoint . Remember to set the number of data groups to 1.
The 3D Packed Bar Graph displays several sets of data as packs of vertical 3D bars. One pack contains one iteration of data from each of the data sets. The height of a bar corresponds to the value of its data sample. The signed version accepts negative values as well as positive.
Displays several 2D sets of data as several series of packs of vertical 3D bars. One pack of bars keeps corresponding samples of one set. The height of a bar corresponds to the value of a data sample.
The signed version accepts negative values as well as positive.
The entry points for these graphs are as follows:
$Widget/XLabelGroup/EntryPoint
The default data range is between 0 and 1. The default number of data groups is two, with three bars in each pack.
To animate just one of the data groups, use this resource in place of the above data entry point:
$Widget/DataGroupOne/DataGroup<num>/EntryPoint
Use the number of the desired data group in place of <num> , as in $Widget/DataGroupOne/DataGroup3/EntryPoint . Remember to set the number of data groups to equal the number of packs in each DataGroup series.
To animate just one of the data packs, you might use a resource that looks like this:
The 3D Stacked Bar Graph displays several sets of data as packs of stacked vertical 3D bars. The corresponding samples of each set are placed on top of one another to form one pack of stacked bars. Each stack contains one iteration of data from each data set. The height of every component of a stack corresponds to the value of its data sample, and the total height of the stack equals the sum of the heights of its individual components.
The range of the graph should accommodate the range of the sum of the individual component data sets. This means that the sum of all values corresponding to one stack should be less than or equal to the total graph range.
The Multiset 3D Stacked Bar Graph is a multiset version of the Stacked Bar Graph described on page 65.
The graph's entry points are as follows:
$Widget/XLabelGroup/EntryPoint
The default data range is between 0 and 0.2. The default number of bars in a stack is 5 and the number of data groups is 2.
To animate just one of the data groups, use this resource in place of the above data entry point:
$Widget/DataGroupOne/DataGroup<num>/EntryPoint
Use the number of the desired data group in place of <num> , as in $Widget/DataGroupOne/DataGroup3/EntryPoint . Remember to set the number of data groups to 1.
The 3D Step Graph displays one set of data in 3D as a step line. The height of a step corresponds to the value of a data sample.
The Multiset 3D Step Graph displays several sets of data in 3D as step lines. The height of a step corresponds to the value of a data sample.
The graph's entry points are as follows:
$Widget/XLabelGroup/EntryPoint
The default data range is between 0 and 1. The default number of data groups is two.
To animate just one of the data groups, use this resource in place of the above data entry point:
$Widget/DataGroupOne/DataGroup<num>/EntryPoint
Use the number of the desired data group in place of <num> , as in $Widget/DataGroupOne/DataGroup3/EntryPoint . Remember to set the number of data groups to 1.
The Ribbon Graph displays one set of data in 3D as a set of points connected by a ribbon. The height of a point corresponds to the value of a data sample. You can adjust the width of the ribbon by editing the polygon that is its series template .
The Multiset Ribbon Graph displays several sets of data in 3D as data points connected by a ribbon. The height of a point corresponds to the value of a data sample.
The graph's entry points are as follows:
$Widget/XLabelGroup/EntryPoint
The default data range is between 0 and 1. The default number of data groups is two.
To animate just one of the data groups, use this resource in place of the above data entry point:
$Widget/DataGroupOne/DataGroup<num>/EntryPoint
Use the number of the desired data group in place of <num> , as in $Widget/DataGroupOne/DataGroup3/EntryPoint . Remember to set the number of data groups to 1.
These graphs display one set of data in 3D as a surface. The surface area is defined by a parallelogram. The parallelogram is then divided into number of nodes by the grid lines parallel to its sides. Every node is elevated by the amount corresponding to the value of a data sample. Drawing markers can be drawn on the graph. Markers are always drawn on the top of the surface.
To form a surface graph, every set of four nodes is connected by a line, creating a parallelogram. This parallelogram is close to a planar one only if the number of data samples is big and the value changes from one data sample to the next is small in both X and Y directions.
The difference between two graphs is in the number of context objects. The Unframed Surface Graph has only the axes, ticks and labels in addition to the surface. The Framed Surface Graph also has a frame made from the polygons and horizontal grids.
Displays constrained time intervals as horizontal bars. The beginning of the next interval is constrained to coincide with the end of the previous interval.
The sum of all time interval values of the graph should be less than or equal to the total range of the graph.
The Horizontal Slider Graph displays one data value in 2D as a horizontal bar. The horizontal dimension of the bar corresponds to the value of the data sample.
The Vertical Slider Graph displays one data value in 2D as a vertical bar. The height of the bar corresponds to the value of a data sample.
The Horizontal 3D Slider Graph is identical to the Horizontal Slider Graph described on page 72, except that the active element is a 3D bar. It displays one data value at a time, and the horizontal dimension of the bar corresponds to the value of the data.
The Vertical 3D Slider Graph is identical to the Vertical Slider Graph described on page 73, except that the active element is a 3D bar. It displays one data value at a time, and the horizontal dimension of the bar corresponds to the value of the data.
The Bevel Widget is an optional beveled area to use for decoration. You can use it to add a border to another widget by placing that widget inside the Bevel Widget. You can constrain resources of the contained widget to the bevel lighting or color to provide a status indicator, as for a toggle button.
The Bevel Widget comes with a text object already inside it for ease of editing. You can use the text object to change the bevel colors easily. Delete or move the text object before inserting the next widget.
The Gauge Widgets provide several graphical dials and gauges with different look and feel. They can all be used to display a value or to enter one using the mouse. Several gauges may be combined together with other widgets to create custom control panels.
The Clock Widgets are used to tell time. A clock widget may be used for output only, in which case you can delete the input handler, then use the ValueHour , ValueMin and ValueSec resources for moving the corresponding clock hands. Use the Hour , Min and Sec resources for supplying data to be displayed as numbers.
The Stopwatch Widget measures the time elapsed between pressing its Start and Stop button. The widget does not reset the time count until its Reset button is pressed. This allows the total time for several time intervals to be measured. The time is measured with the precision of one second.
The stopwatch widget displays the elapsed time in the following format:
<hours>:<minutes>:<seconds>If the strings corresponding to the hours or minutes are deleted, the display shows the total number of expired minutes or seconds, without going back to zero at 59. That is, if the hour string is deleted, the clock will read "61:00" when 61 minutes have elapsed.
The Thermometer Widget displays a temperature value in both Co and Fo; allows the value to be changed using the mouse.
The Thermometer Widget has its own resource set, as follows:
FAxis (POLYGON, optional): Fo axis
FAxisLabel (TEXT, optional): Fo axis title
FMajorGroup (SERIES): Fo axis major ticks
FMajorTick (POLYGON): template major tick
Factor (DDATA): number of major ticks
FMinorGroupOne (SERIES): Fo axis minor ticks
FMinorGroup (SERIES): template for one set of minor ticks
FMinorTick (POLYGON): template minor tick
Factor (DDATA): number of minor ticks
LogType (DDATA): controls logarithmic positioning of minor ticks
Factor (DDATA, CONSTR): number of major ticks
FLabelGroup (SERIES): Fo axis major tick labels
FLabel (TEXT): template major tick label
Format (SDATA): format to use for displaying label values
Low (DDATA): low range of Fo values
High (DDATA): high range of Fo values
Factor (DDATA, CONSTR): number of major ticks
CAxis (POLYGON, optional): Co axis
CAxisLabel (TEXT, optional): Co axis title
CMajorGroup (SERIES): Co major ticks
CMajorTick (POLYGON): template major tick
Factor (DDATA): number of Co major ticks
CMinorGroupOne (SERIES): Co minor ticks
CMinorGroup (SERIES): template for one set of minor ticks
CMinorTick (POLYGON): template minor tick
Factor (DDATA): number of Co minor ticks
LogType (DDATA): controls logarithmic positioning of minor ticks
Factor (DDATA, CONSTR): number of Co major ticks
CLabelGroup (SERIES): Co major tick labels
CLabel (TEXT): template major tick label
Format (SDATA): format to use for displaying Co label values
Low (DDATA, CONSTR): low range of Co values
The Joystick Widgets provide several joystick controls to enter pairs of X and Y values using the mouse. The joysticks also provide a visual feedback displaying the current values.
The Indicator Widget is a a bevelled area displaying a numerical value. The bevel size is controlled by the BevelSize resource and does not change when the button is resized. Bevel shading may vary slightly for different screen ratios.
The Rubberbanding Indicator Widget is the same as the Indicator Widget, but the bevel size is changed proportionally when the button is resized. This widget guarantees the bevel shading will remain constant for any screen ratio.
The Push Button Widget is a button with a visual feedback on press. It may be added to any other widget to provide an interface for triggering some action. The bevel size is controlled by the BevelSize resource and does not change when the button is resized. The bevel shading may slightly vary for different screen ratios. There are two buttons in the drawing, one with attributes optimized for the darker colors and another for the lighter ones. To use a button, choose the button you'll be using, delete the other one and save the chosen button into a separate file. Repeat this for the second button, if necessary, after reloading the original drawing.
The Rubberbanding Push Button Widget is the same as the Push Button, but the bevel size is changed proportionally when the button is resized. This widget guarantees the bevel shading will stay constant for any screen ratios. The Round Push Button is the same as the Push Button except that it is round.
The GLG Widget Library also includes a set of directional buttons. This is a set of four buttons indicating up, down, left and right movements. These buttons are intended for use with the joystick widgets. Simply paste the whole set into the joystick's viewport. To disable dithering, set the patterns factor of the button's viewport colortable to 0.