- extras/guestbk/cgi.ch
- extras/guestbk/guestbk.hbp
- extras/guestbk/guestbk.txt
* .gitattributes
* contrib/hbgd/tests/counter.prg
* contrib/hbhttpd/core.prg
* contrib/hbgd/tests/digits/57chevy.gif -> contrib/hbgd/tests/imgs_in/57chevy.gif
* contrib/hbgd/tests/digits/7seg.gif -> contrib/hbgd/tests/imgs_in/7seg.gif
* contrib/hbgd/tests/digits/brsd.gif -> contrib/hbgd/tests/imgs_in/brsd.gif
* contrib/hbgd/tests/digits/digib.gif -> contrib/hbgd/tests/imgs_in/digib.gif
* contrib/hbgd/tests/digits/fdb.gif -> contrib/hbgd/tests/imgs_in/fdb.gif
* contrib/hbgd/tests/digits/jelly.gif -> contrib/hbgd/tests/imgs_in/jelly.gif
* contrib/hbgd/tests/digits/odb.gif -> contrib/hbgd/tests/imgs_in/odb.gif
* contrib/hbgd/tests/digits/odw.gif -> contrib/hbgd/tests/imgs_in/odw.gif
* contrib/hbgd/tests/digits/pdg.gif -> contrib/hbgd/tests/imgs_in/pdg.gif
* contrib/hbgd/tests/digits/pdw.gif -> contrib/hbgd/tests/imgs_in/pdw.gif
* contrib/hbhttpd/tests/tpl/_main.tpl -> contrib/hbhttpd/tests/tpl/_main.html
* contrib/hbhttpd/tests/tpl/app/account/edit.tpl -> contrib/hbhttpd/tests/tpl/app/account/edit.html
* contrib/hbhttpd/tests/tpl/app/account.tpl -> contrib/hbhttpd/tests/tpl/app/account.html
* contrib/hbhttpd/tests/tpl/app/cart.tpl -> contrib/hbhttpd/tests/tpl/app/cart.html
* contrib/hbhttpd/tests/tpl/app/login.tpl -> contrib/hbhttpd/tests/tpl/app/login.html
* contrib/hbhttpd/tests/tpl/app/logout.tpl -> contrib/hbhttpd/tests/tpl/app/logout.html
* contrib/hbhttpd/tests/tpl/app/main.tpl -> contrib/hbhttpd/tests/tpl/app/main.html
* contrib/hbhttpd/tests/tpl/app/register.tpl -> contrib/hbhttpd/tests/tpl/app/register.html
* contrib/hbhttpd/tests/tpl/app/shopping.tpl -> contrib/hbhttpd/tests/tpl/app/shopping.html
* extras/gtwvw/docs/funclist.txt -> contrib/gtwvw/doc/funclist.txt
* extras/gtwvw/docs/gtwvw.txt -> contrib/gtwvw/doc/gtwvw.txt
* extras/gtwvw/docs/whatsnew.txt -> contrib/gtwvw/doc/ChangeLog.txt
* extras/gtwvw/gtwvw.hbc -> contrib/gtwvw/gtwvw.hbc
* extras/gtwvw/gtwvw.hbx -> contrib/gtwvw/gtwvw.hbx
* extras/gtwvw/gtwvwd.c -> contrib/gtwvw/gtwvwd.c
* extras/gtwvw/hbgtwvw.h -> contrib/gtwvw/hbgtwvw.h
* extras/gtwvw/hbole.h -> contrib/gtwvw/hbole.h
* extras/gtwvw/tests/_wvwmous.prg -> contrib/gtwvw/tests/_wvwmous.prg
* extras/gtwvw/tests/def2.bmp -> contrib/gtwvw/tests/def2.bmp
* extras/gtwvw/tests/dia_excl.ico -> contrib/gtwvw/tests/dia_excl.ico
* extras/gtwvw/tests/drawimg.prg -> contrib/gtwvw/tests/drawimg.prg
* extras/gtwvw/tests/ebtest7.prg -> contrib/gtwvw/tests/eb7.prg
* extras/gtwvw/tests/hbmk.hbm -> contrib/gtwvw/tests/hbmk.hbm
* extras/gtwvw/tests/vouch1.bmp -> contrib/gtwvw/tests/vouch1.bmp
* extras/gtwvw/tests/vouch1.gif -> contrib/gtwvw/tests/vouch1.gif
* extras/gtwvw/wvt2wvw.ch -> contrib/gtwvw/wvt2wvw.ch
* extras/gtwvw/wvwcheck.c -> contrib/gtwvw/checkbox.c
* extras/gtwvw/wvwdraw.c -> contrib/gtwvw/wvwdraw.c
* extras/gtwvw/wvwedit.c -> contrib/gtwvw/editbox.c
* extras/gtwvw/wvwfuncs.c -> contrib/gtwvw/wvwutils.c
* extras/gtwvw/wvwmenu.c -> contrib/gtwvw/menubar.c
* extras/gtwvw/wvwpush.c -> contrib/gtwvw/pushbut.c
* extras/gtwvw/wvwstbar.c -> contrib/gtwvw/statbar.c
* extras/gtwvw/wvwtbar.c -> contrib/gtwvw/toolbar.c
* extras/guestbk/guestbk.html -> tests/guestbk.html
* extras/hbdoc/hbdoc.css -> contrib/hbdoc/hbdoc.css
* extras/gtwvw/gtwvw.hbp -> contrib/gtwvw/gtwvw.hbp
* extras/gtwvw/tests/cbtest1.prg -> contrib/gtwvw/tests/cb1.prg
* extras/gtwvw/tests/cbtest6.prg -> contrib/gtwvw/tests/cb6.prg
* extras/gtwvw/tests/inpfocus.prg -> contrib/gtwvw/tests/inpfocus.prg
* extras/gtwvw/tests/maincoor.prg -> contrib/gtwvw/tests/maincoor.prg
* extras/gtwvw/tests/maximize.prg -> contrib/gtwvw/tests/maximize.prg
* extras/gtwvw/tests/prog0.prg -> contrib/gtwvw/tests/prog0.prg
* extras/gtwvw/tests/prog1.prg -> contrib/gtwvw/tests/prog1.prg
* extras/gtwvw/tests/prog2.prg -> contrib/gtwvw/tests/prog2.prg
* extras/gtwvw/tests/readme.txt -> contrib/gtwvw/tests/readme.txt
* extras/gtwvw/tests/wvwtest9.prg -> contrib/gtwvw/tests/demo.prg
* extras/guestbk/_cgi.prg -> tests/cgi.prg
* extras/guestbk/_inifile.prg -> tests/inifile.prg
* extras/guestbk/guestbk.ini -> tests/guestbk.ini
* extras/guestbk/guestbk.prg -> tests/guestbk.prg
* extras/hbdoc/_genbase.prg -> contrib/hbdoc/_base.prg
* extras/hbdoc/_genhtml.prg -> contrib/hbdoc/_html.prg
* extras/hbdoc/_gentxt.prg -> contrib/hbdoc/_txt.prg
* extras/hbdoc/_genxml.prg -> contrib/hbdoc/_xml.prg
* extras/hbdoc/hbdoc.hbp -> contrib/hbdoc/hbdoc.hbp
* extras/hbdoc/hbdoc.prg -> contrib/hbdoc/hbdoc.prg
* more file/dir rename sync with 3.4 fork, plus some related file content
137 lines
3.7 KiB
Plaintext
137 lines
3.7 KiB
Plaintext
/* sample on using Maximize Mode in GTWVW. budyanto@centrin.net.id */
|
|
|
|
#require "gtwvw"
|
|
|
|
#include "inkey.ch"
|
|
|
|
// this dimension will be used when user presses RESTORE button
|
|
STATIC s_nNormalMaxrow := 24
|
|
STATIC s_nNormalMaxcol := 79
|
|
|
|
STATIC s_lSizeReady := .F.
|
|
|
|
PROCEDURE Main()
|
|
|
|
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
|
|
hbshell_gtSelect( "GTWVW" )
|
|
#endif
|
|
|
|
// activate WVW_SIZE()
|
|
s_lSizeReady := .T.
|
|
|
|
// the biggest possible window
|
|
SetColor( "N/W" )
|
|
SetMode( wvw_MaxMaxRow() + 1, wvw_MaxMaxCol() + 1 )
|
|
|
|
// enable MAXIMIZE button
|
|
wvw_EnableMaximize( 0, .T. )
|
|
|
|
// set the window to MAXIMIZED state
|
|
wvw_Maximize( 0 )
|
|
|
|
updatescr()
|
|
DO WHILE Inkey( 0 ) != K_ESC
|
|
// refresh screen, probably in a new dimension
|
|
// (You may alternatively call updatescr() from WVW_SIZE() instead)
|
|
updatescr()
|
|
ENDDO
|
|
|
|
RETURN
|
|
|
|
PROCEDURE diminfo()
|
|
|
|
@ 0, 0 SAY "Window size: " + hb_ntos( MaxRow() + 1 ) + " x " + hb_ntos( MaxCol() + 1 ) + " "
|
|
|
|
RETURN
|
|
|
|
PROCEDURE updatescr()
|
|
|
|
LOCAL i
|
|
|
|
CLS
|
|
FOR i := 0 TO MaxCol()
|
|
@ 0, i SAY "T"
|
|
NEXT
|
|
FOR i := 0 TO MaxRow()
|
|
@ i, 0 SAY "L"
|
|
NEXT
|
|
FOR i := 0 TO MaxCol()
|
|
@ MaxRow(), i SAY "B"
|
|
#if 0
|
|
@ MaxRow() - 1, i SAY Right( Transform( i, "999" ), 1 )
|
|
#endif
|
|
NEXT
|
|
FOR i := 0 TO MaxRow()
|
|
@ i, MaxCol() SAY "R"
|
|
NEXT
|
|
@ Int( MaxRow() / 2 ) + 0, 2 SAY PadC( "Press MAXIMIZE/RESTORE button to change dimension", MaxCol() + 1 - 4 )
|
|
@ Int( MaxRow() / 2 ) + 1, 2 SAY PadC( "Try also changing taskbar size/position", MaxCol() + 1 - 4 )
|
|
@ Int( MaxRow() / 2 ) + 3, 2 SAY PadC( "Press any key to redraw screen", MaxCol() + 1 - 4 )
|
|
@ Int( MaxRow() / 2 ) + 4, 2 SAY PadC( "Press ESC to quit", MaxCol() + 1 - 4 )
|
|
diminfo()
|
|
|
|
RETURN
|
|
|
|
// this function is called by gtwvw AFTER the size is changed
|
|
// WARNING: screen repainting is not performed completely by gtwvw at this point of call
|
|
FUNCTION WVW_SIZE( nWinNum, hWnd, message, wParam, lParam )
|
|
|
|
LOCAL cScreen
|
|
LOCAL lNeedReset
|
|
LOCAL maxsavedscrrow, maxsavedscrcol
|
|
|
|
HB_SYMBOL_UNUSED( message )
|
|
HB_SYMBOL_UNUSED( hWnd )
|
|
HB_SYMBOL_UNUSED( lParam )
|
|
|
|
IF ! s_lSizeReady
|
|
// program is not ready to handle window resizing
|
|
// (or this function is currently running)
|
|
RETURN NIL
|
|
ENDIF
|
|
IF nWinNum != 0
|
|
// only care about Main Window
|
|
RETURN NIL
|
|
ENDIF
|
|
|
|
// avoid reentrance
|
|
s_lSizeReady := .F.
|
|
|
|
DO CASE
|
|
CASE wParam == 2 // SIZE_MAXIMIZED
|
|
// Alert( "MAXIMIZE" )
|
|
// reset is required only if we are changing size
|
|
lNeedReset := MaxCol() != wvw_MaxMaxCol();
|
|
.OR. MaxRow() != wvw_MaxMaxRow()
|
|
|
|
IF lNeedReset
|
|
maxsavedscrrow := Min( Min( s_nNormalMaxrow, wvw_MaxMaxRow() ), MaxRow() )
|
|
maxsavedscrcol := Min( Min( s_nNormalMaxcol, wvw_MaxMaxCol() ), MaxCol() )
|
|
cScreen := SaveScreen( 0, 0, maxsavedscrrow, maxsavedscrcol )
|
|
IF SetMode( wvw_MaxMaxRow() + 1, wvw_MaxMaxCol() + 1 ) // adjust MaxRow() & MaxCol()
|
|
RestScreen( 0, 0, maxsavedscrrow, maxsavedscrcol, cScreen )
|
|
ENDIF
|
|
diminfo() // updatescr()
|
|
ENDIF
|
|
CASE wParam == 0 // SIZE_RESTORED
|
|
// Alert( "RESTORE" )
|
|
lNeedReset := MaxCol() != s_nNormalMaxcol .OR. ;
|
|
MaxRow() != s_nNormalMaxrow
|
|
IF lNeedReset
|
|
maxsavedscrrow := Min( s_nNormalMaxrow, MaxRow() )
|
|
maxsavedscrcol := Min( s_nNormalMaxcol, MaxCol() )
|
|
cScreen := SaveScreen( 0, 0, maxsavedscrrow, maxsavedscrcol )
|
|
IF SetMode( s_nNormalMaxrow + 1, s_nNormalMaxcol + 1 )
|
|
RestScreen( 0, 0, maxsavedscrrow, maxsavedscrcol, cScreen )
|
|
ENDIF
|
|
diminfo() // updatescr()
|
|
ENDIF
|
|
OTHERWISE
|
|
// do nothing
|
|
ENDCASE
|
|
|
|
// allow next call
|
|
s_lSizeReady := .T.
|
|
|
|
RETURN NIL
|