home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / tvision / gravis / gv / gvviews.doc < prev    next >
Encoding:
Text File  |  1994-05-23  |  7.6 KB  |  227 lines

  1. Documentation of GVViews
  2. ========================
  3.  
  4. GVViews is a Turbo Pascal unit and is a part of the Graphics Vision
  5. package.
  6. GVViews provides basic GV classes.
  7.  
  8. Methods that are not mentioned are compatible with TV.
  9.  
  10. WindowsCmds: Stores a set of commands. If there are windows on the desktop
  11.              this commands are inactive else active. The standard set consists
  12.              of cmTile, cmCascade, cmNext and cmPrev. If you wish to
  13.          deactivate more than these commands automatically if there are
  14.          no windows on the desktop simply add these commands to the set.
  15.  
  16. TVRect
  17. ------
  18.  
  19. This record stores a number of rectangles within a block. Count is the amount
  20. of the stored rectangles. Next to a pointer at a block which eventually
  21. follows.
  22. (see TGview.GetVisibleRect)
  23.  
  24.  
  25. TGview
  26. ------
  27.  
  28. GOwner, GNext: have to be used instead of Owner and Next.
  29.  
  30. CursorSize: The text cursor in GV is drawn as a white bar. With this variable
  31.         you can adjust the size of this bar (for example in a constructor
  32.         of an Tinputline object).
  33.  
  34. procedure ChangeBounds (var R: TRect); virtual;
  35.  
  36.   does not call DrawView as the TV method after adjusting the borders of an
  37.   object. This is only done by groups responsible for the object (and only by
  38.   descendants of TWindow).
  39.  
  40. procedure ChMCursor; virtual;
  41.  
  42.   is for adjusting the mouse pointer according to its position within the
  43.   object. The routine inspects whether the mouse pointer is on certain
  44.   coordinates and eventually registers in MyMouse.NewNum the number of a new
  45.   mouse pointer. To adjust the mouse pointer you will have to override this
  46.   method.
  47.  
  48. procedure DeleteRectList (var RectList: PVRect);
  49.  
  50.   deletes a list of rectangles (type TVRect -> see there) from the Heap.
  51.  
  52. procedure DrawRectList (var RectList: PVRect);
  53.  
  54.   draws the part of an object which is referred to by RectList.
  55.   If possible VGA rest memory or the metafile concept of unit MetaGr is used.
  56.   (also see GInfo.DOC; Option flags)
  57.  
  58. procedure GetVisibleRect (var RectList: PVRect);
  59.  
  60.   examines which part of an object is visible at the moment and gives back
  61.   this part divided into rectangles (see TVRect)
  62.   This method is for drawing into windows which lie in the background of the
  63.   desktop. If you wish to draw into a window which is inactive you first will
  64.   have to find out the visible part(s) via GetVisibleRect. Then you call
  65.   DrawRectList in order to draw this part of the window. At last you should
  66.   remove the rectlist from memory using DeleteRectList.
  67.  
  68.   Example : procedure TMyWindow.DrawOnlyVisiblePart;
  69.         var RectList: PVRect;
  70.         Begin
  71.           GetVisibleRect (RectList);
  72.           DrawRectList (RectList);
  73.           DeleteRectList (RectList);
  74.         End;
  75.  
  76.   (Hint: Please note that DrawRectList calls Draw.)
  77.  
  78. procedure GetInVisibleRect (var RectList: PVRect);
  79.  
  80.   examines which part of an object is invisible at the moment and gives
  81.   back this part divided into rectangles. (see TVRect)
  82.   This routine is the direct counterpart of GetVisibleRect.
  83.  
  84. (Hint: It is useful to use the three last mentioned methods only in connection
  85.        with window objects.)
  86.  
  87. procedure GetColor(Color: Word): Word;
  88.  
  89.   gives back the entry of the application palette which Color refers to.
  90.   Color always refers to the palette of the object which refers to the
  91.   palette of its owner and so on. Is Color out of the range of the palette
  92.   it refers to the next owner palette that is long enough.
  93.  
  94. procedure GetStandardFont: Word;
  95.  
  96.   groups contain a field called StandardFont. In this variable the
  97.   standardfont of the group is stored (see ftXXXXX in ExtGraph). This
  98.   function returns the value of StandardFont or ftSansSerif if there is no
  99.   group responsible for the object. The standard font is e.g. used by buttons
  100.   (A button in a messagebox uses a bigger font that a button in a normal
  101.   dialog window.) (see TGgroup.StandardFont)
  102.  
  103. procedure SetViewPort; virtual;
  104.  
  105.   sets Gr.ClipRect and Gr.DrawOrigin which are responsible that every output
  106.   on the screen is cut on the borders of the object. You will have to call
  107.   SetViewPort in your draw methods before you are able to start drawing.
  108.   (see example program GVGUID06.PAS or DEMO.PAS)
  109.  
  110. procedure RestoreViewPort; virtual;
  111.  
  112.   restores the settings which were current before calling SetViewPort.
  113.  
  114. Tframe
  115. ------
  116.  
  117.   This object provides title line and frame of Twindow objects. It is only
  118.   used internally. So it will not be documented.
  119.  
  120. Tbackground
  121. -----------
  122.  
  123. procedure Draw; virtual;
  124.  
  125.   The color of a Tbackground object can be adjusted with the help of the
  126.   palette entries. Tbackgrounds allways expects the first entry to be the
  127.   entry of the background color.
  128.  
  129. Tscrollbar
  130. ----------
  131.  
  132.   Flags: is for storing the sbXXXX flags
  133.  
  134.   (Hint: Besides the flags known from TV there is one another flag in GV.
  135.      This is the flag sbDoScrolling. If enabled and the scrollbar
  136.      indicator is "touched" with the mouse ScrollDraw will be called
  137.      with any change of the indicator (normally ScrollDraw is called after
  138.      you have positioned the indicator).
  139.  
  140. procedure Init (var Bounds: TRect);
  141.  
  142.   automatically detects whether it is a vertical (Size.X = 18) or a
  143.   horizontal scrollbar.
  144.  
  145. If Min and Max are equal the flag sfDisabled will be enabled automatically
  146. in state.
  147.  
  148. Tscroller
  149. ---------
  150.  
  151.   TextSize: defines how many pixels every scrollstep will have.
  152.         standard: X:8; Y:18
  153.      (see Demo.PAS)
  154.  
  155. Tlistviewer
  156. -----------
  157.  
  158. Tlistviewer objects cannot have more that on column in GV.
  159. So the respective parameters are dropped.
  160.  
  161. procedure DrawItem (Item: Integer); virtual;
  162.  
  163.   draws the item with the number given in item on the screen. DrawItem
  164.   should not be called directly.
  165.  
  166. TGgroup
  167. -------
  168.  
  169. StandardFont:  This variable stores the actual font (see ftXXXXXX in ExtGraph).
  170.            With the help of TGview.GetStandrdFont (see there) this value
  171.            can be evaluated by the subviews.
  172.  
  173. procedure ChMCursor; virtual;
  174.  
  175.   calls the ChMCursor methods of all subviews the mouse pointer is in at the
  176.   moment. (see TGview.CgMCursor)
  177.  
  178. procedure Lock;
  179.  
  180.   increases LockFlag but does not write any outputs into a buffer.
  181.   Lock only prevents that screen output is made.
  182.  
  183. procedure ReDraw;
  184.  
  185.   only calls TGgroup.Draw.
  186.  
  187. procedure UnLock;
  188.  
  189.   decreases LockFlag and calls DrawView.
  190.  
  191. Twindow
  192. -------
  193.  
  194. TWindow objects have got a background object in GV (in contrast to TV).
  195. (see InitBackground)
  196.  
  197. Procedure DragView (Event: TEvent; Mode: Byte; var Limits: TRect;
  198.        MinSize, MaxSize: TPoint; ResMode: Byte);
  199.  
  200.   Only Twindow and its descendants have got a functionable DragView method.
  201.   The parameter ResMode is set on one of the ResMode values (see GVViews.INT)
  202.   which represent the clicked corner when the object is resized with the mouse.
  203.  
  204. Procedure InitFrame; virtual;
  205.  
  206.   initiates a Tframe object for the window and gives back a pointer at this
  207.   object in Frame.
  208.  
  209. Procedure InitBackground; virtual;
  210.  
  211.   initiates a Tbackground object for the window and gives back a pointer
  212.   at this object in Background.
  213.  
  214. Procedure RestoreBackground; virtual;
  215.  
  216.   draws the area behind the window by drawing the windows positioned there.
  217.   Restoring the background for a certain rectangle (also a part of the
  218.   windows):
  219.  
  220.   - store the rectangle you want to restore in msgClip
  221.   - send an evBroadCast event to the GOwner group
  222.     (Event.Command = cmRestoreBackground; Event.InfoPtr is a pointer on an
  223.      object which will not be drawn which means normally @Self)
  224.  
  225. Procedure GetGVViewsCursor (n: Integer);
  226.  
  227.   provides the extra mouse pointers used in GVViews.