|
GLG Toolkit, C / C++ API Library
Version 4.6
|
This group contains functions for zooming, panning and scrolling GLG drawings, charts and GIS map objects. More...
This group contains functions for zooming, panning and scrolling GLG drawings, charts and GIS map objects.
Functions | |
| GlgBoolean | GlgSetZoom (GlgObject object, char *resource_name, GlgLong type, double value) |
| Provides a programmatic interface to integrated zooming and panning. More... | |
| GlgBoolean | GlgSetZoomMode (GlgObject object, char *resource_name, GlgObject zoom_object, char *zoom_object_resource_name, GlgZoomMode zoom_mode) |
| Sets or resets a viewport's zoom mode by supplying a GIS or Chart object to be zoomed. More... | |
| GlgBoolean GlgSetZoom | ( | GlgObject | object, |
| char * | resource_name, | ||
| GlgLong | type, | ||
| double | value | ||
| ) |
Provides a programmatic interface to integrated zooming and panning.
| object | Specifies a viewport or a light viewport, or its parent. |
| resource_name | Specifies the resource path of a child viewport to zoom or pan, or NULL to zoom or pan the viewport specified by the object parameter. The resource path is relative to the object specified by the object parameter. |
| type | A char value that specifies the type of the zoom or pan operation to perform. For example, 'i' may be used to zoom in. The value of this parameter matches the corresponding zooming and panning accelerators:
|
| value | Specifies a value for zoom and pan operations as described above. |
This function performs a specified zoom or pan operation regardless of the setting of the viewport's Pan and ZoomEnabled attributes.
Zooming and panning keyboard accelerators may also be used by settings a viewport's ZoomEnabled attribute to True (the user may have to click on the viewport first to set the keyboard focus). This is especially useful for interactive testing of integrated zooming and panning in the GLG Graphics Builder.
The viewport's Pan attribute can be used to activate integrated scrollbars for scrolling the drawing, as well as scrolling charts and GIS maps.
In the Drawing Zoom Mode, if the function attempts to set a very large zoom factor which would result in the overflow of the integer coordinate values used by the native windowing system, the zoom operation is not performed and the function returns False.
The left mouse button is the default button for performing the ZoomTo operation, as well as for panning and scrolling the drawing by dragging it with the mouse. These defaults can be changed by setting the GlgZoomToButton and GlgPanDragButton global configuration resources. If the default is changed, the left-click used in the description of the affected operations changes to the click with the mouse button assigned to the respective ZoomTo or Pan operation.
| GlgBoolean GlgSetZoomMode | ( | GlgObject | object, |
| char * | resource_name, | ||
| GlgObject | zoom_object, | ||
| char * | zoom_object_resource_name, | ||
| GlgZoomMode | zoom_mode | ||
| ) |
Sets or resets a viewport's zoom mode by supplying a GIS or Chart object to be zoomed.
In the Drawing Zoom Mode (default), the drawing displayed in the viewport is zoomed and panned. If the GIS Zoom Mode is set, any zooming and panning operation performed by GlgSetZoom will zoom and pan the map displayed in the viewport's GIS Object, instead of being applied to the viewport's drawing. In the Chart Zoom Mode, the content of the chart is zoomed and panned.
| object | Specifies a viewport object or a viewport's parent. |
| resource_name | Specifies the resource path of a child viewport whose zoom mode to set, or NULL to set the Zoom Mode of the viewport specified by the object parameter. The resource path is relative to the object specified by the object parameter. |
| zoom_object | GIS or Chart object to be zoomed in the GIS and Chart zooming modes (or NULL for the Drawing zoom mode):
|
| zoom_object_resource_name | Resource path of the GIS or Chart object.
|
| zoom_mode | The zoom mode to set:
|