|
GEOS SDK TechDocs
|
|
3 Basic View Attributes
|
3.2 Dimensional Attributes
GVI_attrs, MSG_GEN_VIEW_SET_ATTRS, MSG_GEN_VIEW_GET_ATTRS
The
GVI_attrs
field, as shown in GenView Instance Data
, controls many aspects of the view, including several features related to scrolling, input events, and the content object. It is implemented as a bitfield record, and any or all of its attributes may be set at once.
Generally, the attributes specified in this field are not changed at run-time; if your application needs to change or retrieve them, however, it may with the messages
MSG_GEN_VIEW_GET_ATTRS
and
MSG_GEN_VIEW_SET_ATTRS
, both of which are shown below.
The attributes that can be set in
GVI_attrs
are shown in the listing below. The default settings are given in GenView Instance Data
.
-
GVA_CONTROLLED
-
Set if the GenView is connected to a GenViewControl object and should therefore send out notification as appropriate and add itself to the proper GCN lists.
-
GVA_GENERIC_CONTENTS
-
Set if the content is a
GenContentClass
object. If this bit is set, the mouse grab mode and pointer sending mode are set by the specific UI, overriding whatever is set in the instance data.
-
GVA_TRACK_SCROLLING
-
Set if track scrolling is desired. If this is set, the view will send scrolling events to the content object. The content can then alter the scrolling behavior and send the event on to the view.
-
GVA_DRAG_SCROLLING
-
Set if drag scrolling is desired. If this bit is set, drag scrolling (when the user drags outside the window bounds, the window scrolls in that direction) is implemented by the view. The content does not have to do anything special; drag scrolling is implemented entirely by the view.
-
GVA_NO_WIN_FRAME
-
Set if no frame around the subview window is desired. This is set only if the view is meant to be a display view with its borders obscured (e.g. a text display that has no frame).
-
GVA_SAME_COLOR_AS_PARENT_WIN
-
Set if the background color of the view should be whatever color the parent window's background is. This is used in nearly every case where GVA_GENERIC_CONTENTS is also set.
-
GVA_VIEW_FOLLOWS_CONTENT_GEOMETRY
-
Set if the view should follow the size of the content in all non-scrollable dimensions. This can only be used if the view and the content are running in the same thread and if the content is not the process object.
-
GVA_WINDOW_COORDINATE_MOUSE_EVENTS
-
Set if mouse coordinates passed to the content are in window coordinates (relative to the window's origin) rather than document coordinates. If the document bounds are set outside the 16-bit boundaries of the standard graphics system, then this bit
must
be set. For full information on mouse event handling, see the Input chapter.
GVA_DONT_SEND_PTR_EVENTS
Set if pointer events should not be sent to the GenView's content. Use this for optimization if pointer events do not need to be sent through the view.
-
GVA_DONT_SEND_KBD_RELEASES
Set if no keyboard releases should be sent to the content. Applications will set this if they only care about presses, not releases.
-
GVA_SEND_ALL_KBD_CHARS
-
Set if the view should pass all keyboard presses and releases to the content before the Specific UI has a chance to interpret them. Normally, the Specific UI will receive keyboard events, filter out the ones it uses (including application-defined accelerators), and then pass the unused events on to the view. This flag will, in essence, override the authority of the Specific UI and therefore is generally highly undesirable. If an application finds a need for this flag, the application is responsible for passing unused characters on to the UI for proper processing. If the unused characters do not get passed on, synchronization problems could result; if an application decides to handle reserved characters, the specific UI's reaction will be unpredictable.
-
GVA_FOCUSABLE
-
Set if the view window can gain the input focus. This is set by default and should be set for nearly all views.
-
GVA_SCALE_TO_FIT
-
Set if the GenView should operate in "scale to fit" mode. In this mode, the vertical scale factor will automatically be set so the entire document fits vertically within the view window; the horizontal scale factor will then be set based on the vertical. This behavior can be modified by designating a page size (via
ATTR_GEN_VIEW_PAGE_SIZE
), by changing the scaling to be based on the horizontal (via the attribute
ATTR_GEN_VIEW_SCALE_TO_FIT_BASED_ON_X
), or by setting
ATTR_GEN_VIEW_SCALE_TO_FIT_BOTH_DIMENSIONS
.
-
GVA_ADJUST_FOR_ASPECT_RATIO
-
Set if the GenView should alter its scale factors appropriate to the aspect ratio of the screen.
MSG_GEN_VIEW_SET_ATTRS
void MSG_GEN_VIEW_SET_ATTRS(
word attrsToSet,
word attrsToClear,
VisUpdateMode updateMode);
This message changes the view's
GVI_attrs
record to new values.
Source: Unrestricted.
Destination: Any GenView object.
Parameters:
attrsToSet
A record of
GenViewAttrs
to set in
GVI_attrs
.
-
attrsToClear
- A record of
GenViewAttrs
; each flag set in this parameter will be cleared in
GVI_attrs
.
-
updateMode
- A
VisUpdateMode
indicating when the GenView should be visually updated.
Return: Nothing.
Interception: Generally not intercepted.
MSG_GEN_VIEW_GET_ATTRS
word MSG_GEN_VIEW_GET_ATTRS();
This message returns a word representing the current
GVI_attrs
record. To check whether an attribute is set, mask the returned word value against the attribute.
Source: Unrestricted.
Destination: Any GenView object.
Parameters: None.
Return: The current
GenViewAttrs
record in the GenView's
GVI_attrs
field.
Interception: Generally not intercepted.
|
GEOS SDK TechDocs
|
|
3 Basic View Attributes
|
3.2 Dimensional Attributes