home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / utility / sunclock / dialog.c next >
Encoding:
Text File  |  1993-10-22  |  2.0 KB  |  64 lines

  1. #include <tos.h>
  2. #include <vdi.h>
  3. #include <aes.h>
  4.  
  5. #include "gem.h"
  6. #include "dialog.h"
  7.  
  8. /*-------------------------------------------------------------------------*/
  9. /* DialogInit:                                                             */
  10. /*-------------------------------------------------------------------------*/
  11. OBJECT* DialogInit( id )
  12. int id;
  13. {
  14.     OBJECT *addr;
  15.  
  16.     graf_mouse(2, 0);
  17.     if (!rsrc_gaddr(R_TREE, id, &addr))
  18.         GemAbort("Can't GADDR on .RCS");
  19.     return addr;
  20. }
  21.  
  22. /*-------------------------------------------------------------------------*/
  23. /* DialogDo:                                                               */
  24. /*-------------------------------------------------------------------------*/
  25. int DialogDo( addr )
  26. OBJECT *addr;
  27. {
  28.    int cx, cy, cw, ch, res;
  29.  
  30.    graf_mouse(0, 0);
  31.    v_show_c(handle, 1);
  32.    form_center(addr, &cx, &cy, &cw, &ch);
  33.    form_dial(FMD_START, 0, 0, 0, 0, cx, cy, cw, ch);
  34.    objc_draw(addr, 0, MAX_DEPTH, 0, 0, 0, 0);
  35.    res = form_do(addr, 0);
  36.    form_dial(FMD_FINISH, 0, 0, 0, 0, cx, cy, cw, ch);
  37.    objc_change(addr, (res&0x7f), 0,0,0,0,0, NORMAL, 0); 
  38.                         /* reset selected object */
  39.    v_hide_c(handle);
  40.    return (res);                                 /* return selected object */
  41. }
  42.  
  43. /*-------------------------------------------------------------------------*/
  44. /* DialogSetItem:                                                          */
  45. /*-------------------------------------------------------------------------*/
  46. void DialogSetItem( addr, field, value )
  47. OBJECT *addr;
  48. int    field;
  49. bool   value;
  50. {
  51.    if (value)
  52.        objc_change(addr, field, 0,0,0,0,0, SELECTED, 0);
  53.    else
  54.        objc_change(addr, field, 0,0,0,0,0, NORMAL,ä                  pβp⇧o:①Hd@c8y`0dra*/
  55. /*⑦>@4HectC @β╱⇦αאB:⓪@⑧✓⇦*/
  56. /*8 i ij:⓪:⓪:üCid*/
  57. /*⑦àé⇧
  58. Õxob⇧dl⇧n agDססס*/
  59. v2סÇסססססcobj'⓪}
  60. }
  61. }e_ã}⇨ppe_⓪DoDoDe_⓪De_⓪ee_⓪ee_⓪ee_⓪ef_fo
  62. #i⇦d;ô*aôDo*DoDDoDDoDh>D◆ë¯ßßß⓪⓪⓪⑧⑧⑧d ⑧ odƒƒƒgDDogººº444*/
  63. /4Do*    c⇨')'''f    y◆⇧!⇧!✓③①◆◆◆E,◆id,E"i.Raaa)
  64. aEE)))EEE)ÉijEEij⇨