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 >
Wrap
Text File
|
1994-06-12
|
33KB
|
792 lines
// FiveWin main Header File
#ifndef _FIVEWIN_CH
#define _FIVEWIN_CH
#define FWVERSION "FiveWin 1.6c - June 1994"
#define FWCOPYRIGHT OemToAnsi( "(c) Antonio Linares & Francisco Pulpón, 1993-4" )
#include "Colors.ch"
#include "DDE.ch"
#include "Dialog.ch"
#include "DLL.ch"
#include "Font.ch"
#include "Ini.ch"
#include "Menu.ch"
#include "Objects.ch"
#include "ODBC.ch"
#include "Print.ch"
#include "Tree.ch"
#include "Video.ch"
#include "VKey.ch"
#include "WinApi.ch"
#define CRLF Chr(13)+Chr(10)
//----------------------------------------------------------------------------//
// ACCESSING / SETTING Variables
#xtranslate bSETGET(<uVar>) => ;
{ | u | If( PCount() == 0, <uVar>, <uVar> := u ) }
//----------------------------------------------------------------------------//
#xcommand DEFAULT <uVar1> := <uVal1> ;
[, <uVarN> := <uValN> ] => ;
<uVar1> := If( <uVar1> == nil, <uVal1>, <uVar1> ) ;;
[ <uVarN> := If( <uVarN> == nil, <uValN>, <uVarN> ); ]
//----------------------------------------------------------------------------//
// DO ... UNTIL support
#xcommand DO => while .t.
#xcommand UNTIL <uExpr> => if <uExpr>; exit; end; end
//----------------------------------------------------------------------------//
// DataBase Objects
#xcommand DATABASE <oDbf> => <oDbf> := TDataBase():New()
//----------------------------------------------------------------------------//
// Brushes
#xcommand DEFINE BRUSH [ <oBrush> ] ;
[ STYLE <cStyle> ] ;
[ COLOR <nRGBColor> ] ;
[ <file:FILE,FILENAME,DISK> <cBmpFile> ] ;
[ <resource:RESOURCE,NAME,RESNAME> <cBmpRes> ] ;
=> ;
[ <oBrush> := ] TBrush():New( [ Upper(<(cStyle)>) ], <nRGBColor>,;
<cBmpFile>, <cBmpRes> )
#xcommand RELEASE BRUSH <oBrush> => <oBrush>:Release()
#xcommand SET BRUSH ;
[ OF <oWnd> ] ;
[ TO <oBrush> ] ;
=> ;
<oWnd>:SetBrush( <oBrush> )
//----------------------------------------------------------------------------//
// Icons
#xcommand @ <nRow>, <nCol> ICON [ <oIcon> ] ;
[ <resource: NAME, RESOURCE, RESNAME> <cResName> ] ;
[ <file: FILE, FILENAME, DISK> <cIcoFile> ] ;
[ <border:BORDER> ] ;
[ ON CLICK <uClick> ] ;
[ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oIcon> := ] TIcon():New( <nRow>, <nCol>, <cResName>,;
<cIcoFile>, <.border.>, <{uClick}>, <oWnd>, <.update.> )
#xcommand DEFINE ICON <oIcon> ;
[ <resource: NAME, RESOURCE, RESNAME> <cResName> ] ;
[ <file: FILE, FILENAME, DISK> <cIcoFile> ] ;
=> ;
<oIcon> := TIcon():New( ,, <cResName>, <cIcoFile> )
//----------------------------------------------------------------------------//
// PUSHBUTTON
#xcommand @ <nRow>, <nCol> BUTTON [ <oBtn> PROMPT ] <cCaption> ;
[ SIZE <nWidth>, <nHeight> ] ;
[ ACTION <uAction> ] ;
[ <default: DEFAULT> ] ;
[ <of:OF, WINDOW, DIALOG> <oWnd> ] ;
[ <help:HELP, HELPID, HELP ID> <nHelpId> ] ;
[ FONT <oFont> ] ;
[ <pixel: PIXEL> ] ;
[ <design: DESIGN> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oBtn> := ] TButton():New( <nRow>, <nCol>, <cCaption>, <oWnd>,;
<{uAction}>, <nWidth>, <nHeight>, <nHelpId>, <oFont>, <.default.>,;
<.pixel.>, <.design.>, <cMsg>, <.update.> )
#xcommand REDEFINE BUTTON [ <oBtn> ] ;
[ ID <nId> <of:OF, WINDOW, DIALOG> <oDlg> ] ;
[ ACTION <uAction> ] ;
[ <help:HELP, HELPID, HELP ID> <nHelpId> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oBtn> := ] TButton():ReDefine( <nId>, <{uAction}>, <oDlg>,;
<nHelpId>, <cMsg>, <.update.> )
//----------------------------------------------------------------------------//
// CHECKBOX
#xcommand REDEFINE CHECKBOX [ <oCbx> VAR ] <lVar> ;
[ ID <nId> ] ;
[ <of:OF, WINDOW, DIALOG> <oWnd> ] ;
[ <help:HELPID, HELP ID> <nHelpId> ] ;
[ <click:ON CLICK, ON CHANGE> <uClick> ];
[ VALID <ValidFunc> ] ;
[ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oCbx> := ] TCheckBox():ReDefine( <nId>, bSETGET(<lVar>),;
<oWnd>, <nHelpId>, [<{uClick}>], <{ValidFunc}>, <nClrFore>,;
<nClrBack>, <cMsg>, <.update.> )
#xcommand @ <nRow>, <nCol> CHECKBOX [ <oCbx> VAR ] <lVar> ;
[ PROMPT <cCaption> ] ;
[ <of:OF, WINDOW, DIALOG> <oWnd> ] ;
[ SIZE <nWidth>, <nHeight> ] ;
[ <help:HELPID, HELP ID> <nHelpId> ] ;
[ FONT <oFont> ] ;
[ ON CLICK <uClick> ] ;
[ VALID <ValidFunc> ] ;
[ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
[ <design: DESIGN> ] ;
[ <pixel: PIXEL> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oCbx> := ] TCheckBox():New( <nRow>, <nCol>, <cCaption>,;
[bSETGET(<lVar>)], <oWnd>, <nWidth>, <nHeight>, <nHelpId>,;
[<{uClick}>], <oFont>, <{ValidFunc}>, <nClrFore>, <nClrBack>,;
<.design.>, <.pixel.>, <cMsg>, <.update.> )
//----------------------------------------------------------------------------//
// COMBOBOX
#xcommand @ <nRow>, <nCol> COMBOBOX [ <oCbx> VAR ] <cVar> ;
[ ITEMS <aItems> ] ;
[ SIZE <nWidth>, <nHeight> ] ;
[ <dlg:OF,WINDOW,DIALOG> <oWnd> ] ;
[ <help:HELPID, HELP ID> <nHelpId> ] ;
[ ON CHANGE <uChange> ] ;
[ VALID <ValidFunc> ] ;
[ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
[ <pixel: PIXEL> ] ;
[ FONT <oFont> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oCbx> := ] TComboBox():New( <nRow>, <nCol>, bSETGET(<cVar>),;
<aItems>, <nWidth>, <nHeight>, <oWnd>, <nHelpId>,;
[{|Self|<uChange>}], <{ValidFunc}>, <nClrText>, <nClrBack>,;
<.pixel.>, <oFont>, <.update.> )
#xcommand REDEFINE COMBOBOX [ <oCbx> VAR ] <cVar> ;
[ ITEMS <aItems> ] ;
[ ID <nId> ] ;
[ <dlg:OF,WINDOW,DIALOG> <oWnd> ] ;
[ <help:HELPID, HELP ID> <nHelpId> ] ;
[ ON CHANGE <uChange> ] ;
[ VALID <ValidFunc> ] ;
[ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oCbx> := ] TComboBox():ReDefine( <nId>, bSETGET(<cVar>),;
<aItems>, <oWnd>, <nHelpId>, <{ValidFunc}>, [{|Self|<uChange>}],;
<nClrText>, <nClrBack>, <.update.> )
//----------------------------------------------------------------------------//
// LISTBOX
#xcommand REDEFINE LISTBOX [ <oLbx> VAR ] <cVar> ;
[ ITEMS <aItems> ] ;
[ FILES <cFileSpec> ] ;
[ ID <nId> ] ;
[ ON CHANGE <uChange> ] ;
[ ON [ LEFT ] DBLCLICK <uLDblClick> ] ;
[ <of: OF, WINDOW, DIALOG > <oWnd> ] ;
[ <help:HELPID, HELP ID> <nHelpId> ] ;
[ <bitmaps: BITMAPS > [ SIZE <nSize> ] ] ;
[ VALID <ValidFunc> ] ;
[ <color: COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oLbx> := ] TListBox():ReDefine( <nId>, bSETGET(<cVar>), <aItems>,;
<{uChange}>, <oWnd>, <nHelpId>, <.bitmaps.>, <nSize>, ;
<{ValidFunc}>, <cFileSpec>, <nClrFore>, <nClrBack>,;
<{uLDblClick}>, <cMsg>, <.update.> )
#xcommand @ <nRow>, <nCol> LISTBOX [ <oLbx> VAR ] <cVar> ;
[ ITEMS <aList> ] ;
[ SIZE <nWidth>, <nHeight> ] ;
[ ON CHANGE <uChange> ] ;
[ ON [ LEFT ] DBLCLICK <uLDblClick> ] ;
[ <of: OF, WINDOW, DIALOG > <oWnd> ] ;
[ VALID <ValidFunc> ] ;
[ <color: COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
[ <pixel: PIXEL> ] ;
[ <design: DESIGN> ] ;
[ FONT <oFont> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oLbx> := ] TListBox():New( <nRow>, <nCol>, bSETGET(<cVar>),;
<aList>, <nWidth>, <nHeight>, <{uChange}>, <oWnd>, <{ValidFunc}>,;
<nClrFore>, <nClrBack>, <.pixel.>, <.design.>, <{uLDblClick}>,;
<oFont>, <cMsg>, <.update.> )
//----------------------------------------------------------------------------//
// LISTBOX - BROWSE
// Warning: SELECT <cField> ==> Must be the Field key of the current INDEX !!!
#xcommand REDEFINE LISTBOX [ <oLbx> ] FIELDS [<Flds,...>] ;
[ ID <nId> ] ;
[ <dlg:OF,DIALOG> <oDlg> ] ;
[ <sizes:FIELDSIZES, SIZES, COLSIZES> <aColSizes,...> ] ;
[ <head:HEAD,HEADER,HEADERS> <aHeaders,...> ] ;
[ SELECT <cField> FOR <uValue1> [ TO <uValue2> ] ] ;
[ <change: ON CHANGE, ON CLICK> <uChange> ] ;
[ ON [ LEFT ] DBLCLICK <uLDblClick> ] ;
[ ON RIGHT CLICK <uRClick> ] ;
[ FONT <oFont> ] ;
[ CURSOR <oCursor> ] ;
[ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oLbx> := ] TWBrowse():ReDefine( <nId>, ;
[\{|| \{ <Flds> \} \}], <oDlg>,;
[ \{<aHeaders>\}], [\{<aColSizes>\}],;
<(cField)>, <uValue1>, <uValue2>,;
[<{uChange}>], [<{uLDblClick}>], [<{uRClick}>], <oFont>,;
<oCursor>, <nClrFore>, <nClrBack>, <cMsg>, <.update.> )
#xcommand @ <nRow>, <nCol> LISTBOX [ <oBrw> ] FIELDS [<Flds,...>] ;
[ <sizes:FIELDSIZES, SIZES, COLSIZES> <aColSizes,...> ] ;
[ <head:HEAD,HEADER,HEADERS> <aHeaders,...> ] ;
[ SIZE <nWidth>, <nHeigth> ] ;
[ <dlg:OF,DIALOG> <oDlg> ] ;
[ SELECT <cField> FOR <uValue1> [ TO <uValue2> ] ] ;
[ <change: ON CHANGE, ON CLICK> <uChange> ] ;
[ ON [ LEFT ] DBLCLICK <uLDblClick> ] ;
[ ON RIGHT CLICK <uRClick> ] ;
[ FONT <oFont> ] ;
[ CURSOR <oCursor> ] ;
[ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oBrw> := ] TWBrowse():New( <nRow>, <nCol>, <nWidth>, <nHeigth>,;
[\{|| \{<Flds> \} \}], ;
[ \{<aHeaders>\}], [\{<aColSizes>\}], ;
<oDlg>, <(cField)>, <uValue1>, <uValue2>,;
[<{uChange}>], [<{uLDblClick}>], [<{uRClick}>],;
<oFont>, <oCursor>, <nClrFore>, <nClrBack>, <cMsg>,;
<.update.> )
//----------------------------------------------------------------------------//
// RADIOBUTTONS
#xcommand @ <nRow>, <nCol> RADIO [ <oRadMenu> VAR ] <nVar> ;
[ PROMPT <cItems,...> ] ;
[ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
[ <help:HELPID, HELP ID> <nHelpId> ] ;
[ <change: ON CLICK, ON CHANGE> <uChange> ] ;
[ COLOR <nClrFore> [,<nClrBack>] ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oRadMenu> := ] TRadMenu():New( <nRow>, <nCol>, {<cItems>},;
[bSETGET(<nVar>)], <oWnd>, <nHelpId>, <{uChange}>,;
<nClrFore>, <nClrBack>, <cMsg>, <.update.> )
#xcommand REDEFINE RADIO [ <oRadMenu> VAR ] <nVar> ;
[ ID <nId,...> ] ;
[ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
[ <help:HELPID, HELP ID> <nHelpId> ] ;
[ <change: ON CLICK, ON CHANGE> <uChange> ] ;
[ COLOR <nClrFore> [,<nClrBack>] ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oRadMenu> := ] TRadMenu():Redefine( [bSETGET(<nVar>)],;
<oWnd>, <nHelpId>, \{ <nId> \}, <{uChange}>, <nClrFore>,;
<nClrBack>, <cMsg>, <.update.> )
//----------------------------------------------------------------------------//
// BITMAP
#xcommand @ <nRow>, <nCol> BITMAP [ <oBmp> ] ;
[ <resource: NAME, RESNAME, RESOURCE> <cResName> ] ;
[ <file: FILE, FILENAME, DISK> <cBmpFile> ] ;
[ <NoBorder:NOBORDER, NO BORDER> ] ;
[ SIZE <nWidth>, <nHeight> ] ;
[ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
[ <lClick: ON CLICK, ON LEFT CLICK> <uLClick> ] ;
[ <rClick: ON RIGHT CLICK> <uRClick> ] ;
[ <scroll: SCROLL> ] ;
[ <adjust: ADJUST> ] ;
[ CURSOR <oCursor> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oBmp> := ] TBitmap():New( <nRow>, <nCol>, <nWidth>, <nHeight>,;
<cResName>, <cBmpFile>, <.NoBorder.>, <oWnd>,;
[\{ |nRow,nCol,nKeyFlags| <uLClick> \} ],;
[\{ |nRow,nCol,nKeyFlags| <uRClick> \} ], <.scroll.>,;
<.adjust.>, <oCursor>, <.update.> )
#xcommand REDEFINE BITMAP [ <oBmp> ] ;
[ ID <nId> ] ;
[ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
[ <resource: NAME, RESNAME, RESOURCE> <cResName> ] ;
[ <file: FILE, FILENAME, DISK> <cBmpFile> ] ;
[ <lClick: ON ClICK, ON LEFT CLICK> <uLClick> ] ;
[ <rClick: ON RIGHT CLICK> <uRClick> ] ;
[ <scroll: SCROLL> ] ;
[ <adjust: ADJUST> ] ;
[ CURSOR <oCursor> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oBmp> := ] TBitmap():ReDefine( <nId>, <cResName>, <cBmpFile>,;
<oWnd>, [\{ |nRow,nCol,nKeyFlags| <uLClick> \}],;
[\{ |nRow,nCol,nKeyFlags| <uRClick> \}],;
<.scroll.>, <.adjust.>, <oCursor>, <.update.> )
//----------------------------------------------------------------------------//
// SAY
#xcommand REDEFINE SAY [ <oSay> ] ;
[ <label:PROMPT,VAR> <cText> ] ;
[ PICTURE <cPict> ] ;
[ ID <nId> ] ;
[ <dlg:OF,WINDOW,DIALOG> <oWnd> ] ;
[ <lCenter: CENTERED > ] ;
[ <lBorder: BORDER> ] ;
[ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
[ <update: UPDATE> ] ;
[ FONT <oFont> ] ;
=> ;
[ <oSay> := ] TSay():ReDefine( <nId>, <{cText}>, <oWnd>, ;
<cPict>, <.lCenter.>, <.lBorder.>, <nClrText>, <nClrBack>,;
<.update.>, <oFont> )
#xcommand @ <nRow>, <nCol> SAY [ <oSay> <label:PROMPT,VAR> ] <cText> ;
[ PICTURE <cPict> ] ;
[ <dlg:OF,WINDOW,DIALOG> <oWnd> ] ;
[ FONT <oFont> ] ;
[ <lCenter: CENTERED > ] ;
[ <lBorder: BORDER> ] ;
[ <lPixel: PIXEL, PIXELS> ] ;
[ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
[ SIZE <nWidth>, <nHeight> ] ;
[ <design: DESIGN> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oSay> := ] TSay():New( <nRow>, <nCol>, <{cText}>,;
[<oWnd>], [<cPict>], <oFont>, <.lCenter.>, <.lBorder.>,;
<.lPixel.>, <nClrText>, <nClrBack>, <nWidth>, <nHeight>,;
<.design.>, <.update.> )
//----------------------------------------------------------------------------//
// GET
#xcommand REDEFINE GET [ <oGet> VAR ] <uVar> ;
[ <memo: MULTILINE, MEMO, TEXT> ] ;
[ ID <nId> ] ;
[ <dlg: OF, WINDOW, DIALOG> <oDlg> ] ;
[ <help:HELPID, HELP ID> <nHelpId> ] ;
[ <color: COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
[ FONT <oFont> ] ;
[ CURSOR <oCursor> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oGet> := ] TMultiGet():ReDefine( <nId>, bSETGET(<uVar>),;
<oDlg>, <nHelpId>, <nClrFore>, <nClrBack>, <oFont>, <oCursor>,;
<cMsg>, <.update.> )
#xcommand REDEFINE GET [ <oGet> VAR ] <uVar> ;
[ ID <nId> ] ;
[ <dlg: OF, WINDOW, DIALOG> <oDlg> ] ;
[ <help:HELPID, HELP ID> <nHelpId> ] ;
[ VALID <ValidFunc> ] ;
[ PICTURE <cPict> ] ;
[ <color:COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
[ FONT <oFont> ] ;
[ CURSOR <oCursor> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oGet> := ] TGet():ReDefine( <nId>, bSETGET(<uVar>), <oDlg>,;
<nHelpId>, <cPict>, <{ValidFunc}>, <nClrFore>, <nClrBack>,;
<oFont>, <oCursor>, <cMsg>, <.update.> )
#command @ <nRow>, <nCol> GET [ <oGet> VAR ] <uVar> ;
[ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
[ <memo: MULTILINE, MEMO, TEXT> ] ;
[ <color:COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
[ SIZE <nWidth>, <nHeight> ] ;
[ FONT <oFont> ] ;
[ <hscroll: HSCROLL> ] ;
[ CURSOR <oCursor> ] ;
[ <pixel: PIXEL> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oGet> := ] TMultiGet():New( <nRow>, <nCol>, bSETGET(<uVar>),;
[<oWnd>], <nWidth>, <nHeight>, <oFont>, <.hscroll.>,;
<nClrFore>, <nClrBack>, <oCursor>, <.pixel.>,;
<cMsg>, <.update.> )
#command @ <nRow>, <nCol> GET [ <oGet> VAR ] <uVar> ;
[ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
[ PICTURE <cPict> ] ;
[ VALID <ValidFunc> ] ;
[ WHEN <WhenFunc> ] ;
[ <color:COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
[ SIZE <nWidth>, <nHeight> ] ;
[ FONT <oFont> ] ;
[ <design: DESIGN> ] ;
[ CURSOR <oCursor> ] ;
[ <pixel: PIXEL> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oGet> := ] TGet():New( <nRow>, <nCol>, bSETGET(<uVar>),;
[<oWnd>], <nWidth>, <nHeight>, <cPict>, <{ValidFunc}>,;
<nClrFore>, <nClrBack>, <oFont>, <.design.>,;
<oCursor>, <.pixel.>, <cMsg>, <.update.> )
//----------------------------------------------------------------------------//
// SCROLLBAR
#xcommand @ <nRow>, <nCol> SCROLLBAR [ <oSbr> ] ;
[ <h: HORIZONTAL> ] ;
[ <v: VERTICAL> ] ;
[ RANGE <nMin>, <nMax> ] ;
[ PAGESTEP <nPgStep> ] ;
[ SIZE <nWidth>, <nHeight> ] ;
[ <up:UP, ON UP> <uUpAction> ] ;
[ <dn:DOWN, ON DOWN> <uDownAction> ] ;
[ <pgup:PAGEUP, ON PAGEUP> <uPgUpAction> ] ;
[ <pgdn:PAGEDOWN, ON PAGEDOWN> <uPgDownAction> ] ;
[ <pos: ON THUMBPOS> <uPos> ] ;
[ <pixel: PIXEL> ] ;
[ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
[ OF <oWnd> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oSbr> := ] TScrollBar():New( <nRow>, <nCol>, <nMin>, <nMax>, <nPgStep>,;
(.not.<.h.>) [.or. <.v.> ], <oWnd>, <nWidth>, <nHeight> ,;
[<{uUpAction}>], [<{uDownAction}>], [<{uPgUpAction}>], ;
[<{uPgDownAction}>], [\{|nPos| <uPos> \}], [<.pixel.>],;
<nClrText>, <nClrBack>, <cMsg>, <.update.> )
// for 'non-true ScrollBars' ( when using WS_VSCROLL or WS_HSCROLL styles )
#xcommand DEFINE SCROLLBAR [ <oSbr> ] ;
[ <h: HORIZONTAL> ] ;
[ <v: VERTICAL> ] ;
[ RANGE <nMin>, <nMax> ] ;
[ PAGESTEP <nPgStep> ] ;
[ <up:UP, ON UP> <uUpAction> ] ;
[ <dn:DOWN, ON DOWN> <uDownAction> ] ;
[ <pgup:PAGEUP, ON PAGEUP> <uPgUpAction> ] ;
[ <pgdn:PAGEDOWN, ON PAGEDOWN> <uPgDownAction> ] ;
[ <pos: ON THUMBPOS> <uPos> ] ;
[ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
[ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oSbr> := ] TScrollBar():WinNew( <nMin>, <nMax>, <nPgStep>, ;
(.not.<.h.>) [.or. <.v.> ], <oWnd>, [<{uUpAction}>],;
[<{uDownAction}>], [<{uPgUpAction}>], ;
[<{uPgDownAction}>], [\{|nPos| <uPos> \}],;
<nClrText>, <nClrBack>, <cMsg>, <.update.> )
#xcommand REDEFINE SCROLLBAR [ <oSbr> ] ;
[ ID <nID> ] ;
[ RANGE <nMin>, <nMax> ] ;
[ PAGESTEP <nPgStep> ] ;
[ <up:UP, ON UP> <uUpAction> ] ;
[ <dn:DOWN, ON DOWN> <uDownAction> ] ;
[ <pgup:PAGEUP, ON PAGEUP> <uPgUpAction> ] ;
[ <pgdn:PAGEDOWN, ON PAGEDOWN> <uPgDownAction> ] ;
[ <pos: ON THUMBPOS> <uPos> ] ;
[ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ;
[ OF <oDlg> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oSbr> := ] TScrollBar():Redefine( <nID>, <nMin>, <nMax>, <nPgStep>,;
<oDlg>, [<{uUpAction}>], [<{uDownAction}>], [<{uPgUpAction}>], ;
[<{uPgDownAction}>], [\{|nPos| <uPos> \}], <nClrText>,;
<nClrBack>, <cMsg>, <.update.> )
//----------------------------------------------------------------------------//
// BOX - GROUPS
#xcommand @ <nTop>, <nLeft> [ GROUP <oGroup> ] TO <nBottom>, <nRight > ;
[ <label:LABEL,PROMPT> <cLabel> ] ;
[ OF <oWnd> ] ;
[ COLOR <nClrFore> [,<nClrBack>] ] ;
=> ;
[ <oGroup> := ] TGroup():New( <nTop>, <nLeft>, <nBottom>, <nRight>,;
<cLabel>, <oWnd>, <nClrFore>, <nClrBack> )
#xcommand REDEFINE GROUP [ <oGroup> ] ;
[ <label:LABEL,PROMPT> <cLabel> ] ;
[ ID <nId> ] ;
[ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
[ COLOR <nClrFore> [,<nClrBack>] ] ;
=> ;
[ <oGroup> := ] TGroup():ReDefine( <nId>, <cLabel>, <oWnd>,;
<nClrFore>, <nClrBack> )
//----------------------------------------------------------------------------//
// meter
#xcommand @ <nRow>, <nCol> METER [ <oMeter> VAR ] <nActual> ;
[ TOTAL <nTotal> ] ;
[ SIZE <nWidth>, <nHeight> ];
[ OF <oWnd> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oMeter> := ] TMeter():New( <nRow>, <nCol>, bSETGET(<nActual>),;
<nTotal>, <oWnd>, <nWidth>, <nHeight>, <.update.> )
#xcommand REDEFINE METER [ <oMeter> VAR ] <nActual> ;
[ TOTAL <nTotal> ] ;
[ ID <nId> ];
[ OF <oWnd> ] ;
[ <update: UPDATE> ] ;
=> ;
[ <oMeter> := ] TMeter():ReDefine( <nId>, bSETGET(<nActual>),;
<nTotal>, <oWnd>, <.update.> )
//----------------------------------------------------------------------------//
// Cursor Commands
#xcommand DEFINE CURSOR <oCursor> ;
[ <resource: RESOURCE, RESNAME, NAME> <cResName> ] ;
=> ;
<oCursor> := TCursor():New( <cResName> )
#xcommand RELEASE CURSOR <oCursor> => <oCursor>:End()
//----------------------------------------------------------------------------//
// Window Commands
#xcommand DEFINE WINDOW [<oWnd>] ;
[ MDICHILD ] ;
[ FROM <nTop>, <nLeft> TO <nBottom>, <nRight> ] ;
[ TITLE <cTitle> ] ;
[ BRUSH <oBrush> ] ;
[ CURSOR <oCursor> ] ;
[ MENU <oMenu> ] ;
[ ICON <oIco> ] ;
[ OF <oParent> ] ;
[ <vscroll: VSCROLL> ] ;
[ <hscroll: HSCROLL> ] ;
[ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
[ <pixel: PIXEL> ] ;
=> ;
[<oWnd> := ] TMdiChild():New( <nTop>, <nLeft>, <nBottom>, <nRight>,;
<cTitle>,, <oMenu>, <oParent>, <oIco>, <.vscroll.>, <nClrFore>,;
<nClrBack>, <oCursor>, <oBrush>, <.pixel.>, <.hscroll.> )
#xcommand DEFINE WINDOW <oWnd> ;
[ FROM <nTop>, <nLeft> TO <nBottom>, <nRight> ] ;
[ TITLE <cTitle> ] ;
[ STYLE <nStyle> ] ;
[ MENU <oMenu> ] ;
[ BRUSH <oBrush> ] ;
[ ICON <oIcon> ] ;
[ MDI ] ;
[ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
[ <vScroll: VSCROLL, VERTICAL SCROLL> ] ;
[ <hScroll: HSCROLL, HORIZONTAL SCROLL> ] ;
[ MENUINFO <nMenuInfo> ] ;
[ <border: NONE, SINGLE> ] ;
[ OF <oParent> ] ;
=> ;
<oWnd> := TMdiFrame():New( <nTop>, <nLeft>, <nBottom>, <nRight>,;
<cTitle>, <nStyle>, <oMenu>, <oBrush>, <oIcon>, <nClrFore>,;
<nClrBack>, [<.vScroll.>], [<.hScroll.>], <nMenuInfo>,;
[Upper(<(border)>)], <oParent> )
#xcommand DEFINE WINDOW <oWnd> ;
[ FROM <nTop>, <nLeft> TO <nBottom>, <nRight> ] ;
[ TITLE <cTitle> ] ;
[ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ];
[ OF <oParent> ] ;
[ BRUSH <oBrush> ] ; // Contained Objects
[ CURSOR <oCursor> ] ;
[ ICON <oIcon> ] ;
[ MENU <oMenu> ] ;
[ STYLE <nStyle> ] ; // Styles
[ BORDER <border: NONE, SINGLE> ] ;
[ <NoSysMenu: NOSYSMENU, NO SYSMENU> ] ;
[ <NoCaption: NOCAPTION, NO CAPTION, NO TITLE> ] ;
[ <NoIconize: NOICONIZE, NOMINIMIZE> ] ;
[ <NoMaximize: NOZOOM, NO ZOOM, NOMAXIMIZE, NO MAXIMIZE> ] ;
[ <vScroll: VSCROLL, VERTICAL SCROLL> ] ;
[ <hScroll: HSCROLL, HORIZONTAL SCROLL> ] ;
=> ;
<oWnd> := TWindow():New( <nTop>, <nLeft>, <nBottom>, <nRight>,;
<cTitle>, <nStyle>, <oMenu>, <oBrush>, <oIcon>, <oParent>,;
[<.vScroll.>], [<.hScroll.>], <nClrFore>, <nClrBack>, <oCursor>,;
[Upper(<(border)>)], !<.NoSysMenu.>, !<.NoCaption.>,;
!<.NoIconize.>, !<.NoMaximize.> )
#xcommand ACTIVATE WINDOW <oWnd> ;
[ <show: ICONIZED, NORMAL, MAXIMIZED> ] ;
[ ON [ LEFT ] CLICK <uLClick> ] ;
[ ON RIGHT CLICK <uRClick> ] ;
[ ON MOVE <uMove> ] ;
[ ON RESIZE <uResize> ] ;
[ ON PAINT <uPaint> ] ;
[ ON KEYDOWN <uKeyDown> ] ;
[ ON INIT <uInit> ] ;
[ ON UP <uUp> ] ;
[ ON DOWN <uDown> ] ;
[ ON PAGEUP <uPgUp> ] ;
[ ON PAGEDOWN <uPgDn> ] ;
[ ON LEFT <uLeft> ] ;
[ ON RIGHT <uRight> ] ;
[ ON PAGELEFT <uPgLeft> ] ;
[ ON PAGERIGHT <uPgRight> ] ;
[ VALID <uValid> ] ;
=> ;
<oWnd>:Activate( [ Upper(<(show)>) ],;
<oWnd>:bLClicked [ := \{ |nRow,nCol,nKeyFlags| <uLClick> \} ], ;
<oWnd>:bRClicked [ := \{ |nRow,nCol,nKeyFlags| <uRClick> \} ], ;
<oWnd>:bMoved [ := <{uMove}> ], ;
<oWnd>:bResized [ := <{uResize}> ], ;
<oWnd>:bPainted [ := <{uPaint}> ], ;
<oWnd>:bKeyDown [ := \{ |nKey| <uKeyDown> \} ],;
<oWnd>:bInit [ := \{ | Self | <uInit> \} ],;
[<{uUp}>], [<{uDown}>], [<{uPgUp}>], [<{uPgDn}>],;
[<{uLeft}>], [<{uRight}>], [<{uPgLeft}>], [<{uPgRight}>],;
[<{uValid}>] )
//----------------------------------------------------------------------------//
// ButtonBar Commands
#xcommand DEFINE BUTTONBAR [ <oBar> ] ;
[ <size: SIZE, BUTTONSIZE, SIZEBUTTON > <nWidth>, <nHeight> ] ;
[ <_3d: 3D, 3DLOOK> ] ;
[ <mode: TOP, LEFT, RIGHT, ADJUST> ] ;
[ <wnd: OF, WINDOW, DIALOG> <oWnd> ] ;
[ CURSOR <oCursor> ] ;
=> ;
[ <oBar> := ] TBar():New( <oWnd>, <nWidth>, <nHeight>, <._3d.>,;
[ Upper(<(mode)>) ], <oCursor> )
#xcommand DEFINE BUTTON [ <oBtn> ] ;
[ <bar: OF, BUTTONBAR > <oBar> ] ;
[ <resource: NAME, RESNAME, RESOURCE> <cResName1> [,<cResName2>] ] ;
[ <file: FILE, FILENAME, DISK> <cBmpFile1> [,<cBmpFile2>] ] ;
[ <action:ACTION,EXEC> <uAction> ] ;
[ <group: GROUP > ] ;
[ MESSAGE <cMsg> ] ;
[ <adjust: ADJUST > ] ;
=> ;
[ <oBtn> := ] TBtnBmp():NewBar( <cResName1>, <cResName2>,;
<cBmpFile1>, <cBmpFile2>,;
<cMsg>, <{uAction}>, <.group.>,;
<oBar>, <.adjust.> )
//----------------------------------------------------------------------------//
// MESSAGE BAR
#xcommand SET MESSAGE [ OF <oWnd> ] ;
[ TO <cMsg> ] ;
[ <center: CENTERED> ] ;
=> ;
<oWnd>:oMsgBar := TMsgBar():New( <oWnd>, <cMsg>, <.center.> )
#xcommand DEFINE MESSAGE BAR [<oMsg>] OF <oWnd> ;
[ PROMPT <cMsg> ] ;
[ <center: CENTERED> ] ;
=> ;
[<oMsg>:=] <oWnd>:oMsgBar := TMsgBar():New( <oWnd>, <cMsg>, <.center.> )
//----------------------------------------------------------------------------//
// CLIPBOARD
#xcommand DEFINE CLIPBOARD <oClp> ;
[ FORMAT <format:TEXT,OEMTEXT,BITMAP,DIF> ] ;
[ OF <oWnd> ] ;
=> ;
<oClp> := TClipBoard():New( [Upper(<(format)>)], <oWnd> )
#xcommand ACTIVATE CLIPBOARD <oClp> => <oClp>:Open()
#xcommand SET TEXT OF CLIPBOARD <oClp> ;
TO <cText> ;
=> ;
<oClp>:SetText( <cText> )
#xcommand DEACTIVATE CLIPBOARD <oClp> => <oClp>:Close()
#xcommand RELEASE CLIPBOARD <oClp> => <oClp>:Close(); <oClp> := nil
//----------------------------------------------------------------------------//
// Timer
#xcommand DEFINE TIMER [ <oTimer> ] ;
[ INTERVAL <nInterval> ] ;
[ ACTION <uAction> ] ;
[ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
=> ;
[ <oTimer> := ] TTimer():New( <nInterval>, [<{uAction}>], <oWnd> )
#xcommand ACTIVATE TIMER <oTimer> => <oTimer>:Activate()
#xcommand DEACTIVATE TIMER <oTimer> => <oTimer>:DeActivate()
#xcommand RELEASE TIMER <oTimer> => <oTimer>:Release()
//----------------------------------------------------------------------------//
// Visual Basic VBX Controls Support
#xcommand REDEFINE VBX [<oControl>] ;
[ ID <nId> ] ;
[ OF <oDlg> ] ;
=> ;
[ <oControl> := ] TVbControl():ReDefine( <nId>, <oDlg> )
//----------------------------------------------------------------------------//
#xcommand CLS => InvalidateRect( GetActiveWindow(), 0, .t. )
#xcommand CLEAR SCREEN => InvalidateRect( GetActiveWindow(), 0, .t. )
#command ? [ <list,...> ] => WQout( [ \{ <list> \} ] )
#command ?? [ <list,...> ] => WQout( [ \{ <list> \} ] )
//----------------------------------------------------------------------------//
// Commands & functions not supported
#xcommand READ =>
#xcommand KEYBOARD <cChars> =>
#xcommand __KeyBoard( <cChars> ) => ;
MsgAlert( OemToAnsi( "__KeyBoard() not available in FiveWin" ) )
#xcommand SAVE SCREEN [ TO <u> ] =>
#xcommand RESTORE SCREEN [ FROM <u> ] =>
#xcommand SaveScreen( <*u*> ) => ;
MsgAlert( OemToAnsi( "SaveScreen() not available in FiveWin" ) )
#xcommand RestScreen( <*u*> ) => ;
MsgAlert( OemToAnsi( "RestScreen() not available in FiveWin" ) )
#xcommand @ <nRow>, <nCol> PROMPT <*u*> =>
#xcommand MENU TO <u> =>
//----------------------------------------------------------------------------//
#endif