- 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
125 lines
3.1 KiB
Plaintext
125 lines
3.1 KiB
Plaintext
/* Copyright 2005 Budyanto Dj. <budyanto@centrin.net.id>
|
|
A simple example on how to make use of GTWVW's combobox. */
|
|
|
|
#require "gtwvw"
|
|
|
|
#include "inkey.ch"
|
|
#include "setcurs.ch"
|
|
|
|
STATIC s_cQuestion := "Quick survey: What do you think about GTWVW?"
|
|
STATIC s_cHint := "Hint: Please be positive..."
|
|
|
|
STATIC s_aAnswers := { "1-GTWVW is a great library!", ;
|
|
"2-GT who? I never heard about him", ;
|
|
"3-Sorry, I don't like it" }
|
|
|
|
STATIC s_cYourAnswer := "Your response is:"
|
|
STATIC s_cThankYou := "Thanks for participating in our survey :-)"
|
|
|
|
#define _SECRET_KEY 101010
|
|
|
|
ANNOUNCE HB_NOSTARTUPWINDOW
|
|
|
|
PROCEDURE Main()
|
|
|
|
LOCAL nMaxWidth, nCBid, nPBid, nPos
|
|
LOCAL ch, ncursor
|
|
|
|
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
|
|
hbshell_gtSelect( "GTWVW" )
|
|
#endif
|
|
|
|
SetColor( "N/W" )
|
|
wvw_SetTitle( NIL, "Quick Survey" )
|
|
wvw_NoClose( NIL )
|
|
wvw_SetAltF4Close( .F. )
|
|
wvw_SetLineSpacing( NIL, 4 )
|
|
#if 0
|
|
wvw_SetLSpaceColor( NIL, 7 )
|
|
#endif
|
|
wvw_cbSetFont( NIL, "Arial", 16 )
|
|
wvw_pbSetFont( NIL, "Arial", 16 )
|
|
|
|
nMaxWidth := 0
|
|
AEval( s_aAnswers, {| x | nMaxWIdth := Max( nMaxWidth, Len( x ) ) } )
|
|
|
|
SetMode( 11, nMaxWidth + 1 + 10 + 2 )
|
|
|
|
CLS
|
|
nCursor := SetCursor( SC_NONE )
|
|
@ 1, 1 SAY s_cQuestion
|
|
@ 2, 1 SAY s_cHint
|
|
nCBid := wvw_cbCreate( NIL, 4, 1, nMaxWidth, s_aAnswers, ;
|
|
{| nWinNum, nId, nEvent, nIndex | ;
|
|
CBhandler( nWinNum, nId, nEvent, nIndex, nPBid ) } )
|
|
|
|
nPBid := wvw_pbCreate( NIL, 4, 1 + nMaxWidth + 1, 4, 1 + nMaxWidth + 1 + 10 - 1, "OK", NIL, ;
|
|
{|| hb_keyPut( _SECRET_KEY ) }, { 0, 0, + 2, 0 } )
|
|
|
|
wvw_cbSetFocus( NIL, nCBid )
|
|
|
|
wvw_ShowWindow()
|
|
|
|
nPos := 1
|
|
DO WHILE ( ch := Inkey( 0 ) ) != _SECRET_KEY
|
|
DO CASE
|
|
CASE ch == K_TAB .OR. ch == K_ENTER
|
|
IF nPos == 2 .AND. ch == K_ENTER .AND. wvw_pbEnable( NIL, nPBid )
|
|
hb_keyPut( _SECRET_KEY )
|
|
LOOP
|
|
ELSE
|
|
nPos++
|
|
ENDIF
|
|
CASE ch == K_SH_TAB
|
|
nPos--
|
|
ENDCASE
|
|
IF nPos > 2
|
|
nPos := 1
|
|
ELSEIF nPos < 1
|
|
nPos := 2
|
|
ENDIF
|
|
DO CASE
|
|
CASE nPos == 1
|
|
wvw_cbSetFocus( NIL, nCBid )
|
|
CASE nPos == 2
|
|
wvw_pbSetFocus( NIL, nPBid )
|
|
wvw_pbSetStyle( NIL, nPBid, 1 ) // BS_DEFPUSHBUTTON
|
|
ENDCASE
|
|
ENDDO
|
|
|
|
wvw_cbEnable( NIL, nCBid, .F. )
|
|
wvw_pbEnable( NIL, nPBid, .F. )
|
|
@ 6, 1 SAY "Your response is:"
|
|
@ 7, 1 SAY wvw_cbGetCurText( NIL, nCBid )
|
|
@ 9, 1 SAY s_cThankYou
|
|
Inkey( 0 )
|
|
SetCursor( nCursor )
|
|
|
|
RETURN // main
|
|
|
|
STATIC FUNCTION CBhandler( nWinNum, nId, nEvent, nIndex, nPBid )
|
|
|
|
DO CASE
|
|
CASE nEvent == 3 // CBN_SETFOCUS
|
|
// none
|
|
CASE nEvent == 4 // CBN_KILLFOCUS
|
|
// none
|
|
IF nIndex == 0
|
|
wvw_pbEnable( nWinNum, nPBid, .T. )
|
|
ELSE
|
|
wvw_pbEnable( nWinNum, nPBid, .F. )
|
|
ENDIF
|
|
CASE nEvent == 1 // CBN_SELCHANGE
|
|
IF ! wvw_cbIsDropped( nWinNum, nId )
|
|
// nIndex is 0-based
|
|
IF nIndex == 0
|
|
wvw_pbEnable( nWinNum, nPBid, .T. )
|
|
ELSE
|
|
wvw_pbEnable( nWinNum, nPBid, .F. )
|
|
ENDIF
|
|
wvw_cbSetFocus( nWinNum, nId )
|
|
ENDIF
|
|
ENDCASE
|
|
|
|
RETURN NIL
|