Appendix A: Global Configuration Resources
There are a small number of drawing features that can't be said to belong to any particular object in a GLG drawing. When a drawing is presented within the GLG Graphics Builder, those drawing features, such as the file save format, are managed by the Builder. When a drawing is presented in an application program, that program must assume the responsibility of managing those features. Rather than include more functions in the GLG API, the Toolkit provides
configuration resources
to control these features that can be queried and modified with the same resource access functions you use to control any other feature of a drawing.
The path name of a configuration resource starts with $config followed by the configuration resource name. For example, $config/GlgSaveFormat is the name of the configuration parameter that controls the default save format.
The GLG configuration file may be used to set global configuration resources for the GLG Graphics Builder, and the GLG Programming API may be used to set these global resources in a program.
The configuration resources, their types and possible values, are listed in the following table. The table also lists environment variables which can be used as an alternative way of setting some global configuration resources for quick testing, or for the cases when the application code can not be accessed. The environment variables settings do not apply to the Java version of the Toolkit.
GLG Toolkit Configuration Resources
|
Name
|
Type
|
Default
|
Description (possible values)
|
|
GlgGridPolygon
|
polygon object
|
solid black line, one pixel wide
|
Defines grid attributes such as line width and color (the grid spacing is controlled by an attribute of the viewport screen object). The polygon is not accessed directly, but its attributes are, for example:
$config/GlgGridPolygon/LineWidth
|
|
GlgArrowShape
|
polygon object
|
default arrow shape as seen in the Graphics Builder
|
3-point polygon defining the pixel dimensions and shape of the arrowheads drawn by the rendering object. To change the arrowheads, change the coordinates of the polygon's points.
|
|
GlgPickResolution
|
Double
|
5
|
Defines pick resolution for user input. When the mouse is within this many pixels of a point, it is considered to be on that point.
|
|
GlgSaveFormat
|
String
|
"ascii"
|
Defines a default save format ("binary", "ascii" or "extended")
|
|
GlgCompressFormat
|
String
|
"uncompressed"
|
Enables saved drawing compression ("compressed" or "uncompressed")
|
|
GlgPSLevel
|
Double
|
2
|
The level of the PostScript output (1 or 2)
|
|
GlgSearchPath
(C/C++ and ActiveX only)
|
String
|
GLG_PATH
env. var. or
NULL
|
The search path used to resolve not found relative file names. May be changed from a program.
|
|
GlgButtonTooltipTimeout
|
Double
|
0.5
|
The button tooltip timeout in seconds
|
|
GlgMouseTooltipTimeout
|
Double
|
0.5
|
The object mouse over tooltip timeout in seconds
|
|
GlgIHArray
|
group object
|
an array holding default GLG interaction handlers
|
The array of GLG Interaction Handlers (GlgButton, GlgSlider, etc.) used to resolve interaction handlers names. It may be used by a program to add custom interaction handlers.
|
|
GlgSwingUsage
(Java only)
|
Double
|
0
|
Controls the component set for the Java version of the Toolkit. If the value is 0, faster AWT components are used. If the value is 1, Swing components are used. Swing components may be used when lightweight components are required by JDesktopPane and JInternalFrame, and also when the Swing version of input objects (buttons and sliders) are wanted.
|
|
GlgAntiAliasing
|
Double
|
GLG_ANTI_
ALIASING_INT
|
Controls the use of antialiasing of the OpenGL renderer. The value of 1 to enables anti-aliasing for the Java version of the Toolkit. For all other environments, the following values are supported:
GLG_ANTI_ALIASING_OFF - disables antialiasing.
GLG_ANTI_ALIASING_INT - enables antialiasing and maps vertices to integer pixel boundaries.
GLG_ANTI_ALIASING_DBL - enables antialiasing and uses double vertex coordinates.
Alternatively for non-Java environments, the antialiasing may be disabled by setting the GLG_ANTI_ALIASING environment variable to False.
|
|
GlgOpenGLMode
(C/C++ and ActiveX only)
|
Double
|
1
|
Controls the use of the OpenGL renderer. If set to True, the OpenGL renderer is used for the viewports with OpenGLHint=ON if the OpenGL renderer is available. Setting the resource to False suppresses the use of the OpenGL renderer.
Alternatively, the OpenGL renderer may be enabled or disabled by setting the GLG_OPENGL_MODE environment variable to True or False, as well as using the -glg-enable-opengl and -glg-disable-opengl command-line options.
|
|
GlgMapServerUsage (C/C++ and ActiveX only)
|
Double
|
0
|
Controls the use of Map Server in C/C++ and ActiveX versions of GLG and may have one of the following values defined in the GlgApi.h file:
GLG_LOCAL_MAP_SERVER - uses the Map Server from the GLG library .
GLG_REMOTE_MAP_SERVER - uses the Map Server from a web server defined by the GISMapServerURL attribute of the GIS Object.
GLG_AUTO_MAP_SERVER (default) - if the drawing was loaded from a URL, use a remote Map Server, otherwise use a local Map Server.
May also be defined by setting GLG_MAP_SERVER_USAGE environment variable to the "auto", "local" or "remote" values.
|
|
GlgDefaultNumFontTypes
|
Double
|
12
|
Defines NumTypes attribute of the default font table. May also be defined by setting GLG_DEFAULT_NUM_FONT_TYPES environment variable to the desired integer value.
|
|
GlgDefaultNumFontSizes
|
Double
|
7
|
Defines NumSizes attribute of the default font table. May also be defined by setting GLG_DEFAULT_NUM_FONT_SIZES environment variable to the desired integer value.
|
|
GlgDefaultFontFile
|
String
|
NULL
|
Specifies name of the file that contains a list of font names for the default font table. Each font in the file is listed on a separate line. May also be defined by setting GLG_DEFAULT_FONT_FILE_NAME environment variable.
|
|
GlgDefaultPSFont
File
|
String
|
NULL
|
Specifies name of the file that contains a list of PostScript font names for the default font table. May also be defined by setting GLG_DEFAULT_PS_FONT_FILE_NAME environment variable.
|
|
GlgFontCharset (C/C++ and ActiveX on
Windows only)
|
Double
|
0
|
Defines a charset to use for fonts with DEFAULT_CHARSET, providing a simple way to change the charset of all fonts in the default font table. May also be defined by setting GLG_FONT_CHARSET environment variable to the integer value of the desired font charset.
|
|
GlgMultibyteFlag (C/C++ and ActiveX only)
|
Double
|
0
|
Defines the value of the multi-byte flag to use for fonts with DEFAULT_CHARSET, providing a simple way to change the multi-byte flag setting for all fonts in the default font table. May also be defined by setting GLG_MULTIBYTE_FLAG environment variable to the "SINGLE_BYTE", "MULTI_BYTE" or "UTF8" values.
|
|
GlgDefaultColor
TableType
|
Double
|
1
|
Defines type of the default color table: RAINBOW (value of 1) or STANDARD (value of 2). May also be defined by setting GLG_DEFAULT_COLOR_TABLE_TYPE environment variable to the "rainbow" or "standard" values.
|
|
GlgDefaultColor
Factor
|
Double
|
19
|
Defines ColorFactor of the default color table. May also be defined by setting GLG_DEFAULT_COLOR_FACTOR environment variable to the desired integer value.
|
|
GlgDefaultNum
ColorGrades
|
Double
|
1
|
Defines GradeHint of the default color table. May also be defined by setting GLG_DEFAULT_NUM_COLOR_GRADES environment variable to the desired integer value.
|
|
GlgDefaultDialog
Color
(C/C++ on Unix and Java only)
|
G - holds 3 RGB color values
|
(-1;-1;-1)
|
Specifies default fill color for the dialog area widget type. If it is set to (-1;-1;-1), the FillColor of the dialog widget is used when the widget is displayed.
|
|
GlgCompatibility
Mode
|
Double
|
GLG_LATEST_RELEASE constant
|
Specifies compatibility mode. For example, when it is set to the GLG_PRE_2_9 constant, the release 2.9 changes which affect code compatibility with the older versions will be disabled. This resource may also be defined by setting GLG_COMPATIBILITY_MODE environment variable to the integer value corresponding to the desired constant.
|
When accessing configuration parameters from a remote client application, both the client's and the server's configuration parameters may be accessed. If the first argument of the resource querying or setting functions is a link ID, the function refers to the server's configuration resources. If the argument is an object ID, or is NULL, the function refers to the client's configuration resources.
When configuration parameters are accessed from the server side, the first parameter of the resource querying or setting functions may be NULL. You cannot access a client's configuration resources from a remote server, since they are interpreted as the client's configuration resource setting.
Appendix B: Message Object Resources
A
message object
is a GLG object used by the Toolkit to pass information about GLG input, object selection and other events to the Input callback. It is a group object containing data in the form of named resources. The Input callback code can query resources of the message object using the GLG GetResource methods. Refer to Handling Input Events of Using the C/C++ version of the Toolkit for more information on handling input events.
Generic Resources of the Message Object
All message objects have the following named attributes:
|
Resource Name
|
Data Type
|
Description
|
|
Format
|
String
|
Defines the format of the message object and the resources present in it. It is defined by the event type and, for input messages, the type of the input handler which detected the input activity and sent the message. It may have values such as
Button
,
Slider
,
Knob
,
ObjectSelection
and
CustomEvent
.
|
|
Origin
|
String
|
Contains one of the following values:
The name of the viewport with an input handler that generated the input message
The name of the object that generated the custom event message
The name of the viewport that generated the window message
An empty string for object selection and other message types.
|
|
FullOrigin
|
String
|
Contains the full path name of the viewport that initiated an input or window message, or the full path name of the object that initiated a custom event message. This resource will be set to an empty string for other types of messages.
|
|
Action
|
String
|
Describes the input action occurred. It may have values of
ValueChanged
,
Activated
, CustomEvent, MouseClick and so (see below). All input handlers send
Abort2
when they receive a middle mouse button click, and
Abort3
when they receive a right mouse button click.
|
|
SubAction
|
String
|
Describes the action in more details. For example, for the
ValueChanged
action it describes what caused the value change and may have values such as
Pick
,
Motion
,
Increase
, and so on.
|
|
Object
|
GlgObject
|
The viewport object that triggered the input callback, or the object that triggered custom event. This resource is present in all messages except the
ObjectSelection
message.
|
Specific Resources of the Message Object
A message object can have other resources as well, depending on the type of the input handler (for input events) or the type of the message (for object selection and custom events).
In the case of an input event, the message object includes all handler resources of the widget. For example, the message object coming from a GLG slider object may also contain such resources as ValueX, ValueY, Granularity, Increment, DisableMotion and others. These resources may be queried from either the message object or the viewport object that generated the message.
Handler resources not present in the viewport are not present in the message object. For example, a one-dimensional slider uses only one of its
ValueX and ValueY
resources, and the second resource will be absent from the message object. Several handlers define resources that appear only in the message object. For example, the GlgMenu input handler defines SelectedIndex and other resources used by the handler during its operation. All such resources are defined in the sections below.
The following sections describe the format of message objects generated by various input handlers as well as object selection and custom events. Refer to Input Handlers of the GLG User's Guide for a complete list of resources of various GLG input handlers.
Slider Message Object
This message object is generated by the GlgSlider or GlgNSlider input handlers whenever a user acts to change the position of the slider or scrollbar controlled by these input handlers.
Slider Message Object Resources
|
Resource
|
Value
|
|
Format
|
Slider
|
|
Action
|
ValueChanged
indicates when a value change has resulted from a mouse click
GrabPointer
is issued when the mouse button is pressed over the slider active area, causing the mouse to assume control of the slider position. The
SubAction
is NULL.
UngrabPointer
is issued when the mouse button is released, ending mouse control of the slider position. The
SubAction
is NULL.
|
|
Object
|
The slider's viewport.
|
The ValueX, ValueY, Granularity, Increment, DisableMotion and other slider resources are also present in the message object.
Knob Message Object
This message object is generated by the GlgKnob input handler whenever a user acts to change the position of the knob.
Knob Message Object Resources
|
Resource
|
Value
|
|
Format
|
Knob
|
|
Action
|
ValueChanged
indicates when a value change has resulted from a mouse click
GrabPointer
is issued when the mouse button is pressed over the slider active area, causing the mouse to assume control of the slider position. The
SubAction
is NULL.
UngrabPointer
is issued when the mouse button is released, ending mouse control of the slider position. The
SubAction
is NULL.
|
|
SubAction
|
Click
when a value change has resulted from a mouse click
Motion
when a value change has resulted from a mouse motion while the left mouse button is held down
Increase
or
Decrease
when a value change has resulted from activating the corresponding button.
|
|
Object
|
The knob's viewport.
|
The Value, Granularity, Increment, DisableMotion and other knob resources are also present in the message object.
Button Message Object
This message object is generated by the GlgButton or GlgNButton input handlers whenever a user presses the button or toggle controlled by these handlers.
Button Message Object Resources
|
Resource
|
Value
|
|
Format
|
Button
|
|
Action
|
Activate
(push buttons without
OnState
resource or native push buttons)
ValueChanged
(toggle buttons with
OnState
resource or native toggle buttons)
Update
|
|
SubAction
|
MouseMove
for
Update
actions when mouse moves inside or outside the button
NULL
otherwise
|
|
Object
|
The button's viewport.
|
As with all the message objects, the button message object also includes the handler resources that are used in the widget, such as
PressedState
,
OnState
and others. Refer to Input Handlers of the GLG User's Guide for a complete list of resources of the GlgButton and GlgNButton input handlers.
Text Message Object
This message object is generated by the GlgText or GlgNText input handlers whenever a user enters text into the text input widget controlled by these input handlers.
Text Widget Message Object Resources
|
Resource
|
Value
|
|
Format
|
Text
|
|
Action
|
Activate
if the key pressed was
<Return>
NOTE:
The
<Return>
key doesn't produce the
Activate
action when the text handler is deployed in the ActiveX control or MFC application on Windows, where the default
<Return>
key action is to close the active dialog.
Update
for any other key.
Focus
if the text input gained the input focus (
GlgNText
handler only).
LosingFocus
if the text input lost the input focus (
GlgNText
handler only).
|
|
SubAction
|
none
|
|
Object
|
The text widget's viewport.
|
The TextString resource and, for numerical inputs, Value resource are present in the message object even if they do not exist in the Text Widget's viewport, allowing the current values to be passed in the message. The MaxLength and, for numerical inputs, the MinValue, MaxValue, InputInvalid and ValueFormat resources are also present in the message object.
Spinner Message Object
This message object is generated by the GlgSpinner input handlers whenever a user changes the spinner's value.
Spinner Widget Message Object Resources
|
Resource
|
Value
|
|
Format
|
Spinner
|
|
Action
|
ValueChanged if the spinner's value has changed
Update
for any other user interaction.
Activate if the spinner's Done button was pressed. The Activate action of the spinner's text input object is also propagated to the spinner.
|
|
SubAction
|
none
|
|
Object
|
The spinner widget's viewport.
|
All resources of the spinner, such as Value, MinValue, MaxValue, Increment, etc. are also present in the message object.
List Message Object
This message object is generated by the GlgNList input handlers when a user selects items in a list widget controlled by this input handler.
List Widget Message Object Resources
|
Resource
|
Value
|
|
Format
|
List
|
|
Action
|
Select
if an item was selected or deselected.
Update
for any other key.
|
|
SubAction
|
DoubleClick
if the item was selected using a double-click, otherwise
NULL
.
|
|
Object
|
The list's viewport.
|
The
GlgSendMessage
method may be used to get extended selection information for a multiple selection list widget.
Option Message Object
This message object is generated by the GlgNOption input handlers when a user changes an option selection in an option menu or combox box widget controlled by this input handler.
List Widget Message Object Resources
|
Resource
|
Value
|
|
Format
|
Option
|
|
Action
|
Select
if a new option was selected.
Update
for any other key.
|
|
SubAction
|
none
|
|
Object
|
The option widget's viewport.
|
Menu Message Object
This message object is generated by the GlgMenu input handler whenever a user presses a button in the menu.
Menu Message Object Resources
|
Resource
|
Value
|
|
Format
|
Menu
|
|
Action
|
Activate
|
|
SubAction
|
none
|
|
Object
|
The menu's viewport.
|
The SelectedIndex, SelectedValue and SelectedString resources are present in the message object even if they do not exist in the menu viewport, allowing the menu to pass information about the selection with the message.
Clock and Stopwatch Message Object
The first message is generated by the clock and stopwatch widgets (GlgClock input handler) when they update the graphical representation of the clock. This is invoked automatically every second. If seconds are not displayed, the callback is invoked once per minute, instead.
The second message is only called from a stopwatch widget, whenever a user presses one of the control buttons.
Clock Widget Message Object Resources
|
Resource
|
Value
|
|
Format
|
Clock
|
|
Action
|
Update
|
|
SubAction
|
none
|
|
Object
|
The widget's viewport.
|
Stopwatch Widget Message Object Resources
|
Resource
|
Value
|
|
Format
|
Clock
|
|
Action
|
Start
,
Stop
, or
Reset
depending on the corresponding stopwatch button.
|
|
SubAction
|
none
|
|
Object
|
The widget's viewport.
|
Either message object will also contain resources of GlgClock input handler such as
Sec
,
ValueSec
, and so on. For the Stopwatch Widget, the Sec resource is present in the message object even if it does not exist in the stopwatch's viewport.
Timer Message Object
This message object is generated automatically by the GlgTimer input handler upon every update of the timer output Value.
Timer Widget Message Object Resources
|
Resource
|
Value
|
|
Format
|
Timer
|
|
Action
|
Update
|
|
SubAction
|
none
|
|
Object
|
The timer's viewport.
|
The program should call the
GlgUpdate()
function to make the changes caused by the timer visible. The remaining resources of the message object (
Interval
,
Period
,
ActiveState
, and so on) can be used to change the timer's state and parameters. The timer handler has been superseded by the timer transformation in the release 2.8 of GLG.
Palette Message Object
This message object is generated by the GlgPalette input handler whenever a user selects one of the objects in the palette with the left mouse button, or changes the selection by dragging the mouse over the palette.
Palette Message Object Resources
|
Resource
|
Value
|
|
Format
|
Palette
|
|
Action
|
Activate
when a selection is made with a mouse click
ValueChanged
when the selection is changed due to a mouse dragging.
|
|
SubAction
|
Click or Motion
|
|
Object
|
The widget's viewport.
|
The palette's message object also has a resource named SelectedObject. This resource refers to the object selected and is used to get values of the that object's attributes. For example, for a color palette, the SelectedObject/FillColor resource of the message object yields the chosen color.
Font Browser Message Object
This message object is generated by the GlgBrowser input handler whenever any input activity is detected in the font browser controlled by the input handler.
Font Browser Message Object Resources
|
Resource
|
Value
|
|
Format
|
FontBrowser
|
|
Action
|
Activate
when the
Done
button of the Font Browser is activated
Cancel
when the
Cancel
button is pressed.
Update
on any other activity in the Font Browser.
|
|
SubAction
|
none
|
|
Object
|
The widget's viewport.
|
All the resources of the font browser widget are also present in the message object, allowing the font selection to be passed in the message.
Browser Message Object
This message object is generated by the GlgBrowser input handler whenever any input activity is detected in the resource, tag or custom data browser controlled by the input handler.
Browser Message Object Resources
|
Resource
|
Value
|
|
Format
|
Browser
|
|
Action
|
Activate
when the
Done
button of the Browser is pressed.
Cancel
when the
Cancel
button is pressed.
Select when the user clicks on a list entry.
Update
on any other activity in the Browser.
|
|
SubAction
|
For the
Update
action, the
SubAction
may be
DoubleClick
when the user double-clicks to open another hierarchy level. Otherwise, this resource is not used.
|
|
Object
|
The browser's viewport.
|
The Input callback is called with Activate as the value of the Action resource when the Done button of the file browser is activated
or
when the <Return> key is pressed with the keyboard focus in the Path text widget
and
the string is the name of some file.
Zoom Message Object
This message object is generated when a zoom or pan operation is performed, activated either by user interaction or programmatically.
Browser Message Object Resources
|
Resource
|
Value
|
|
Format
|
Zoom
|
|
Action
|
Zoom or Pan
|
|
SubAction
|
Left, Right, Up or Down for the Pan action.
ZoomIn, ZoomOut, Set or Reset for the Zoom action.
Start or End for the ZoomTo mode of the Zoom action or the Dragging mode of the Pan action.
ZoomRectangle for the Zoom action.
|
|
Object
|
The viewport that triggered the message.
|
The Start and End subactions are generated when the ZoomTo, custom zoom or dragging operation is started or finished. The Reset subaction is generated when the zooming state is reset using the `n' or `N' zoom action. The Set subaction is generated when the drawing is zoomed, paned or rotated using any zoom actions other than ZoomTo, custom zoom or
Reset
. The ZoomRectangle subaction indicates that the ZoomTo rectangle has been created and is accessible via the GlgZoomRect resource of the viewport in the ZoomTo mode.
Custom Event Message Object
This message object is generated by a GLG drawing when a mouse moves over an object with the GlgMouseOverEvent property attached or when an object with the GlgMouseClickEvent property is clicked on with the mouse button. It is also generated when the tooltip (attached to an object or a button using the TooltipString property) is activated or erased. The viewport's ProcessMotion attribute has to be set to Move and Click or Click to enable custom event processing (except for the button tooltip events). The input callback can use the message object's resources to process the custom event. This message is invoked for any viewport object and does not require an input handler.
Custom Event Message Object Resources
|
Resource
|
Value
|
|
Format
|
CustomEvent
|
|
Action
|
MouseOver when user moves the mouse over an object with the GlgMouseOverEvent property or moves away from it.
MouseClick when user clicks on an object with the GlgMouseClickEvent property.
MouseRelease when user releases the mouse button after the custom mouse click event.
ObjectTooltip when an object tooltip is activated or erased.
ButtonTooltip when a button tooltip is activated or erased.
|
|
SubAction
|
none
|
|
EventLabel
|
The string value of the GlgMouseOverEvent or GlgMouseClickEvent properties attached to the object that generated the mouse click or mouse over events.
The tooltip string for the tooltip events (the string value of the TooltipString property attached to an object), or an empty string if the tooltip event is generated when the mouse moves away from the object and the tooltip is erased.
|
|
ButtonIndex
|
For events generated by a mouse click, the index of the button that generated the custom event. A value of 0 for other custom events.
|
|
Object
|
The top-level object that generated the custom event. For example, if a group object has the custom events defined, the group will be used as the Object resource when any object in the group is selected with the mouse. NULL when the message is invoked on mouse release, the mouse being moved away from the object or a tooltip being erased.
|
|
OrigObject
|
The low-level object that originated the custom event. If a group object has the custom events defined, the Object resource is the group and OrigObject is the object inside the group that was actually selected with the mouse. NULL when the message is invoked on mouse release, the mouse being moved away from the object or a tooltip being erased.
|
The GetResourceObject method may be used to get the object ID of the object and origin object from the message using the "Object" and "OrigObject" resource names:
GlgObject object = GlgGetResourceObject( message_object, "Object" );
The resources of the object and origin object may be accessed through the message object using the Standard API. For example, the "Object/FillColor" resource name may be used to access the FillColor attribute of the object as a resource of the message object:
GlgSetGResource( message_object, "Object/FillColor", 1., 0., 0. );
Object Selection Message Object
This message object is generated by a GLG drawing when objects in the drawing are selected via the mouse over or mouse click events. The viewport's ProcessMotion attribute has to be set to Move and Click or Click to enable object selection processing. The input callback can use the message object's resources to process the object selection. This message is invoked for any viewport object and does not require an input handler.
Object Selection Message Object Resources
|
Resource
|
Value
|
|
Format
|
ObjectSelection
|
|
Action
|
MouseMove when user moves the mouse over objects in the drawing.
MouseClick when the user clicks on the objects in the drawing.
|
|
SubAction
|
none
|
|
ButtonIndex
|
The index of the button that generated the selection event, or 0 for selections generated by mouse over events.
|
|
Selection-Array
|
A group object containing object IDs of all objects on the lowest level of the hierarchy selected by the mouse event.
|
The objects selected by the mouse event may be queried from the SelectionArray using the GetElement method of the Extended API:
GlgObject selection_array =
GlgGetResourceObject( message_object, "SelectionArray" );
for( i=0; i<GlgGetSize( selection_array ); ++i )
GlgObject selected_object = GlgGetElement( selection_array, i );
The array contains the selected objects on the lowest level of the hierarchy. For example, if the object is part of a group, it will contain the object itself and not the group. The parents of the selected objects may be queried by using the selected object's GetParent method.
Window Message Object
This message object is generated by a viewport object when it becomes visible for the first time or receives a message to delete or close its window. The delete window request is received when the user activates the window's controls to close the window. The input callback gives the program a chance to react to the user's request. This message is invoked for any viewport object and does not require an input handler.
Window Message Object Resources
|
Resource
|
Value
|
|
Format
|
Window
|
|
Action
|
DeleteWindow when user closes the viewport's window.
FirstExposure when the viewport's window is becoming visible for the first time.
|
|
SubAction
|
none
|
|
Object
|
The viewport that triggered the message.
|
Appendix C: GLG Object's Attribute Table
The following lists the Default Attribute Names that may be used by a program to access attributes of various objects. The generic attributes are common attributes that may be used for objects of any type. The rest of the attributes exist only in certain types of objects and are listed under their corresponding object types.
Most of the attribute names are either self-explanatory or are described in the corresponding section GLG Objects of the GLG User's Guide. There are some attributes that are not described in the User's Guide and may be used only by a program to access some objects' internal structures. Such attributes may have an explanation next to the attribute name.
Generic Attributes
Object type.
An optional transformation object attached to the object.
Generic Attributes of Drawable objects
A group containing all history objects attached to the object, if any.
A group containing all custom properties attached to the object, if any.
A flag to disable setup of custom properties when complex objects are attached as properties.
A group containing all aliases attached to the object, if any.
The rendering object attached to the object, if any. Objects that have a rendering object attached, inherit the rendering object's attributes. In this case, rendering attributes may be queried directly from the object the rendering object is attached to.
Polygon Attributes
Disables 3D shading.
A group object containing polygon points.
Rendering Object Attributes
If an object has a rendering object attached, the object inherits all of the rendering object's attributes, so that they can be queried directly from the object.
Marker Attributes
Control point
Text Object Attributes
Control Points
Box Attributes object attached to the text object (if any).
Cursor type (SCROLLED TEXT only).
Cursor position (SCROLLED TEXT only).
Start index of the first visible character (SCROLLED TEXT only).
The text object also inherits attributes from its attached Box Attributes object. These attributes may be queried directly from the text object.
Box Attributes Object Attributes
Generic name
Generic name
Specific name
Specific name
Arc Attributes
Center control point.
Vector control point.
The polygon object used to render the arc.
Parallelogram Attributes
Disables 3D shading.
The polygon object used to render the parallelogram.
Spline Object Attributes
Disables 3D shading.
A group containing the spline's control points.
The polygon object used to render the spline.
Image Object attributes
Control points.
GIS Object attributes
Control points.
Group and List Objects' Attributes
Connector Object Attributes
A group containing the control points.
The polygon or arc object used to render the connector.
Reference Object Attributes
A path for the drawing file or resource path for a palette object in the drawing.
Resource path for the object in the template, may contain an origin resource path after a colon.
Control point.
The template object.
The template's origin.
The transformation used to scale or otherwise transform the reference's instance.
An array of bindings for rebinding instance's attributes.
Series Object Attributes
Controls instance positioning. Changing the value of the attribute in the range of 0 to 1 may be used to animate the series by moving its instances along the path.
The transformation object used as a path.
The first point of the path transformation.
The template's origin point.
The template object.
A group containing template instances.
Square Series Object Attributes
Control points.
The template object.
A group containing template instances.
Polyline Attributes
The transformation object used as a path.
The line or segment's template.
The marker's template.
A group containing marker instances.
A group containing segment instances.
The polyline object also inherits attributes of its polygon template. These attributes may be accessed directly by querying the polyline.
Polysurface Attributes
The surface segment's template.
Control points.
The marker's template.
A group containing marker instances.
A group containing segment instances.
The polysurface object also inherits attributes of its polygon template. These attributes may be accessed directly by querying the polysurface.
Frame Object Attributes
A group containing the frame's control points.
A group containing the frame's constrained points.
Viewport Attributes
Control points.
The horizontal scrollbar (viewport) of the integrated panning and zooming (if PanX is enabled).
The vertical scrollbar (viewport) of the integrated panning and zooming (if PanY is enabled).
The spacer viewport of the integrated panning and zooming used in the lower right corner (if both PanX and PanY scrollbars are enabled).
Read-only attribute which may be queried to get the viewport's current zoom factor.
Read-only attribute which may be queried to get the X/Y ratio of the viewport's window.
Enables mouse event processing
A function object attached to the viewport as a handler.
The group used by the viewport to contain the objects drawn in the viewport. The view and zoom transformations are attached to this group.
The screen object associated with the viewport.
The viewport also inherits most of the screen object's attributes and all attributes of the light object attached to the viewport, so that they may be queried directly from the viewport,
Screen Object Attributes
Controls anti-aliasing for the screen's viewport. The default is ON.
A filename of a GLG drawing containing a font table to be used for the viewport's drawing.
Window title when the screen is used as a top-level window.
Returns the Widget ID of the native widget used to render the screen and viewport.
Returns the Widget ID of the highest level parent.
The drawable used for rendering. Returns the ID of the double-buffering pixmap when double-buffering is enabled.
Returns the Display pointer (X Windows only).
Returns the display name.
Read-only attribute, is set to a non-zero value when the screen is displayed on a TrueColor display.
The screen also inherits most of the colortable object's attributes which may be queried directly from both the screen and viewport object.
Colortable Object Attributes
The requested number of colors.
The actual number of colors.
The requested number of color grades.
The actual number of color grades.
The requested number of dithering patterns.
The actual number of dithering patterns.
The color to use for B&W rendering (when NumColors=1).
If set to True, increases the brightness of dark colors.
Font Table Object Attributes
A group used to hold the font table's fonts
Font Object Attributes
Multi-byte flag.
Transformation Object Attributes
The first attribute object (any type).
The second attribute object (any type).
The third attribute object (any type).
The fourth attribute object (any type).
The fifth attribute object (any type).
The sixth attribute object (any type).
The transformation's matrix object.
Alias Object Attributes
The alias name.
The resource path to associate with the alias.
History Object Attributes
The index of the current scroll iteration.
Data Object Attributes
The value of the data object, accessed using NULL as the resource name.
The transformed value (value transformed with an xform attached to the data object; in world coordinates for control points).
An optional tag object attached to the data object. If a tag object is attached, the data object inherits the TagName, TagSorce and TagComment attributes from the tag object.
Attribute Object Attributes
Creation type resource that determines the type of transformations that will affect the attribute.
The value of the attribute object, accessed using NULL as the resource name.
The absolute value (in screen coordinates for drawable control points).
An optional tag object attached to the attribute object. If a tag object is attached, the attribute object inherits the TagName, TagSorce and TagComment attributes from the tag object.
The base data object used for storing the attribute's value.
Tag Object Attributes
Used to persistently identify the tag when browsing.
Defines the mapping to a database field.
Contains any user-defined information.
Function Object Attributes
The name of the function object (
GlgSlider
,
GlgButton
, etc.).