This chapter presents descriptions of all the options on 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. These options are described starting on page 177.
The Palettes Menu provides access to palettes of widgets and other pre-built objects. These options are described starting on page 183.
The Edit Menu provides options for copying objects. These options are described starting on page 185.
The View Menu provides options for controlling your view of the drawing. These options are described starting on page 189.
The Traverse Menu provides options for working with advanced objects. These options are described starting on page 192.
The Arrange Menu provides options for working with group objects. These options are described starting on page 195.
The Object Menu provides options for creating and manipulating objects. These options are described starting on page 202.
The Run Menu provides options that let you animate a drawing. These options are described starting on page 223.
The Options Menu provides options that control the appearance and function of the GLG Graphics Builder. These options are described starting on page 224.
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, print drawings, and close the GLG Graphics Builder.
New Widget starts a new drawing by creating a new widget and placing editing focus into it.
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.
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.
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 225.
If a drawing is already open, Open closes the 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 180.
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 closes the 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 225.
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 225.
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 178.
To save a drawing to a file, use either File , Save or File , Save Object ; see page 179.
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 180. To edit the saved object, use File , Open to open the saved object as a separate drawing file; see page 178.
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 225.
For UNIX users, Print saves a PostScript version of the current drawing into a file. The PostScript level is selected with the Print Configuration option.
For MS Windows users, Print sends the current drawing to the printer, using the standard MS Windows print facilities. Use Export PostScript to save a PostScript version of the drawing to a file. The Print button on the toolbar can be configured to perform either task; use Options , Toolbar Print PostScript to toggle between them.
Export PostScript saves a PostScript image of the current drawing (in its current condition) to a file.
The exported drawing uses the print configuration set by the File , Print Configuration options.
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 page area. Resizing the page layout viewport changes the size of the area that the printed drawing fills. Delete the viewport when you have finished resizing the page area.
This option applies to PostScript printing and export, and to MS 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 PostScript printing and export, and to MS Windows printing.
For PostScript printing and export, PostScript Level specifies which version of PostScript the Builder sends to the printer.
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.
Export Strings exports all strings defined in the drawing into a file. Refer to Localization Support on page 101 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 101 for information about the string translation file format.
Export Tags exports all tag names defined in the drawing into a file. It uses the same file format as the Export Strings option.
The Palettes Menu provides access to palettes of widgets and other pre-built objects. By default, only the Custom Objects palette is installed. Other palettes are optional and will be installed only if purchased. Possible palettes include 2D graphs, 3D graphs, controls, 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.
When no optional palettes are installed, the Palette Menu provides the Custom Objects , Read Palette and Read Directory options.
The Custom Objects Palette displays a few 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 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.
Each drawing file defines one palette item. The complete content of the each drawing is added to the palette, which make 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 instead. The $Drawing or $Widget resource is then used to annotate the object or part of the drawing to insert when the palette icon is selected.
To read a directory, select Read Directory, then select a directory to read with the activated file browser.
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, create a group object that contains them, select the group object, and then use the Edit options. You can explode the group when you have finished the edit operation, to restore the drawing hierarchy to its prior state.
The Cut , Copy , and Paste options add and remove objects from the hierarchy. The Clone options let you position and transform 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 155 for more information on the Global attribute.
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 .
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 allows you to edit attributes that are common to all the group members.
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 in the Properties dialog apply to all the objects in the group that have the attributes you edit.
For example, consider a group that contains two circles, a parallelogram, and a fixed text object. Select Edit All 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.
This option is equivalent to the Edit All button in the Selected Object Properties dialog for a group object.
When a Font Table, Color Table, Rendering Attributes or Box Attributes are added to a group of objects using the group's Edit All option, 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 rendering 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 194). Alternatively, use Traverse , Hierarchy Down to edit the members of the group; see page 192.
Create Temporary Group is equivalent to Select Rectangular Area described on page 186.
Select Multiple Objects is equivalent to Select Multiple Objects described on page 186.
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 to Group 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 from Group 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 193.
Select Bottom is equivalent to Select Bottom on page 194.
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.
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 138 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 name 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 131 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.
Scrolled Text presents a string with a cursor within a bounding box. The text is resized to fit vertically; horizontally, it resizes if only five characters can be displayed. To create a scrolled text object, click on two points to define the bounding box, then type the string in the text entry box. The scrolled text widget can be used for text entry, using the GlgText input handler. This text type is provided for backward compatibility only; use the native text input widget type and the GlgNText handler to implement the text input.
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 56 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 133 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 193.
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 MS 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.
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 te