diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ec5f279e93..2dd48744c1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,21 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-10-22 23:01 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * harbour/tests/wvtext.prg + Updated to demonstrate multi-windows GT capabilities. + + A REMINDER : This development alone places Harbour much higher than + so many dialects. Mind-blowing feature. I had ever longed + for this functionality since I started with Xbase++. + But the ease of use of a MW-GT in Harbour is far superior + than in Xbase++. Spread this word. I am sure this feature + alone is going to add a handsome value to my applications. + I hope you all will be benefitted. + + I have no word of appreciation for Przemyslaw Czerpak as + whatever I will say will fall short of weight. So... + 2008-10-22 05:03 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbstack.h * harbour/include/hbgtcore.h diff --git a/harbour/tests/wvtext.prg b/harbour/tests/wvtext.prg index 2fb9d661e2..80298438e2 100644 --- a/harbour/tests/wvtext.prg +++ b/harbour/tests/wvtext.prg @@ -24,6 +24,10 @@ //----------------------------------------------------------------------// +STATIC nRows := 20, nCols := 60, nColorIndex := 1 + +//----------------------------------------------------------------------// + FUNCTION Main() Local nKey, lMark, lResize, lClose Local nHeight := 20 @@ -80,6 +84,9 @@ FUNCTION Main() CASE nKey == K_F9 RunInSysTray() + CASE nKey == K_F10 + hb_threadStart( @thFunc() ) + ENDCASE ENDDO @@ -135,6 +142,7 @@ STATIC FUNCTION DispScreen() #ifdef __GTWVG__ DispOutAt( ++nRow, nCol, "< F9 Run in SysTray >", cColor ) #endif + DispOutAt( ++nRow, nCol, "< F10 Open New Window >", cColor ) DispOutAt( maxrow(), 0, Space( maxcol()+1 ), "N/G*" ) @@ -214,3 +222,32 @@ FUNCTION RunInSysTray() //----------------------------------------------------------------------// +PROCEDURE thFunc() + Local cTitle + Local aColor := { 'W+/N', 'W+/B', 'W+/G', 'W+/BG', 'W+/N*', 'W+/RB', 'N/W*', 'N/GR*' } + + /* allocate own GT driver */ + hb_gtReload( 'WVT' ) + Hb_GtInfo( HB_GTI_PALETTE, 8, RGB( 120, 200, 240 ) ) + + nColorIndex++ + if nColorIndex > len( aColor ) + nColorIndex := 1 + endif + + nRows++ + nCols += 2 + cTitle := 'New Window with '+ltrim( str( nRows ) )+; + ' Rows and '+ltrim( str( nCols ) )+' Columns' + + SetMode( nRows,nCols ) + SetColor( aColor[ nColorIndex ] ) + Hb_GtInfo( HB_GTI_WINTITLE, cTitle ) + DispOutAt( 0, 0, padc( cTitle, maxcol()+1 ), 'N/GR*' ) + + use test shared + browse() + + return + +//----------------------------------------------------------------------//