home *** CD-ROM | disk | FTP | other *** search
/ Chip 1996 October / CHIP Ekim 1996.iso / prog / cpicmult / scripts / defscr next >
Encoding:
Text File  |  1996-01-19  |  3.4 KB  |  176 lines

  1. /*
  2.  
  3. default pickle module 
  4. (Photodex Internal 'C' Kernel Language Environment)
  5.  
  6. Copyright (c)1995 Photodex Corporation.  All rights reserved.
  7. Photodex is a trademark of Photodex Corporation.
  8.  
  9. THIS INFORMATION IS PROPRIETARY AND CONFIDENTIAL.  USE OF THIS INFORMATION
  10. IS STRICTLY PROHIBITED WITHOUT WRITTEN PERMISSION FROM AN EXECUTIVE OFFICER
  11. OF PHOTODEX CORPORATION.
  12.  
  13. */
  14.  
  15. "Copyright (c)1995 Photodex Corporation.  All rights reserved."        // legal copyright notice (emitted in data segment)
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22. export "V()" PickleStartup()        /* startup routine */
  23. {
  24.     Deb("PICKLE STARTUP - STARTING");
  25.  
  26.     VarSetGlobal("kbFileDouble","(script code for double click)");        /* set global variable for double click event */
  27.     VarSetGlobal("h","[cpicPath]help/");        /* set global variable for help directory */
  28.  
  29.     // do housekeeping of anything that can change with preferences
  30.     StatDockCheck(ifs);        /* check docking of status stack */
  31.  
  32.     Deb("PICKLE STARTUP - COMPLETE");
  33. }
  34.  
  35.  
  36.  
  37.  
  38. export "V()" mHelpOver()        /* help overview */
  39. {
  40.     Help("[h]help");        /* main help */
  41. }
  42.  
  43.  
  44. export "V()" mHelpAbout()        /* help about */
  45. {
  46.     Deb("CPIC version %s",cpicVer);
  47.     Deb("Pickle version %s",pickleVer);
  48. }
  49.  
  50.  
  51. export "V()" ExitScript()        /* exit script */
  52. {
  53.     Deb("ExitScript calling Exit...");        /* tell user */
  54.     Exit(ifs);        /* exit application */
  55. }
  56.  
  57.  
  58.  
  59. export "V()" tViewScript()        /* view script */
  60. {
  61.     RecPresent(ifs,RecGetCaret(ifs));        /* present record */
  62. }
  63.  
  64.  
  65.  
  66. export "V()" tEditScript()        /* edit script */
  67. {
  68.     RecEdit(ifs,RecGetCaret(ifs));        /* edit record */
  69. }
  70.  
  71.  
  72.  
  73. export "V()" tCreateScript()        /* create script */
  74. {
  75.     Deb("toolbar create new");
  76. }
  77.  
  78.  
  79.  
  80. export "V()" tBogusScript()        /* bogus script */
  81. {
  82.     Deb("toolbar bogus");
  83. }
  84.  
  85.  
  86.  
  87. export "V()" tPathExpAll()        /* expand all paths */
  88. {
  89.     val=0;        // preload temporary variable
  90.  
  91.     pos=0;        /* start at first entry */
  92.     while(1) {
  93.         val=PathGetListCount(ifs);
  94.         if(pos < val) {        /* until done */
  95.             PathExpandListEntry(ifs,pos);        /* expand entry */
  96.         } else {
  97.             break;
  98.         }
  99.         pos++;
  100.     }
  101.     Deb("Done expanding");
  102. }
  103.  
  104.  
  105.  
  106. export "V()" tPathColAll()        /* collapse all paths */
  107. {
  108.     val=0;        // preload temporary variable
  109.  
  110.     pos=PathGetListCount(ifs);        /* start at last entry */
  111.     while(--pos >= 0) {
  112.         PathCollapseListEntry(ifs,pos);        /* collapse entry */
  113.     }
  114. }
  115.  
  116.  
  117.  
  118. export "V()" tPathExpAllSel()        /* expand selected paths recursively */
  119. {
  120.     val=0;        // preload temporary variable
  121.  
  122.     pos=0;        /* start at first entry */
  123.     while(1) {
  124.         pos=PathNextSelItem(ifs,pos);        /* find next selected item */
  125.         if(pos < 0) {
  126.             break;
  127.         }
  128.         val=PathGetListCount(ifs);
  129.         if(pos < val) {        /* until done */
  130.             indent=PathGetListIndent(ifs,pos);        /* get indentation level */
  131.             PathExpandListEntry(ifs,pos);        /* expand entry */
  132.             pos++;
  133.             while(val > indent) {        /* until end of parent's children */
  134.                 PathExpandListEntry(ifs,pos);        /* expand entry */
  135.                 pos++;
  136.                 val=PathGetListIndent(ifs,pos);
  137.             }
  138.         } else {
  139.             break;
  140.         }
  141.     }
  142. }
  143.  
  144.  
  145.  
  146.  
  147. export "V()" tPathExpSel()        /* expand selected paths once */
  148. {
  149.     val=0;        // preload temporary variable
  150.  
  151.     pos=0;        /* start at first entry */
  152.     while(1) {
  153.         pos=PathNextSelItem(ifs,pos);        /* find next selected item */
  154.         if(pos < 0) {
  155.             break;
  156.         }
  157.         val=PathGetListCount(ifs);
  158.         if(pos < val) {        /* until done */
  159.             PathExpandListEntry(ifs,pos);        /* expand entry */
  160.         } else {
  161.             break;
  162.         }
  163.         pos++;
  164.     }
  165. }
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.