This chapter presents descriptions of all the options of the GLG Graphics Builder's menus. They are organized by menu name, in the same order as they appear in the Builder's menu bar:
The File Menu provides options that mainly deal with saving and printing drawing files, saving images and various exported files. These options are described starting on page 227.
The Palettes Menu provides access to palettes of widgets and other pre-built objects. These options are described starting on page 234.
The Edit Menu provides options for selecting, editing and copying objects, as well as undo options. These options are described starting on page 237.
The View Menu provides options for controlling your view of the drawing. These options are described starting on page 241.
The Traverse Menu provides options for working with advanced objects. These options are described starting on page 244.
The Arrange Menu provides options for working with groups, as well as other miscellaneous options described starting on page 248.
The Layout menu provides options for aligning and positioning objects.
The Object Menu provides options for creating and manipulating objects. These options are described starting on page 256.
The Run Menu provides options that let you animate a drawing. These options are described starting on page 280.
The Options Menu provides options that control the appearance and function of the GLG Graphics Builder. These options are described starting on page 281.
This chapter describes all menu options available in the Enterprise Edition of the Graphics Builder. Some options are not present in the Basic and Professional Editions.
The toolbar below the menu bar provides convenient shortcuts for accessing the most often used menu choices. To see the tooltip showing the function of a toolbar's button, hold the mouse inside the button until the tooltip appears.
The File menu provides options to let you load and save drawing files, export/import strings and tags, print drawings, generate images, and close the GLG Graphics Builder.
The New submenu provides options to create widgets and subdrawings with various resize policies. The entries without the No Stretch/Resize option use the world coordinate system and stretch or change the size of objects in the drawing accordingly when the drawing is resized. The entries with the No Stretch/Resize option use the screen coordinate system, and objects in the drawing do not change their size when the drawing is resized. Instead, more or less of the drawing area is shown when the window is resized. If the grid is ON, the grid interval is adjusted to match the selected stretch/resize option.
New, Widget starts a new resizable drawing by creating a new widget and placing editing focus into it. The widget's resize policy resizes all objects in the drawing when the widget is resized.
If the drawing area already contains objects, they are not saved. The Builder asks if you want to discard the current drawing, but it does not prompt you to save any changes to the current drawing. You must explicitly save the drawing using File , Save .
A new drawing area contains two objects: MMDrawingArea and MMAxisIcon , which are visible in the Resource Browser and Properties Dialog of the drawing area. MMDrawingArea represents the drawing area itself, and MMAxisIcon displays the three axes to shows the orientation of the view. MMAxisIcon is only displayed when the drawing area's Axis attribute is turned on. These objects are not part of the drawing, but part of the Builder.
To create objects, use the buttons in the object palette or the choices in the Object , Create submenu. To use pre-built objects, use the Palette menu to load the palettes. When the drawing is saved, the Builder will bring the editing focus back to the top level of the hierarchy, showing the $Widget viewport it created for the new widget.
Same as New, Widget, but creates a non-resizable widget. When the widget is resized, its drawing area shows more or less without changing the size of the objects drawn in it. Since the drawing is not stretched, the objects in the drawing always keep their X/Y ratio.
New , SubDrawing is used to create a resizable subdrawing which is later used as a template of a resizable reference object.
New , SubDrawing (No stretch/Resize) is used to create a non-resizable subdrawing to be used with the fixed-size reference object.
New , Empty Drawing creates a new resizable drawing without creating a widget. When the drawing is resized, all objects in the drawing are resized as well.
Before drawing objects, we recommend that you create a viewport using Object , Create , Viewport , open it using Traverse , Hierarchy Down , or use the New Widget option to create a new viewport automatically.
To create objects, use the buttons in the object palette or the choices in the Object , Create submenu. To use pre-built objects, use the Palettes menu to load the palettes. Ctrl-clicking on the palette's icons loads the corresponding widget as a new drawing.
New , Empty Drawing (No stretch/Resize) is the same as New /Empty Drawing, but creates a non-resizable drawing where objects do not change their size when the drawing is resized. Instead, more or less of the drawing area is shown in the window. Since the drawing is not stretched, the objects in the drawing always keep their X/Y ratio.
Reset Drawing initializes the current drawing. The Builder rebuilds each object in the drawing, updating the Builder's representation to match the current information in the object hierarchy.
For composite objects such as series, references, polylines and polysurfaces, Reset Drawing ensures that the instance objects reflect any changes to the template. This means that any changes made to series instances are lost when the drawing is reset.
All attribute values of instances are also lost when the drawing is reset. The old instances are destroyed and a new set is replicated with values from the template.
Open loads a drawing from a file.
When you select Open , the Builder prompts you to select a file name, using the standard file selection dialog. The Builder can open a drawing saved in any of its own formats; see page 282.
If a drawing is already open, Open discards the current drawing. The Builder asks if you want to discard the current drawing, but it does not prompt you to save the changes.
To load more than one drawing into the drawing area, use File , Load Object ; see page 230.
Open URL loads a drawing from a URL. In the Unix environment, the GLG_WGET_PATH environment variable must be set to point to the wget utility executable to enable this option.
Recent Drawings displays a list of the recently edited drawings. Select one of the recent drawings from the list to load it.
If a drawing is already open, loading a recent drawing discards the current drawing. The Builder asks if you want to discard the current drawing, but it does not prompt you to save the changes.
Save saves the current drawing to a file.
The first time you save a drawing, the Builder prompts you for a file name, using the standard file selection dialog. If the drawing has been saved before, it asks if you want to overwrite the existing file.
The Builder can save files in three different formats:
Binary, which loads quickly but is not portable across platforms that use different binary data representations.
ASCII, which is completely portable across platforms, but loads more slowly than binary.
Extended, which is portable across platforms and across versions of the Builder, but loads most slowly.
There is also an option for saving compressed drawings. Compressed drawings are smaller but load slower.
The default format for saving drawings is compressed ASCII. To change the format, use Options , Save Format and Save Compressed ; see page 282.
Save As saves the current drawing to a different file.
When you select Save As , the Builder prompts you to enter a file name, using the standard file selection dialog. The usual file name extension for a GLG drawing is .g though it is not required.
The default format for saving drawings is compressed ASCII. To change the format, use Options , Save Format and Save Compressed ; see page 282.
Load Object loads an object from a file into an existing drawing. The object is loaded into the current place in the object hierarchy. If the editing focus is inside a viewport or a group, the loaded object will be added to that viewport or group.
When you select Load Object , the Builder prompts you to select a file name, using the standard file selection dialog. The Builder can open any drawing saved in any GLG format. If the input drawing contains more than one object, they appear together in a newly created group in the existing drawing.
To clear the drawing area before loading a drawing, use File , Open ; see page 229.
To save a drawing to a file, use either File , Save or File , Save Object ; see page 230.
Recent Objects displays a list of the recently edited objects. Select one of the recently accessed objects from the list to load it into an existing drawing. Similar to Load Object , the object is loaded into the current place in the object hierarchy.
Save Object saves the currently selected object to a file. Save Object differs from File , Save because it lets you save a selected part of a drawing. For example, by including objects in a group and then using Save Object on the group object, you can isolate part of an object hierarchy.
When you select an object and then select Save Object , the Builder prompts you to enter a file name, using the standard file selection dialog. The usual file name extension for a GLG drawing is .g though it is not required.
To add a saved object into an existing drawing, use File , Load Object ; see page 230. To edit the saved object, use File , Open to open the saved object as a separate drawing file; see page 229.
The object is saved using the same format as for File , Save ; to change the format for saving drawings and objects, use Options , Save Format ; see page 282.
For Linux/UNIX users, Print saves a PostScript image of the current drawing into a file.
For Windows users, Print sends the current drawing to the printer, using the standard Windows print facilities. Use Export PostScript to save a PostScript image of the drawing to a file. The Print toolbar button can be configured to perform either task using the ToolbarPrint configuration file variable.
Print uses the print configuration set by the File , Print Configuration options. If editing focus is set, it prints the focus viewport instead of the whole drawing.
Export PostScript (Windows only) saves a PostScript image of the current drawing (in its current state) to a file. On Unix/Linux, the Print option performs the same task.
Export PostScript uses the print configuration set by the File , Print Configuration options. If editing focus is set, it generates PostScript for the focus viewport instead of the whole drawing.
The Print Configuration submenu provides options to let you set up the printer.
Page Layout specifies how to map the drawing to the printed page.
Page Layout presents a viewport that corresponds to the printed area. The position and size of the viewport relatively to the Drawing Area define the position and size of the area in which the drawing will be printed relatively to the page.
Resize the page layout viewport with the mouse to define the printing area. Delete the viewport when you have finished.
This option applies to both PostScript and Windows printing.
Stretch prints the drawing using the full area of the page. The drawing is scaled to fill the printing area, so the proportions of the printed drawing may not correspond to the drawing's actual proportions. Using the appropriate orientation (portrait or landscape) can help reduce distortion; to preserve the drawing ratio, turn Stretch off.
This option applies to both PostScript and Windows printing.
For PostScript printing and export, PostScript Level specifies which version of PostScript the Builder sends to the printer. Level 3 is required for proper PostScript printing of images with transparent background.
Save Image saves the image of the visible part of the drawing area into a file in the JPEG format. If the editing focus has been moved into a viewport, the image of that viewport will be saved instead of the main drawing area.
Save Image Full saves an unclipped image of the whole drawing into a file in the JPEG format. If the editing focus has been moved into a viewport, the image of that viewport will be saved instead of the main drawing area.
Save Direct OpenGL Image (Windows only) saves a visible part of the drawing into a file by taking an OpenGL snapshot of an image displayed in a viewport. This technique improves the rendering quality of the generated image by getting around the Windows' OpenGL driver, which uses a software renderer with poor anti-aliasing for off-screen rendering.
This option may be used only for viewports with the OpenGL rendering, and it does not work with children viewports.
Export Strings exports all strings defined in the drawing into a file. Refer to Localization Support on page 125 for information about the string translation file format.
Import Strings imports strings from a strings file, replacing matching strings in the drawing. Refer to Localization Support on page 125 for information about the string translation file format.
Export Tags exports all tag names defined in the drawing into a file. Refer to Tag Export and Import Features for Run-Time Tag Mapping on page 129 for information about the tag file format.
Import Tags imports tag names from a tag translation file, replacing matching tag names in the drawing. Refer to Tag Export and Import Features for Run-Time Tag Mapping on page 129 for information about the tag file format.
The Palettes Menu provides access to palettes of widgets and other pre-built objects. By default, only the Custom Objects and HMI Editor Widget Samples palettes are installed. Other palettes are optional and will be installed only if selected. Possible palettes include 2D graphs, 3D graphs, controls, avionics, process control and special widgets palettes.
The Palettes Menu lists all available palettes of pre-built objects. To display a palette, select it from the palettes list. To add an object from a palette into the drawing, click on its icon in the palette. The Builder will insert a copy of the object into the drawing. Give the object a name for accessing its resources and adjust its shape using the resize box.
To load an object or widget from a palette as a new drawing, Ctrl-click on the widget's icon in the palette. The current drawing will be discarded (after a prompt) and the widget's drawing will be loaded. The run command will also be set to match the widget's resources. This is a convenient way to create a drawing containing just one widget. The widget's viewport is named $Widget by default, so the drawing may be saved and used with a GLG program. The drawing also contains a small icon viewport used by the Builder when the widget is shown in the palette. This icon will be ignored at run time, since only the $Widget viewport will be used.
Some palette items, such as viewportless dials, define a collection of graphical objects without a viewport. Such drawings do not define the $Widget viewport and can not be displayed by themselves, they need to be inserted into a viewport to be displayed.
When no optional palettes are installed, the Palette Menu provides the Custom Objects , HMI Editor Widget Samples, Read Palette and Read Directory options.
The Custom Objects palette displays samples of pre-built objects that can be used in a drawing. It contains buttons, sliders and other objects, described in more detail in the GLG Builder and Animation Tutorial .
You can add your own objects to the Custom Object Palette. To do so, simply save it in the widgets/custom_objects directory. The object will be automatically added to the Custom Objects Palette when the builder is restarted or the palette is re-opened.
The HMI Editor Widget Samples palette displays samples of HMI components that use application-specific public properties. These components are used with HMI Configurator, where public properties are used for simplified editing of a component.
Click on a component in the palette to add it to the drawing, then use Object, Public Properties to display its public properties.
The Read Palette option can be used to load a palette into the Builder. A palette is defined by a Palette Description File with the .pal extension. This file provides information about the palette and the objects it contains. Refer to Palette Description File Format and Adding Custom Palettes to the Builder for more information.
To load a palette, select Read Palette , then select the palette's .pal file using the activated file browser.
The Read Directory option can be used to scan a directory containing GLG drawings and display a palette containing all drawings in the directory. To read a directory, select Read Directory, then select a directory to read with the activated file browser.
Each drawing file defines one palette item. A drawing may contain special graphics to be used as a palette icon, as well as the graphical object to be used in the Builder. The following describes the naming conventions used to annotate the icon and the graphical object to be used.
By default, the complete content of the each drawing is added to the palette, which may take a considerable amount of memory and CPU time to load and render.
To make the process faster, each drawing can contain a $Icon resource, optimized in size and appearance for being displayed as a small palette item. If this resource exists in the drawing, it will be displayed as a palette icon. The icon will be used as is, without scaling, and must have a proper size and position to be displayed properly. The icons of the drawings supplied with the Toolkit define icons in a separate small viewport, so that they appear in the drawing the same way they will look like in the palette.
Alternatively, a D custom property named $GlgScaleIconToFit may be added to the icon and set to 1 to enable icon fitting, in which case the icon will be automatically scaled and positioned inside its palette slot. Icon scaling may not be very precise for icons that contain text objects, since the text objects do not scale well.
If the $Icon resource is absent, the whole drawing will be used as an icon. The drawing will be scaled to fit the icon area in the palette.
The $Drawing or $Widget resource may be defined in the drawing to annotate the object or part of the drawing to insert when the palette icon is selected. If these resources are absent, the content of the whole drawing will be inserted.
The $Widget resource name is used for components that are contained in a viewport and may be used as a widget in a stand-alone way. $Drawing is used for components without a viewport. Such components must be placed in a viewport in order to be displayed.
The Palette Description File ( .pal extension name) provides information about the palette and the objects it contains. Each line of the palette description file contains a key word and a value, separated with the "=" sign. The following keywords are supported:
title
Specifies a mandatory title for the palette, which is displayed in the Builder's
Palettes
Menu.
num columns
Defines an optional number of columns displayed in the palette. The default value is 4.
num rows
Defines an optional number of visible rows displayed in the palette. By default, the palettes height is extended to accommodate as many rows as required to display all palette objects. If this parameter is set to a smaller value, for example 4, the palette will show only 4 rows and will include a scroll bar to scroll the rest of the palette objects.
background color
Specifies the palette's optional background color. This color is defined by supplying an RGB value in the range from 0 to 1. For example, use
"background color=1. 1. 1."
to define a white background. The default color is the color of the template.
directory
An optional directory parameter. If defined, all drawing files from the directory are displayed in the palette. Each drawing file defines one palette item and may contain the $Icon, $Drawing or $Widget resources (as described in Read Directory) to specify the icon to display and the object to insert in the drawing when the palette icon is selected. If the
directory
is not defined, the
entries
parameter is used. The Builder's
Custom Objects
Palette uses the
directory
parameter to define its entries.
entries
Specifies the drawing files to display in the palette. The entries parameter should be the last in the file and should contain nothing on the right side of the "=" sign. The drawing files are listed one per line on the lines following the
entries
key word.
Each drawing file defines one palette item and may contain the $Icon, $Drawing or $Widget resources (as described in Read Directory) to specify the icon to display and the object to insert in the drawing when the palette icon is selected. File names may include directory path relative to the location of the palette description file.
The palette file may also contain comments (lines starting with the "#" character).
The Builder uses the palettes.pls file located in GLG's widgets directory to detect installed palettes during start up. This file contains a list of palettes to be added to the Builder's Palettes Menu. To add a new custom palette to the Builder, create its palette description file and add it to the palettes.pls file. After restarting the Builder, the new palette will show up in the Builder's palette list.
Each line of the palettes.pls file contains the file name of a palette description file, including a path name relative to the location of palettes.pls . The file may also contain separator lines (lines that have just the "-" symbol) as well as comments (lines starting with the "#" character).
By default, on Unix, the Builder searches for the palettes.pls file in the GLG's "widgets" directory by using the "../widgets" path relative to the Builder's directory, or relatively to the current directory. On both Unix and Windows, the value of the GLG_DIR environment variable, if it is set, is used as a name of the directory that contains the "widgets" directory. You can change the default place where the Builder searches for the palettes.pls file by setting the GLG_PALETTES_LOCATION environment variable to point to either a new palette file name or a new directory where the palettes.pls file is located.
The Edit Menu provides options that let you make and manipulate copies of objects.
These options operate on the selected object. To operate on several objects at the same time, use the menu options for selecting multiple objects, then use editing options.
The Cut , Copy , and Paste options add and remove objects. The Clone options let you position and transform the added objects as they are created.
Undo reverts the effect of the last editing operation, such as changing geometry or an attribute value of an object or group of objects, changes to object's control points, layout and alignment operations, zooming and panning and others. The undo button displays the last editing operation that can be undone and changes its label to Redo after performing the Undo operation. Some advanced editing operations, such as exploding, constraining and some others, cannot be undone.
Undo History displays a list of recent editing actions and allows selecting individual actions to undo or redo. Some geometry editing actions require the drawing's viewing state (pan and zoom) to be unchanged in order to be reverted properly. The changes to the drawing's viewing state are listed in the Undo History list and can be undone as well.
Select Multiple Objects is equivalent to using Ctrl-click. It starts multiple object selection without the need to hold the Ctrl key. After the option is selected, click on the objects in the drawing to add or delete them from the selection.
Select Rectangular Area is equivalent to clicking and dragging the mouse in the drawing to define the selection rectangle. It provides a convenient option for starting a rectangular selection for cases when all drawing area is covered with objects and there is no free space to click and drag the mouse without selecting some object. After the option is selected, click and drag the mouse anywhere in the drawing area to define the selection rectangle. All objects that are either completely or partially enclosed by the rectangle will be selected.
Cut removes the selected object from the drawing and places it on the clipboard. The cut object remains on the clipboard until you replace it by performing another Edit , Cut or an Edit , Copy operation.
Copy places a full copy of the selected object on the clipboard without removing it from the drawing. The copied object remains on the clipboard until you replace it by performing an Edit , Cut or Edit , Copy operation.
Paste gets a cut or copied object from the clipboard and adds it to the current drawing. Pasting an object does not delete the object from the clipboard, so you can paste the same object repeatedly. If an object is cut and then pasted repeatedly, the first paste places the object itself, preserving all constraints. Any consequent paste operations place a full copy of the object, removing any constraints.
The pasted object is added at the position of the current editing focus. For example, if an editing focus is inside of a viewport, the new object appears inside the viewport. If it's inside a group, the new object becomes a member of the group.
Delete removes the selected object from the drawing. The deleted object is irrevocably discarded; it is not placed on the clipboard.
To remove an object from the drawing and place it on the clipboard, use Edit , Cut . This allows you to move an object from one part of the drawing to another.
Define Clone Offset determines the placement of a clone with respect to the original object. If a clone transformation has been defined, the clone offset is not used.
When you select Define Clone Offset , the Builder prompts you to click on two points that define the clone path. The clone path specifies the distance and direction from the origin of the original object to the origin of the clone, using the object's coordinate system.
The Builder uses a default offset of 50 units to the Southeast for all objects unless you redefine the offset.
To clone an object, use the clone options on the Edit menu ( Full Clone , Strong Clone, Weak Clone and Constrained Clone ).
Define Clone Transformation specifies a transformation for a cloned object. The original object is copied and transformed to produce the clone.
By default, the Builder applies the default linear clone offset. The Define Clone Transformation option may be used to define any transformation to offset the copies, for example rotate or scale.
To create the clones, use the clone options on the Edit menu ( Full Clone , Strong Clone, Weak Clone and Constrained Clone ).
To disable the clone transformation, select any object and use Define Clone Transformation , setting the parameters of the transformation so that they have a neutral effect. For example, for a move transformation you would set the move distance parameters to zero.
The clone transformation is applied to copies using Transform Points, changing the coordinates of their control points irrevocably, without creating a transformation object. However, a Constrained Clone attaches a transformation to the clone, and some objects such as circles, arcs and reference objects are treated differently for Scale and Rotate transformations. Cloning a circle using a rotate transformation attaches a static matrix transformation to the cloned object to position it. The matrix transformation can be treated like any other transformation.
Full Clone creates a copy of the selected object. The copy has all the characteristics of the original object, including transformations, attributes, resources and internal constraints between its attributes. The Full Clone removes any attribute constraints to external objects.
The copy is created in the position specified by the current clone offset setting. If you specified a transformation using Edit , Define Clone Transformation , it is applied before the clone is drawn.
Weak Clone creates a copy of the selected object preserving any internal constraints between the object's attributes. The Weak Clone also handles global attributes. The attributes of the object whose Global flag is set to GLOBAL are considered to be global attributes, and the corresponding attributes of the copy are constrained to the attributes of the original object.
The copy is created in the position specified by the current clone offset setting. If you specified a transformation using Edit , Define Clone Transformation , it is applied before the clone is drawn.
Strong Clone creates a copy of the selected object. It also handles global attributes, but, unlike the weak clone, any attribute whose Global attribute is set to either GLOBAL or SEMI-GLOBAL is considered to be a global, and the corresponding attributes of the clone are constrained to the attributes of the original object.
The copy is created in the position specified by the current clone offset setting. If you specified a transformation using Edit , Define Clone Transformation , it is applied before the clone is drawn.
Constrained Clone creates a copy of the selected object. All the copy's attributes are constrained to the original object, so it has the same characteristics of the original, including transformations, attributes, and resources.
The copy is created in the position specified by the current clone offset setting. If you specified a transformation using Edit , Define Clone Transformation , it is applied before the clone is drawn. Because of the constraint, the offset and transformation are attached to the copy as static transformations.
When you create a constrained clone, all the clone's attributes are constrained to the original object, regardless of the Global attribute settings. See page 194 for more information on the Global attribute.
Provides options for reusing Rendering and Text Box attributes, as well as font tables and the viewport's light attributes. The menu becomes active when the objects to be reused are marked by selecting the Mark button in the Object Properties dialog. The Attribute Clone Type option of the Options menu controls the constrain type of the added copies. When a group is selected, adding a marked object adds copies of it to all objects in the group.
The View Menu provides options to let you change the appearance of the drawing. These options have no effect on the underlying drawing, but just alter its appearance within the drawing area.
The Set View submenu provides options to let you change the projection used to display the drawing.
In this view, the X axis points to the right, the Y axis points up, and the Z axis points toward the viewer.
In this view, the X axis points to the left, the Y axis points up, and the Z axis points away from the viewer.
In this view, the X axis points away from the viewer, the Y axis points up, and the Z axis points to the right.
In this view, the X axis points toward the viewer, the Y axis points up, and the Z axis points to the left.
Adjust View defines and applies a transformation to the view of the drawing, letting you transform the view incrementally.
The view transformations are defined and applied in the same way as object and clone transformations; see GLG Objects for transformation descriptions. A viewing transformation does not affect the drawing's content; it only adjusts the viewing projection used to present the drawing.
To return to one of the predefined projections, select a view from the View , Set submenu.
When the view is adjusted in the Builder, the result of the adjustment is stored in the viewport's Zoom transformation. If you want to transform the view from a program, attach a parametric view transformation to the viewport object. See Viewport of GLG Objects for more information on Zoom and View transformations.
Load View Transformation applies a saved view transformation to the current drawing. The transformation does not affect the drawing itself, just the way it is presented.
When you select Load View Transformation , the Builder prompts you to enter a file name, using the standard file selection dialog.
To save a view projection, use View , Save View Transformation .
Save View Transformation writes the definition for the current view projection to a file. A saved view transformation is useful if you frequently use a particular projection that is not among the standard views. You can configure your projection once, save it, and then load it whenever you want to view a drawing using that projection.
When you select Save View Transformation , the Builder prompts you to enter a file name, using the standard file selection dialog.
To apply a saved view projection, use View , Load View Transformation .
The Coordinate System submenu provides options to let you view the drawing using different coordinate systems. The effect of these options depends on the relationships among the objects in the drawing. If the objects share the same coordinate system, the options have no effect on the appearance of the drawing.
Changing the viewing coordinate system does not affect the objects or their relationships to one another. It affects only the Rotation and Scaling axes and the way the Builder interprets numerical values of coordinates. For information about the various coordinate systems relevant to a GLG drawing, please see Structure of a GLG Drawing.
View lets you edit the drawing using the coordinate system of the viewport, before view transformations are applied.
Drawing lets you edit the drawing using the coordinate system for the drawing, after view transformations are applied.
The Zooming submenu provides options to let you change the scale of the view. The changes in scale affect your view of the drawing, not the drawing itself, and are saved with the viewport. All the zooming options use the drawing's coordinate system. The Builder's Control Panel also provides zooming controls.
Zoom In increases the scale of the drawing, so the objects look bigger. Zooming into a drawing enlarges the objects in the center of the drawing, but objects near the edges of the drawing may be clipped.
To control the degree of scaling, use View , Zooming , Set Zoom Factor .
Zoom Out decreases the scale of the drawing, so the objects look smaller.
To control the degree of scaling, use View , Zooming , Set Zoom Factor .
Zoom To zooms into a specified area of the drawing. When you select this option, the Builder prompts you to specify two points that define a bounding box for the zoom area.
To recover your view of the excluded area, use View , Zooming , Zoom Out .
Pan To moves the center of the view to another part of the drawing area.
After you select this option, click on a spot to use as the new center of the view.
Starts dragging mode. Click and drag the mouse after selecting this option to scroll the drawing with the mouse.
Scrolling the drawing with the mouse may also be performed by the Ctrl-click-drag sequence in any empty area of the drawing. However, if the drawing area is completely occupied by objects, this menu option provides an alternative.
The Traverse Menu provides options to let you work with the object hierarchy.
Hierarchy Down shows the members of the object hierarchy below the selected object. The effect of this option depends on the selected object:
For a container object such as a group or viewport, this option shows the elements inside the container object.
For a composite object such as a series or object reference, this option shows the template for the composite object.
For the file reference (subdrawing), this option loads the referenced file.
For polylines and polysurfaces this option shows the template marker object.
For non-composite objects, this option is grayed.
This menu option is equivalent to the Hierarchy Down button at the left side of the Builder window.
To navigate back up through the object hierarchy, use Traverse , Up .
For a transformed object, Transformation Down shows the original object before its transformation.
To return to a view of the transformed object, use Traverse , Up .
Up undoes the effect of Traverse , Hierarchy Down , returning to a higher level of the object hierarchy. It also undoes the effect of Traverse , Transformation Down , returning to a view of the transformed object.
Set Focus enters a mode that makes a viewport's contents available for editing without filling the whole Builder window. This lets you edit the contents of a viewport in the context of the surrounding drawing, unlike Hierarchy Down , which excludes from the drawing area any objects not within the selected branch of the object hierarchy. When the focus is set to a viewport different from the main drawing area, Traversing Down is disabled until the focus is returned to the main drawing.
To set the focus, use this menu option (or click on the Set Focus button on the Control Panel ). The Builder prompts you to select a viewport to focus on. Ctrl-Shift-clicking on a viewport also moves focus into it, acting as a convenient shortcut for Set Focus.
To return to the default editing mode, use Traverse , Main Focus , or click on the Main Focus button.
Main Focus returns focus to the main drawing area. Ctrl-Shift-clicking on a top-level viewport of the drawing area also moves focus into it.
Main Focus terminates the Set Focus mode. To edit the contents of the selected viewport, use Traverse , Hierarchy Down .
This option is grayed until you use Traverse , Set Focus to change the viewport editing mode.
When you select a member of a group with a mouse click, you select the entire group. If you want to edit only one member of the group, you can use Select Next to select it. This option selects members of a group that exist at the next lower level of the object hierarchy. That is, if one of the members of the group is itself a group, when you choose Select Next and then click on a member of that sub-group, you select the entire sub-group. If you are editing nested groups, you can use Select Bottom to select objects at the bottom of the hierarchy of nested groups. When a permanent group is selected, the Ctrl-Shift-click on an object in the group selects the object, acting as a shortcut for Select Next. When an object inside the group is selected using Select Next, the boundaries of its parent group are highlighted with a dotted line to provide visual feedback for the traversal of the group hierarchy.
To change attributes that are common to all the members of a group, use Traverse , Edit All, or the Edit All button on the group's Properties dialog.
To delete a group object and separate its members for independent editing, select the group and use Arrange , Explode, Object .
Alternatively, you can select the group, and use Traverse , Hierarchy Down to move to the hierarchy level that shows the individual objects in the group. At this level, you can select and edit each member of the group independently. To return to the hierarchy level that shows the group object, use Traverse , Up .
This option is equivalent to the Select Next button in the Selected Object Properties dialog for a group object.
Select Next mode is aborted when an object outside of the group is selected.
When you select a member of a group with a mouse click, you select the entire group. If you want to edit only one member of the group, you can use Select Bottom to select it. This option selects members of a group that exist at the lowest visible level of the object hierarchy. That is, if one of the members of the group is itself a group, when you choose Select Bottom and then click on a member of that sub-group, you select only the object on which you clicked. If you want to select the entire sub-group instead, you can use Select Next to select objects at the next lower level of the hierarchy of nested groups. When an object inside the group is selected using Select Bottom, the boundaries of its parent group are highlighted with a dotted line to provide visual feedback for the traversal of the group hierarchy.
To change attributes that are common to all the members of a group, use Traverse , Edit All, or the Edit All button on the group's Properties dialog .
To delete a group object and separate its members for independent editing, select the group and use Arrange , Explode, Object .
Alternatively, you can select the group, and use Traverse , Hierarchy Down repeatedly to move to the lowest level of the hierarchy. At this level, you can select and edit each member of the group independently. To return to the hierarchy level that shows the group object, use Traverse , Up .
This option is equivalent to the Select Bottom button in the Selected Object Properties dialog for a group object.
Select Bottom mode is aborted when an object outside of the group is selected.
For a group object, Edit All (First) starts editing the attributes of objects in the group by using the first object in the group to select a set of attributes for editing. This is a convenient option for fast editing of groups that contain objects of the same type.
For groups that contain objects of different types, the Edit All (Select) option allows you to select a set of attributes to edit. For example, if the group contains both the polygon and text objects, the Edit All (Select) option allows you to select the polygon or text attributes to be edited.
If a Font Table, Color Table, Rendering Attributes or Box Attributes are added to an object in a group in the Edit All mode, constrained copies are added. Changing any attribute will affect all copies. Individual or all attributes of added copies may be unconstrained. Use the Unconstrain button in the Attribute Object dialog to unconstrain selected attributes of the constrained objects (in Edit All mode, the attribute will be unconstrained from all copies).
For a group object, Edit All (Select) allows you to choose a set of attributes to edit. This may be convenient when the group contains objects of different types with different sets of attributes.
When you select this option, the Builder prompts you to select an object that has the attributes you want to change. The changes you make to an attribute in the Properties dialog apply to all the objects in the group that have the attribute.
For example, consider a group that contains two circles, a parallelogram, and a fixed text object. Select Edit All (Select) and then select a circle. The Properties dialog shows the attributes for a circle object. Resetting the Resolution affects both circles. Resetting the LineWidth affects both of the circles and the parallelogram. However, the text object doesn't have a LineWidth attribute and is not affected.
If a Font Table, Color Table, Rendering Attributes or Box Attributes are added to an object in a group in the Edit All mode, constrained copies are added. Changing any attribute will affect all copies. Individual or all attributes of added copies may be unconstrained. Use the Unconstrain button in the Attribute Object dialog to unconstrain selected attributes of the constrained objects (in Edit All mode, the attribute will be unconstrained from all copies).
For a series or reference object, Replace Parent's Template lets you use a different object as a template. Use the following procedure:
Select Traverse , Hierarchy Down to open the series object.
Select or create a new template object.
Select Traverse , Replace Parent's Template .
When you go back up the hierarchy, the series or reference is drawn with the new template object. The old template is discarded.
If the template is a simple object (a polygon, for example), this option may be used to add more objects to the template by replacing the polygon with the group containing other objects as well.
The Arrange Menu provides options to let you change the relationships between objects.
Create Permanent Group creates a group object, which is a container for objects. A group is an object that organizes the objects it contains, letting you apply actions to all the objects at once. A group can contain any object, including other groups.
When you use this option, the Builder prompts you to click and drag the mouse in the drawing to define a rectangle that touches or encloses all the objects to be included in the group. A group object does not appear as a visible shape, but the control points of objects in a group appear as hollow squares. Clicking on any member of a group selects the group. This option is equivalent to the Group icon on the Object Palette .
To remove an object from a group, use the options on the Arrange , Explode submenu.
To edit a single object in a group, use the options on the Traverse menu ( Edit Next , Edit Bottom , and Edit All ; see page 246). Alternatively, use Traverse , Hierarchy Down to edit the members of the group; see page 244. The Ctrl-Shift-Click on an object in a group may be used as a shortcut for getting access to objects inside the group.
Create Temporary Group is equivalent to Select Rectangular Area described on page 238.
Select Multiple Objects is equivalent to Select Multiple Objects described on page 238.
Add Object to Group adds an object to the selected group object. It may be used with both temporary and permanent groups.
Select Arrange , Add Object to Group .
Click on the first object to add to the group.
Click on the next object to add to the group.
When you have added all the objects to the group, use the Esc key or the right mouse button to complete the operation.
The status bar at the bottom of the Builder window provides prompts to guide you through the procedure.
This option is equivalent to the Add Object button in the Selected Object Properties dialog for a group object.
Delete Object from Group removes a single object from the selected group. The option may be used with both temporary and permanent groups.
Select Arrange , Delete Object from Group .
Click on the first object to remove from the group.
Click on the next object to remove from the group.
When you have removed the objects from the group, use the Esc key or the right mouse button to complete the operation.
The status bar at the bottom of the Builder window provides prompts to guide you through the procedure.
This option is equivalent to the Remove Object button in the Selected Object Properties dialog for a group object.
Add or Delete Object from Group adds an object to the group if the object is not part of the group, or deletes the object from the group if the object is a part of the group.The option may be used with both temporary and permanent groups.
Select Arrange , Add or Delete Object from Group .
Click on the first object to add or delete from the group.
Click on the next object to add or delete from the group.
When you have removed the objects from the group, use the Esc key or the right mouse button to complete the operation.
The status bar at the bottom of the Builder window provides prompts to guide you through the procedure.
For temporary groups, the same action can be accomplished by Ctrl-clicking on the object with the mouse.
Select Next is equivalent to Select Next on page 246.
Select Bottom is equivalent to Select Bottom on page 246.
Permanent Group toggles the type of the selected group object between temporary and permanent. The current group type is displayed as the state of this toggle button.
The Explode submenu provides options to let you separate the objects in a composite object such as a group or series, so that they become independent objects.
The effect of Explode depends on what kind of object is selected. In general, it alters the relationship between objects:
For a series, Explode deletes the series object and destroys the template. The objects that were previously members of the series remain associated; they are contained in a group object with the same name as the exploded series object.
For a reference, Explode deletes the reference object and replaces it with an instance of the template object. If no other reference object uses the template, the template is destroyed. For file references, the loaded instance of a drawing is used.
For a group, Explode deletes the group object. The objects that were previously members of the group become independent objects.
For a circle or parallelogram, Explode separates the lines that render the object from their relationships with each other, and places a control point at each vertex. Exploding a circle creates a many-sided polygon, and exploding a parallelogram creates a four-sided, unconstrained polygon.
Object explodes the selected object. If the selected object is a group or series, this option only affects the top level of the association. Use Arrange , Explode , Sub-Objects to explode the sub-objects.
If the selected object is a group with attached transformations, the transformations are copied to the resulting objects. The Builder prompts you for the type of cloning used to copy the transformations.
For objects that are contained in a group, Sub-Objects lets you explode the sub-objects without affecting the group.
When you select this option, the Builder prompts you to choose between transforming the points in each object or adding the transformation to each object's control points. If you choose to add the transformation to the control points, the Builder prompts you for the type of cloning used to copy the transformations.
This option is grayed if the selected group object has no transformations.
The Reorder submenu provides options to let you change the drawing order of objects. Unless the parent viewport or group has the DepthSort attribute turned on, the last object drawn appears to be in front of any other overlapping objects. This is true regardless of the spatial positions of the objects, with the exception of the viewports which are windows and always appear on top of graphical objects.
Move to Back moves the selected object behind other objects in the drawing. All overlapping objects appear to be in front of the selected object.
Bring to Front moves the selected object in front of other objects in the drawing. All overlapping objects appear to be behind the selected object.
Inverts the order of the polygon's control points. This does not change the polygon's appearance, but the first point in the list of the polygon's points (annotated in the drawing with the small black square) becomes the last point in the list. The list of the polygon points may be edited by pressing the Point List button in polygon's Properties dialog. Inverting the points' order may be convenient when merging polygons.
This submenu provides options for merging polygons. To merge polygons, all points of one polygon are first marked and then added to another polygon. To mark polygon's points for merging, select the polygon, display its Properties dialog, press the Point List button to display its point list and press Mark List .
Adds the marked list of points at the beginning of the point list of the selected polygon.
Sets the GIS Zoom Mode of the GIS Object's parent viewport by setting the currently selected GIS Object as the parent viewport's GIS Object. In the GIS Zoom Mode the zoom and pan controls of the viewport zoom and pan the map displayed in the GIS Object instead of zooming and panning the viewport's drawing. The GIS Zoom Mode is persistent and is stored with the drawing. To unset the GIS Zoom Mode, use the Unset GIS Object option described below.
The Layout Menu provides options to align and layout objects in the drawing. It may also be used to view or set the objects' width and height using the Layout Toolbox option.
This option activates the Layout Toolbox which contains icons and controls for performing various align and layout operations. See Object Layout and Alignment on page 171 for more information.
The Align submenu provides options for aligning objects.
Align Left aligns the left edge of each selected object with the left edge of the anchor object. If no anchor object is selected, the left most selected object is used as an anchor.
Align Horiz. Center aligns the center of each selected object with the center of the anchor object horizontally. If no anchor object is selected, the left most selected object is used as an anchor.
Align Right aligns the right edge of each selected object with the right edge of the anchor object. If no anchor object is selected, the right most selected object is used as an anchor.
Align Top aligns the top edge of each selected object with the top edge of the anchor object. If no anchor object is selected, the highest selected object is used as an anchor.
Make Same Size submenu provides options for setting size of selected objects to be the same.
Sets the width of each selected object to be the same as the width of the anchor object. If no anchor object is selected, the left most selected object is used as an anchor.
Distribute submenu provides options for distributing objects in the selected group, leaving no spaces between the objects.
Space Evenly submenu provides options for evenly distributing spaces between objects in the selected group.
Distribute Evenly submenu provides options for evenly distributing objects in the selected group using objects' centers.
Select Anchor defines the anchor object. Select this option, then click on the object with the mouse to define it to be the anchor. The anchor selection will be preserved until the currently selected group is unselected.
The Object Menu provides options to let you create and manipulate objects within the drawing.
The options under the Create option let you add new objects to the drawing.
Most of the options under the Create submenu correspond to the buttons in the Object Palette on the left side of the Builder window. You can create the object by choosing its type from this menu, or by clicking on the corresponding button in the palette.
If an object has an icon in the drawing primitives palette, the icon is shown next to the object description. If an icon is not displayed, the object may be created only by using the Object, Create main menu.
See page 162 for basic instructions on drawing objects.
The Polygon options let you create the following kinds of polygons:
To create any type of polygon, click on each point to be used as a vertex, then click the right mouse button (or use the Esc key) to complete the polygon. For the closed and filled polygons, the Builder joins the first and last vertices, closing the polygon.
The Rectangle options let you create the following kinds of rectangles:
Although the GLG object set does not include a rectangle object, the Rectangle options are provided for convenience. Drawing a rectangle actually creates a specialized parallelogram with perpendicular sides. The sides are not constrained to remain perpendicular, though they remain parallel unless you explode the object.
To create a rectangle, click on two points to define the diagonal corners of the rectangle.
The Parallelogram options let you create the following kinds of parallelograms:
To create a parallelogram, click on one point, and then click on two other points. The second and third points define two vectors from the first point; they specify the angles and lengths of the opposing sides. The opposing sides of the parallelogram remain parallel when the object's control points are moved. To remove this constraint, explode the object.
The Arc options let you create the following kinds of arcs:
An arc is a many-sided regular polygon, like a circle; however, an arc does not encompass 360°. A simple arc is just the segment of a circle's perimeter connecting the points you choose. A chord arc closes the shape with a straight line from one end of the arc to the other. A segment arc closes the shape with two straight lines from each end of the arc to the center, like a wedge of pie.
To create any type of arc, click on the center point, a point to define the radius, and a point to define the angle of the sector.
You can convert an arc to a circle by editing its StartAngle or EndAngle attributes.
The control points of an arc or a circle are unusual for graphical objects. See the description of a circle (below) for an explanation.
The Circle options let you create the following kinds of circles:
A circle is a many-sided regular polygon. Its Resolution attribute specifies the number of sides used to render the circle. At low Resolution values, the shape no longer resembles a circle; for example, a circle with a Resolution of 5 is a pentagon.
To define a circle, click on the center point, then on a point to define the radius.
In GLG, both circles and arcs are rendered using an Arc object type. A circle is a special case of an arc with a StartAngle of 0 and an EndAngle of 360.
Circles and arcs have an arrangement of control points different from other graphical objects. Each circle has two control points that initially appear superimposed at the center of the circle. (The move point is moved slightly away from the center to avoid confusion.) The two points define a line to which the circle is perpendicular. The length of the line is ignored. This means that you can grab one of the control points, and tilt the circle by moving it. However, a circle has no control points on its perimeter for resizing it; to change its radius, change its Radius attribute or use the Resize Box .
The Spline options let you create a multi-point Bezier cubic spline used to render curves in 2D or 3D space:
To create a spline, click in the drawing area to define the number of spline control points, then click the middle or right mouse buttons (or use the Esc key) to complete the spline. The spline will render a smooth curve defined by the control points. The shape of the curve may be changed by moving the control points.
A marker is an object that indicates the position of a single point. Markers are made by selecting one or more shapes from a set of predefined shapes such as squares, crosses, and circles. Unlike other graphical objects, marker objects do not change their size when the viewport is resized.
To create a marker, select Object, Create, Marker and then specify the point.
Since markers are always drawn the same size, they are not affected by transformations. To change a marker's size, change its Size attribute.
An image object may be used to display an image in the GIF or BMP (on Windows only) formats. The Image options let you create the following kinds of images:
To create an image, select the type of the image: fixed size or scalable, define its position (one control point for the fixed image and two points for the scalable image), and select the image file.
For images of fixed size, the Anchoring attribute may be used to control the image's position relative to its control point.
The Text options let you create the following kinds of text objects:
Fixed Text presents a string. To create a fixed text object, click in the drawing to define the text's position, then type the string in the text entry box.
Scaled Text presents a string within a bounding box. Resizing the bounding box changes the font size of the string. To create a scaled text object, click on two points to define the diagonal corners of the bounding box, then type the string in the text entry box. Note that the text is scaled by selecting different size fonts from the viewport's font table, not by changing the dimensions of the characters. Depending on the selection of sizes defined in the font table, this may appear to give incorrect results when the text object is resized.
Spaced Text presents a string within a bounding box, with flexible orientation. Changing the box repositions the string. To create a spaced text object, click on two points to define a line, then click on a third point to define the height of the bounding box. Finally, type the string in the text entry box.
. The third control point is used for line positioning when the text object has several lines.
A text object is a graphical object that presents a string. The text object itself just sets the boundaries of the text. The text object's data attribute defines the string that appears in the drawing.
You can transform the text object itself using the transformations that apply to geometric data; the transformations affect the bounding box that contains the text. You can transform the text object's String attribute using any of the transformations that apply to string data; they can be used to display a numeric value or another string. For a complete list of transformations and details on text object types, see GLG Objects.
All the text objects can display any font that is available in the GLG Graphics Builder. The final appearance of the string depends on the font table attributes of the viewport that contains the text object. To set the font table attributes:
Select the viewport and use Object , Properties to see the viewport's attributes.
In the
Selected Object Properties
dialog for the
Viewport
object, click on the ellipsis button
for
More
, to see the attributes of the
Screen
object.
In the
Selected Object Properties
dialog for the
Screen
object, set the
Default Fonts
attribute to
NO
, and click on the ellipsis button
for
Fonts
, to see the attributes of the
Fonttable
object.
In the Selected Object Properties dialog for the Fonttable object, use the buttons to set the attributes for the Fonttable object. This object refers to a font table, which is an array of data that includes the font specification and available sizes.
To see the fonts in the selected font table, click on the ellipsis button
for the
Fonts
attribute and edit Font objects in the font table. Each font object allows defining fonts for both Windows, Unix and Java run-time environments, as well as for PostScript printing.
A GIS Object provides a way to embed GIS maps generated with the GLG Map Server into GLG drawings. It automatically handles all aspects of the low-level interaction with the Map Server to display, zoom and pan GIS map data. The GIS Object
provides attributes to control projection, center and extent of the map.
Select Object , Create , GIS Object and choose rectangular or orthographic projection to create the GIS Object.
Click on two points to define a rectangular area to use for the map display.
When prompted, select a dataset file that describes the GIS data to render.
The GIS Object will display the map specified by the dataset file. The map may be positioned by changing the GISCenter and GISExtent attributes of the object. The GIS Zoom mode of the drawing's Integrated Zoom feature may be used at run time to zoom and pan the map. Refer to Viewport of GLG Objects on page 61 for details.
A group is a container for other objects. It lets you manipulate all members of the group as if they were a single object.
To define a group, select Object , Create , Group and drag a rectangle through the objects you want to include in the group. Any object touched by the defining rectangle is included in the group. The groups created using this method are permanent. Refer to Multiple Selection on page 164 for information about temporary groups.
The Arrange and Traverse menus provide options to let you work with a group object. The Arrange , Create Permanent Group option is equivalent to the Object , Create , Group option.
You can use the Builder to create groups of graphical objects, but groups can contain any objects, graphical or not. The polygon, for example, contains a group of point coordinates. It is not uncommon to see non-graphical objects grouped using the GLG API.
A
container
is a subtype of the reference object used to hold other objects, preserving their coordinate system. The container provides a single control point for moving all objects it contains. See Reference for information on creating different types of reference objects, including the container.
A viewport is a rectangular object that acts as a container for other objects. The viewport represents the final stage in the visualization of a drawing object; it presents the objects within the drawing area and may be used as a widget in different run-time environments.
To create a viewport object, click on two points to define the diagonal corners of the viewport. To place objects inside the viewport, use Traverse , Hierarchy Down to open the viewport, or use View , Set Focus ; see page 245.
A drawing can contain multiple viewports, viewports nested within viewports, or no viewports at all. However, to use the drawing as a widget, the drawing must contain a viewport named $Widget that contains all the objects in the drawing; see Details of using GLG Standard API for C and C++.
Note: Due to features of the Windows graphical environment, there could be an inconsistency when moving or resizing a viewport with a native widget type (such as a button or scrollbar). The native widgets may intercept mouse events, so an extra mouse click may be required to finish when dragging the viewport with the mouse. Also, Microsoft Windows does not report mouse events which happen on the window's border. To handle this situation, the Builder allows you to create an offset between the actual mouse position and the position of the control point being moved. You can choose a position in the center of the control point (the default), slightly below and to the right, or above and to the left. Use Ctrl+Z to toggle between the three possible values of the offset.
A series object is a set of dynamically created copies of a
template
object. Typically, you use a series object to create a set of entities with identical, or at least very similar, characteristics, such as the bars in a chart. A series object consists of a template, a
factor
indicating the number of copies, a path along which to arrange them, and a set of generated instances.
Select an object to use as a template.
Select Object , Properties to set the attributes of the template object so that its instances will inherit appropriate characteristics. Name the object.
Select Object, Create , then select Line Series or Path Series to create the instance objects.
Click on two points to define a line path for a Line Series, on which to arrange the series instances. For a Path Series, define a transformation to be used for replicating instances.
Enter a factor to specify the number of instances to create.
When you create a series object, the Builder names the instances using the template object name and an index; for example, a template named Rect with a factor of 3 creates three instances named Rect0 , Rect1 , and Rect2 .
To edit the template object, use Traverse , Hierarchy Down . When you finish editing, use Traverse , Up to see the instance objects.
A square series is a special type of series object, which presents the instances of its template in rows and columns. The number of rows and columns in the square series determines the number of instances in the series. A square series object consists of a template and a set of generated instances.
Select an object to use as a template.
Select Object , Properties to set the attributes of the template object so that its instances will inherit appropriate characteristics. Name the object.
Select Object , Create , Square Series to create the instance objects.
Click on the center point for the square series, and click on two points to define two vectors from the first point; they specify the arrangement of the series instances.
When prompted, enter the number of rows, then the number of columns. These values specify the number of instances to create.
When you create a square series object, the Builder names the instances using the template object name and an index. The names are ordered in a simple sequence, even though there are two dimensions to the series. For example, a template named Rect with two rows and two columns creates four instances named Rect0 , Rect1 , Rect2 , and Rect3 .
To edit the template object, use Traverse , Hierarchy Down . When you finish editing, use Traverse , Up to see the instance objects.
A polyline is a specialized series that can be used to draw line graphs. Like a series object, a polyline consists of templates and a set of instances. For the polyline, the instances are the line and the markers at each point of the line. A polyline can rendered as a single polygon or as a collection of individual segments, depending on the value of the Segments attribute.
To create a polyline, click on two points to define the beginning and end of the polyline. The Builder prompts you for the factor, which controls the number of data points along the line.
By default, the polyline has Marker and Polygon resources that contain the template marker object and the template polygon from which the line segment characteristics are derived. If the DrawMarkers and Segments attributes are turned on, two groups, Markers and Polygons , appear among the resources of the polyline. These contain the instances of the template objects.
In order to control a polyline, you must name the control point of the template marker. Use Traverse, Hierarchy Down to edit the marker template. This creates a third group of resources within the polyline, called Points , which contains the instances of the marker control point. The coordinates of these points control the position of the polyline's points.
A polysurface is a specialized three-dimensional object that can be used to anchor a set of objects along its surfaces. It is used primarily for patching of curved surfaces. Like a square series object, a polysurface consists of a template and a set of instances; for the poly-surface, the instances are polygons arranged in rows and columns.
To create a polysurface, click on a point to define the center of the polysurface, and click on two points to define two vectors from the center point. The Builder prompts you for the number of rows and columns in the surface; these values control the number of surface polygons.
By default, the polysurface has a Marker , and a Polygon resource, that contain the template marker object and the template polygon from which the instance polygons' characteristics are derived. You only see the instances of the polysurface templates if those objects are named. The template objects of a polysurface are named by default. If the objects are named, two groups, Markers and Polygons , appear among the resources of the polysurface. These contain the instances of the template objects.
In order to control a polysurface, the control point of the template marker must also be named. The default name is Point . Use Traverse, Hierarchy Down to edit the marker template if you want to change its name or other characteristics. The instances of the marker control point are found in a third group of resources within the polysurface, called Points . The coordinates of these points control the position of the polysurface's points.
A frame object organizes other objects in a specified arrangement. The points on the frame act as anchors, so other objects can be constrained to them. These are the frame points . There are five frame types:
Point Frame allows anchoring to a single point. Click once to define the point.
Line Frame allows anchoring to points along a line. Click twice to define the start and end of the line. The Builder prompts you for the factor, which controls the number of anchor points along the line frame.
2D Frame allows anchoring to points inside a parallelogram defined by three control points. Click on a point, and click on two points to define two vectors from the first point. The Builder prompts you for the factor, which controls the number of anchor points on each segment of the frame.
3D Frame allowing anchoring to points inside a parallel prism defined by four control points. Click on the center point, and click three times to define three vectors for the axes of the frame. The Builder prompts you for the factor, which controls the number of anchor points on each dimension of the frame.
Free Frame allows anchoring of points to a free-form polygon. Click on each point in the polygon, and click the right mouse button to finish drawing.
Because the control points of the frame coincide with the anchor points, use Options , Show Frame Points to get access to the anchor points of the frame. You can move the anchor points of the frame by moving its control points.
A reference is similar to a series object with a template and a single copy (instance) of that template. There are two types of reference objects that are used to implement two completely different types of functionalities:
A
Container
reference object is used to hold a template and preserves the template's coordinate system when the container is moved. This may be used to preserve the center of rotational dynamics when the object is moved. The container draws its template directly, without creating any additional instances of it.
An
object reference
(
Reference
) is used to replicate a template in different locations in the drawing, as well as implement object dynamics, changing the object that gets displayed. One important feature of the reference is that a copy of it refers back to the same template used by the original reference. This is useful when constructing drawings that contain many copies of a single object used as a sub-drawing or a model. By using the reference, you can make a drawing file smaller than it might be otherwise, since only one copy of the template is saved. You can also edit a template in one place to change all of its copies in the drawing.
A
file reference
(
Subdrawing
) is used to replicate instances of another drawing. By using the reference object, you can make a drawing file smaller and load faster. You can also edit one referenced drawing to change all of its copies in the drawing.
A palette reference is similar to the object and file reference objects, but uses a palette embedded in the drawing as its template.
Select an object to use as a template.
Select Object , Properties to set the attributes of the template object so that its instance will inherit the appropriate characteristics. Name the object.
Click on the
button, or select
Object
,
Create
,
Container
menu option to place the selected object in a container, then click in the drawing to define the container's position.
To create an object reference:
Select an object to use as a template.
Select Object , Properties to set the attributes of the template object so that its instance will inherit the appropriate characteristics. Name the object.
Click on the
button, or select
Object
,
Create
,
Reference, Object Reference
menu option, then click in the drawing to select reference's anchor point.
If the template contains several named objects used as icons for object dynamics, enter two colon-separated resource paths, to one of the objects ( ObjectPath ) and its anchor point ( OriginPath ), and press OK . To display the whole template, press OK without entering ObjectPath .
Click on the
button, or select
Object
,
Create
,
Reference, File Reference
menu option, then click in the drawing to define the subdrawing's position.
Select the drawing file to use. This drawing may contain $Widget or $Drawing resource to specify the object in the drawing to be used as a template.
If the drawing contains several named objects used as icons for object dynamics, enter two colon-separated resource paths, to one of the objects ( ObjectPath ) and its anchor point ( OriginPath ), and press OK . To display the whole template drawing, press OK without entering ObjectPath .
To create a palette reference:
Select Object , Create , Reference, Palette Reference and click in the drawing to define the reference object's position.
If the palette contains several named objects used as icons for object dynamics, enter two colon-separated resource paths, to one of the objects ( ObjectPath ) and its anchor point ( OriginPath ), and press OK . To display the whole palette, press OK without entering ObjectPath .
Edit reference object's properties and enter palette object's resource path in the SourcePath attribute.
When you create a reference object, the Builder places it at the current level of the hierarchy. There are two resources within the reference. The first one, called Instance , is a copy of the original template (or of it's subobject if ObjectPath is defined) and is also visible in the resource hierarchy under its original name. The second resource, called Template , is the original template object. For containers, the template is drawn directly and both objects refer to the template. For file references, the Template refers to a loaded instance of the subdrawing. This instance is cached and is used by all instances of the subdrawing.
You can use a reference to create a set of objects that refer to the same template, but can be positioned independently. To create additional referenced instances, select and copy the first reference object, positioning created copies as desired. All copies will share the same template object. Reference's bindings may be used to assign local values and change behavior of attributes of a particular instance.
When you copy a container, each copy will store its own copy of the template.
If reference objects are used to represent connected nodes, the reference's control point may be used for constraining connecting lines that represent edges.
To edit the template object, use Traverse, Hierarchy Down . When finished, use Traverse, Up to go back to the top level.
This option creates a connector object which may be used to connect other objects in the drawing. It is useful when implementing node and edge functionality or connecting objects in a diagram.
There are two types of connectors:
A Recta-Linear connector connects objects with linear segments, maintaining right angles between adjacent segments. There are Horizontal
and Vertical
recta-linear connectors.
An arc connector connects objects with an arc
.
To create a connector, select the connector type, then click in the drawing to define its shape. For the arc connector, select 3 points to define the arc. For the recta-linear connector, select any number of points to define one or more recta-linear segments and press the Esc key or the middle mouse button to finish.
This option activates the Edit Toolbox for fast access to the selected objects' properties. Refer to Edit Toolbox on page 166 for more information.
Properties displays a dialog that lists the attributes of the selected object and provides access to their transformations, alarms and tags. Note that, within the context of the GLG Toolkit, properties and attributes are synonymous.
The generic properties common for all GLG objects, such as object name or HasResources, are displayed at the top of the dialog, and the properties that depend on the type of an object are listed below. For explanations of the generic object properties and attributes of specific object types, see GLG Objects.
The buttons at the bottom of the dialog provide access to adding and editing geometrical dynamics attached to the object, such as move, scale or rotate. The Custom Props button at the top of the dialog provides a shortcut for accessing custom properties attached to the object. The selection buttons in the top right corner of the dialog may be used to rotate selection in case when several objects are selected by the mouse.
When you select an object and then use Object , Properties , the Builder displays a dialog that shows the properties (attributes) of the object.
For attributes that are also objects, the
Selected Object Properties
dialog presents an ellipsis button
that lets you edit the attribute interactively. Clicking on the ellipsis button displays the
Attribute Object
dialog; see below. If an attribute has dynamics, alarms or tags attached, the `X', `A' and/or `T' buttons will be displayed on the right side of the attribute row to provide a quick access to the corresponding transformation, alarm or tag object.
For attributes that are not objects in themselves, the Builder does not present a separate dialog. Such attributes include the Name , the HasResources flag, and the Global attribute.
The contents of the dialog depend on the type of the object (e.g. polygon, group, polyline). Here are some of the object-specific features of the Selected Object Properties dialogs:
For all graphical primitives (such as polygon or text objects) and the viewport object, the Add/Edit Rendering button can be used to add and edit rendering attributes of an object, such as gradient or shadows.
For text objects, the Add/Edit Text Box can be used to add a box around the text and edit its attributes.
For a group object, the dialog includes a set of buttons that give you access to the members of the group without exploding the group. These buttons act as equivalents to the Traverse Menu options Select Next , Select Bottom , and Edit All and the Arrange Menu options Add Object to Group and Remove Object from Group .
For a viewport object, the More button provides an access to the attributes of the screen object, which can be thought of as a second set of attributes for the viewport object. Click on the Back button to return to the viewport properties. See page 260 for information on font handling for a viewport. The Add/Edit Light button adds a light object and lists its attributes.
For a screen object, the Add/Edit Fonttable button allows to define a custom font table and edit its list of fonts. The Add/Edit Colortable button allows to add and edit attributes of a custom colortable.
For the font table, the Save Font Table and Load Font Table buttons save or load the fonttable object from a file. The Mark Font Table button marks the font table for reuse, while the Use Marked Table button replaces the fonttable with the marked fonttable. The Options, Attribute Clone Type menu controls constraining of the marked fonttable attributes.
For rendering and box attributes, as well as fonttable, colortable and light objects, the Delete button at the bottom of the attribute list deletes the object. The Mark button at the top of the Properties dialog stores the object for reuse with the Edit, Add Marked Object menu option.
Some objects are both attributes and objects. For these objects, the
Selected Object Properties
dialog for the object includes ellipsis buttons
that let you edit the attribute objects. Clicking on the button displays the
Attribute Object
dialog for the attribute.
The Attribute Object dialog displays the following attributes:
The HasResources attribute, which control the position of the attribute's attributes in the resource hierarchy.
The Global attribute, which controls the behavior of the attribute during cloning. This attribute changes its label depending on its current setting; the default label is Local .
A list of values or a palette for setting the value of the attribute. For text strings, it also contains a text editor field for entering multi-line text.
A set of buttons on the right of the palette for manipulating the attribute object, which are grayed if they are not relevant to the attribute. The Add/Edit Alarm button at the bottom can be used to add or edit an alarm to monitor the value of the attribute.
A Value entry field for changing the attribute's value. The value is a double-precision number for D attributes, a triplet of numbers for G attributes, and a text string for S attributes. If the text attribute contains a multi-line string, the Value field is read-only and the text editor field should be used to edit the string.
An XfValue field showing the final transformed value after any transformations attached to the attribute are applied.
The Dynamics buttons at the bottom of the Attribute Object dialog provide the only method of attaching a transformation to the attribute. The Add/Edit Tag button at the top of the dialog can be used to add a tag for database connectivity.
You edit a control point's attributes by Shift+clicking over the point. The Control Point dialog is similar to the Attribute Object dialog. However, it includes a set of arrow buttons for positioning the point, and a Position text entry box showing the position of the control point after all transformations have been applied. This field may also be used for setting its position using different coordinate systems. You can reposition the point by typing in the Value or Position text entry box, or clicking on the arrow buttons.
Public Properties display user-defined public properties of an object. Public properties are used to create components that may be easily edited in the GLG HMI Configurator. The OEM version of the GLG Graphics Builder is used to define an object's public properties. In the non-OEM Builder, the Public Properties menu option can be used to browse public properties of an object.
The Public Properties dialog displays public properties in a way similar to the way attributes are displayed in the Properties dialog. The only difference is the absence of the `X' button for the public properties that have dynamics attached. Instead, the `x' character is displayed in the property's ellipsis button
to indicate the presence of a transformation attached to the object. A scrollbar to scroll the list of properties is automatically activated if required.
Each property has an ellipsis button
that brings the
Property Object
dialog for editing the property. The Property Object dialog is the same as the Attribute Object dialog described in the previous section.
Resources displays a Resource Browser that shows resources of the selected object. If no object is selected, resources of the whole drawing (at the current level of the hierarchy) are shown. Selecting a different object updates the Resource Browser to display the object's resources.
For a discussion of the basics of object resources, see Structure of a GLG Drawing.
The Resource Browser dialog lists resources of the drawing. Clicking on any resource entry activates dialogs for editing attributes of the selected resource.
All resources are organized hierarchically, in a way similar to a file and directory structure. You can navigate between the levels by double-clicking on the entries.
Composite resources that contain other resources are annotated with the >> suffix after a resource name. Double-clicking on such a resource enters another level of hierarchy, listing all resources inside the selected composite resource.
The following special entries may also be present in the Resource Browser dialog and may be used for navigation:
/ represents the top level viewport (Drawing Area of the Builder).
. represents the object which is currently selected in the Builder (if any).
~ represents the viewport with the editing focus, if it is different from the Drawing Area.
.. represents the previous level (relatively to the currently selected resource).
The resource browser also provides three toggles which can be used to control what resources are displayed in the browser: named resources , default resources , aliases or any combination of them. By default, all three resource categories are displayed.
For a discussion of the basics of object resources, see Structure of a GLG Drawing.
Tags brings a Tag Browser that shows a list of tags of the selected object, or of the whole drawing if no object is selected. Selecting a different object updates the Tag Browser to display the object's tags.
The Tag Browser dialog displays a list of tags defined in the drawing or the selected object. Tags are global and have a flat hierarchy, therefore all tags of either the whole drawing or the selected object will be listed in the tag browser. Each tag entry shows the tag's TagName and TagSource attributes separated by the `/' character.
Tags are attached to the data resources to enable an application to access data via tags. When a tag entry in the tag browser is selected with the mouse, two dialogs are displayed: one to edit the attributes of the tag object and another to edit the resource object the tag is attached to.
The Sort by toggle of the tag browser may be used to sort the tags by the value of their TagName or TagSource attributes. The Filter field may be used to display only a subset of tags matching a regular expression that may contain the ? (any character) and * (any sequence of characters) wild cards. The regular expression will be applied to either the tag names or tag sources as controlled by the Source/Names toggle on the right side of the Filter field. The toggle also controls the Selection field, allowing the user to select a tag by typing its TagName or TagSource.
The Display Both/One toggle switches the view to display both the TagName and TagSource, or just one of them based on the current sorting setting. If tags are sorted by the tag name, the TagName is shown in the Display One mode. If tags are sorted by the tag source, the TagSource is displayed.
The Unique Tag Sources/Names toggle controls the display of tags with identical tag sources (when sorting by tag sources) or tag names (when sorting by tag names). By default, the toggle is unchecked and all instances of tags with the same tag source or tag name will be displayed in the tag browser. If the toggle is checked, only the first instances of tags with the same tag source or tag name will be displayed.
To add a tag, click on the Add Tag button in the Attribute Object or Resource Object dialog. To delete a tag, click on the Delete button in the Data Tag dialog.
For a discussion of the basics of attribute tags, see Tags for Database Connectivity on page 29 and Tag-Based Data Access and Database Connectivity on page 127.
Alarms opens an AlarmBrowser that shows a list of alarms attached to the selected object or all alarms of the whole drawing if no object is selected. Selecting a different object updates the Alarm Browser to display the object's alarms.
The Alarm Browser dialog displays a list of alarms attached to the attributes of the selected object to monitor their values. If no object is selected, all alarms defined in the whole drawing will be displayed. Each alarm entry shows the alarm's AlarmLabel attribute.
Alarms are attached to object attributes to monitor their values. When an alarm entry in the alarm browser is selected with the mouse, two dialogs are displayed: one to edit the attributes of the alarm object and another to edit the attribute the alarm is attached to.
The Filter field may be used to display only a subset of alarms whose AlarmLabel matches a regular expression that may contain the ? (any character) and * (any sequence of characters) wild cards. The Selection field may be used to select an alarm by typing its AlarmLabel.
For a discussion of the basics of attribute alarms, see Alarms on page 37 and Integrated Alarms for Value Monitoring on page 130.
Add Dynamics adds geometrical dynamics (such as move, scale or rotate) to the selected object. The dynamics are attached in the form of a dynamic transformation.
For an explanation of the difference between "static" and "dynamic" and a description of the possible transformations, see GLG Objects.
You can animate a drawing by attaching a dynamic transformation to a named object, and naming the factor for the transformation. (This value, called Variable Name in the Add Dynamics dialog, is called Factor in the Edit Dynamics dialog.) When you use Run , Start to execute the animation, specify the named factor in the command line; see page 280.
To add dynamics to object attributes (such as visibility or color dynamics), use the Add Dynamics button of the Attribute Object dialog. Refer to Adding Attribute Dynamics on page 178 for details.
The Add Dynamics dialog lets you define a parametrical (dynamic) transformation to attach to the selected object.
To specify the transformation, use the Transformation Type option, which lists the geometrical transformations. See GLG Objects for specifications of these transformations. When you select a transformation, the content of the dialog changes, providing appropriate text entry boxes and buttons for defining the transformation.
To switch from defining a dynamic transformation to transforming points or defining a static transformation, use the Action option.
Some of the text entry boxes are paired with buttons; for these values, you can specify these values by typing values or by clicking with the mouse. Clicking on a button and then in the drawing area records the mouse position in the corresponding text entry box. For example, clicking on the Distance X In Drawing button and clicking on two points in the drawing calculates and records the distance between the points in the X direction. When using buttons for defining transformation's geometry in the drawing, notice the prompt at the bottom of the drawing area that provides information on the number of points to select with the mouse.
For most transformations, a Reverse button provides a way to reverse a transformation by inverting its parameters.
Use the Variable Name text entry box to name the controlling factor of the dynamic transformation. The range parameters may be used to map the range of the input data to the range of the required change of the transformation's factor.
For the Path transformation, the dialog provides several ways of defining the path points. The Points In Drawing button can be used to define the path points with the mouse. Use Polygon Points uses points of a polygon selected with the mouse. Constrain To Polygon constrains points of the path to the points of the selected polygon; if polygon's points change their position, the path changes accordingly. However, adding or deleting points from the polygon after using the Constrain To Polygon button does not affect the path. Finally, Select Path can be used to select the path object ID, so that adding or deleting points from the object is reflected in the path. Select Path can also be used to use objects other than polygons, such as arcs, connectors or splines.
For the Use Marked transformation type option, the dialog provides the Clone Type option that controls if the parameters of the added transformation copy are constrained to the corresponding parameters of the original transformation.
Use the Apply button when you have finished specifying the transformation.
Edit Dynamics lets you change the values of a dynamic transformation.
This option is equivalent to selecting the Edit Dynamics button from the Properties dialog. It is grayed when the selected object has no dynamic transformations.
The Edit Dynamics dialog lets you change parameters of dynamic transformations attached to the object, change their order and delete selected transformations from any position in the list.
A list of transformations attached to the object is displayed on the left side of the dialog. Selecting a transformation in the list displays its properties.
For stock transformations, the attributes are listed in the dialog. For predefined transformations, their public properties are listed. The attributes are listed in the dialog the same way as in the Properties dialog described on page 267. The public properties are listed the same way as in the Public Properties dialog described on page 269.
Each attribute or property row has an ellipsis button
that provides access to editing the attribute or property, as well as adding tags, alarms and second-level transformations to it. For convenience of editing, the dialog also lists a name of each attribute or public property.
The Up and Down buttons on the right of the transformation list allow the user to change the order of the transformations by moving the selected transformation up or down the list. The Mark Object and Mark List buttons may be used to mark the dynamics for reuse. The Mark Object button marks the selected transformation, while Mark List marks the whole list in case if it has more than one transformation. To reuse the marked dynamics, use the Use Marked option when adding dynamics to an object.
The Back button may be used to return from recursive editing of the second-level transformations attached to the attributes of the main transformation.
The Delete Dynamics submenu provides options to let you remove static or dynamic transformations from the object or it's subobjects.
This option is grayed when neither the selected object no its subobjects have transformations attached.
Delete Object's Transformation removes either the first or last transformation in the list from the selected object. If you are using the object's coordinates to view the drawing (see page 243), the last transformation in the list is deleted. Otherwise, the first transformation in the list is deleted. Note that this order applies even if the Edit Dynamics dialog is open and a different transformation is selected.
Transform Points changes the coordinates of the control points of the selected object.
Transforming an object's points changes the object permanently by changing the coordinates that define its points. This kind of transformation is not saved as part of the object, but is applied immediately. Therefore, it will not appear in the object's transformation list.
If the object's MoveMode is set to STICKY MODE, this operation also changes the control points of any geometrical transformations attached to the object. If the object's
MoveMode
is set to
MOVE BY XFORM, the operation adds a static transformation to the object instead of changing its coordinates, see page 48.
The Transform Points dialog lets you define the transformation to apply to the selected object's points. Keep in mind that transforming an object's points irrevocably changes the object; such a transformation cannot be edited or deleted.
To specify the transformation, use the Transformation Type option, which lists the transformations for geometric data. See GLG Objects for specifications of these transformations. When you select a transformation, the content of the dialog changes, providing appropriate text entry boxes and buttons for defining the transformation, which are the same as in the Add Dynamics dialog described on page 271.
To switch from transforming points to defining a static or dynamic transformation, use the Action option.
For most transformations, a Reverse button provides a way to "undo" a transformation. It inverts the parameters of the last transformation you applied, which has the effect of restoring the object to its untransformed state when the inverse transformation is applied.
The Variable Name , InLow , InHigh , OutLow , and OutHigh options are not available; these options apply only to dynamic transformations.
Use the Apply button when you have finished specifying the transformation.
Add Static Transformation creates and applies a matrix (static) transformation to the selected object. The transformation is saved as part of the object. You can delete a static transformation using Object , Delete Dynamics ; see page 272.
A matrix transformation cannot be edited directly. If several matrix transformations are applied, they are merged in a single matrix transformation that has a combined effect of all applied matrix transformations. Therefore, the only way to change a matrix transformation is to modify its matrix by applying another matrix transformation.
To see the object without transformations, use Traverse , Transformation Down ; see page 245. For an explanation of the difference between "static" and "dynamic" and a description of the possible transformations, see GLG Objects.
The Matrix Transformation dialog lets you define a matrix (static) transformation to attach to the selected object. Keep in mind that a matrix transformation cannot be edited directly.
To specify the transformation, use the Transformation Type option, which lists the transformations for geometric data. See GLG Objects for specifications of these transformations. When you select a transformation, the content of the dialog changes, providing appropriate text entry boxes and buttons for defining the transformation, which are the same as in the Add Dynamics dialog described on page 271.
To switch from defining a static transformation to transforming points or defining a dynamic transformation, use the Action option.
For most of the transformations, a Reverse button provides a way to "undo" a transformation. It inverts the parameters of the last transformation you applied, which has the effect of negating the effect of the previously applied static transformation when the inverted transformation is applied.
The Variable Name , InLow , InHigh , OutLow , and OutHigh options are not available; these options apply only to dynamic transformations.
Use the Apply button when you have finished specifying the transformation.
Add Tooltip creates a custom property of the string (S) type named TooltipString, attaches it to the selected object and displays a Custom Properties dialog for entering the tooltip string. The selected object must have HasResources set to YES in order for the tooltip to be added. To activate tooltip processing, set the ProcessMouse attribute of the viewport containing the object to Move & Click. The Run mode of the Builder may be used to test the tooltips.
Add MouseClick Event creates a custom property of the string (S) type named MouseClickEvent, attaches it to the selected object and displays a Custom Properties dialog for entering the custom event's label. The selected object must have HasResources set to YES in order to add the event. To activate mouse click event processing, set the ProcessMouse attribute of the viewport containing the object to Click or Move & Click.
The program will receive a custom MouseClick event every time the object or any of its sub-objects is clicked on with the mouse button. The program will also receive an event when the mouse button is released. See Handling Input Events of the GLG Programming Reference Manual for more information on processing custom events in the program.
Add MouseOver Event creates a custom property of the string (S) type named MouseOverEvent, attaches it to the selected object and displays a Custom Properties dialog for entering the custom event's label. The selected object must have HasResources set to YES in order to add the event. To activate mouse over event processing, set the ProcessMouse attribute of the viewport containing the object to Move & Click.
The program will receive a custom MouseOver event every time the mouse moves over the object or any of its sub-objects. The program will also receive an event when the mouse moves away from the object. See Handling Input Events of the GLG Programming Reference Manual for more information on processing custom events in the program.
Edit/Delete Tooltip Or Event activates the dialog for editing custom properties attached to the object and may be used to edit or delete tooltip or custom event properties.
Add Custom Property attaches a custom property to an object. Custom properties are saved with the drawing and may be used to associate application-specific data with objects. Custom properties other then data may be attached to objects programmatically using the Extended API.
The presence of custom properties is indicated by the Data indicator in the Status Panel when an object with custom properties is selected.
To change the names and value of custom properties, select the object to which the custom property is attached and use Object , Edit Properties , or display the object's Properties dialog and click on the Custom Props button.
Creates a list of custom properties containing a single D data property and adds the list into the objects' list of custom properties. This is different from simply adding a custom property of a D type: selecting Add D List creates a list of lists. The new list entry appears as an " Unnamed >>" in the list of object's custom properties. The " >> " symbols indicate that the list can be opened for editing by double-clicking on it with the left mouse button. When the list is opened, it can be given a name and its content can be edited as well. To add more D properties to the list, press the Add button at the bottom of the list dialog. To edit lists' elements, select an element and edit it using the displayed Attribute Object dialog. To get back to the object's custom properties list, double-click on the " .. " entry.
Adds a marked list of custom properties to object's custom property list. This is different from Add Marked Properties below which adds all properties of the list, but not the list itself. A custom property list may be marked by pressing the Mark List button in the list editing dialog.
Edit Custom Properties lets you change the names and values of custom properties associated with the object, as well as delete selected custom properties from a list.
When you use the Edit Custom Properties option, the Builder displays a list of custom properties attached to the object. Selecting a property in the list brings up the Attribute dialog for editing it.
The List Name field can be used to name the custom property list. The HasResources toggle controls the corresponding flag of the list, which may be used to make the named properties of the list to appear as resources of the list instead of resources of the object the list is attached to. The Mark List buttons marks the list for reuse with the Object, Custom Properties, Add Marked List menu option.
The ">>" suffix is displayed if a property itself is a list that contains other properties. Double-click on such property opens it for editing and displays a list of properties it contains. When editing such list property, List Name, HasResources and Mark List control the attributes of the list property instead of the attributes of the object's custom property list.
NOTE: Programmatically attached custom properties other then data properties can't be edited in the Builder.
Delete All Aliases destroys all custom properties attached to the object. The Delete button of the Edit Custom Properties dialog may be used to delete individual properties.
Adds custom properties marked with Mark Custom Properties to the custom property list of the selected object.
Add Alias creates an alias object.
An alias object provides a way to assign logical names to arbitrary resource hierarchies. The resource can then be accessed using the alias instead of the hierarchical resource path.
An alias object is not visible and does not appear in the drawing. Its presence is indicated by the Alias indicator in the Status Panel when an object with aliases is selected.
To change the attributes of an alias, select the object to which the alias is attached and use Object , Edit Aliases .
Edit Aliases lets you change the attributes of an alias after it has been added, as well as delete selected alias from a list.
When the
Edit Alias
option is used, the Builder displays a list of aliases attached to the object. Selecting an alias in the list shows its parameters. The
Alias
parameter specifies the logical name to use, and the
Path
parameter specifies the resource path. The ellipsis button
next to
Path
activates the Resource Browser for selecting the resource.
Delete All Aliases destroys all aliases attached to the object. The Delete button of the Edit Aliases dialog may be used to delete individual alias objects from a list.
Add History creates a history object.
A history object provides a way to animate resources that use numbers in their names, providing sequential access to each resource. History objects can be used with any set of named resources with a numeric series in the name; for example, with a series object or with a set of rectangles named Rectangle0 , Rectangle1 , and Rectangle2 .
A history object is not visible; it does not appear in the drawing and only appears in the resource hierarchy if you explicitly name it. Its presence is generally indicated by a resource named EntryPoint in the resource hierarchy and by the History indicator in the Status Panel when the object is selected. To animate the object containing the history object, you provide input data to the EntryPoint resource.
To change the behavior of a history object, select the object that is the parent of the EntryPoint and use Object , Edit History .
The Add History dialog lets you specify the resource to animate. It prompts you to enter the name of the resource.
Specify the constant part of the name, substituting a percent sign (%) for the variable part of the name. You can specify a "path" to a child object, using forward slashes (/) as you would in a UNIX path specification.
For example, for a series named S with a template named Triangle , the instances are named Triangle0 , Triangle1 , Triangle2 , and Triangle3 . To animate the fill color, select S and use Object , Add History . In the Add History dialog, specify Triangle% / FillColor in the Resource Name text entry box. The resulting EntryPoint object is defined at the same level as the Triangle object ( $Widget/S/EntryPoint ).
Edit History lets you change the attributes of a history object, as well as delete selected history objects from the list of attached history objects.
When you use the Edit History option, the Builder prompts you with a list of history objects, similar to the transformation list. Selecting a history object in the list shows its attributes, so you can edit them.
Delete All Histories destroys all attached history objects. The Delete button of the Edit History dialog may be used to delete individual history objects from the list.
If you explode an object with a history object, the group that remains after exploding it retains the history object. Exploding that group discards the history object.
The Run Menu provides options to let you test the animation of drawings. The simplest way to test a drawing is by using the test data generated by the GLG datagen program.
Start invokes a process to animate a drawing. The process executes the command or commands given it in the dialog presented when you select Start . The default animation program is $datagen , a test program that is part of the GLG Toolkit; see GLG Programming Tools and Utilities.
To animate a drawing, use Run , Start , specifying a named resource as part of the command.
For example, to animate an object named valve1 with a dynamic transformation that has a named factor (variable name) of rotate , use this command line:
$datagen -sin d 0 1 valve1/rotateThe $datagen is a GLG shortcut that prevents the initiation of another process and uses an internal data generator. See The Data Generation Utility of GLG Programming Tools and Utilities for more information on data generation options.
If no command is given the run process, or if an error is encountered when trying to execute the command, the Builder searches the drawing for a string resource called "$DatagenString" , and uses it as a run command.
When a new drawing containing "$DatagenString" resource is loaded, the resource value is used to initialize the animation command. The Store Run Command option may be used to store the current animation command in the existing "$DatagenString" resource of the drawing.
While a drawing is running, many of the Builder's menu options and buttons become unavailable. To terminate the animation, use Run , Stop .
Stop halts the animation of a drawing, killing the process started with the Start command.
To restore the original appearance of the drawing, use File , Reset Drawing .
Restore Values on Stop controls the behavior of the data generator. If the option is checked, the resource values animated with the data generator will be restored to the values they had before animation started.
This option does not restore the state of the graph's history: reset the drawing using File, Reset to reset the graphs.
Store Run Command stores the current animation command in the existing "$DatagenString" resource of the drawing. The value of the resource is used to initialize the default animation command when a drawing containing "$DatagenString" resource is loaded.
To create a "$DatagenString" resource in the drawing, create a text object outside of the widget at the top of the drawing hierarchy, and name it's String resource "$DatagenString".
The Options Menu provides options to let you customize the operation of the Builder. The glg_config Builder configuration file can be used to specify default values of various options.
The Draw Grid submenu provides options to let you display grid lines with a drawing. The grid is displayed at a selected grid interval in the GLG world coordinates. In addition to the constant grid spacing options, two adaptive options are provided. The Adaptive (Constant Space) option automatically selects a grid interval to maintain approximately constant visual grid spacing, while Adaptive (Constant Number) maintains a constant number of grid lines. The Custom option allows the user to specify a custom grid interval in world coordinates. To disable grid, use the No Grid option.
The grid is not saved as part of the drawing. It is just a convenience for editing a drawing. To save the grid as part of the drawing, specifying a value for the viewport's GridValue attribute.
To position objects relative to the grid, use Options , Snap To , Grid .
The Snap To submenu provides options to let you align objects. Snapping places objects by rounding their coordinates as you draw them.
The options on the Snap To submenu specify the resolution of the alignment grid in the GLG world coordinates. If you specify Snap to Grid , the Builder snaps to the grid and also to the midpoints of the grid. The 0 (No snapping) option is used to disable snapping, and 1 (Round to integer) option is used to get rid of the fractional coordinate values, which is almost the same as no snapping, but with integer coordinates. The Custom option allows the user to specify a custom rounding value.
The Snap To submenu only affects the placement of points and objects with the mouse. Other means of specifying points, such as entering coordinate values or using existing values, are not affected by the Snap To option.
Show Axis shows or hides the axis icon. The axis icon indicates the center and orientation of the current view and coordinate system.
To change the view projection and the coordinate system used to view the drawing, use the options on the View menu.
Show Coordinates shows or hides the mouse coordinate display window in the lower right corner of the Builder. Both the screen (S) and world (W) coordinates in the selected coordinate system are displayed. To change coordinate system, use View, Coordinate System.
Save Format determines the format the Builder uses to save a drawing to a file. The Builder can save files in three different formats:
Binary, which loads quickly but is not portable across platforms that use different binary data representations.
ASCII, which is completely portable across platforms, but loads slightly slower than binary.
Extended, which is portable across platforms and across versions of the Builder, but loads most slowly. This format is used only to import drawings to the older versions of the Toolkit and is available only in the Enterprise Edition of the Graphics Builder.
The default format for the saved drawing is ASCII. This is the recommended format that works not only across all hardware platforms, but also binary and Java applications.
Save Compressed enables or disables saved drawing compression. When the drawing compression is enabled, drawings are saved using gzip-compression. The saved file extension is not changed when the drawing is saved compressed. This option controls only saving operations: on loading, the drawing format is recognized and handled automatically. The editor can also load drawings compressed outside of the editor using gzip utility.
The default is Save Compressed. Disable the drawing compression if the drawing will be used for code generation.
Disable Dynamics For Editing disables geometrical dynamics (such as move, scale or rotate) when the object is selected. When the option is set, the object will appear in its untransformed state with dynamics disabled. This is convenient for editing such objects as needles of dial controls, so that the editing is performed in the object's initial state, with the needle pointing along the X axis. This makes it easier to stretch the object in X or Y direction, as well as enter coordinate values or use snapping to the grid.
The option disables only the geometrical dynamics attached to the object. It does not disable dynamics attached to the object's control points.
Selection Display toggles between three modes of displaying the selection:
Resize and Reshape displays both the object's resize box and the object's control points. This is the default mode.
Reshape shows only the control points.
Resize shows only the resize box points. This mode may be used to speed up editing groups with a lot of control points.
The Control Points Display toggles between three modes for displaying control points:
Object's points display only control points of drawable objects (polygons, circles, etc.).
Object's and dynamics' points display control points of drawable objects and control points of dynamics ( Start and End Points , Rotate and Scale Centers , etc.). This option helps to visualize dynamics attached to objects.
Object's, dynamics' and point dynamics' points is similar to Object's and dynamics' points, but also displays control points of dynamics attached to the control points.
This option controls the reference resizing modes when the reference object is stretched using the resize box:
Resize Box mode resizes relative to the box. This is the general way objects are resized.
Around Point mode uses the control point of the reference object as the center of scaling, making sure the control point position does not change when the reference is resized. This may be used to resize reference objects used as nodes: the node will resize without changing the position of its attachment point.
For a selected frame object, Show Frame Points toggles between its control points and its frame points. Only one of the two sets of points is available to be selected at any time, because several of these points may coincide on a frame (all of them for a free frame or a point frame).
This option also affects the recta-linear connector object, displaying the control or constrained points.
If you want to move or resize a frame or connector object, use their control points. If you need to constrain other objects to the frame or to the middle point of a recta-linear path, they should be constrained to the constrained points.
Swap Color Palettes toggles the displayed color palette between the default color palette and custom color palette.
Refer to Custom Color Palette on page 217 for information on defining a custom color palette.
255 Color Display toggles the range of the color RGB values between the default [0;1] range and the [0;255] range familiar to the Windows users. The color display range changes only the color RGB display in the Builder. The run-time color RGB values and the values saved in the drawing still use the default [0;1] range.
Full Display of Predefined Dynamics controls the way predefined dynamics are displayed. If the option is not checked (default), the Edit Dynamics dialog displays public properties of predefined dynamics for convenient editing. If the option is checked, the dialog displays all attributes of the dynamics for advanced editing.
Show Predefined Dynamics First controls the choices of dynamics presented in the attribute dynamics menu. If the option is checked (default), the predefined dynamics options are shown first to provide intuitive attribute dynamics, and stock dynamics are shown when the More button is pressed. If the option is unchecked, the stock dynamics options are shown first.
Attribute Clone Type defines the clone type to use when multiple copies of an attribute object are added. For example, when a Rendering object is added to all objects in a group using the group's Edit All option with the default Constrained Clone setting of the clone type, all attributes of rendering objects attached to objects in the group will be constrained. If a rendering attribute of one object is changed, all objects will change. If the clone type is set to Full Clone, each object will have its own, unconstrained copy of the rendering attributes. If the clone type is changed to Strong Clone, all attributes that are Global or SemiGlobal will be constrained to the corresponding attributes of the original Rendering object.
Attribute Clone Type controls adding Rendering, Box Attributes, Light, Font Table and Color Table objects to all objects in a group using the Edit All option. It also controls constraining of attributes of an attribute transformation when the attribute the transformation is attached to is unconstrained. If the clone type is set to Constrained Clone, the attribute itself will be unconstrained, but the attributes of the transformation attached to it will still be constrained. The Attribute Clone Type also controls constraints of the transformations added to an object's control points when the object's transformation is exploded using the Add Copy To Points option.
Refer to the GlgCloneObject method on page 122 of the GLG Programming Reference Manual for more details on the clone types.
Paste Clone Type defines the clone type to use when copies of an object are pasted into the drawing using the Copy/Paste or Clone operations. For the Copy/Paste sequence, the clone type must be set before Copy.
The default setting is Full Clone and the attributes of the pasted copies are not constrained. If the setting is changed to Strong Clone, all attributes of the pasted object that are Global or SemiGlobal will be constrained to the corresponding attribute of the original object.
Refer to the GlgCloneObject method on page 122 of the GLG Programming Reference Manual for more details on the clone types.
Subdrawing Traversal controls the interface for loading and saving subdrawings when the subdrawing is entered using the Hierarchy Down button and exited using Hierarchy Up. By default, it is set to Verbose (Save Prompt), which displays confirmation dialogs when loading and saving the modified subdrawing. The Silent (Auto-Save) option eliminates confirmation dialogs to automatically load and save the subdrawing. It may be used to simplify the process for beginner users.
Detach Palettes frees the button palettes from the main Builder window. Detaching the palettes increases the available area for viewing a drawing. The palettes can be iconized and resized independently of the main Builder window. Detaching the palettes does not affect the content of the drawing.
To reattach the palettes to the Builder window, select Detach Palettes again.
This option controls modality of the dialogs. If dialogs aren't modal, clicking in the drawing selects an object and may close the currently displayed dialog. This option enables fast navigation and is intended for expert users.
If dialogs are modal, clicking in the drawing area is allowed only for some operations. This setting helps learning the Builder and is recommended for novice users.
This option displays diagnostic information about the status of the OpenGL driver. If the driver has been successfully initialized, it also displays the OpenGL renderer and vendor information to assist in troubleshooting the OpenGL driver setup problems.
The -verbose command-line option may be used to display extended diagnostic information on Linux/Unix, or to record the information in the glg_error.log file on Windows.
Save Layout saves the drawing that defines the layout and appearance of the of the Builder. This drawing can be edited like any other drawing. When you select this option, the layout drawing is saved in a file. The objects in the drawing correspond to the entities in the Builder window. You can now load and edit the drawing like you would any other.
Although you can freely change all the objects in the Builder's drawing, you should exercise caution because drastic changes can prevent the Builder from working properly.
To load the new drawing instead of the previous version, set the GLG_EDITOR_LAYOUT environment variable to the name of the file you saved.
If the Builder does not work properly and you want to revert to the previous layout, set the GLG_EDITOR_LAYOUT environment variable back to its original value, or unset it.
This option is not available in the Basic Edition of the Builder.