A Show Workspace template is Leaf Entry template
that:
show workspace action. That action provides a variety of techniques for displaying a workspace at a given location and scale in a G2 window. You can use a Show Workspace template to achieve most of the effects of the show workspace action.
![]() |
To use a Show Workspace template in a menu specification
gms-display-target to specify the name of the workspace to display.
The rest of this section shows you how to use these attributes to tell GMS what workspace to display and how to display it.
Specifying the Workspace to Display
To specify the workspace to display:
Set Gms-display-target to a symbol that names:
To specify the scale at which to display the workspace:
Set Gms-view-scale to a float that gives the scale, or to none.
none displays the workspace at the scale at which it was most recently displayed, or at normal size if the workspace has never been displayed.Specifying a
GMS-view-scale value has the same effect as specifying the scale in a show workspace scaled by scale action.
Gms-display-target and Gms-view-scale, all Show Workspace template attributes exist to tell G2 where to display the workspace. This section refers to such attributes as location attributes.Despite the multiplicity of location attributes, the information G2 needs is actually simple: one point on the G2 window, and one point on the workspace. G2 displays the workspace so that the two specified points appear at the same location on the screen. This section refers to the two points as display points.
You can specify display points in two different ways:
In all other cases, if you fail to supply both a window display point and a workspace display point, the workspace appears where it did the last time it was displayed. If the workspace was never displayed, G2 provides default window and workspace display points.
top-left-corner, top-center, top-right-corner, right-center, bottom-right-corner, bottom center, bottom-left-corner, left-center, or center. Each of these describes a point along the edge, or at the center, of the window or workspace.
To specify a window display point symbolically:
Set Gms-window-symbolic-location to be one of the values: top-left-corner, top-center, top-right-corner, right-center, bottom-right-corner, bottom center, bottom-left-corner, left-center, or center.
To specify a workspace display point symbolically:
Set Gms-workspace-symbolic-location to be one of the values: top-left-corner, top-center, top-right-corner, right-center, bottom-right-corner, bottom center, bottom-left-corner, or left-center.
none (the default), GMS looks for a numeric specification of that display point.
gms-allow-for-menu-bar attribute.none.
To specify a window display point numerically:
Set Gms-window-x-location and Gms-window-y-location to be integers that specify the X and Y coordinates of the point.
To specify a workspace display point numerically:
Set Gms-workspace-x-location and Gms-workspace-y-location to be integers that specify the X and Y coordinates of the point.
none, GMS treats both positions as being none, and obtains a default display point from G2.
When you specify an offset to a symbolic display point, GMS first converts the location to equivalent X and Y coordinates. When you specify an offset to a numeric display point, GMS already has the X and Y coordinates.
To implement an offset, GMS adds the X and/or Y offsets to the X and/or Y coordinates of the original display point. GMS uses the result as the display point.
To specify a window display point offset:
Set Gms-window-x-offset and Gms-window-y-offset to be integers that specify the X and Y offsets of the point.
To specify a workspace display point offset:
Set Gms-workspace-x-offset and Gms-workspace-y-offset to be integers that specify the X and Y offsets of the point.
none. The effect is the same as if you had specified the offset as 0.