VisContent: 1.2 VisContent Instance Data: Fields That Affect the View

Up: GEOS SDK TechDocs | Up | Prev: 1.1 The VCNI_attrs Field | Next: 1.3 Fields That Affect the Document
VCNI_view, VCNI_viewHeight, VCNI_viewWidth, VCNI_window, MSG_VIS_CONTENT_GET_WIN_SIZE

Because the content must interact directly with the view, it must maintain some information about both the GenView object and its associated window. VisContentClass defines four fields that deal exclusively with view-related information. Each of these fields is described below.

VCNI_view
This field contains the optr of the GenView object. The content should not ever actually use this field for the view's optr; if you need to contact the view, you should instead use the messages MSG_VIS_VUP_SEND_TO_OBJECT_OF_CLASS and MSG_VIS_VUP_CALL_OBJECT_OF_CLASS . The field will be set automatically by the GenView when the view is opened; the view will send a MSG_META_CONTENT_VIEW_OPENING .
VCNI_viewHeight
This field contains the height, in document coordinates, of the view window. This will be set by the view object and should not be altered by the application; it can be retrieved with the message MSG_VIS_CONTENT_GET_WIN_SIZE (below). The view automatically notifies the content each time the window size changes with MSG_META_CONTENT_VIEW_SIZE_CHANGED .
VCNI_viewWidth
This field contains the width, in document coordinates, of the view window. This will be set by the view object and should not be altered by the application; it can be retrieved with the message MSG_VIS_CONTENT_GET_WIN_SIZE (below). The view automatically notifies the content on each window resize with MSG_META_CONTENT_VIEW_SIZE_CHANGED .
VCNI_window
This field contains the window handle of the view's window. This field is set by the view object and should not be accessed by the application. If an object under the content needs to get the window handle, it should use MSG_VIS_QUERY_WINDOW . This field will be set automatically by the GenView when the view's window is first opened. The view will send the messages MSG_META_CONTENT_VIEW_WIN_OPENED and MSG_META_CONTENT_VIEW_OPENING to set the window handle. When the view window closes, the view will send MSG_META_CONTENT_VIEW_CLOSING and MSG_META_CONTENT_VIEW_WIN_CLOSED .

The messages shown above that are sent by the view to the content are detailed in Messages Received from the View .

MSG_VIS_CONTENT_GET_WIN_SIZE

SizeAsDWord MSG_VIS_CONTENT_GET_WIN_SIZE();

This message returns the size of the content object's associated window in terms of width and height.

Source: Unrestricted.

Destination: Any VisContent object.

Parameters: None.

Return: A SizeAsDWord value with the window's width in the high word and the window's height in the low word. Use the DWORD_HEIGHT and DWORD_WIDTH macros to extract the proper values.

Interception: Unlikely.


Up: GEOS SDK TechDocs | Up | Prev: 1.1 The VCNI_attrs Field | Next: 1.3 Fields That Affect the Document