home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 4611 / fw16d.ins / INCLUDE / FIVEWIN.CH < prev    next >
Text File  |  1994-06-12  |  33KB  |  792 lines

  1. // FiveWin main Header File
  2.  
  3. #ifndef _FIVEWIN_CH
  4. #define _FIVEWIN_CH
  5.  
  6. #define FWVERSION   "FiveWin 1.6c - June 1994"
  7. #define FWCOPYRIGHT OemToAnsi( "(c) Antonio Linares & Francisco Pulpón, 1993-4" )
  8.  
  9. #include "Colors.ch"
  10. #include "DDE.ch"
  11. #include "Dialog.ch"
  12. #include "DLL.ch"
  13. #include "Font.ch"
  14. #include "Ini.ch"
  15. #include "Menu.ch"
  16. #include "Objects.ch"
  17. #include "ODBC.ch"
  18. #include "Print.ch"
  19. #include "Tree.ch"
  20. #include "Video.ch"
  21. #include "VKey.ch"
  22. #include "WinApi.ch"
  23.  
  24. #define CRLF Chr(13)+Chr(10)
  25.  
  26. //----------------------------------------------------------------------------//
  27. // ACCESSING / SETTING Variables
  28.  
  29. #xtranslate bSETGET(<uVar>) => ;
  30.             { | u | If( PCount() == 0, <uVar>, <uVar> := u ) }
  31.  
  32. //----------------------------------------------------------------------------//
  33.  
  34. #xcommand DEFAULT <uVar1> := <uVal1> ;
  35.                [, <uVarN> := <uValN> ] => ;
  36.                   <uVar1> := If( <uVar1> == nil, <uVal1>, <uVar1> ) ;;
  37.                 [ <uVarN> := If( <uVarN> == nil, <uValN>, <uVarN> ); ]
  38.  
  39. //----------------------------------------------------------------------------//
  40. // DO ... UNTIL support
  41.  
  42. #xcommand DO            => while .t.
  43. #xcommand UNTIL <uExpr> => if <uExpr>; exit; end; end
  44.  
  45. //----------------------------------------------------------------------------//
  46. // DataBase Objects
  47.  
  48. #xcommand DATABASE <oDbf> => <oDbf> := TDataBase():New()
  49.  
  50. //----------------------------------------------------------------------------//
  51. // Brushes
  52.  
  53. #xcommand DEFINE BRUSH [ <oBrush> ] ;
  54.              [ STYLE <cStyle> ] ;
  55.              [ COLOR <nRGBColor> ] ;
  56.              [ <file:FILE,FILENAME,DISK> <cBmpFile> ] ;
  57.              [ <resource:RESOURCE,NAME,RESNAME> <cBmpRes> ] ;
  58.        => ;
  59.           [ <oBrush> := ] TBrush():New( [ Upper(<(cStyle)>) ], <nRGBColor>,;
  60.              <cBmpFile>, <cBmpRes> )
  61.  
  62. #xcommand RELEASE BRUSH <oBrush> => <oBrush>:Release()
  63.  
  64. #xcommand SET BRUSH ;
  65.              [ OF <oWnd> ] ;
  66.              [ TO <oBrush> ] ;
  67.        => ;
  68.           <oWnd>:SetBrush( <oBrush> )
  69.  
  70. //----------------------------------------------------------------------------//
  71. // Icons
  72.  
  73. #xcommand @ <nRow>, <nCol> ICON [ <oIcon> ] ;
  74.              [ <resource: NAME, RESOURCE, RESNAME> <cResName> ] ;
  75.              [ <file: FILE, FILENAME, DISK> <cIcoFile> ] ;
  76.              [ <border:BORDER> ] ;
  77.              [ ON CLICK <uClick> ] ;
  78.              [ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
  79.              [ <update: UPDATE> ] ;
  80.        => ;
  81.           [ <oIcon> := ] TIcon():New( <nRow>, <nCol>, <cResName>,;
  82.              <cIcoFile>, <.border.>, <{uClick}>, <oWnd>, <.update.> )
  83.  
  84. #xcommand DEFINE ICON <oIcon> ;
  85.              [ <resource: NAME, RESOURCE, RESNAME> <cResName> ] ;
  86.              [ <file: FILE, FILENAME, DISK> <cIcoFile> ] ;
  87.        => ;
  88.           <oIcon> := TIcon():New( ,, <cResName>, <cIcoFile> )
  89.  
  90. //----------------------------------------------------------------------------//
  91. // PUSHBUTTON
  92.  
  93. #xcommand @ <nRow>, <nCol> BUTTON [ <oBtn> PROMPT ] <cCaption> ;
  94.              [ SIZE <nWidth>, <nHeight> ] ;
  95.              [ ACTION <uAction> ] ;
  96.              [ <default: DEFAULT> ] ;
  97.              [ <of:OF, WINDOW, DIALOG> <oWnd> ] ;
  98.              [ <help:HELP, HELPID, HELP ID> <nHelpId> ] ;
  99.              [ FONT <oFont> ] ;
  100.              [ <pixel: PIXEL> ] ;
  101.              [ <design: DESIGN> ] ;
  102.              [ MESSAGE <cMsg> ] ;
  103.              [ <update: UPDATE> ] ;
  104.       => ;
  105.          [ <oBtn> := ] TButton():New( <nRow>, <nCol>, <cCaption>, <oWnd>,;
  106.             <{uAction}>, <nWidth>, <nHeight>, <nHelpId>, <oFont>, <.default.>,;
  107.             <.pixel.>, <.design.>, <cMsg>, <.update.> )
  108.  
  109. #xcommand REDEFINE BUTTON [ <oBtn> ] ;
  110.              [ ID <nId> <of:OF, WINDOW, DIALOG> <oDlg> ] ;
  111.              [ ACTION <uAction> ] ;
  112.              [ <help:HELP, HELPID, HELP ID> <nHelpId> ] ;
  113.              [ MESSAGE <cMsg> ] ;
  114.              [ <update: UPDATE> ] ;
  115.        => ;
  116.           [ <oBtn> := ] TButton():ReDefine( <nId>, <{uAction}>, <oDlg>,;
  117.              <nHelpId>, <cMsg>, <.update.> )
  118.  
  119. //----------------------------------------------------------------------------//
  120. // CHECKBOX
  121.  
  122. #xcommand REDEFINE CHECKBOX [ <oCbx> VAR ] <lVar> ;
  123.              [ ID <nId> ] ;
  124.              [ <of:OF, WINDOW, DIALOG> <oWnd> ] ;
  125.              [ <help:HELPID, HELP ID> <nHelpId> ] ;
  126.              [ <click:ON CLICK, ON CHANGE> <uClick> ];
  127.              [ VALID   <ValidFunc> ]       ;
  128.              [ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
  129.              [ MESSAGE <cMsg> ] ;
  130.              [ <update: UPDATE> ] ;
  131.        => ;
  132.           [ <oCbx> := ] TCheckBox():ReDefine( <nId>, bSETGET(<lVar>),;
  133.              <oWnd>, <nHelpId>, [<{uClick}>], <{ValidFunc}>, <nClrFore>,;
  134.              <nClrBack>, <cMsg>, <.update.>  )
  135.  
  136. #xcommand @ <nRow>, <nCol> CHECKBOX [ <oCbx> VAR ] <lVar> ;
  137.              [ PROMPT <cCaption> ] ;
  138.              [ <of:OF, WINDOW, DIALOG> <oWnd> ] ;
  139.              [ SIZE <nWidth>, <nHeight> ] ;
  140.              [ <help:HELPID, HELP ID> <nHelpId> ] ; 
  141.              [ FONT <oFont> ] ;
  142.              [ ON CLICK <uClick> ] ;
  143.              [ VALID   <ValidFunc> ] ;
  144.              [ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
  145.              [ <design: DESIGN> ] ;
  146.              [ <pixel: PIXEL> ] ;
  147.              [ MESSAGE <cMsg> ] ;
  148.              [ <update: UPDATE> ] ;
  149.       => ;
  150.          [ <oCbx> := ] TCheckBox():New( <nRow>, <nCol>, <cCaption>,;
  151.              [bSETGET(<lVar>)], <oWnd>, <nWidth>, <nHeight>, <nHelpId>,;
  152.              [<{uClick}>], <oFont>, <{ValidFunc}>, <nClrFore>, <nClrBack>,;
  153.              <.design.>, <.pixel.>, <cMsg>, <.update.> )
  154.  
  155. //----------------------------------------------------------------------------//
  156. // COMBOBOX
  157.  
  158. #xcommand @ <nRow>, <nCol> COMBOBOX [ <oCbx> VAR ] <cVar> ;
  159.              [ ITEMS <aItems> ] ;
  160.              [ SIZE <nWidth>, <nHeight> ] ;
  161.              [ <dlg:OF,WINDOW,DIALOG> <oWnd> ] ;
  162.              [ <help:HELPID, HELP ID> <nHelpId> ] ;
  163.              [ ON CHANGE <uChange> ] ;
  164.              [ VALID   <ValidFunc> ] ;
  165.              [ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
  166.              [ <pixel: PIXEL> ] ;
  167.              [ FONT <oFont> ] ;
  168.              [ <update: UPDATE> ] ;
  169.        => ;
  170.           [ <oCbx> := ] TComboBox():New( <nRow>, <nCol>, bSETGET(<cVar>),;
  171.              <aItems>, <nWidth>, <nHeight>, <oWnd>, <nHelpId>,;
  172.              [{|Self|<uChange>}], <{ValidFunc}>, <nClrText>, <nClrBack>,;
  173.              <.pixel.>, <oFont>, <.update.> )
  174.  
  175. #xcommand REDEFINE COMBOBOX [ <oCbx> VAR ] <cVar> ;
  176.              [ ITEMS <aItems> ] ;
  177.              [ ID <nId> ] ;
  178.              [ <dlg:OF,WINDOW,DIALOG> <oWnd> ] ;
  179.              [ <help:HELPID, HELP ID> <nHelpId> ] ;
  180.              [ ON CHANGE <uChange> ] ;
  181.              [ VALID   <ValidFunc> ]       ;
  182.              [ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
  183.              [ <update: UPDATE> ] ;
  184.        => ;
  185.           [ <oCbx> := ] TComboBox():ReDefine( <nId>, bSETGET(<cVar>),;
  186.              <aItems>, <oWnd>, <nHelpId>, <{ValidFunc}>, [{|Self|<uChange>}],;
  187.              <nClrText>, <nClrBack>, <.update.> )
  188.  
  189. //----------------------------------------------------------------------------//
  190. // LISTBOX
  191.  
  192. #xcommand REDEFINE LISTBOX [ <oLbx> VAR ] <cVar> ;
  193.              [ ITEMS <aItems> ]  ;
  194.              [ FILES <cFileSpec> ] ;
  195.              [ ID <nId> ] ;
  196.              [ ON CHANGE <uChange> ] ;
  197.              [ ON [ LEFT ] DBLCLICK <uLDblClick> ] ;
  198.              [ <of: OF, WINDOW, DIALOG > <oWnd> ] ;
  199.              [ <help:HELPID, HELP ID> <nHelpId> ] ;
  200.              [ <bitmaps: BITMAPS > [ SIZE <nSize> ] ] ;
  201.              [ VALID   <ValidFunc> ]       ;
  202.              [ <color: COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
  203.              [ MESSAGE <cMsg> ] ;
  204.              [ <update: UPDATE> ] ;
  205.        => ;
  206.           [ <oLbx> := ] TListBox():ReDefine( <nId>, bSETGET(<cVar>), <aItems>,;
  207.              <{uChange}>, <oWnd>, <nHelpId>, <.bitmaps.>, <nSize>, ;
  208.              <{ValidFunc}>, <cFileSpec>, <nClrFore>, <nClrBack>,;
  209.              <{uLDblClick}>, <cMsg>, <.update.> )
  210.  
  211. #xcommand @ <nRow>, <nCol> LISTBOX [ <oLbx> VAR ] <cVar> ;
  212.              [ ITEMS <aList>  ] ;
  213.              [ SIZE <nWidth>, <nHeight> ] ;
  214.              [ ON CHANGE <uChange> ] ;
  215.              [ ON [ LEFT ] DBLCLICK <uLDblClick> ] ;
  216.              [ <of: OF, WINDOW, DIALOG > <oWnd> ] ;
  217.              [ VALID   <ValidFunc> ]       ;
  218.              [ <color: COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
  219.              [ <pixel: PIXEL> ] ;
  220.              [ <design: DESIGN> ] ;
  221.              [ FONT <oFont> ] ;
  222.              [ MESSAGE <cMsg> ] ;
  223.              [ <update: UPDATE> ] ;
  224.        => ;
  225.           [ <oLbx> := ] TListBox():New( <nRow>, <nCol>, bSETGET(<cVar>),;
  226.              <aList>, <nWidth>, <nHeight>, <{uChange}>, <oWnd>, <{ValidFunc}>,;
  227.              <nClrFore>, <nClrBack>, <.pixel.>, <.design.>, <{uLDblClick}>,;
  228.              <oFont>, <cMsg>, <.update.> )
  229.  
  230. //----------------------------------------------------------------------------//
  231. // LISTBOX - BROWSE
  232.  
  233. // Warning: SELECT <cField>  ==> Must be the Field key of the current INDEX !!!
  234.  
  235. #xcommand REDEFINE LISTBOX [ <oLbx> ] FIELDS [<Flds,...>] ;
  236.              [ ID <nId> ] ;
  237.              [ <dlg:OF,DIALOG> <oDlg> ] ;
  238.              [ <sizes:FIELDSIZES, SIZES, COLSIZES> <aColSizes,...> ] ;
  239.              [ <head:HEAD,HEADER,HEADERS> <aHeaders,...> ] ;
  240.              [ SELECT <cField> FOR <uValue1> [ TO <uValue2> ] ] ;
  241.              [ <change: ON CHANGE, ON CLICK> <uChange> ] ;
  242.              [ ON [ LEFT ] DBLCLICK <uLDblClick> ] ;
  243.              [ ON RIGHT CLICK <uRClick> ] ;
  244.              [ FONT <oFont> ] ;
  245.              [ CURSOR <oCursor> ] ;
  246.              [ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
  247.              [ MESSAGE <cMsg> ] ;
  248.              [ <update: UPDATE> ] ;
  249.        => ;
  250.               [ <oLbx> := ] TWBrowse():ReDefine( <nId>, ;
  251.               [\{|| \{ <Flds> \} \}], <oDlg>,;
  252.               [ \{<aHeaders>\}], [\{<aColSizes>\}],;
  253.               <(cField)>, <uValue1>, <uValue2>,;
  254.               [<{uChange}>], [<{uLDblClick}>], [<{uRClick}>], <oFont>,;
  255.               <oCursor>, <nClrFore>, <nClrBack>, <cMsg>, <.update.> )
  256.  
  257. #xcommand @ <nRow>, <nCol> LISTBOX [ <oBrw> ] FIELDS [<Flds,...>] ;
  258.                [ <sizes:FIELDSIZES, SIZES, COLSIZES> <aColSizes,...> ] ;
  259.                [ <head:HEAD,HEADER,HEADERS> <aHeaders,...> ] ;
  260.                [ SIZE <nWidth>, <nHeigth> ] ;
  261.                [ <dlg:OF,DIALOG> <oDlg> ] ;
  262.                [ SELECT <cField> FOR <uValue1> [ TO <uValue2> ] ] ;
  263.                [ <change: ON CHANGE, ON CLICK> <uChange> ] ;
  264.                [ ON [ LEFT ] DBLCLICK <uLDblClick> ] ;
  265.                [ ON RIGHT CLICK <uRClick> ] ;
  266.                [ FONT <oFont> ] ;
  267.                [ CURSOR <oCursor> ] ;
  268.                [ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
  269.                [ MESSAGE <cMsg> ] ;
  270.                [ <update: UPDATE> ] ;
  271.       => ;
  272.           [ <oBrw> := ] TWBrowse():New( <nRow>, <nCol>, <nWidth>, <nHeigth>,;
  273.                            [\{|| \{<Flds> \} \}], ;
  274.                            [ \{<aHeaders>\}], [\{<aColSizes>\}], ;
  275.                            <oDlg>, <(cField)>, <uValue1>, <uValue2>,;
  276.                            [<{uChange}>], [<{uLDblClick}>], [<{uRClick}>],;
  277.                            <oFont>, <oCursor>, <nClrFore>, <nClrBack>, <cMsg>,;
  278.                            <.update.> )
  279.  
  280. //----------------------------------------------------------------------------//
  281. // RADIOBUTTONS
  282.  
  283. #xcommand @ <nRow>, <nCol> RADIO [ <oRadMenu> VAR ] <nVar> ;
  284.              [ PROMPT <cItems,...> ] ;
  285.              [ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
  286.              [ <help:HELPID, HELP ID> <nHelpId> ] ; 
  287.              [ <change: ON CLICK, ON CHANGE> <uChange> ] ;
  288.              [ COLOR <nClrFore> [,<nClrBack>] ] ;
  289.              [ MESSAGE <cMsg> ] ;
  290.              [ <update: UPDATE> ] ;
  291.        => ;
  292.           [ <oRadMenu> := ] TRadMenu():New( <nRow>, <nCol>, {<cItems>},;
  293.              [bSETGET(<nVar>)], <oWnd>, <nHelpId>, <{uChange}>,;
  294.              <nClrFore>, <nClrBack>, <cMsg>, <.update.> )
  295.  
  296. #xcommand REDEFINE RADIO [ <oRadMenu> VAR ] <nVar> ;
  297.              [ ID <nId,...> ] ;
  298.              [ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
  299.              [ <help:HELPID, HELP ID> <nHelpId> ] ;
  300.              [ <change: ON CLICK, ON CHANGE> <uChange> ] ;
  301.              [ COLOR <nClrFore> [,<nClrBack>] ] ;
  302.              [ MESSAGE <cMsg> ] ;
  303.              [ <update: UPDATE> ] ;
  304.        => ;
  305.           [ <oRadMenu> := ] TRadMenu():Redefine( [bSETGET(<nVar>)],;
  306.              <oWnd>, <nHelpId>, \{ <nId> \}, <{uChange}>, <nClrFore>,;
  307.              <nClrBack>, <cMsg>, <.update.> )
  308.  
  309. //----------------------------------------------------------------------------//
  310. // BITMAP
  311.  
  312. #xcommand @ <nRow>, <nCol> BITMAP [ <oBmp> ] ;
  313.              [ <resource: NAME, RESNAME, RESOURCE> <cResName> ] ;
  314.              [ <file: FILE, FILENAME, DISK> <cBmpFile> ] ;
  315.              [ <NoBorder:NOBORDER, NO BORDER> ] ;
  316.              [ SIZE <nWidth>, <nHeight> ] ;
  317.              [ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
  318.              [ <lClick: ON CLICK, ON LEFT CLICK> <uLClick> ] ;
  319.              [ <rClick: ON RIGHT CLICK> <uRClick> ] ;
  320.              [ <scroll: SCROLL> ] ;
  321.              [ <adjust: ADJUST> ] ;
  322.              [ CURSOR <oCursor> ] ;
  323.              [ <update: UPDATE> ] ;
  324.        => ;
  325.           [ <oBmp> := ] TBitmap():New( <nRow>, <nCol>, <nWidth>, <nHeight>,;
  326.              <cResName>, <cBmpFile>, <.NoBorder.>, <oWnd>,;
  327.              [\{ |nRow,nCol,nKeyFlags| <uLClick> \} ],;
  328.              [\{ |nRow,nCol,nKeyFlags| <uRClick> \} ], <.scroll.>,;
  329.              <.adjust.>, <oCursor>, <.update.> )
  330.  
  331. #xcommand REDEFINE BITMAP [ <oBmp> ] ;
  332.              [ ID <nId> ] ;
  333.              [ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
  334.              [ <resource: NAME, RESNAME, RESOURCE> <cResName> ] ;
  335.              [ <file: FILE, FILENAME, DISK> <cBmpFile> ] ;
  336.              [ <lClick: ON ClICK, ON LEFT CLICK> <uLClick> ] ;
  337.              [ <rClick: ON RIGHT CLICK> <uRClick> ] ;
  338.              [ <scroll: SCROLL> ] ;
  339.              [ <adjust: ADJUST> ] ;
  340.              [ CURSOR <oCursor> ] ;
  341.              [ <update: UPDATE> ] ;
  342.        => ;      
  343.           [ <oBmp> := ] TBitmap():ReDefine( <nId>, <cResName>, <cBmpFile>,;
  344.              <oWnd>, [\{ |nRow,nCol,nKeyFlags| <uLClick> \}],;
  345.                      [\{ |nRow,nCol,nKeyFlags| <uRClick> \}],;
  346.              <.scroll.>, <.adjust.>, <oCursor>, <.update.> )
  347.  
  348. //----------------------------------------------------------------------------//
  349. // SAY
  350.  
  351. #xcommand REDEFINE SAY [ <oSay> ] ;
  352.              [ <label:PROMPT,VAR> <cText> ] ;
  353.              [ PICTURE <cPict> ] ;
  354.              [ ID <nId> ] ;
  355.              [ <dlg:OF,WINDOW,DIALOG> <oWnd> ] ;
  356.              [ <lCenter: CENTERED > ]  ;
  357.              [ <lBorder: BORDER> ]  ;
  358.              [ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
  359.              [ <update: UPDATE> ] ;
  360.              [ FONT <oFont> ] ;
  361.        => ;
  362.           [ <oSay> := ] TSay():ReDefine( <nId>, <{cText}>, <oWnd>, ;
  363.              <cPict>, <.lCenter.>, <.lBorder.>, <nClrText>, <nClrBack>,;
  364.              <.update.>, <oFont> )
  365.  
  366. #xcommand @ <nRow>, <nCol> SAY [ <oSay> <label:PROMPT,VAR> ] <cText> ;
  367.              [ PICTURE <cPict> ] ;
  368.              [ <dlg:OF,WINDOW,DIALOG> <oWnd> ] ;
  369.              [ FONT <oFont> ]  ;
  370.              [ <lCenter: CENTERED > ]  ;
  371.              [ <lBorder: BORDER> ]  ;
  372.              [ <lPixel: PIXEL, PIXELS> ] ;
  373.              [ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
  374.              [ SIZE <nWidth>, <nHeight> ] ;
  375.              [ <design: DESIGN> ] ;
  376.              [ <update: UPDATE> ] ;
  377.       => ;
  378.           [ <oSay> := ] TSay():New( <nRow>, <nCol>, <{cText}>,;
  379.              [<oWnd>], [<cPict>], <oFont>, <.lCenter.>, <.lBorder.>,;
  380.              <.lPixel.>, <nClrText>, <nClrBack>, <nWidth>, <nHeight>,;
  381.              <.design.>, <.update.> )
  382.  
  383. //----------------------------------------------------------------------------//
  384. // GET
  385.  
  386. #xcommand REDEFINE GET [ <oGet> VAR ] <uVar> ;
  387.              [ <memo: MULTILINE, MEMO, TEXT> ] ;
  388.              [ ID <nId> ] ;
  389.              [ <dlg: OF, WINDOW, DIALOG> <oDlg> ] ;
  390.              [ <help:HELPID, HELP ID> <nHelpId> ] ;
  391.              [ <color: COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
  392.              [ FONT <oFont> ] ;
  393.              [ CURSOR <oCursor> ] ;
  394.              [ MESSAGE <cMsg> ] ;
  395.              [ <update: UPDATE> ] ;
  396.        => ;
  397.           [ <oGet> := ] TMultiGet():ReDefine( <nId>, bSETGET(<uVar>),;
  398.              <oDlg>, <nHelpId>, <nClrFore>, <nClrBack>, <oFont>, <oCursor>,;
  399.              <cMsg>, <.update.> )
  400.  
  401. #xcommand REDEFINE GET [ <oGet> VAR ] <uVar> ;
  402.              [ ID <nId> ] ;
  403.              [ <dlg: OF, WINDOW, DIALOG> <oDlg> ] ;
  404.              [ <help:HELPID, HELP ID> <nHelpId> ] ;
  405.              [ VALID   <ValidFunc> ]       ;
  406.              [ PICTURE <cPict> ] ;
  407.              [ <color:COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
  408.              [ FONT <oFont> ] ;
  409.              [ CURSOR <oCursor> ] ;
  410.              [ MESSAGE <cMsg> ] ;
  411.              [ <update: UPDATE> ] ;
  412.        => ;
  413.           [ <oGet> := ] TGet():ReDefine( <nId>, bSETGET(<uVar>), <oDlg>,;
  414.              <nHelpId>, <cPict>, <{ValidFunc}>, <nClrFore>, <nClrBack>,;
  415.              <oFont>, <oCursor>, <cMsg>, <.update.> )
  416.  
  417. #command @ <nRow>, <nCol> GET [ <oGet> VAR ] <uVar> ;
  418.                           [ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
  419.                           [ <memo: MULTILINE, MEMO, TEXT> ] ;
  420.                           [ <color:COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
  421.                           [ SIZE <nWidth>, <nHeight> ] ;
  422.                           [ FONT <oFont> ] ;
  423.                           [ <hscroll: HSCROLL> ] ;
  424.                           [ CURSOR <oCursor> ] ;
  425.                           [ <pixel: PIXEL> ] ;
  426.                           [ MESSAGE <cMsg> ] ;
  427.                           [ <update: UPDATE> ] ;
  428.        => ;
  429.           [ <oGet> := ] TMultiGet():New( <nRow>, <nCol>, bSETGET(<uVar>),;
  430.                             [<oWnd>], <nWidth>, <nHeight>, <oFont>, <.hscroll.>,;
  431.                             <nClrFore>, <nClrBack>, <oCursor>, <.pixel.>,;
  432.                             <cMsg>, <.update.> )
  433.  
  434. #command @ <nRow>, <nCol> GET [ <oGet> VAR ] <uVar>     ;
  435.                           [ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
  436.                           [ PICTURE <cPict> ]           ;
  437.                           [ VALID   <ValidFunc> ]       ;
  438.                           [ WHEN    <WhenFunc> ]        ;
  439.                           [ <color:COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
  440.                           [ SIZE <nWidth>, <nHeight> ]  ;
  441.                           [ FONT <oFont> ] ;
  442.                           [ <design: DESIGN> ] ;
  443.                           [ CURSOR <oCursor> ] ;
  444.                           [ <pixel: PIXEL> ] ;
  445.                           [ MESSAGE <cMsg> ] ;
  446.                           [ <update: UPDATE> ] ;
  447.        => ;
  448.           [ <oGet> := ] TGet():New( <nRow>, <nCol>, bSETGET(<uVar>),;
  449.                       [<oWnd>], <nWidth>, <nHeight>, <cPict>, <{ValidFunc}>,;
  450.                       <nClrFore>, <nClrBack>, <oFont>, <.design.>,;
  451.                       <oCursor>, <.pixel.>, <cMsg>, <.update.> )
  452.  
  453. //----------------------------------------------------------------------------//
  454. // SCROLLBAR
  455.  
  456. #xcommand @ <nRow>, <nCol> SCROLLBAR [ <oSbr> ] ;
  457.              [ <h: HORIZONTAL> ] ;
  458.              [ <v: VERTICAL> ] ;
  459.              [ RANGE <nMin>, <nMax> ] ;
  460.              [ PAGESTEP <nPgStep> ] ;
  461.              [ SIZE <nWidth>, <nHeight> ] ;
  462.              [ <up:UP, ON UP> <uUpAction> ] ;
  463.              [ <dn:DOWN, ON DOWN> <uDownAction> ] ;
  464.              [ <pgup:PAGEUP, ON PAGEUP> <uPgUpAction> ] ;
  465.              [ <pgdn:PAGEDOWN, ON PAGEDOWN> <uPgDownAction> ] ;
  466.              [ <pos: ON THUMBPOS> <uPos> ] ;
  467.              [ <pixel: PIXEL> ] ;
  468.              [ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
  469.              [ OF <oWnd> ] ;
  470.              [ MESSAGE <cMsg> ] ;
  471.              [ <update: UPDATE> ] ;
  472.        => ;
  473.           [ <oSbr> := ] TScrollBar():New( <nRow>, <nCol>, <nMin>, <nMax>, <nPgStep>,;
  474.              (.not.<.h.>) [.or. <.v.> ], <oWnd>, <nWidth>, <nHeight> ,;
  475.              [<{uUpAction}>], [<{uDownAction}>], [<{uPgUpAction}>], ;
  476.              [<{uPgDownAction}>], [\{|nPos| <uPos> \}], [<.pixel.>],;
  477.              <nClrText>, <nClrBack>, <cMsg>, <.update.> )
  478.  
  479. // for 'non-true ScrollBars' ( when using WS_VSCROLL or WS_HSCROLL styles )
  480.  
  481. #xcommand DEFINE SCROLLBAR [ <oSbr> ] ;
  482.              [ <h: HORIZONTAL> ] ;
  483.              [ <v: VERTICAL> ] ;
  484.              [ RANGE <nMin>, <nMax> ] ;
  485.              [ PAGESTEP <nPgStep> ] ;
  486.              [ <up:UP, ON UP> <uUpAction> ] ;
  487.              [ <dn:DOWN, ON DOWN> <uDownAction> ] ;
  488.              [ <pgup:PAGEUP, ON PAGEUP> <uPgUpAction> ] ;
  489.              [ <pgdn:PAGEDOWN, ON PAGEDOWN> <uPgDownAction> ] ;
  490.              [ <pos: ON THUMBPOS> <uPos> ] ;
  491.              [ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
  492.              [ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
  493.              [ MESSAGE <cMsg> ] ;
  494.              [ <update: UPDATE> ] ;
  495.        => ;
  496.              [ <oSbr> := ] TScrollBar():WinNew( <nMin>, <nMax>, <nPgStep>, ;
  497.              (.not.<.h.>) [.or. <.v.> ], <oWnd>, [<{uUpAction}>],;
  498.              [<{uDownAction}>], [<{uPgUpAction}>], ;
  499.              [<{uPgDownAction}>], [\{|nPos| <uPos> \}],;
  500.              <nClrText>, <nClrBack>, <cMsg>, <.update.> )
  501.  
  502. #xcommand REDEFINE SCROLLBAR [ <oSbr> ] ;
  503.              [ ID <nID>  ] ;
  504.              [ RANGE <nMin>, <nMax> ] ;
  505.              [ PAGESTEP <nPgStep> ] ;
  506.              [ <up:UP, ON UP> <uUpAction> ] ;
  507.              [ <dn:DOWN, ON DOWN> <uDownAction> ] ;
  508.              [ <pgup:PAGEUP, ON PAGEUP> <uPgUpAction> ] ;
  509.              [ <pgdn:PAGEDOWN, ON PAGEDOWN> <uPgDownAction> ] ;
  510.              [ <pos: ON THUMBPOS> <uPos> ] ;
  511.              [ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
  512.              [ OF <oDlg> ] ;
  513.              [ MESSAGE <cMsg> ] ;
  514.              [ <update: UPDATE> ] ;
  515.        => ;
  516.              [ <oSbr> := ] TScrollBar():Redefine( <nID>, <nMin>, <nMax>, <nPgStep>,;
  517.              <oDlg>, [<{uUpAction}>], [<{uDownAction}>], [<{uPgUpAction}>], ;
  518.              [<{uPgDownAction}>], [\{|nPos| <uPos> \}], <nClrText>,;
  519.              <nClrBack>, <cMsg>, <.update.> )
  520.  
  521. //----------------------------------------------------------------------------//
  522. // BOX - GROUPS
  523.  
  524. #xcommand @ <nTop>, <nLeft> [ GROUP <oGroup> ] TO <nBottom>, <nRight > ;
  525.              [ <label:LABEL,PROMPT> <cLabel> ] ;
  526.              [ OF <oWnd> ] ;
  527.              [ COLOR <nClrFore> [,<nClrBack>] ] ;
  528.        => ;
  529.           [ <oGroup> := ] TGroup():New( <nTop>, <nLeft>, <nBottom>, <nRight>,;
  530.              <cLabel>, <oWnd>, <nClrFore>, <nClrBack> )
  531.  
  532. #xcommand REDEFINE GROUP [ <oGroup> ] ;
  533.              [ <label:LABEL,PROMPT> <cLabel> ] ;
  534.              [ ID <nId> ] ;
  535.              [ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
  536.              [ COLOR <nClrFore> [,<nClrBack>] ] ;
  537.        => ;
  538.           [ <oGroup> := ] TGroup():ReDefine( <nId>, <cLabel>, <oWnd>,;
  539.              <nClrFore>, <nClrBack> )
  540.  
  541. //----------------------------------------------------------------------------//
  542. // meter
  543.  
  544. #xcommand @ <nRow>, <nCol> METER [ <oMeter> VAR ] <nActual> ;
  545.              [ TOTAL <nTotal> ] ;
  546.              [ SIZE <nWidth>, <nHeight> ];
  547.              [ OF <oWnd> ] ;
  548.              [ <update: UPDATE> ] ;
  549.        => ;
  550.           [ <oMeter> := ] TMeter():New( <nRow>, <nCol>, bSETGET(<nActual>),;
  551.              <nTotal>, <oWnd>, <nWidth>, <nHeight>, <.update.> )
  552.  
  553. #xcommand REDEFINE METER [ <oMeter> VAR ] <nActual> ;
  554.              [ TOTAL <nTotal> ] ;
  555.              [ ID <nId> ];
  556.              [ OF <oWnd> ] ;
  557.              [ <update: UPDATE> ] ;
  558.        => ;
  559.           [ <oMeter> := ] TMeter():ReDefine( <nId>, bSETGET(<nActual>),;
  560.               <nTotal>, <oWnd>, <.update.> )
  561.  
  562. //----------------------------------------------------------------------------//
  563. // Cursor Commands
  564.  
  565. #xcommand DEFINE CURSOR <oCursor> ;
  566.              [ <resource: RESOURCE, RESNAME, NAME> <cResName> ] ;
  567.        => ;
  568.           <oCursor> := TCursor():New( <cResName> )
  569.  
  570. #xcommand RELEASE CURSOR <oCursor> => <oCursor>:End()
  571.  
  572. //----------------------------------------------------------------------------//
  573. // Window Commands
  574.  
  575. #xcommand DEFINE WINDOW [<oWnd>] ;
  576.              [ MDICHILD ] ;
  577.              [ FROM <nTop>, <nLeft> TO <nBottom>, <nRight> ] ;
  578.              [ TITLE <cTitle> ] ;
  579.              [ BRUSH <oBrush> ] ;
  580.              [ CURSOR <oCursor> ] ;
  581.              [ MENU <oMenu> ] ;
  582.              [ ICON <oIco> ] ;
  583.              [ OF <oParent> ] ;
  584.              [ <vscroll: VSCROLL> ] ;
  585.              [ <hscroll: HSCROLL> ] ;
  586.              [ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
  587.              [ <pixel: PIXEL> ] ;
  588.        => ;
  589.           [<oWnd> := ] TMdiChild():New( <nTop>, <nLeft>, <nBottom>, <nRight>,;
  590.              <cTitle>,, <oMenu>, <oParent>, <oIco>, <.vscroll.>, <nClrFore>,;
  591.              <nClrBack>, <oCursor>, <oBrush>, <.pixel.>, <.hscroll.> )
  592.  
  593. #xcommand DEFINE WINDOW <oWnd> ;
  594.              [ FROM <nTop>, <nLeft> TO <nBottom>, <nRight> ] ;
  595.              [ TITLE <cTitle> ] ;
  596.              [ STYLE <nStyle> ] ;
  597.              [ MENU  <oMenu> ] ;
  598.              [ BRUSH <oBrush> ] ;
  599.              [ ICON  <oIcon> ] ;
  600.              [ MDI ] ;
  601.              [ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
  602.              [ <vScroll: VSCROLL, VERTICAL SCROLL> ] ;
  603.              [ <hScroll: HSCROLL, HORIZONTAL SCROLL> ] ;
  604.              [ MENUINFO <nMenuInfo> ] ;
  605.              [ <border: NONE, SINGLE> ] ;
  606.              [ OF <oParent> ] ;
  607.        => ;
  608.           <oWnd> := TMdiFrame():New( <nTop>, <nLeft>, <nBottom>, <nRight>,;
  609.              <cTitle>, <nStyle>, <oMenu>, <oBrush>, <oIcon>, <nClrFore>,;
  610.              <nClrBack>, [<.vScroll.>], [<.hScroll.>], <nMenuInfo>,;
  611.              [Upper(<(border)>)], <oParent> )
  612.  
  613. #xcommand DEFINE WINDOW <oWnd> ;
  614.              [ FROM <nTop>, <nLeft> TO <nBottom>, <nRight> ] ;
  615.              [ TITLE <cTitle> ] ;
  616.              [ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ];
  617.              [ OF <oParent> ] ;
  618.              [ BRUSH <oBrush> ] ;                         // Contained Objects
  619.              [ CURSOR <oCursor> ] ;
  620.              [ ICON  <oIcon> ] ;
  621.              [ MENU <oMenu> ] ;
  622.              [ STYLE <nStyle> ] ;                          // Styles
  623.              [ BORDER <border: NONE, SINGLE> ] ;
  624.              [ <NoSysMenu:  NOSYSMENU, NO SYSMENU> ] ;
  625.              [ <NoCaption:  NOCAPTION, NO CAPTION, NO TITLE> ] ;
  626.              [ <NoIconize:  NOICONIZE, NOMINIMIZE> ] ;
  627.              [ <NoMaximize: NOZOOM, NO ZOOM, NOMAXIMIZE, NO MAXIMIZE> ] ;
  628.              [ <vScroll: VSCROLL, VERTICAL SCROLL> ] ;
  629.              [ <hScroll: HSCROLL, HORIZONTAL SCROLL> ] ;
  630.        => ;
  631.           <oWnd> := TWindow():New( <nTop>, <nLeft>, <nBottom>, <nRight>,;
  632.              <cTitle>, <nStyle>, <oMenu>, <oBrush>, <oIcon>, <oParent>,;
  633.              [<.vScroll.>], [<.hScroll.>], <nClrFore>, <nClrBack>, <oCursor>,;
  634.              [Upper(<(border)>)], !<.NoSysMenu.>, !<.NoCaption.>,;
  635.              !<.NoIconize.>, !<.NoMaximize.> )
  636.  
  637. #xcommand ACTIVATE WINDOW <oWnd> ;
  638.              [ <show: ICONIZED, NORMAL, MAXIMIZED> ] ;
  639.              [ ON [ LEFT ] CLICK <uLClick> ] ;
  640.              [ ON RIGHT CLICK <uRClick> ] ;
  641.              [ ON MOVE <uMove> ] ;
  642.              [ ON RESIZE <uResize> ] ;
  643.              [ ON PAINT <uPaint> ] ;
  644.              [ ON KEYDOWN <uKeyDown> ] ;
  645.              [ ON INIT <uInit> ] ;
  646.              [ ON UP <uUp> ] ;
  647.              [ ON DOWN <uDown> ] ;
  648.              [ ON PAGEUP <uPgUp> ] ;
  649.              [ ON PAGEDOWN <uPgDn> ] ;
  650.              [ ON LEFT <uLeft> ] ;
  651.              [ ON RIGHT <uRight> ] ;
  652.              [ ON PAGELEFT <uPgLeft> ] ;
  653.              [ ON PAGERIGHT <uPgRight> ] ;
  654.              [ VALID <uValid> ] ;
  655.        => ;
  656.           <oWnd>:Activate( [ Upper(<(show)>) ],;
  657.                            <oWnd>:bLClicked [ := \{ |nRow,nCol,nKeyFlags| <uLClick> \} ], ;
  658.                            <oWnd>:bRClicked [ := \{ |nRow,nCol,nKeyFlags| <uRClick> \} ], ;
  659.                            <oWnd>:bMoved    [ := <{uMove}> ], ;
  660.                            <oWnd>:bResized  [ := <{uResize}> ], ;
  661.                            <oWnd>:bPainted  [ := <{uPaint}> ], ;
  662.                            <oWnd>:bKeyDown  [ := \{ |nKey| <uKeyDown> \} ],;
  663.                            <oWnd>:bInit     [ := \{ | Self | <uInit> \} ],;
  664.                            [<{uUp}>], [<{uDown}>], [<{uPgUp}>], [<{uPgDn}>],;
  665.                            [<{uLeft}>], [<{uRight}>], [<{uPgLeft}>], [<{uPgRight}>],;
  666.                            [<{uValid}>] )
  667.  
  668. //----------------------------------------------------------------------------//
  669. // ButtonBar Commands
  670.  
  671. #xcommand DEFINE BUTTONBAR [ <oBar> ] ;
  672.              [ <size: SIZE, BUTTONSIZE, SIZEBUTTON > <nWidth>, <nHeight> ] ;
  673.              [ <_3d: 3D, 3DLOOK> ] ;
  674.              [ <mode: TOP, LEFT, RIGHT, ADJUST> ] ;
  675.              [ <wnd: OF, WINDOW, DIALOG> <oWnd> ] ;
  676.              [ CURSOR <oCursor> ] ;
  677.       => ;
  678.          [ <oBar> := ] TBar():New( <oWnd>, <nWidth>, <nHeight>, <._3d.>,;
  679.              [ Upper(<(mode)>) ], <oCursor> )
  680.  
  681. #xcommand DEFINE BUTTON [ <oBtn> ] ;
  682.              [ <bar: OF, BUTTONBAR > <oBar> ] ;
  683.              [ <resource: NAME, RESNAME, RESOURCE> <cResName1> [,<cResName2>] ] ;
  684.              [ <file: FILE, FILENAME, DISK> <cBmpFile1> [,<cBmpFile2>] ] ;
  685.              [ <action:ACTION,EXEC> <uAction> ] ;
  686.              [ <group: GROUP > ] ;
  687.              [ MESSAGE <cMsg> ] ;
  688.              [ <adjust: ADJUST > ] ;
  689.       => ;
  690.          [ <oBtn> := ] TBtnBmp():NewBar( <cResName1>, <cResName2>,;
  691.                                          <cBmpFile1>, <cBmpFile2>,;
  692.                                          <cMsg>, <{uAction}>, <.group.>,;
  693.                                          <oBar>, <.adjust.> )
  694.  
  695. //----------------------------------------------------------------------------//
  696. // MESSAGE BAR
  697.  
  698. #xcommand SET MESSAGE [ OF <oWnd> ] ;
  699.              [ TO <cMsg> ] ;
  700.              [ <center: CENTERED> ] ;
  701.        => ;
  702.           <oWnd>:oMsgBar := TMsgBar():New( <oWnd>, <cMsg>, <.center.> )
  703.           
  704. #xcommand DEFINE MESSAGE BAR [<oMsg>] OF <oWnd> ;
  705.              [ PROMPT <cMsg> ] ;
  706.              [ <center: CENTERED> ] ;
  707.       => ;
  708.          [<oMsg>:=] <oWnd>:oMsgBar := TMsgBar():New( <oWnd>, <cMsg>, <.center.> )
  709.  
  710. //----------------------------------------------------------------------------//
  711. // CLIPBOARD
  712.  
  713. #xcommand DEFINE CLIPBOARD <oClp> ;
  714.              [ FORMAT <format:TEXT,OEMTEXT,BITMAP,DIF> ] ;
  715.              [ OF <oWnd> ] ;
  716.        => ;
  717.           <oClp> := TClipBoard():New( [Upper(<(format)>)], <oWnd> )
  718.  
  719. #xcommand ACTIVATE CLIPBOARD <oClp>  => <oClp>:Open()
  720.  
  721. #xcommand SET TEXT OF CLIPBOARD <oClp> ;
  722.              TO <cText> ;
  723.        => ;
  724.           <oClp>:SetText( <cText> )
  725.  
  726. #xcommand DEACTIVATE CLIPBOARD <oClp>   => <oClp>:Close()
  727.  
  728. #xcommand RELEASE CLIPBOARD <oClp>      => <oClp>:Close(); <oClp> := nil
  729.  
  730. //----------------------------------------------------------------------------//
  731. // Timer
  732.  
  733. #xcommand DEFINE TIMER [ <oTimer> ] ;
  734.              [ INTERVAL <nInterval> ] ;
  735.              [ ACTION <uAction> ] ;
  736.              [ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
  737.        => ;
  738.           [ <oTimer> := ] TTimer():New( <nInterval>, [<{uAction}>], <oWnd> )
  739.  
  740. #xcommand ACTIVATE TIMER <oTimer> => <oTimer>:Activate()
  741.  
  742. #xcommand DEACTIVATE TIMER <oTimer> => <oTimer>:DeActivate()
  743.  
  744. #xcommand RELEASE TIMER <oTimer> => <oTimer>:Release()
  745.  
  746. //----------------------------------------------------------------------------//
  747. // Visual Basic VBX Controls Support
  748.  
  749. #xcommand REDEFINE VBX [<oControl>] ;
  750.              [ ID <nId> ] ;
  751.              [ OF <oDlg> ] ;
  752.        => ;
  753.           [ <oControl> := ] TVbControl():ReDefine( <nId>, <oDlg> )
  754.  
  755. //----------------------------------------------------------------------------//
  756.  
  757. #xcommand CLS => InvalidateRect( GetActiveWindow(), 0, .t. )
  758.  
  759. #xcommand CLEAR SCREEN => InvalidateRect( GetActiveWindow(), 0, .t. )
  760.  
  761. #command ? [ <list,...> ] => WQout( [ \{ <list> \} ] )
  762.  
  763. #command ?? [ <list,...> ] => WQout( [ \{ <list> \} ] )
  764.  
  765. //----------------------------------------------------------------------------//
  766. // Commands & functions not supported
  767.  
  768. #xcommand READ =>
  769.  
  770. #xcommand KEYBOARD <cChars> =>
  771.  
  772. #xcommand __KeyBoard( <cChars> ) => ;
  773.    MsgAlert( OemToAnsi( "__KeyBoard() not available in FiveWin" ) )
  774.  
  775. #xcommand SAVE SCREEN [ TO <u> ] =>
  776.  
  777. #xcommand RESTORE SCREEN [ FROM <u> ] =>
  778.  
  779. #xcommand SaveScreen( <*u*> ) => ;
  780.    MsgAlert( OemToAnsi( "SaveScreen() not available in FiveWin" ) )
  781.  
  782. #xcommand RestScreen( <*u*> ) => ;
  783.    MsgAlert( OemToAnsi( "RestScreen() not available in FiveWin" ) )
  784.  
  785. #xcommand @ <nRow>, <nCol> PROMPT <*u*> =>
  786.  
  787. #xcommand MENU TO <u> =>
  788.  
  789. //----------------------------------------------------------------------------//
  790.  
  791. #endif
  792.