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

  1. Documentation of GVDialog
  2. =========================
  3.  
  4. GVDialog is a Turbo Pascal unit and is a part of the Graphics Vision
  5. package.
  6. GVDialog provides graphical dilog elements.
  7.  
  8. All not documented methods are compatible with TV.
  9.  
  10. Tinputline
  11. ----------
  12.  
  13. procedure ChMCursor; virtual;
  14.  
  15.   If the mouse pointer is inside the inputline MyMouse.NewNum will be set
  16.   to mcInput (see: TGView.ChMCursor)
  17.  
  18. procedure DrawText (APos, EPos: Integer); virtual;
  19.  
  20.   draws the text of the inputline from position APos till EPos on the screen.
  21.  
  22. procedure SetCurPos (ACurPos: Integer);
  23.  
  24.   sets the text cursor to the position ACurPos.
  25.  
  26. Tarrowfield
  27. -----------
  28.  
  29.   provides an object that after being clicked with the mouse sends an
  30.   evBroadCast event to its GOwner. Event.Command can have the values
  31.   cmArrowUp or cmArrowDn (see top of GVDialog.INT). An arrowfield is used
  32.   for example by Tnuminput objects.
  33.  
  34. Tnuminput
  35. ---------
  36.  
  37.   modifies Tinputline so that it is only possible to input numbers.
  38.   Tnuminput objects are able to communicate with Tarrowfield objects.
  39.   Only integer numbers can be input. The limits of the integer value can be
  40.   given by Tnuminput.Init or changed by SetLimit.
  41.  
  42.   In addition to the cursor right and cursor left key to change the cursor
  43.   position it is possible to change the value by using the cursor up or
  44.   cursor down key. You also can use PgUp, PgDn, Ctrl-PgUp, Ctrl-PgDn.
  45.  
  46. Tbutton
  47. -------
  48.  
  49. procedure DrawState (Down: Boolean); virtual;
  50.  
  51.   draws the button in the state given in Down (i.e. pushed or not pushed).
  52.  
  53. procedure CondDrawState (Down: Boolean);
  54.  
  55.   is a help routine which should not be overwritten.
  56.  
  57. procedure DrawText (Down: Boolean); virtual
  58.  
  59.   draws the text Title^ on the button. If you overwrite this method you can
  60.   output other things on the button.
  61.  
  62. TGbutton
  63. --------
  64.  
  65.   provides a slightly modified Tbutton object that draws a bitmap on the
  66.   button not a text.
  67.  
  68. constructor Init (var Bounds: TRect; ASign: Pointer; ACommand: Word; AFlag: Word);
  69.  
  70.   creates a new TGbutton object. ASign has to be a pointer to a bitmap
  71.   created by VGAMem.GetImage which size is 30x20 pixel.
  72.   (see: ExtGraph.SignX, ExtGraph.SignY and VGAMem-image routines)
  73.  
  74. TRegler
  75. -------
  76.  
  77.   provides an object that allows you to change a real number within certain
  78.   limits by a linear, graphical controller. Controllers (=TRegler objects)
  79.   are always vertical.
  80.   TRegler has the following functions:
  81.  
  82.     - dragging with the mouse
  83.     - setting the value on a miximum or a minimum with POS1 or END
  84.     - setting the value on the middle with space
  85.     - change the value in big steps with PgUp/PgDn
  86.     - change the value in little steps with cursor keys
  87.  
  88. Constructor Init (var Bounds:TRect; AMinValue, AMaxValue:Real;
  89.       ABezeichnung, AMinBez, AMidBez, AMaxBez:String);
  90.  
  91.   AMinValue, AMaxValue: limits of the real number (Value)
  92.  
  93.   ABezeichnung: title of the controller
  94.  
  95.   AMinBez: text for the lower limit
  96.  
  97.   AMidBez: text for the middle value
  98.  
  99.   AMaxBez: text for the upper limit
  100.  
  101. Tcluster
  102. --------
  103.  
  104. Value: Has in GV a length of 32 bits, i.e. Tcheckboxes objects can have up to
  105.        32 items.
  106.  
  107. EnableMask: The first 32 items of a cluster can be (de)activated independently
  108.         from each other. If the bit which belongs to a certain item is
  109.         enabled this item is active else it is inactive.
  110.  
  111. function ButtonState(Item: Integer): Boolean;
  112.  
  113.   If the item is active ButtonState gives back true.
  114.  
  115. procedure DrawItem (Item: Integer); virtual;
  116.  
  117.   draws the item with the number item on the screen.
  118.   You shouldn't call DrawItem directly.
  119.  
  120. function GetIconNum (Id: Byte): Integer; virtual;
  121.  
  122.   returns the number of the icon that is drawn in front of the text.
  123.   GetIconNum is overwritten by descendants of Tcluster. It substitutes the
  124.   TV method DrawBox.
  125.  
  126. procedure GetItemRect (Item: Integer; var Extent: TRect); virtual;
  127.  
  128.   returns the extent of an item on the screen.
  129.  
  130. function MultiMark(Item: Integer): Byte;
  131.  
  132.   This function is used instead of Mark in Tmulticheckboxes objects.
  133.   (see there)
  134.  
  135. procedure SetButtonState(AMask: LongInt; Enable: Boolean);
  136.  
  137.   If Enable is true the bits enabled in AMask will be enabled in
  138.   EnableMask, too. Otherwise these bits will be disabled in EnableMask.
  139.  
  140. Tmulticheckboxes
  141. ----------------
  142.  
  143. cfXXXXX constants:
  144.   More-state-checkboxes use the cfXXXXX constants to define how many bits
  145.   of the field value shall represent the actual state of an item.
  146.   The hibyte of the constant define the amount of bits the lowbyte is used
  147.   as a mask to evaluate the status bits.
  148.   For example the value cfTwoBits shows, that value (a LongInt variable which
  149.   consists of 32 bits) uses two bits for every item (so the maximum amount
  150.   of items for the group is defined: in this case 16) and that the actual
  151.   state is evaluated with the help of the bitmask $03.
  152.  
  153. Flags: Flags is a field whose single bits are defined as cfXXXXX constants.
  154.  
  155. SelRange: SelRange stores the amount of different states an item can have.
  156.  
  157. States: States is a pointer at the bitmaps which represent the different states
  158.     of an item. The bitmaps have to have to following form:
  159.  
  160.       - one word for the length of the bitmap counted in word
  161.         (=amount of lines)
  162.       - the bitmap as array of 16 bit words
  163.  
  164.     Example:
  165.  
  166.       DW    13                      { first bitmap }
  167.       DW    0000000000000000B
  168.       DW    0000000000000000B
  169.       DW    0011111111100000B
  170.       DW    0000001000000000B
  171.       DW    0000001000000000B
  172.       DW    0000001000000000B
  173.       DW    0000001000000000B
  174.       DW    0000001000000000B
  175.       DW    0000001000000000B
  176.       DW    0000001000000000B
  177.       DW    0011111111100000B
  178.       DW    0000000000000000B
  179.       DW    0000000000000000B
  180.       DW    13                      { second Bitmap }
  181.       DW    0000000000000000B
  182.       DW    0000000000000000B
  183.       DW    0011111111100000B
  184.       DW    0000100010000000B
  185.       DW    0000100010000000B
  186.       DW    0000100010000000B
  187.       DW    0000100010000000B
  188.       DW    0000100010000000B
  189.       DW    0000100010000000B
  190.       DW    0000100010000000B
  191.       DW    0011111111100000B
  192.       DW    0000000000000000B
  193.       DW    0000000000000000B
  194.  
  195.     If more than one bitmap are needed these bitmaps simply are stored
  196.     behind each other.
  197.  
  198.     Hint: If you create the bitmaps as data (e.g. on the heap) you will
  199.           have to deallocate this data them when finishing the program.
  200.           If a Tmulticheckboxes object is loaded from a stream it puts
  201.           the bitmaps on the heap and does (de)allocate the memory
  202.           neccessary for this itself.
  203.  
  204. constructor Init(var Bounds: TRect; AStrings: PSItem;
  205.     ASelRange: Byte; AFlags: Word; AStates: Pointer);
  206.  
  207.   creates a field of buttons with more than one state. First Tcluster.init
  208.   is called. Then the amount of states is set with SelRange, the field Flags
  209.   is set on the values given in AFlags. At last a pointer at the bitmaps
  210.   representing the different states (AStates) is assigned to States.
  211.  
  212. function MultiMark(Item: Integer): Byte;
  213.  
  214.   gives back the state of the item with the given number.
  215.  
  216. Tstaticsign
  217. -----------
  218.  
  219.   provides a static bitmap.
  220.  
  221. constructor Init (var Bounds: TRect; ASign: Pointer);
  222.  
  223.   creates a new Tstaticsign object. ASign has to be a pointer at a bitmap
  224.   created by VGAMem.GetImage with the size 30x20 pixel.
  225.   (see: ExtGraph.SignX, ExtGraph.SignY and VGAMem-image routines)
  226.  
  227. Ticon
  228. -----
  229.  
  230.   modifies Tstaticsign similar as Tlabel does this with its ancestor
  231.   Tstatictext.
  232.   What was said for Tstaticsign is also valid here.
  233.  
  234. procedure GetGVDialogCursor (n: Integer);
  235.  
  236.   provides the extra mouse pointers of GVDialog.