|
From: Alexander S.K. <al...@be...> - 2013-01-10 13:07:37
|
> For example, we can
> create a new .ch, where old SAY, BUTTON, GROUP commands will be related
> with new "ex" classes.
Maybe, it is better to place in guilib.ch two SAY commands with
different syntax:
#xcommand @ <x>,<y> SAY [ <oSay> CAPTION ] <caption> ;
[ OF <oWnd> ] ;
[ ID <nId> ] ;
[ SIZE <width>, <height> ] ;
[ COLOR <color> ] ;
[ BACKCOLOR <bcolor> ] ;
[<lTransp: TRANSPARENT>] ;
[ ON INIT <bInit> ] ;
[ ON SIZE <bSize> ] ;
[ ON PAINT <bDraw> ] ;
[ ON CLICK <bClick> ] ;
[ ON DBLCLICK <bDblClick> ];
[[ON OTHER MESSAGES <bOther>][ON OTHERMESSAGES <bOther>]] ;
[ STYLE <nStyle> ] ;
[ FONT <oFont> ] ;
[ TOOLTIP <ctoolt> ] ;
=> ;
[<oSay> := ] HStaticEx():New(
<oWnd>,<nId>,<nStyle>,<x>,<y>,<width>, ;
<height>,<caption>,<oFont>,<bInit>,<bSize>,<bDraw>,<ctoolt>, ;
<color>,<bcolor>,<.lTransp.>,<bClick>,<bDblClick>,<bOther> );;
[ <oSay>:name := <(oSay)> ]
#xcommand @ <x>,<y> SAY [ <oSay> CAPTION ] <caption> ;
[ OF <oWnd> ] ;
[ ID <nId> ] ;
[ SIZE <width>, <height> ] ;
[ COLOR <color> ] ;
[ BACKCOLOR <bcolor> ] ;
[<lTransp: TRANSPARENT>] ;
[ ON INIT <bInit> ] ;
[ ON SIZE <bSize> ] ;
[ ON PAINT <bDraw> ] ;
[ STYLE <nStyle> ] ;
[ FONT <oFont> ] ;
[ TOOLTIP <ctoolt> ] ;
=> ;
[<oSay> := ] HStatic():New(
<oWnd>,<nId>,<nStyle>,<x>,<y>,<width>, ;
<height>,<caption>,<oFont>,<bInit>,<bSize>,<bDraw>,<ctoolt>, ;
<color>,<bcolor>,<.lTransp.> );;
[ <oSay>:name := <(oSay)> ]
in this case the
@ 20,10 SAY cText SIZE 260, 22
will be preprocessed to
HStatic():New(,,,20,10,260, 22,cText,,,,,,,,.F. );
and the
@ 20,10 SAY cText SIZE 260, 22 ON DBLCLICK {||MsgInfo("!")}
to:
HStaticEx():New(,,,20,10,260, 22,cText,,,,,,,,.F.,,{||MsgInfo("!")}, );
Any opinions are highly appreciated.
Regards, Alexander.
|