home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / pascal / pdial / demos / nested.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-07-08  |  1.2 KB  |  54 lines

  1. program nested_dials;
  2.  
  3. uses gem, geminit, newobs, pform, tools, alert;
  4.  
  5. (*$I nested.i*)
  6.  
  7. var
  8.     tree                :    AESTreePtr;
  9.     rc, x, y, w, h    :    integer;
  10.     spf                :    SUBPFORM;
  11.     
  12. begin
  13.     if not initgem then
  14.         exit;
  15.     if rsrc_load('nested.rsc') = 0 then
  16.     begin
  17.         exitgem;
  18.         exit;
  19.     end;        
  20.     graf_mouse(ARROW, NIL);
  21.     init_pform(vdihandle, TRUE);    
  22.     init_newobs(vdihandle);
  23.     fix_all(TRUE);
  24.     rsrc_gaddr(R_TREE, FORM, pointer(tree));
  25.     
  26.     wind_update(BEG_UPDATE);
  27.     wind_update(BEG_MCTRL);
  28.     pform_center(tree, x, y, w, h);
  29.     pform_dial(FMD_START, x, y, w, h, x, y, w, h);
  30.     objc_draw(tree, ROOT, MAX_DEPTH, x, y, w, h);
  31.     repeat
  32.         rc := pform_do(tree, 0) and $7fff;
  33.         if rc = HELP_BUTTON then
  34.         begin
  35.             init_subdial(tree, spf);
  36.             do_alert(@INFO, 'Hier könnte ein Hilfetext stehen, z. B. ' +
  37.                      'mit dem Hinweis, daß der nächste aus dem ' +
  38.                      'Hause Atari kommen sollte!', '   [OK   ', 0, -1);
  39.             exit_subdial(spf);
  40.         end;
  41.         deselect(tree^[rc]);
  42.         draw_object(tree, rc);
  43.     until rc <> HELP_BUTTON;
  44.     pform_size(tree, x, y, w, h);
  45.     pform_dial(FMD_FINISH, x, y, w, h, x, y, w, h);
  46.     wind_update(END_MCTRL);
  47.     wind_update(END_UPDATE);
  48.     
  49.  
  50.     fix_all(FALSE);
  51.     exit_pform;
  52.     rsrc_free;
  53.     exitgem;            
  54. end.