|
GLG Toolkit, C / C++ API Library
Version 4.6
|
This group contains methods for zooming, panning and scrolling GLG drawings, charts and GIS map objects. More...
This group contains methods for zooming, panning and scrolling GLG drawings, charts and GIS map objects.
Functions | |
| GlgBoolean | SetZoom (char *resource_name, GlgLong type, double value=0.) |
| Provides a programmatic interface to integrated zooming and panning. More... | |
| GlgBoolean | SetZoomMode (char *resource_name, GlgObjectC *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 SetZoom | ( | char * | resource_name, |
| GlgLong | type, | ||
| double | value = 0. |
||
| ) |
Provides a programmatic interface to integrated zooming and panning.
This is a wrapper for GlgSetZoom.
| resource_name | Specifies the resource path of a child viewport to zoom or pan, or NULL to zoom or pan this viewport object. The resource path is relative to this viewport object. |
| 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. See GlgSetZoom for a list of possible values. |
| value | Specifies a value for zoom and pan operations. |
This method 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 method 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 method 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 SetZoomMode | ( | char * | resource_name, |
| GlgObjectC * | 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.
This is a wrapper for GlgSetZoomMode.
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 SetZoom 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.
| resource_name | Specifies the resource path of a child viewport whose zoom mode to set, or NULL to zoom or pan this viewport object. The resource path is relative to this viewport object. |
| 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:
|