home *** CD-ROM | disk | FTP | other *** search
- Documentation of GVDialog
- =========================
-
- GVDialog is a Turbo Pascal unit and is a part of the Graphics Vision
- package.
- GVDialog provides graphical dilog elements.
-
- All not documented methods are compatible with TV.
-
- Tinputline
- ----------
-
- procedure ChMCursor; virtual;
-
- If the mouse pointer is inside the inputline MyMouse.NewNum will be set
- to mcInput (see: TGView.ChMCursor)
-
- procedure DrawText (APos, EPos: Integer); virtual;
-
- draws the text of the inputline from position APos till EPos on the screen.
-
- procedure SetCurPos (ACurPos: Integer);
-
- sets the text cursor to the position ACurPos.
-
- Tarrowfield
- -----------
-
- provides an object that after being clicked with the mouse sends an
- evBroadCast event to its GOwner. Event.Command can have the values
- cmArrowUp or cmArrowDn (see top of GVDialog.INT). An arrowfield is used
- for example by Tnuminput objects.
-
- Tnuminput
- ---------
-
- modifies Tinputline so that it is only possible to input numbers.
- Tnuminput objects are able to communicate with Tarrowfield objects.
- Only integer numbers can be input. The limits of the integer value can be
- given by Tnuminput.Init or changed by SetLimit.
-
- In addition to the cursor right and cursor left key to change the cursor
- position it is possible to change the value by using the cursor up or
- cursor down key. You also can use PgUp, PgDn, Ctrl-PgUp, Ctrl-PgDn.
-
- Tbutton
- -------
-
- procedure DrawState (Down: Boolean); virtual;
-
- draws the button in the state given in Down (i.e. pushed or not pushed).
-
- procedure CondDrawState (Down: Boolean);
-
- is a help routine which should not be overwritten.
-
- procedure DrawText (Down: Boolean); virtual
-
- draws the text Title^ on the button. If you overwrite this method you can
- output other things on the button.
-
- TGbutton
- --------
-
- provides a slightly modified Tbutton object that draws a bitmap on the
- button not a text.
-
- constructor Init (var Bounds: TRect; ASign: Pointer; ACommand: Word; AFlag: Word);
-
- creates a new TGbutton object. ASign has to be a pointer to a bitmap
- created by VGAMem.GetImage which size is 30x20 pixel.
- (see: ExtGraph.SignX, ExtGraph.SignY and VGAMem-image routines)
-
- TRegler
- -------
-
- provides an object that allows you to change a real number within certain
- limits by a linear, graphical controller. Controllers (=TRegler objects)
- are always vertical.
- TRegler has the following functions:
-
- - dragging with the mouse
- - setting the value on a miximum or a minimum with POS1 or END
- - setting the value on the middle with space
- - change the value in big steps with PgUp/PgDn
- - change the value in little steps with cursor keys
-
- Constructor Init (var Bounds:TRect; AMinValue, AMaxValue:Real;
- ABezeichnung, AMinBez, AMidBez, AMaxBez:String);
-
- AMinValue, AMaxValue: limits of the real number (Value)
-
- ABezeichnung: title of the controller
-
- AMinBez: text for the lower limit
-
- AMidBez: text for the middle value
-
- AMaxBez: text for the upper limit
-
- Tcluster
- --------
-
- Value: Has in GV a length of 32 bits, i.e. Tcheckboxes objects can have up to
- 32 items.
-
- EnableMask: The first 32 items of a cluster can be (de)activated independently
- from each other. If the bit which belongs to a certain item is
- enabled this item is active else it is inactive.
-
- function ButtonState(Item: Integer): Boolean;
-
- If the item is active ButtonState gives back true.
-
- procedure DrawItem (Item: Integer); virtual;
-
- draws the item with the number item on the screen.
- You shouldn't call DrawItem directly.
-
- function GetIconNum (Id: Byte): Integer; virtual;
-
- returns the number of the icon that is drawn in front of the text.
- GetIconNum is overwritten by descendants of Tcluster. It substitutes the
- TV method DrawBox.
-
- procedure GetItemRect (Item: Integer; var Extent: TRect); virtual;
-
- returns the extent of an item on the screen.
-
- function MultiMark(Item: Integer): Byte;
-
- This function is used instead of Mark in Tmulticheckboxes objects.
- (see there)
-
- procedure SetButtonState(AMask: LongInt; Enable: Boolean);
-
- If Enable is true the bits enabled in AMask will be enabled in
- EnableMask, too. Otherwise these bits will be disabled in EnableMask.
-
- Tmulticheckboxes
- ----------------
-
- cfXXXXX constants:
- More-state-checkboxes use the cfXXXXX constants to define how many bits
- of the field value shall represent the actual state of an item.
- The hibyte of the constant define the amount of bits the lowbyte is used
- as a mask to evaluate the status bits.
- For example the value cfTwoBits shows, that value (a LongInt variable which
- consists of 32 bits) uses two bits for every item (so the maximum amount
- of items for the group is defined: in this case 16) and that the actual
- state is evaluated with the help of the bitmask $03.
-
- Flags: Flags is a field whose single bits are defined as cfXXXXX constants.
-
- SelRange: SelRange stores the amount of different states an item can have.
-
- States: States is a pointer at the bitmaps which represent the different states
- of an item. The bitmaps have to have to following form:
-
- - one word for the length of the bitmap counted in word
- (=amount of lines)
- - the bitmap as array of 16 bit words
-
- Example:
-
- DW 13 { first bitmap }
- DW 0000000000000000B
- DW 0000000000000000B
- DW 0011111111100000B
- DW 0000001000000000B
- DW 0000001000000000B
- DW 0000001000000000B
- DW 0000001000000000B
- DW 0000001000000000B
- DW 0000001000000000B
- DW 0000001000000000B
- DW 0011111111100000B
- DW 0000000000000000B
- DW 0000000000000000B
- DW 13 { second Bitmap }
- DW 0000000000000000B
- DW 0000000000000000B
- DW 0011111111100000B
- DW 0000100010000000B
- DW 0000100010000000B
- DW 0000100010000000B
- DW 0000100010000000B
- DW 0000100010000000B
- DW 0000100010000000B
- DW 0000100010000000B
- DW 0011111111100000B
- DW 0000000000000000B
- DW 0000000000000000B
-
- If more than one bitmap are needed these bitmaps simply are stored
- behind each other.
-
- Hint: If you create the bitmaps as data (e.g. on the heap) you will
- have to deallocate this data them when finishing the program.
- If a Tmulticheckboxes object is loaded from a stream it puts
- the bitmaps on the heap and does (de)allocate the memory
- neccessary for this itself.
-
- constructor Init(var Bounds: TRect; AStrings: PSItem;
- ASelRange: Byte; AFlags: Word; AStates: Pointer);
-
- creates a field of buttons with more than one state. First Tcluster.init
- is called. Then the amount of states is set with SelRange, the field Flags
- is set on the values given in AFlags. At last a pointer at the bitmaps
- representing the different states (AStates) is assigned to States.
-
- function MultiMark(Item: Integer): Byte;
-
- gives back the state of the item with the given number.
-
- Tstaticsign
- -----------
-
- provides a static bitmap.
-
- constructor Init (var Bounds: TRect; ASign: Pointer);
-
- creates a new Tstaticsign object. ASign has to be a pointer at a bitmap
- created by VGAMem.GetImage with the size 30x20 pixel.
- (see: ExtGraph.SignX, ExtGraph.SignY and VGAMem-image routines)
-
- Ticon
- -----
-
- modifies Tstaticsign similar as Tlabel does this with its ancestor
- Tstatictext.
- What was said for Tstaticsign is also valid here.
-
- procedure GetGVDialogCursor (n: Integer);
-
- provides the extra mouse pointers of GVDialog.