GenView: 5.2 The GenViewControl: Notification Received

Up: GEOS SDK TechDocs | Up | Prev: 5.1 GenViewControl Instance Data | Next: 5.3 GenViewControl Example

When a view's attributes change and the controller will be affected, the view sends notification to the controller. The type of notification handled by the controller is NT_VIEW_STATE_CHANGE. This notification type will carry with it a block containing a structure of type NotifyViewStateChange , shown in The NotifyViewStateChange Structure .

The NotifyViewStateChange structure contains much more information about the view than just those features affected by the controller. Additional information includes background color, increment, document bounds, Ink information, origin, etc. If you want to add functionality to the GenViewControl, you can set up additional UI gadgetry with the GenControlClass attribute ATTR_GEN_CONTROL_APP_UI and have it change and handle the appropriate attributes.

Code Display 9-8 The NotifyViewStateChange Structure

/* This structure is passed to the GenViewControl object when a feature of the
 * active view changes. It is passed with notification NT_VIEW_STATE_CHANGE. */
typedef struct {
    PointDWFixed			NVSC_origin;			/* absolute origin of the view */
    RectDWord			NVSC_docBounds;			/* document bounds of the view */
    PointDWord			NVSC_increment;			/* the view's increment value */
    PointWWFixed			NVSC_scaleFactor;			/* view's current scale factor */
    ColorQuad			NVSC_color;			/* view's background color */
    GenViewAttrs			NVSC_attrs;			/* view's GVI_attrs record */
    GenViewDimensionAttrs				NVSC_horizAttrs;		/* view's GVI_horizAttrs record */
    GenViewDimensionAttrs				NVSC_vertAttrs;		/* view's GVI_vertAttrs record */
    GenViewInkType			NVSC_inkType;			/* view's GVI_inkType value */
  /* The following four fields are used internally by the GenViewControl. */
    XYSize			NVSC_contentSize;
    XYSize			NVSC_contentScreenSize;
    PointDWord			NVSC_originRelative;
    PointDWord			NVSC_documentSize;
} NotifyViewStateChange;

Up: GEOS SDK TechDocs | Up | Prev: 5.1 GenViewControl Instance Data | Next: 5.3 GenViewControl Example