home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / utility / gemfut15 / gemutil.doc < prev    next >
Encoding:
Text File  |  1990-06-29  |  27.7 KB  |  493 lines

  1.  
  2. **************************************************************************
  3. *
  4. * GEMUTIL.DOC - Descriptions of the utility functions in GEMFAST.
  5. *
  6. *  05/26/90 - v1.4
  7. *             The rsc_gstrings()/rsc_sstrings() routines now support ICONs.
  8. *             The following functions are new with this release:
  9. *               frm_dsdial()
  10. *               obj_rbselect()
  11. *               obj_xtfind()
  12. *
  13. *  08/28/89 - v1.3
  14. *             Massive changes have been made to the utilty routines, and
  15. *             to this document.  Your best bet is to read the entire doc
  16. *             over again.
  17. *
  18. *             Most of the changes involve renaming routines to move toward
  19. *             a consistant naming standard (which is to pave the way for
  20. *             things planned for v2.0).  I've done my best to cover the
  21. *             name changes with #define statements in GEMFAST.H, so your
  22. *             existing code should work, but you should make every effort
  23. *             to convert existing and new code to the new names.  Sorry,
  24. *             I guess I wasn't thinking far enough ahead when I did the
  25. *             first release.
  26. *             
  27. *             For all the renamed routines, I've put the old name in
  28. *             the title bar of the new function's name.
  29. **************************************************************************
  30.  
  31. This document describes the functions in the AESUTxxx modules of the
  32. GEMFAST bindings.  These are not GEM function calls, and thus are not
  33. documented in standard GEM programming guides.
  34.  
  35. Within this document, the most changes will be indicated by a vertical bar 
  36. and the change level (|vX.X).
  37.  
  38. Definitions:
  39.  
  40. NO_OBJECT - A constant defined in GEMFAST.H; it has a value of -1.  This
  41.             value is used by most object-related utilties to indicate that
  42.             no object was found with the criteria specified in the search
  43.             (eg, for objc_find(), obj_rbfind(), etc).
  44.  
  45. GRECT     - A graphics-type rectangle of the form x,y,w,h.  A GRECT
  46.             describes a screen area by defining the x/y of the upper left
  47.             corner, and the width and height of the area.
  48.  
  49. VRECT     - A vdi-type rectangle of the form x1,y1,x2,y2.  A VRECT
  50.             describes a screen area by defining the upper left and lower
  51.             right corners of the area in x/y coordinates.
  52.  
  53. xRECT     - Used to indicate that either of the above types is accepted.
  54.  
  55. ;*************************************************************************
  56. ; Rectangle utilties.
  57. ;*************************************************************************
  58.  
  59. ;-------------------------------------------------------------------------
  60. ; rc_copy
  61. ;-------------------------------------------------------------------------
  62.  
  63. void rc_copy (xRECT *source, xRECT *dest)
  64.  
  65.         This function copies a rectangle.  It will copy either a GRECT or
  66.         VRECT type rectangle.  More generally, it will copy 2 longwords
  67.         from source to dest, they don't have to be rectangles at all.
  68.          >> NOTE BACKWARDS ORDER OF SOURCE & DEST.  Sorry, not my decision.
  69.  
  70. ;-------------------------------------------------------------------------
  71. ; rc_equal
  72. ;-------------------------------------------------------------------------
  73.  
  74. bool rc_equal(xRECT *rect1, xRECT *rect2)
  75.         
  76.         This function tests 2 rectangles for equality and returns TRUE/FALSE
  77.         (1/0) accordingly.  Works on GRECT or VRECT type rectangles, but
  78.         both rectangles must be of the same type.  More generally, this
  79.         function compare 2 sets of 2 contiguous longwords.
  80.  
  81. ;-------------------------------------------------------------------------
  82. ; rc_intersect
  83. ;-------------------------------------------------------------------------
  84.      
  85. bool rc_intersect(GRECT *rect1, GRECT *rect2)
  86.  
  87.         This function computes the intersection of 2 rectangles.  It works
  88.         only for GRECT type rectangles.  The intersection is the parts of 
  89.         two rectangles which overlap each other; this function is typically
  90.         used in processing the AES window-update rectangle list.  The result
  91.         is placed into 'rect2', overlaying the original data (again, not my
  92.         decision).  TRUE/FALSE is returned, depending on whether the 
  93.         rectangles had a common intersected area or not; the values in 
  94.         'rect2' are modified regardless of whether there was an intersection or not.
  95.         If the rectangle representing the intersecting area has a width or
  96.         height of zero, this routine will return TRUE.
  97.  
  98. ;-------------------------------------------------------------------------
  99. ; rc_union
  100. ;-------------------------------------------------------------------------
  101.  
  102. void rc_union(GRECT *rect1, GRECT *rect2)
  103.  
  104.         This function computes the union of two rectangles.  The union is 
  105.         the single rectangle that encompases all the area defined by the 
  106.         individual rectangles.  It works only for GRECT type rectangles.  
  107.         The result is placed into 'rect2'.
  108.  
  109. ;-------------------------------------------------------------------------
  110. ; rc_vtog
  111. ;-------------------------------------------------------------------------
  112.      
  113. void rc_vtog(VRECT *rect1, GRECT *rect2)
  114.  
  115.         This function converts a VRECT rectangle to a GRECT rectangle.
  116.         Do not specify the same rectangle for input and output.
  117.  
  118. ;-------------------------------------------------------------------------
  119. ; rc_gtov
  120. ;-------------------------------------------------------------------------
  121.         
  122. void rc_gtov(GRECT *rect1, VRECT *rect2)
  123.  
  124.         This function converts a GRECT rectangle to a VRECT rectangle.
  125.         Do not specify the same rectangle for input and output.
  126.  
  127. ;-------------------------------------------------------------------------
  128. ; rc_vadjust            (formerly objclv_adjust)
  129. ; rc_gadjust            (formerly objclg_adjust)
  130. ;-------------------------------------------------------------------------
  131.         
  132. void rc_vadjust(VRECT *rect, int h_adjust, int v_adjust);
  133. void rc_gadjust(GRECT *rect, int h_adjust, int v_adjust);
  134.  
  135.         These functions expand or contract a rectangle by a given amount
  136.         in each axis. A positive value exands the area, a negative
  137.         value contracts it.  You must use rc_gadjust for GRECTs and
  138.         rc_vadjust for VRECTs.  
  139.         
  140. |v1.3   Negative results are prevented by the adjust routines; zero will be 
  141. |       placed into any rectangle structure element which would have been 
  142. |       negative after the adjustment.
  143.         
  144. ;*************************************************************************
  145. ; Object utilities.
  146. ;*************************************************************************
  147.  
  148. ;-------------------------------------------------------------------------
  149. ; obj_flchange          (formerly objfl_change)
  150. ;-------------------------------------------------------------------------
  151.  
  152. void obj_flchange(OBJECT *tree, int object, int flagsmask, int updateflag);
  153.  
  154.         This function sets or resets bits in an object's ob_flags field.
  155.         Depending on the setting of 'updateflag' the object is updated 
  156.         on the screen or not. (Update is done via objc_draw internally).
  157.         If the high bit of 'flagsmask' is set, the flags bits are reset,
  158.         otherwise they are set.  This allows the following syntax:
  159.            objfl_change(mytree, myobj,  HIDETREE, TRUE);
  160.            objfl_change(mytree, myobj, ~HIDETREE, FALSE);
  161.         The first case will set 'myobj' to hidden and will erase it from
  162.         the screen.  The second case will set 'myobj' to visible, but does
  163.         not update the screen.
  164.         
  165.         Note that you CAN use this function to hide and unhide trees
  166.         visibly on the screen.  When the objc_draw is called internally
  167.         by this function, the draw starts at the root of the tree, but is
  168.         clipped by the x/y/w/h of the object who's state is being changed.
  169.         This means that a flag change to HIDETREE with update will draw
  170.         the parents of the hidden object, effectively erasing it on the
  171.         screen.  The same holds true for setting an object to ~HIDETREE;
  172.         the object will be redrawn and become visible.
  173.  
  174. |v1.4   Be aware that the xywh sizes of the changed object are used in the 
  175. |       internal objc_draw() when redraw is requested.  For window-oriented
  176. |       programs, where some of the object tree might be outside a window's
  177. |       work area, it is best for the calling program to request no redraw,
  178. |       and then to handle the redraw itself, specifying the window's work
  179. |       area as a clipping rectangle.  (This is not new for v1.4, it just
  180. |       hasn't been documented as such before.)
  181.         
  182. ;-------------------------------------------------------------------------
  183. ; obj_stchange          (formerly objst_change)
  184. ;-------------------------------------------------------------------------
  185.  
  186. ÜØ⓪7õ5/¨´1œ0Ã3Øö'í%"í¬⓪⑤:92ØÇτIJ@τij╱@D╱ατIJ@τאוג◆⇩ τIJ@τij⇨גוג⇦@ו⇦! 88x8gτττττττijIJIJ⇩'ג@FIJgא⇦א ץêÖ\ך]יπ Çê╱ûΓ╱⑥Γ╱÷&ªV7Bw2╱e to the new names.  Sorry,
  187. *             I guess I wasn't thinking far enough ahead when I did the
  188. *             first release.
  189. *             
  190. *             For all the renamed routines, I've put the old name in
  191. *             the title bar of the new function's name.
  192. **************************************************************************
  193.  
  194. This document describes the functions in the AESUTxxx modules of the
  195. GEMFAST bindings.  These are not GEM function calls, and thus are not
  196. documented in standard GEM programming guides.
  197.  
  198. Within this document, the most changes will be indicated by a vertical bar 
  199. and the change level (|vX.X).
  200.  
  201. Definitions:
  202.  
  203. NO_OBJECT - A constant defined in GEMFAST.H; it has a value of -1.  This
  204.             value is used by most object-related utilties to indicate that
  205.             no object was found with the criteria specified in the search
  206.             (eg, for objc_find(), obj_rbfind(), etc).
  207.  
  208. GRECT     - A graphics-type rectangle of the form x,y,w,h.  A GRECT
  209.             describes a screen area by defining the x/y of the upper left
  210.             corner, and the width and height of the area.
  211.  
  212. VRECT     - A vdi-type rectangle of the form x1,y1,x2,y2.  A VRECT
  213.             describes a screen area by defining the upper left and lower
  214.             right corners of the area in x/y coordinates.
  215.  
  216. xRECT     - Used to indicate that either of the above types is accepted.
  217.  
  218. ;*************************************************************************
  219. ; Rectangle utilties.
  220. ;*************************************************************************
  221.  
  222. ;-------------------------------------------------------------------------
  223. ; rc_copy
  224. ;-------------------------------------------------------------------------
  225.  
  226. void rc_copy (xRECT *source, xRECT *dest)
  227.  
  228.         This function copies a rectangle.  It will copy either a GRECT or
  229.         VRECT type rectangle.  More generally, it will copy 2 longwords
  230.         from source to dest, they don't have to be rectangles at all.
  231.          >> NOTE BACKWARDS ORDER OF SOURCE & DEST.  Sorry, not my decision.
  232.  
  233. ;-------------------------------------------------------------------------
  234. ; rc_equal
  235. ;-------------------------------------------------------------------------
  236.  
  237. bool rc_equal(xRECT *rect1, xRECT *rect2)
  238.         
  239.         This function tests 2 rectangles for equality and returns TRUE/FALSE
  240.         (1/0) accordingly.  Works on GRECT or VRECT type rectangles, but
  241.         both rectangles must be of the same type.  More generally, this
  242.         function compare 2 sets of 2 contiguous longwords.
  243.  
  244. ;-------------------------------------------------------------------------
  245. ; rc_intersect
  246. ;-------------------------------------------------------------------------
  247.      
  248. bool rc_intersect(GRECT *rect1, GRECT *rect2)
  249.  
  250.         This function computes the intersection of 2 rectangles.  It works
  251.         only for GRECT type rectangles.  The intersection is the parts of 
  252.         two rectangles which overlap each other; this function is typically
  253.         used in processing the AES window-update rectangle list.  The result
  254.         is placed into 'rect2', overlaying the original data (again, not my
  255.         decision).  TRUE/FALSE is returned, depending on whether the 
  256.         rectangles had a common intersected area or not; the values in 
  257.         'rect2' are modified regardless of whether there was an intersection or not.
  258.         If the rectangle representing the intersecting area has a width or
  259.         height of zero, this routine will return TRUE.
  260.  
  261. ;-------------------------------------------------------------------------
  262. ; rc_union
  263. ;-------------------------------------------------------------------------
  264.  
  265. void rc_union(GRECT *rect1, GRECT *rect2)
  266.  
  267.         This function computes the union of two rectangles.  The union is 
  268.         the single rectangle that encompases all the area defined by the 
  269.         individual rectangles.  It works only for GRECT type rectangles.  
  270.         The result is placed into 'rect2'.
  271.  
  272. ;-------------------------------------------------------------------------
  273. ; rc_vtog
  274. ;-------------------------------------------------------------------------
  275.      
  276. void rc_vtog(VRECT *rect1, GRECT *rect2)
  277.  
  278.         This function converts a VRECT rectangle to a GRECT rectangle.
  279.         Do not specify the same rectangle for input and output.
  280.  
  281. ;-------------------------------------------------------------------------
  282. ; rc_gtov
  283. ;-------------------------------------------------------------------------
  284.         
  285. void rc_gtov(GRECT *rect1, VRECT *rect2)
  286.  
  287.         This function converts a GRECT rectangle to a VRECT rectangle.
  288.         Do not specify the same rectangle for input and output.
  289.  
  290. ;-------------------------------------------------------------------------
  291. ; rc_vadjust            (formerly objclv_adjust)
  292. ; rc_gadjust            (formerly objclg_adjust)
  293. ;-------------------------------------------------------------------------
  294.         
  295. void rc_vadjust(VRECT *rect, int h_adjust, int v_adjust);
  296. void rc_gadjust(GRECT *rect, int h_adjust, int v_adjust);
  297.  
  298.         These functions expand or contract a rectangle by a given amount
  299.         in each axis. A positive value exands the area, a negative
  300.         value contracts it.  You must use rc_gadjust for GRECTs and
  301.         rc_vadjust for VRECTs.  
  302.         
  303. |v1.3   Negative results are prevented by the adjust routines; zero will be 
  304. |       placed into any rectangle structure element which would have been 
  305. |       negative after the adjustment.
  306.         
  307. ;*************************************************************************
  308. ; Object utilities.
  309. ;*************************************************************************
  310.  
  311. ;-------------------------------------------------------------------------
  312. ; obj_flchange          (formerly objfl_change)
  313. ;-------------------------------------------------------------------------
  314.  
  315. void obj_flchange(OBJECT *tree, int object, int flagsmask, int updateflag);
  316.  
  317.         This function sets or resets bits in an object's ob_flags field.
  318.         Depending on the setting of 'updateflag' the object is updated 
  319.         on the screen or not. (Update is done via objc_draw internally).
  320.         If the high bit of 'flagsmask' is set, the flags bits are reset,
  321.         otherwise they are set.  This allows the following syntax:
  322.            objfl_change(mytree, myobj,  HIDETREE, TRUE);
  323.            objfl_change(mytree, myobj, ~HIDETREE, FALSE);
  324.         The first case will set 'myobj' to hidden and will erase it from
  325.         the screen.  The second case will set 'myobj' to visible, but does
  326.         not update the screen.
  327.         
  328.         Note that you CAN use this function to hide and unhide trees
  329.         visibly on the screen.  When the objc_draw is called internally
  330.         by this function, the draw starts at the root of the tree, but is
  331.         clipped by the x/y/w/h of the object who's state is being changed.
  332.         This means that a flag change to HIDETREE with update will draw
  333.         the parents of the hidden objec-----------------------------
  334. ; obj_parent
  335. ;-------------------------------------------------------------------------
  336.  
  337. int  obj_parent(OBJECT *tree, int curentobj);
  338.  
  339.         This function returns the index of the parent object of the
  340.         specified object.  By definition, the root object in a tree has
  341.         no parent, 0 will be returned (as if the root were its own parent).
  342.         This function is useful for things like building your own radio
  343.         button handler using evnt_multi().
  344.  
  345. ;-------------------------------------------------------------------------
  346. ; obj_xtfind
  347. ;-------------------------------------------------------------------------
  348.  
  349. int  obj_xtfind(OBJECT *tree, int parent, int xtype);
  350.  
  351.         This function returns the index of the child object within 'parent'
  352.         which has the specified extended object type.  The extended object
  353.         type is encoded within the high byte of the ob_type field, and is
  354.         useful for categorizing objects by function, or for connecting
  355.         objects to array elements by using the extended type as an index.
  356.         If no object with the given type is found, NO_OBJECT is returned.
  357.         
  358. |v1.4   This function is new with this release.  It is the functional 
  359. |       equivelent of the old find_exttype() routine from the 'canned
  360. |       source' library.
  361.  
  362. ;*************************************************************************
  363. ; Resource utilties.
  364. ;*************************************************************************
  365.  
  366. ;-------------------- @FûÉ #KH⓪①Ññ
  367. ק    j4Œ⇧⇧əZ@Çì----------------------------
  368. ; rsc_sstrings
  369. ;--------------------------------------------------------------------- @Fûåà╱à;7œØ⓪99õ»¨¨´94Ã3¨ö'í%"í¬⓪⑤:92Øû⓪╱à⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪4Ã:⓪7õ5⑧û1œ0¨⓪⑤8:9⑧û╱à⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪-Ãõ5⑨⑥8:9⑨⑥⓪⑦⑦⑦⓪7õ57⑥8:97⑥.åà⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⑥ÿö¥åà⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪⓪╱à⓪⓪⓪⓪⓪⓪⓪⓪*44¨É3:Ã1´4ÃÃ⓪9Ø´9É7Ã2É7¨⓪6è2É9´94Ã3É87œÃ:2¨9É;œ´44Ã⓪0Ã⓪7õ52õ´╱à⓪⓪⓪⓪⓪⓪⓪⓪:92Øù⓪⓪!τijDג⇩BוDא'ijIJג'גIJ⇦DD⇩DF⇦'הDij⇦⇦gאאI✓L τמ@ijז✓`τוD°8gτττττττijכ⇧ijτij╱@D╱         describes a screen area by defining the x/y of the upper left
  370.             corner, and the width and height of the area.
  371.  
  372. VRECT     - A vdi-type rectangle of the form x1,y1,x2,y2.  A VRECT
  373.             describes a screen area by defining the upper left and lower
  374.             right corners of the area in x/y coordinates.
  375.  
  376. xRECT     - Used to indicate that either of the above types is accepted.
  377.  
  378. ;*************************************************************************
  379. ; Rectangle utilties.
  380. ;*************************************************************************
  381.  
  382. ;-------------------------------------------------------------------------
  383. ; rc_copy
  384. ;-------------------------------------------------------------------------
  385.  
  386. void rc_copy (xRECT *source, xRECT *dest)
  387.  
  388.         This function copies a rectangle.  It will copy either a GRECT or
  389.         VRECT type rectangle.  More generally, it will copy 2 longwords
  390.         from source to dest, they don't have to be rectangles at all.
  391.          >> NOTE BACKWARDS ORDER OF SOURCE & DEST.  Sorry, not my decision.
  392.  
  393. ;-------------------------------------------------------------------------
  394. ; rc_equal
  395. ;-------------------------------------------------------------------------
  396.  
  397. bool rc_equal(xRECT *rect1, xRECT *rect2)
  398.         
  399.         This function tests 2 rectangles for equality and returns TRUE/FALSE
  400.         (1/0) accordingly.  Works on GRECT or VRECT type rectangles, but
  401.         both rectangles must be of the same type.  More generally, this
  402.         function compare 2 sets of 2 contiguous longwords.
  403.  
  404. ;-------------------------------------------------------------------------
  405. ; rc_intersect
  406. ;-------------------------------------------------------------------------
  407.      
  408. bool rc_intersect(GRECT *rect1, GRECT *rect2)
  409.  
  410.         This function computes the intersection of 2 rectangles.  It works
  411.         only for GRECT type rectangles.  The intersection is the parts of 
  412.         two rectangles which overlap each other; this function is typically
  413.         used in processing the AES window-update rectangle list.  The result
  414.         is placed into 'rect2', overlaying the original data (again, not my
  415.         decision).  TRUE/FALSE is returned, depending on whether the 
  416.         rectangles had a common intersected area or not; the values in 
  417.         'rect2' are modified regardless of whether there was an intersection or not.
  418.         If the rectangle representing the intersecting area has a width or
  419.         height of zero, this routine will return TRUE.
  420.  
  421. ;-------------------------------------------------------------------------
  422. ; rc_union
  423. ;-------------------------------------------------------------------------
  424.  
  425. void rc_union(GRECT *rect1, GRECT *rect2)
  426.  
  427.         This function computes the union of two rectangles.  The union is 
  428.         the single rectangle that encompases all the area defined by the 
  429.         individual rectangles.  It works only for GRECT type rectangles.  
  430.         The result is placed into 'rect2'.
  431.  
  432. ;-------------------------------------------------------------------------
  433. ; rc_vtog
  434. ;-------------------------------------------------------------------------
  435.      
  436. void rc_vtog(VRECT *rect1, GRECT *rect2)
  437.  
  438.         This function converts a VRECT rectangle to a GRECT rectangle.
  439.         Do not specify the same rectangle for input and output.
  440.  
  441. ;-------------------------------------------------------------------------
  442. ; rc_gtov
  443. ;-------------------------------------------------------------------------
  444.         
  445. void rc_gtov(GRECT *rect1, VRECT *rect2)
  446.  
  447.         This function converts a GRECT rectangle to a VRECT rectangle.
  448.         Do not specify the same rectangle for input and output.
  449.  
  450. ;-------------------------------------------------------------------------
  451. ; rc_vadjust            (formerly objclv_adjust)
  452. ; rc_gadjust            (formerly objclg_adjust)
  453. ;-------------------------------------------------------------------------
  454.         
  455. void rc_vadjust(VRECT *rect, int h_adjust, int v_adjust);
  456. void rc_gadjust(GRECT *rect, int h_adjust, int v_adjust);
  457.  
  458.         These functions expand or contract a rectangle by a given amount
  459.         in each axis. A positive value exands the area, a negative
  460.         value contracts it.  You must use rc_gadjust for GRECTs and
  461.         rc_vadjust for VRECTs.  
  462.         
  463. |v1.3   Negative results are prevented by the adjust routines; zero will be 
  464. |       placed into any rectangle structure element which would have been 
  465. |       negative after the adjustment.
  466.         
  467. ;*************************************************************************
  468. ; Object utilities.
  469. ;*************************************************************************
  470.  
  471. ;-------------------------------------------------------------------------
  472. ; obj_flchange          (formerly objfl_change)
  473. ;-------------------------------------------------------------------------
  474.  
  475. void obj_flchange(OBJECT *tree, int object, int flagsmask, int updateflag);
  476.  
  477.         This function sets or resets bits in an object's ob_flags field.
  478.         Depending on the setting of 'updateflag' the object is updated 
  479.         on the screen or not. (Update is done via objc_draw internally).
  480.         If the high bit of 'flagsmask' is set, the flags bits are reset,
  481.         otherwise they are set.  This allows the following syntax:
  482.            objfl_change(mytree, myobj,  HIDETREE, TRUE);
  483.            objfl_change(mytree, myobj, ~HIDETREE, FALSE);
  484.         The first case will set 'myobj' to hidden and will erase it from
  485.         the screen.  The second case will set 'myobj' to visible, but does
  486.         not update the screen.
  487.         
  488.         Note that you CAN use this function to hide and unhide trees
  489.         visibly on the screen.  When the objc_draw is called internally
  490.         by this function, the draw starts at the root of the tree, but is
  491.         clipped by the x/y/w/h of the object who's state is being changed.
  492.         This means that a flag change to HIDETREE with update will draw
  493.         the parents of the hidden objec