GEOS SDK TechDocs
|
|
|
2 Getting Started: View Basics
|
4 Advanced Concepts and Uses
The GenView has several instance data fields that it uses to maintain its current status. It also has other attribute fields that determine its scrolling, scaling, and sizing behavior as well as the manner in which it accepts input events. Listed in GenView Instance Data are all the GenView's instance data fields. Each is described later in the chapter. Additionally, each is dynamically changeable with the use of messages defined by GenView.
Code Display 9-3 GenView Instance Data
/* Default settings are shown in the definitions. Other possible settings are * shown in a comment after the definition. */
@instance PointDWFixed GVI_origin = {{0, 0}, {0,0}};
@instance RectDWord GVI_docBounds = {0, 0, 0, 0};
@instance PointDWord GVI_increment = {20, 15};
@instance PointWWFixed GVI_scaleFactor = {{0, 1}, {0, 1}};
@instance ColorQuad GVI_color = {WHITE, 0, 0, 0};
@instance GenViewAttrs GVI_attrs = (GVA_FOCUSABLE);
/* Possible flags for GVI_attrs:
* GVA_CONTROLLED GVA_GENERIC_CONTENTS
* GVA_TRACK_SCROLLING GVA_DRAG_SCROLLING
* GVA_NO_WIN_FRAME GVA_SAME_COLOR_AS_PARENT_WIN
* GVA_VIEW_FOLLOWS_CONTENT_GEOMETRY
* GVA_WINDOW_COORDINATE_MOUSE_EVENTS
* GVA_DONT_SEND_PTR_EVENTS GVA_DONT_SEND_KBD_RELEASES
* GVA_SEND_ALL_KBD_CHARS GVA_FOCUSABLE
* GVA_SCALE_TO_FIT GVA_ADJUST_FOR_ASPECT_RATIO */
@instance GenViewDimensionAttrs GVI_horizAttrs = 0;
@instance GenViewDimensionAttrs GVI_vertAttrs = 0;
/* Possible flags for the dimension attribute records:
* GVDA_SCROLLABLE GVDA_SPLITTABLE
* GVDA_TAIL_ORIENTED GVDA_DONT_DISPLAY_SCROLLBAR
* GVDA_NO_LARGER_THAN_CONTENT
* GVDA_NO_SMALLER_THAN_CONTENT
* GVDA_SIZE_A_MULTIPLE_OF_INCREMENT
* GVDA_KEEP_ASPECT_RATIO */
@instance GenViewInkType GVI_inkType = GVIT_PRESSES_ARE_NOT_INK; /* Possible flags for GVI_inkType: * GVIT_PRESSES_ARE_NOT_INK GVIT_INK_WITH_STANDARD_OVERRIDE * GVIT_PRESSES_ARE_INK GVIT_QUERY_OUTPUT */
@instance @optr GVI_content;
@instance @optr GVI_horizLink;
@instance @optr GVI_vertLink;
/* The following are the hints and attributes defined for the GenView's vardata. * Because GenViewClass is a subclass of GenClass, it inherits all other generic * hints as well. */
@vardata void HINT_VIEW_LEAVE_ROOM_FOR_VERT_SCROLLER;
@vardata void HINT_VIEW_LEAVE_ROOM_FOR_HORIZ_SCROLLER;
@vardata void HINT_VIEW_IMMEDIATE_DRAG_UPDATES;
@vardata void HINT_VIEW_DELAYED_DRAG_UPDATES;
@vardata void HINT_VIEW_REMOVE_SCROLLERS_WHEN_NOT_SCROLLABLE;
@vardata void HINT_VIEW_SHOW_SCROLLERS_WHEN_NOT_SCROLLABLE;
@vardata InkDestinationInfoParams ATTR_GEN_VIEW_INK_DESTINATION_INFO; @reloc ATTR_GEN_VIEW_INK_DESTINATION_INFO, word_offsetof(InkDestinationInfoParams, IDIP_dest), optr;
@vardata void ATTR_GEN_VIEW_DOES_NOT_ACCEPT_TEXT_INPUT;
@vardata XYSize ATTR_GEN_VIEW_PAGE_SIZE;
@vardata void ATTR_GEN_VIEW_SCALE_TO_FIT_BASED_ON_X;
@vardata void ATTR_GEN_VIEW_SCALE_TO_FIT_BOTH_DIMENSIONS;
@vardata void ATTR_GEN_VIEW_DO_NOT_WIN_SCROLL;
/* By default, all GenView objects are targetable. */
@default GI_attrs = @default | GA_TARGETABLE;
The attributes shown in GenView Instance Data are all dynamically changeable; in fact, many (such as the scale factor) become interesting only when set or changed as a feature of the application (as in the scaling features of GeoWrite and GeoDraw). Each attribute, therefore, is described under its appropriate section of this chapter.
GEOS SDK TechDocs
|
|
|
2 Getting Started: View Basics
|
4 Advanced Concepts and Uses