home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 June / PCWorld_2002-06_cd.bin / Software / Komercni / xbase / express / exd17208.r04 / exp17 / Include / Dcget.ch < prev    next >
Text File  |  2002-01-30  |  6KB  |  135 lines

  1. /*
  2.  ╓───────────────────────────────────────────────────╖
  3.  ║  Program..: DCGET.CH                              ║
  4.  ║  Author...: Roger J. Donnay                       ║
  5.  ║  Notice...: (c) DONNAY Software Designs 1987-1995 ║
  6.  ║  Date.....: Mar 24, 1995                          ║
  7.  ║  Notes....: dCLIP 4.0 Get system translations     ║
  8.  ╙───────────────────────────────────────────────────╜
  9.  
  10.  This translate file is needed to make code that uses GETs and is
  11.  compiled in 5.01 compatabile with the 5.2 libraries.
  12.  
  13. */
  14.  
  15. #ifndef FORCEVALID
  16. #define   FORCEVALID  CARGO 101
  17. #define   PICKLIST    CARGO 102
  18. #define   PROTECT     CARGO 106
  19. #define   CAPFIRST    CARGO 107
  20. #define   DOUBLEPICK  CARGO 112
  21. // #define   HIDE        CARGO 113
  22. #define   CODEBLOCK   CARGO 114
  23. #endif
  24.  
  25.  
  26. #translate  APOINTER <p>  =>  CARGO -1*<p>
  27.  
  28. /***
  29. *  @..SAY
  30. */
  31.  
  32. #command @ <row>, <col> SAY <xpr>                                       ;
  33.                         [PICTURE <pic>]                                 ;
  34.                         [COLOR <color>]                                 ;
  35.                                                                         ;
  36.       => DevPos( <row>, <col> )                                         ;
  37.        ; DevOutPict( <xpr>, <pic> [, <color>] )
  38.  
  39.  
  40. #command @ <row>, <col> SAY <xpr>                                       ;
  41.                         [COLOR <color>]                                 ;
  42.                                                                         ;
  43.       => DevPos( <row>, <col> )                                         ;
  44.        ; DevOut( <xpr> [, <color>] )
  45.  
  46.  
  47. #command @ <row>, <col> GET <var>                                       ;
  48.          [CARGO <cargo>]                                 ;
  49.          [CHECKBOX MEMVAR <m> [ELEMENT <n>] [DELIMS <check>]] ;
  50.          [RADIOGROUP <g> MEMVAR <v> [DELIMS <r>] VALUE <y>]    ;
  51.          [PREEVAL <preblock>]                            ;
  52.          [POSTEVAL <postblock>]                          ;
  53.          [MESSAGE <getmsg>]                              ;
  54.          [PICTURE <pic>]                                 ;
  55.          [VALID <valid>]                                 ;
  56.          [WHEN <when>]                                   ;
  57.          [SEND <msg>]                                    ;
  58.          [HELPCODE <hlp>]                                ;
  59.       => AAdd( GetList, ;
  60.             ( Get():new( <row>, <col>, __gBlock(<var>), __gName(<var>), ;
  61.                         <pic>, NIL, <{valid}>, <{when}>) ) ) ;
  62.        ; DC_GETDISPLAY( GetList )                                       ;
  63.       [; GetList:=DC_ADDCARGO(GetList,<cargo>) ]                        ;
  64.       [; GetList:=DC_ADDCARGO(GetList,{ 103, <{preblock}> } ) ]         ;
  65.       [; GetList:=DC_ADDCARGO(GetList,{ 104, <{postblock}> } ) ]        ;
  66.       [; GetList:=DC_ADDCARGO(GetList,{ 105, <getmsg> }) ]              ;
  67.       [; GetList:=DC_ADDCARGO(GetList,{ 115, <hlp> }) ]                 ;
  68.       [; GetList:=;
  69.          DC_ADDCARGO(GetList,{110,<check>,{||DC_ReadVar(@<m>,<n>,,.t.)}}) ] ;
  70.       [; GetList:=;
  71.          DC_ADDCARGO(GetList,{111,<g>,<r>,{||DC_ReadVar(@<v>,,<y>,.f.)}}) ] ;
  72.       [; ATail(GetList):<msg>]
  73.  
  74.  
  75. /***
  76. *   @..SAY..GET
  77. */
  78.  
  79. #command @ <row>, <col> SAY <xpr>                                       ;
  80.                         [COLOR <color>]                                 ;
  81.                         GET <var>                                       ;
  82.                         [CARGO <cargo>]                                 ;
  83.                         [PREEVAL <preblock>]                            ;
  84.                         [POSTEVAL <postblock>]                          ;
  85.                         [MESSAGE <getmsg>]                              ;
  86.                         [PICTURE <pic>]                                 ;
  87.                         [VALID <valid>]                                 ;
  88.                         [WHEN <when>]                                   ;
  89.                         [SEND <msg>]                                    ;
  90.                         [HELPCODE <hlp>]                                ;
  91.       => DC_GETDEVOUT( <row>, <col>, <xpr>, [, <color>] )               ;
  92.       ;  AAdd( GetList, ;
  93.             ( Get():new( Row(), Col()+1, __gBlock(<var>), __gName(<var>), ;
  94.                         <pic>, NIL, <{valid}>, <{when}>) ) ) ;
  95.        ; DC_GETDISPLAY( GetList )                                       ;
  96.       [; GetList:=DC_ADDCARGO(GetList,<cargo>) ]                        ;
  97.       [; GetList:=DC_ADDCARGO(GetList,{ 103, <{preblock}> } ) ]         ;
  98.       [; GetList:=DC_ADDCARGO(GetList,{ 104, <{postblock}> } ) ]        ;
  99.       [; GetList:=DC_ADDCARGO(GetList,{ 105, <getmsg> }) ]              ;
  100.       [; GetList:=DC_ADDCARGO(GetList,{ 115, <hlp> }) ]                 ;
  101.       [; GetList:=DC_ADDCARGO(GetList,{ 108, { <row>, <col>, <xpr> }})] ;
  102.       [; ATail(GetList):<msg>]
  103.  
  104.  
  105. /***
  106. *   fancy GETs...
  107. */
  108.  
  109. // @..GET..RANGE (preprocessed to @..GET..VALID)
  110.  
  111.  
  112. #command @ <row>, <col> GET <var>                                       ;
  113.                         [<clauses,...>]                                 ;
  114.                         RANGE <lo>, <hi>                                ;
  115.                         [<moreClauses,...>]                             ;
  116.                                                                         ;
  117.       => @ <row>, <col> GET <var>                                       ;
  118.                         [<clauses>]                                     ;
  119.                         VALID {|_1| RangeCheck(_1,, <lo>, <hi>)}        ;
  120.                         [<moreClauses>]
  121.  
  122.  
  123. // @..GET COLOR
  124.  
  125. #command @ <row>, <col> GET <var>                                       ;
  126.                         [<clauses,...>]                                 ;
  127.                         COLOR <color>                                   ;
  128.                         [<moreClauses,...>]                             ;
  129.                                                                         ;
  130.       => @ <row>, <col> GET <var>                                       ;
  131.                         [<clauses>]                                     ;
  132.                         SEND colorDisp(<color>)                         ;
  133.                         [<moreClauses>]
  134.  
  135.