GenView: 3.4 Basic View Attributes: The GVI_increment Attribute

Up: GEOS SDK TechDocs | Up | Prev: 3.3 Setting the Background Color | Next: 4 Advanced Concepts and Uses
GVI_increment, MSG_GEN_VIEW_GET_INCREMENT, MSG_GEN_VIEW_SET_INCREMENT

Every view has an increment associated with it; this increment may be used in scrolling and sizing the view window. The increment has both a horizontal and a vertical component which are separate from each other. The increment must be specified in document coordinates (points) and is represented by a signed long number. By default, the horizontal increment is set to 20 and the vertical to 15.

The increment values are stored in the GVI_increment field. This field is a structure of type PointDWord . This structure consists of two signed long integers, as follows:

  typedef struct {
	sdword		PD_x;		/* x increment */
	sdword		PD_y;		/* y increment */
} PointDWord;

It is easy to set the increment values in your Goc code, thus:

GVI_increment = {
         horiz,    /* horizontal increment value */
         vert }    /* vertical increment value */

In general, the increment will not change during execution. However, if you find it necessary to do so, you can retrieve and set the increment with MSG_GEN_VIEW_GET_INCREMENT and MSG_GEN_VIEW_SET_INCREMENT .

MSG_GEN_VIEW_SET_INCREMENT

void	MSG_GEN_VIEW_SET_INCREMENT(@stack
        sdword	yIncrement,
        sdword	xIncrement);

This message sets the horizontal and vertical increment values for the view. If the increment had been used before for scrolling, sizing, or scaling, all the same operations will subsequently use the new increment. The two increment values must be in document coordinates (1/72 inch).

Source: Unrestricted.

Destination: Any GenView object.

Parameters: yIncrement The new vertical increment value.

xIncrement
The new horizontal increment value.

Return: Nothing.

Interception: Generally not intercepted.

MSG_GEN_VIEW_GET_INCREMENT

void	MSG_GEN_VIEW_GET_INCREMENT(
        PointDWord *increment);

This message returns the view's current horizontal and vertical increments in document coordinates.

Source: Unrestricted.

Destination: Any GenView object.

Parameters: increment A pointer to an empty PointDWord structure.

Return: The increment pointer will point to the PointDWord structure containing the horizontal and vertical increment values.

Interception: Generally not intercepted.


Up: GEOS SDK TechDocs | Up | Prev: 3.3 Setting the Background Color | Next: 4 Advanced Concepts and Uses