home *** CD-ROM | disk | FTP | other *** search
/ BUG 4 / BUGCD1997_05.BIN / aplic / clip4win / clip4win.exe / C4W30E.HUF / INCLUDE / SAY.CH < prev    next >
Text File  |  1993-05-19  |  6KB  |  130 lines

  1. ////////////////////////////
  2. //
  3. //    Clip-4-Win @ ... SAY definitions
  4. //
  5. //    Copyright (C) 1993 Skelton Software, Kendal Cottage, Hillam, Leeds, UK.
  6. //    All Rights Reserved.
  7. //
  8. //    These #command's produce output that is automatically re-drawn
  9. //    whenever necessary, as well as allowing you to specify exact
  10. //    width/height in pixels, exact position, font to use, etc.
  11. //
  12. //    NOTE:    You need an empty array called SayList (rather like GetList),
  13. //
  14. //    e.g.    LOCAL    SayList := {}
  15. //
  16. //        @ 10,10 say "Using row,col positioning" color "b/g"
  17. //        #define    BLUE    RGB(0,0,255)
  18. //        #define    GREEN    RGB(0,255,0)
  19. //        @ pixel 50,10 say "Using x,y positioning"    ;
  20. //            textcolor BLUE bkcolor GREEN
  21. //
  22. //
  23. //    NOTE:  You can choose a font either using something like:
  24. //
  25. //        SET DEFAULT SAY FONT TO GetStockObject(ANSI_VAR_FONT)
  26. //
  27. //    which uses one of the pre-defined fonts, or use a font from
  28. //    CreateFont() or ChooseFont().
  29. //
  30. //    You probably won't want to do this, but: you can define
  31. //    SAY_IN_WINDOW if you want to keep Clipper's @ ... SAY as well.
  32. //
  33. ////////////////////////////
  34.  
  35.  
  36. #ifndef    C4W_SAY_CH
  37. #define    C4W_SAY_CH
  38.  
  39.  
  40. #command CLEAR SAYS                                                     ;
  41.       => _ClearSays( SayList )                                          ;
  42.        ; SayList := {}
  43.  
  44. #command SET DEFAULT SAY FONT TO <hFont>                                ;
  45.       => SetSayFont( <hFont> )
  46.  
  47.  
  48. #ifdef    SAY_IN_WINDOW
  49.  
  50. #command @ <row>,<col> SAY <xpr>                                        ;
  51.                        [PICTURE <pic>]                                  ;
  52.                        [COLOR <color>]                                  ;
  53.                        [TEXTCOLOR <textrgb>]                            ;
  54.                        [BKCOLOR <bkrgb>]                                ;
  55.                        [STYLE <style>]                                  ;
  56.                        [CHARWIDTH <wc>]                                 ;
  57.                        [CHARHEIGHT <hc>]                                ;
  58.                        [WIDTH <w>]                                      ;
  59.                        [HEIGHT <h>]                                     ;
  60.                        [FONT <font>]                                    ;
  61.                        IN WINDOW <hWnd>                                 ;
  62.       => AAdd( SayList,                                                 ;
  63.                _SayWndRC( SayList,                                      ;
  64.                           <hWnd>, <row>, <col>, <w>, <h>, <wc>, <hc>,   ;
  65.                           <xpr>, <pic>, <color>,                        ;
  66.                           <textrgb>, <bkrgb>, <font> [, <style>] )      ;
  67.              )
  68.  
  69. #command @ PIXEL <x>,<y> SAY <xpr>                                      ;
  70.                          [PICTURE <pic>]                                ;
  71.                          [COLOR <color>]                                ;
  72.                          [TEXTCOLOR <textrgb>]                          ;
  73.                          [BKCOLOR <bkrgb>]                              ;
  74.                          [STYLE <style>]                                ;
  75.                          [WIDTH <w>]                                    ;
  76.                          [HEIGHT <h>]                                   ;
  77.                          [FONT <font>]                                  ;
  78.                          IN WINDOW <hWnd>                               ;
  79.       => AAdd( SayList,                                                 ;
  80.                _SayWndXY( SayList,                                      ;
  81.                           <hWnd>, <x>, <y>, <w>, <h>,                   ;
  82.                           <xpr>, <pic>, <color>,                        ;
  83.                           <textrgb>, <bkrgb>, <font> [, <style>] )      ;
  84.              )
  85.  
  86.  
  87. #else    // SAY_IN_WINDOW
  88.  
  89.  
  90. #command @ <row>,<col> SAY <xpr>                                        ;
  91.                        [PICTURE <pic>]                                  ;
  92.                        [COLOR <color>]                                  ;
  93.                        [TEXTCOLOR <textrgb>]                            ;
  94.                        [BKCOLOR <bkrgb>]                                ;
  95.                        [STYLE <style>]                                  ;
  96.                        [CHARWIDTH <wc>]                                 ;
  97.                        [CHARHEIGHT <hc>]                                ;
  98.                        [WIDTH <w>]                                      ;
  99.                        [HEIGHT <h>]                                     ;
  100.                        [FONT <font>]                                    ;
  101.                        [IN [WINDOW] <hWnd>]                             ;
  102.       => AAdd( SayList,                                                 ;
  103.                _SayWndRC( SayList,                                      ;
  104.                           <hWnd>, <row>, <col>, <w>, <h>, <wc>, <hc>,   ;
  105.                           <xpr>, <pic>, <color>,                        ;
  106.                           <textrgb>, <bkrgb>, <font> [, <style>] )      ;
  107.              )
  108.  
  109. #command @ PIXEL <x>,<y> SAY <xpr>                                      ;
  110.                          [PICTURE <pic>]                                ;
  111.                          [COLOR <color>]                                ;
  112.                          [TEXTCOLOR <textrgb>]                          ;
  113.                          [BKCOLOR <bkrgb>]                              ;
  114.                          [STYLE <style>]                                ;
  115.                          [WIDTH <w>]                                    ;
  116.                          [HEIGHT <h>]                                   ;
  117.                          [FONT <font>]                                  ;
  118.                          [IN [WINDOW] <hWnd>]                           ;
  119.       => AAdd( SayList,                                                 ;
  120.                _SayWndXY( SayList,                                      ;
  121.                           <hWnd>, <x>, <y>, <w>, <h>,                   ;
  122.                           <xpr>, <pic>, <color>,                        ;
  123.                           <textrgb>, <bkrgb>, <font> [, <style>] )      ;
  124.              )
  125.  
  126. #endif    // SAY_IN_WINDOW
  127.  
  128.  
  129. #endif    // C4W_SAY_CH
  130.