home *** CD-ROM | disk | FTP | other *** search
- Documentation of GVViews
- ========================
-
- GVViews is a Turbo Pascal unit and is a part of the Graphics Vision
- package.
- GVViews provides basic GV classes.
-
- Methods that are not mentioned are compatible with TV.
-
- WindowsCmds: Stores a set of commands. If there are windows on the desktop
- this commands are inactive else active. The standard set consists
- of cmTile, cmCascade, cmNext and cmPrev. If you wish to
- deactivate more than these commands automatically if there are
- no windows on the desktop simply add these commands to the set.
-
- TVRect
- ------
-
- This record stores a number of rectangles within a block. Count is the amount
- of the stored rectangles. Next to a pointer at a block which eventually
- follows.
- (see TGview.GetVisibleRect)
-
-
- TGview
- ------
-
- GOwner, GNext: have to be used instead of Owner and Next.
-
- CursorSize: The text cursor in GV is drawn as a white bar. With this variable
- you can adjust the size of this bar (for example in a constructor
- of an Tinputline object).
-
- procedure ChangeBounds (var R: TRect); virtual;
-
- does not call DrawView as the TV method after adjusting the borders of an
- object. This is only done by groups responsible for the object (and only by
- descendants of TWindow).
-
- procedure ChMCursor; virtual;
-
- is for adjusting the mouse pointer according to its position within the
- object. The routine inspects whether the mouse pointer is on certain
- coordinates and eventually registers in MyMouse.NewNum the number of a new
- mouse pointer. To adjust the mouse pointer you will have to override this
- method.
-
- procedure DeleteRectList (var RectList: PVRect);
-
- deletes a list of rectangles (type TVRect -> see there) from the Heap.
-
- procedure DrawRectList (var RectList: PVRect);
-
- draws the part of an object which is referred to by RectList.
- If possible VGA rest memory or the metafile concept of unit MetaGr is used.
- (also see GInfo.DOC; Option flags)
-
- procedure GetVisibleRect (var RectList: PVRect);
-
- examines which part of an object is visible at the moment and gives back
- this part divided into rectangles (see TVRect)
- This method is for drawing into windows which lie in the background of the
- desktop. If you wish to draw into a window which is inactive you first will
- have to find out the visible part(s) via GetVisibleRect. Then you call
- DrawRectList in order to draw this part of the window. At last you should
- remove the rectlist from memory using DeleteRectList.
-
- Example : procedure TMyWindow.DrawOnlyVisiblePart;
- var RectList: PVRect;
- Begin
- GetVisibleRect (RectList);
- DrawRectList (RectList);
- DeleteRectList (RectList);
- End;
-
- (Hint: Please note that DrawRectList calls Draw.)
-
- procedure GetInVisibleRect (var RectList: PVRect);
-
- examines which part of an object is invisible at the moment and gives
- back this part divided into rectangles. (see TVRect)
- This routine is the direct counterpart of GetVisibleRect.
-
- (Hint: It is useful to use the three last mentioned methods only in connection
- with window objects.)
-
- procedure GetColor(Color: Word): Word;
-
- gives back the entry of the application palette which Color refers to.
- Color always refers to the palette of the object which refers to the
- palette of its owner and so on. Is Color out of the range of the palette
- it refers to the next owner palette that is long enough.
-
- procedure GetStandardFont: Word;
-
- groups contain a field called StandardFont. In this variable the
- standardfont of the group is stored (see ftXXXXX in ExtGraph). This
- function returns the value of StandardFont or ftSansSerif if there is no
- group responsible for the object. The standard font is e.g. used by buttons
- (A button in a messagebox uses a bigger font that a button in a normal
- dialog window.) (see TGgroup.StandardFont)
-
- procedure SetViewPort; virtual;
-
- sets Gr.ClipRect and Gr.DrawOrigin which are responsible that every output
- on the screen is cut on the borders of the object. You will have to call
- SetViewPort in your draw methods before you are able to start drawing.
- (see example program GVGUID06.PAS or DEMO.PAS)
-
- procedure RestoreViewPort; virtual;
-
- restores the settings which were current before calling SetViewPort.
-
- Tframe
- ------
-
- This object provides title line and frame of Twindow objects. It is only
- used internally. So it will not be documented.
-
- Tbackground
- -----------
-
- procedure Draw; virtual;
-
- The color of a Tbackground object can be adjusted with the help of the
- palette entries. Tbackgrounds allways expects the first entry to be the
- entry of the background color.
-
- Tscrollbar
- ----------
-
- Flags: is for storing the sbXXXX flags
-
- (Hint: Besides the flags known from TV there is one another flag in GV.
- This is the flag sbDoScrolling. If enabled and the scrollbar
- indicator is "touched" with the mouse ScrollDraw will be called
- with any change of the indicator (normally ScrollDraw is called after
- you have positioned the indicator).
-
- procedure Init (var Bounds: TRect);
-
- automatically detects whether it is a vertical (Size.X = 18) or a
- horizontal scrollbar.
-
- If Min and Max are equal the flag sfDisabled will be enabled automatically
- in state.
-
- Tscroller
- ---------
-
- TextSize: defines how many pixels every scrollstep will have.
- standard: X:8; Y:18
- (see Demo.PAS)
-
- Tlistviewer
- -----------
-
- Tlistviewer objects cannot have more that on column in GV.
- So the respective parameters are dropped.
-
- procedure DrawItem (Item: Integer); virtual;
-
- draws the item with the number given in item on the screen. DrawItem
- should not be called directly.
-
- TGgroup
- -------
-
- StandardFont: This variable stores the actual font (see ftXXXXXX in ExtGraph).
- With the help of TGview.GetStandrdFont (see there) this value
- can be evaluated by the subviews.
-
- procedure ChMCursor; virtual;
-
- calls the ChMCursor methods of all subviews the mouse pointer is in at the
- moment. (see TGview.CgMCursor)
-
- procedure Lock;
-
- increases LockFlag but does not write any outputs into a buffer.
- Lock only prevents that screen output is made.
-
- procedure ReDraw;
-
- only calls TGgroup.Draw.
-
- procedure UnLock;
-
- decreases LockFlag and calls DrawView.
-
- Twindow
- -------
-
- TWindow objects have got a background object in GV (in contrast to TV).
- (see InitBackground)
-
- Procedure DragView (Event: TEvent; Mode: Byte; var Limits: TRect;
- MinSize, MaxSize: TPoint; ResMode: Byte);
-
- Only Twindow and its descendants have got a functionable DragView method.
- The parameter ResMode is set on one of the ResMode values (see GVViews.INT)
- which represent the clicked corner when the object is resized with the mouse.
-
- Procedure InitFrame; virtual;
-
- initiates a Tframe object for the window and gives back a pointer at this
- object in Frame.
-
- Procedure InitBackground; virtual;
-
- initiates a Tbackground object for the window and gives back a pointer
- at this object in Background.
-
- Procedure RestoreBackground; virtual;
-
- draws the area behind the window by drawing the windows positioned there.
- Restoring the background for a certain rectangle (also a part of the
- windows):
-
- - store the rectangle you want to restore in msgClip
- - send an evBroadCast event to the GOwner group
- (Event.Command = cmRestoreBackground; Event.InfoPtr is a pointer on an
- object which will not be drawn which means normally @Self)
-
- Procedure GetGVViewsCursor (n: Integer);
-
- provides the extra mouse pointers used in GVViews.