2017-09-13 14:32 UTC Viktor Szakats (vszakats users.noreply.github.com)
- 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
1
.gitattributes
vendored
@@ -39,7 +39,6 @@ ChangeLog.txt ident
|
|||||||
*.sfc text
|
*.sfc text
|
||||||
*.spec text
|
*.spec text
|
||||||
*.sx text
|
*.sx text
|
||||||
*.tpl text
|
|
||||||
*.txt text
|
*.txt text
|
||||||
*.ucf text
|
*.ucf text
|
||||||
*.vbs text
|
*.vbs text
|
||||||
|
|||||||
@@ -7,6 +7,82 @@
|
|||||||
Entries may not always be in chronological/commit order.
|
Entries may not always be in chronological/commit order.
|
||||||
See license at the end of file. */
|
See license at the end of file. */
|
||||||
|
|
||||||
|
2017-09-13 14:32 UTC Viktor Szakats (vszakats users.noreply.github.com)
|
||||||
|
- 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
|
||||||
|
|
||||||
2017-09-13 12:49 UTC Viktor Szakats (vszakats users.noreply.github.com)
|
2017-09-13 12:49 UTC Viktor Szakats (vszakats users.noreply.github.com)
|
||||||
* contrib/gtqtc/gtqtc.hbp
|
* contrib/gtqtc/gtqtc.hbp
|
||||||
* contrib/hbssl/ssl_hbcon.prg
|
* contrib/hbssl/ssl_hbcon.prg
|
||||||
|
|||||||
@@ -11,14 +11,15 @@
|
|||||||
|
|
||||||
gtwvwd.c
|
gtwvwd.c
|
||||||
|
|
||||||
wvwcheck.c
|
|
||||||
wvwdraw.c
|
wvwdraw.c
|
||||||
wvwedit.c
|
wvwutils.c
|
||||||
wvwfuncs.c
|
|
||||||
wvwmenu.c
|
checkbox.c
|
||||||
wvwpush.c
|
editbox.c
|
||||||
wvwstbar.c
|
menubar.c
|
||||||
wvwtbar.c
|
pushbut.c
|
||||||
|
statbar.c
|
||||||
|
toolbar.c
|
||||||
|
|
||||||
# NOTE: Due to large quantity of unprecise code, it doesn't build in C++ mode.
|
# NOTE: Due to large quantity of unprecise code, it doesn't build in C++ mode.
|
||||||
-cpp=no
|
-cpp=no
|
||||||
@@ -1,12 +1,5 @@
|
|||||||
/*
|
/* Copyright 2005 Budyanto Dj. <budyanto@centrin.net.id>
|
||||||
Copyright 2005 Budyanto Dj. <budyanto@centrin.net.id>
|
A simple example on how to make use of GTWVW's combobox. */
|
||||||
|
|
||||||
A simple example on how to make use of GTWVW's combobox.
|
|
||||||
|
|
||||||
This program requires GTWVW.LIB.
|
|
||||||
|
|
||||||
Compile: bldwvw cbtest1
|
|
||||||
*/
|
|
||||||
|
|
||||||
#require "gtwvw"
|
#require "gtwvw"
|
||||||
|
|
||||||
@@ -23,7 +16,7 @@ STATIC s_aAnswers := { "1-GTWVW is a great library!", ;
|
|||||||
STATIC s_cYourAnswer := "Your response is:"
|
STATIC s_cYourAnswer := "Your response is:"
|
||||||
STATIC s_cThankYou := "Thanks for participating in our survey :-)"
|
STATIC s_cThankYou := "Thanks for participating in our survey :-)"
|
||||||
|
|
||||||
#define _SECRET_KEY 101010
|
#define _SECRET_KEY 101010
|
||||||
|
|
||||||
ANNOUNCE HB_NOSTARTUPWINDOW
|
ANNOUNCE HB_NOSTARTUPWINDOW
|
||||||
|
|
||||||
@@ -1,14 +1,8 @@
|
|||||||
/*
|
/* Copyright 2005 Budyanto Dj. <budyanto@centrin.net.id>
|
||||||
Copyright 2005 Budyanto Dj. <budyanto@centrin.net.id>
|
|
||||||
|
|
||||||
This is an example on how to integrate GTWVW's combobox into
|
This is an example on how to integrate GTWVW's combobox into
|
||||||
regular GET/GETLIST system. Be creative, do not be bound by
|
regular GET/GetList system. Be creative, do not be bound by
|
||||||
the ideas presented herein. There may be better ways to do it.
|
the ideas presented herein. There may be better ways to do it. */
|
||||||
|
|
||||||
This program requires GTWVW.LIB.
|
|
||||||
|
|
||||||
Compile: bldwvw cbtest6
|
|
||||||
*/
|
|
||||||
|
|
||||||
#require "gtwvw"
|
#require "gtwvw"
|
||||||
|
|
||||||
@@ -16,9 +10,8 @@
|
|||||||
#include "inkey.ch"
|
#include "inkey.ch"
|
||||||
|
|
||||||
/* Two different keyboard handling method
|
/* Two different keyboard handling method
|
||||||
* (notes: WVW_CB_KBD_CLIPPER doesn't mimic anything from Clipper
|
(notes: WVW_CB_KBD_CLIPPER doesn't mimic anything from Cl*pper
|
||||||
* it just 'feels like Clipper' to me)
|
it just 'feels like Cl*pper' to me) */
|
||||||
*/
|
|
||||||
#define WVW_CB_KBD_STANDARD 0
|
#define WVW_CB_KBD_STANDARD 0
|
||||||
#define WVW_CB_KBD_CLIPPER 1
|
#define WVW_CB_KBD_CLIPPER 1
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 822 B After Width: | Height: | Size: 822 B |
@@ -1,27 +1,15 @@
|
|||||||
|
// Test/Demo Program for
|
||||||
|
// GTWVW GUI Interface
|
||||||
|
// with multiple window support
|
||||||
|
// a work in progress by
|
||||||
|
// Budyanto Dj. <budyanto@centrin.net.id>
|
||||||
|
// based on:
|
||||||
//
|
//
|
||||||
|
// wvtgui.prg,
|
||||||
|
// GTWVT Console GUI Interface
|
||||||
|
// by Pritpal Bedi <pritpal@vouchcac.com>
|
||||||
//
|
//
|
||||||
// Test/Demo Program for
|
// parts of this program are copyrights of their respective owners
|
||||||
// GTWVW GUI Interface
|
|
||||||
// with multiple window support
|
|
||||||
// a work in progress by
|
|
||||||
// Budyanto Dj. <budyanto@centrin.net.id>
|
|
||||||
// based on:
|
|
||||||
//
|
|
||||||
// wvtgui.prg,
|
|
||||||
// GTWVT Console GUI Interface
|
|
||||||
// by Pritpal Bedi <pritpal@vouchcac.com>
|
|
||||||
//
|
|
||||||
// GTWVT
|
|
||||||
// by Peter Rees <peter@rees.co.nz>
|
|
||||||
//
|
|
||||||
// parts of this program are copyrights of their respective owners
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
/*
|
|
||||||
Compile/Link info:
|
|
||||||
You may use 'hbmk2 wvwtest9.hbp' to build this program.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#require "gtwvw"
|
#require "gtwvw"
|
||||||
|
|
||||||
@@ -113,7 +101,7 @@
|
|||||||
#define WVW_MAXWINDOWS 20 // ! must match with hbgtwvw.h
|
#define WVW_MAXWINDOWS 20 // ! must match with hbgtwvw.h
|
||||||
#define WVW_DEFAULT_MENUKEYEVENT 1024 // ! must match with hbgtwvw.h
|
#define WVW_DEFAULT_MENUKEYEVENT 1024 // ! must match with hbgtwvw.h
|
||||||
|
|
||||||
// for Button Types: //20040303
|
// for Button Types: // 2004-03-03
|
||||||
#define _BUTTON_NORMAL 0 // normal button
|
#define _BUTTON_NORMAL 0 // normal button
|
||||||
#define _BUTTON_FLAT 1 // 'transparent', raised when mouseover
|
#define _BUTTON_FLAT 1 // 'transparent', raised when mouseover
|
||||||
#define _BUTTON_NONE 2 // no sign even when mouseover or clicked
|
#define _BUTTON_NONE 2 // no sign even when mouseover or clicked
|
||||||
|
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
@@ -1,10 +1,5 @@
|
|||||||
/*
|
/* Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
|
||||||
* Demo program to show how to make use of WVW_INPUTFOCUS feature
|
Demo program to show how to make use of WVW_INPUTFOCUS() feature of GTWVW */
|
||||||
* of GTWVW
|
|
||||||
*
|
|
||||||
* Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#require "gtwvw"
|
#require "gtwvw"
|
||||||
|
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
/*
|
/* Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
|
||||||
Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
|
|
||||||
|
|
||||||
Simplest demo program to show the difference of MainCoord Mode and
|
Simplest demo program to show the difference of MainCoord Mode and
|
||||||
Standard Mode of GTWVW.
|
Standard Mode of GTWVW. */
|
||||||
*/
|
|
||||||
|
|
||||||
#require "gtwvw"
|
#require "gtwvw"
|
||||||
|
|
||||||
@@ -33,7 +30,7 @@ PROCEDURE fillscreen()
|
|||||||
wvw_nOpenWindow( "Win2", 10, 10, 19, 69 )
|
wvw_nOpenWindow( "Win2", 10, 10, 19, 69 )
|
||||||
wvw_nOpenWindow( "Win3", 15, 15, 22, 75 )
|
wvw_nOpenWindow( "Win3", 15, 15, 22, 75 )
|
||||||
DevPos( 0, 0 )
|
DevPos( 0, 0 )
|
||||||
?? "I'm gonna fill this (" + hb_ntos( MaxRow() + 1 ) + "x" + hb_ntos( MaxCol() + 1 ) + ") screen"
|
?? "I'm going to fill this (" + hb_ntos( MaxRow() + 1 ) + "x" + hb_ntos( MaxCol() + 1 ) + ") screen"
|
||||||
DevPos( 1, 0 )
|
DevPos( 1, 0 )
|
||||||
FOR i := 1 TO MaxRow() - 1
|
FOR i := 1 TO MaxRow() - 1
|
||||||
FOR j := 0 TO MaxCol()
|
FOR j := 0 TO MaxCol()
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
/*
|
/* sample on using Maximize Mode in GTWVW. budyanto@centrin.net.id */
|
||||||
sample on using Maximize Mode in gtwvw.
|
|
||||||
budyanto@centrin.net.id
|
|
||||||
*/
|
|
||||||
|
|
||||||
#require "gtwvw"
|
#require "gtwvw"
|
||||||
|
|
||||||
@@ -35,7 +32,7 @@ PROCEDURE Main()
|
|||||||
updatescr()
|
updatescr()
|
||||||
DO WHILE Inkey( 0 ) != K_ESC
|
DO WHILE Inkey( 0 ) != K_ESC
|
||||||
// refresh screen, probably in a new dimension
|
// refresh screen, probably in a new dimension
|
||||||
// (You may alternatively call updatescr() from WVW_SIZE instead)
|
// (You may alternatively call updatescr() from WVW_SIZE() instead)
|
||||||
updatescr()
|
updatescr()
|
||||||
ENDDO
|
ENDDO
|
||||||
|
|
||||||
@@ -1,13 +1,11 @@
|
|||||||
/*
|
/* Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
|
||||||
Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
|
|
||||||
|
|
||||||
This is a simple Clipper program runs simple GET and BROWSE dialogs
|
This is a simple program runs simple GET and BROWSE dialogs
|
||||||
each on a pseudo-window with brief help message on the bottom of
|
each on a pseudo-window with brief help message on the bottom of
|
||||||
the screen.
|
the screen.
|
||||||
|
|
||||||
Note that this Clipper program uses ZNEWWINDOW() and ZREVWINDOW() to
|
Note that this program uses ZNEWWINDOW() and ZREVWINDOW() to
|
||||||
open and close every pseudo-windows respectively.
|
open and close every pseudo-windows respectively. */
|
||||||
*/
|
|
||||||
|
|
||||||
#require "gtwvw"
|
#require "gtwvw"
|
||||||
|
|
||||||
@@ -1,26 +1,21 @@
|
|||||||
/*
|
/* Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
|
||||||
Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
|
|
||||||
|
|
||||||
This is prog0.prg modified in a quick and dirty fashion to convert
|
This is prog0.prg modified in a quick and dirty fashion to convert
|
||||||
pseudo-windows in prog0.prg into real windows of GTWVW.
|
pseudo-windows in prog0.prg into real windows of GTWVW.
|
||||||
|
|
||||||
This quick and dirty approach is making use of GTWVW's MainCoord Mode.
|
This quick and dirty approach is making use of GTWVW's MainCoord Mode.
|
||||||
Instead of specifying to which window we are writing output, we simply
|
Instead of specifying to which window we are writing output, we simply
|
||||||
specify "screen-wide" coordinates like we do in Clipper. In GTWVW's
|
specify "screen-wide" coordinates like we do in Cl*pper. In GTWVW's
|
||||||
MainCoord Mode, a coordinate (row,col) are processed to find which window
|
MainCoord Mode, a coordinate (row,col) are processed to find which window
|
||||||
does it belong to and the output commands then is directed to operate on
|
does it belong to and the output commands then is directed to operate on
|
||||||
that window.
|
that window.
|
||||||
|
|
||||||
This way we don't have to change a single coordinate from the original
|
This way we don't have to change a single coordinate from the original
|
||||||
Clipper code.
|
Cl*pper code.
|
||||||
|
|
||||||
Since the original Clipper code uses ZNEWWINDOW() and ZREVWINDOW() to
|
Since the original Cl*pper code uses ZNEWWINDOW() and ZREVWINDOW() to
|
||||||
open and close any window, we only have to change these two functions
|
open and close any window, we only have to change these two functions
|
||||||
and let all other functions unchanged (xGet1(), xBrowse1(), ...).
|
and let all other functions unchanged (xGet1(), xBrowse1(), ...). */
|
||||||
|
|
||||||
All changes are guarded by #ifdef, so this program is still compilable
|
|
||||||
in Clipper resulting its original behaviour.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#require "gtwvw"
|
#require "gtwvw"
|
||||||
|
|
||||||
@@ -1,13 +1,11 @@
|
|||||||
/*
|
/* Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
|
||||||
Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
|
|
||||||
|
|
||||||
To present prettier displays we may want to use pseudo-GUI objects.
|
To present prettier displays we may want to use pseudo-GUI objects.
|
||||||
This, however, is not as easy as the previous example.
|
This, however, is not as easy as the previous example.
|
||||||
Once you understand how GTWVW draws these objects, you can put
|
Once you understand how GTWVW draws these objects, you can put
|
||||||
pseudo-GUI objects onto each window, one by one.
|
pseudo-GUI objects onto each window, one by one.
|
||||||
|
|
||||||
Notes: GTWVW now also has native Windows Controls. See other samples.
|
Notes: GTWVW now also has native Windows Controls. See other samples. */
|
||||||
*/
|
|
||||||
|
|
||||||
#require "gtwvw"
|
#require "gtwvw"
|
||||||
|
|
||||||
21
contrib/gtwvw/tests/readme.txt
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
To run samples:
|
||||||
|
|
||||||
|
(1) Make sure you have GTWVW library
|
||||||
|
(2) Compile/link the .prg/.hbp using hbmk2 <name>
|
||||||
|
|
||||||
|
BRIEF DESCRIPTIONS:
|
||||||
|
|
||||||
|
As described in https://www.csacomputer.com/gtwvw/
|
||||||
|
prog0.prg : to be compiled with Cl*pper
|
||||||
|
prog1.prg : 1st evolution with GTWVW
|
||||||
|
prog2.prg : 2nd evolution with GTWVW
|
||||||
|
|
||||||
|
Supporting files:
|
||||||
|
some .gif
|
||||||
|
some .bmp
|
||||||
|
some .ico
|
||||||
|
|
||||||
|
Main programs:
|
||||||
|
wvwtest9.prg : demo of several GTWVW features.
|
||||||
|
maincoor.prg : to show differences of MainCoord and Standard Mode.
|
||||||
|
inpfocus.prg : demo of how to handle input on non topmost window.
|
||||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 779 B After Width: | Height: | Size: 779 B |
@@ -85,13 +85,13 @@ METHOD NewIndex( cDir, cFilename, cTitle, cExtension, cLang ) CLASS TPLGenerate
|
|||||||
|
|
||||||
::New( cDir, cFilename, cTitle, cExtension, cLang, INDEX_ )
|
::New( cDir, cFilename, cTitle, cExtension, cLang, INDEX_ )
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD NewDocument( cDir, cFilename, cTitle, cExtension, cLang ) CLASS TPLGenerate
|
METHOD NewDocument( cDir, cFilename, cTitle, cExtension, cLang ) CLASS TPLGenerate
|
||||||
|
|
||||||
::New( cDir, cFilename, cTitle, cExtension, cLang, DOCUMENT_ )
|
::New( cDir, cFilename, cTitle, cExtension, cLang, DOCUMENT_ )
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD New( cDir, cFilename, cTitle, cExtension, cLang, nType ) CLASS TPLGenerate
|
METHOD New( cDir, cFilename, cTitle, cExtension, cLang, nType ) CLASS TPLGenerate
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ METHOD New( cDir, cFilename, cTitle, cExtension, cLang, nType ) CLASS TPLGenerat
|
|||||||
iif( Lower( ::cLang ) == "en", "", "." + ::cLang ) + ;
|
iif( Lower( ::cLang ) == "en", "", "." + ::cLang ) + ;
|
||||||
::cExtension
|
::cExtension
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD Generate() CLASS TPLGenerate
|
METHOD Generate() CLASS TPLGenerate
|
||||||
|
|
||||||
@@ -121,4 +121,4 @@ METHOD Generate() CLASS TPLGenerate
|
|||||||
|
|
||||||
hb_MemoWrit( ::cOutFileName, ::cFile )
|
hb_MemoWrit( ::cOutFileName, ::cFile )
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
@@ -64,9 +64,9 @@ CREATE CLASS GenerateHTML INHERIT TPLGenerate
|
|||||||
METHOD CloseTag( cText )
|
METHOD CloseTag( cText )
|
||||||
METHOD AppendInline( cText, cFormat, lCode )
|
METHOD AppendInline( cText, cFormat, lCode )
|
||||||
METHOD Append( cText, cFormat, lCode )
|
METHOD Append( cText, cFormat, lCode )
|
||||||
METHOD Space() INLINE ::cFile += ", ", self
|
METHOD Space() INLINE ::cFile += ", ", Self
|
||||||
METHOD Spacer() INLINE ::cFile += hb_eol(), self
|
METHOD Spacer() INLINE ::cFile += hb_eol(), Self
|
||||||
METHOD Newline() INLINE ::cFile += "<br>" + hb_eol(), self
|
METHOD Newline() INLINE ::cFile += "<br>" + hb_eol(), Self
|
||||||
METHOD NewFile()
|
METHOD NewFile()
|
||||||
|
|
||||||
CLASS VAR lCreateStyleDocument AS LOGICAL INIT .T.
|
CLASS VAR lCreateStyleDocument AS LOGICAL INIT .T.
|
||||||
@@ -127,7 +127,7 @@ METHOD NewFile() CLASS GenerateHTML
|
|||||||
|
|
||||||
::OpenTag( "main" )
|
::OpenTag( "main" )
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
STATIC FUNCTION GitRev()
|
STATIC FUNCTION GitRev()
|
||||||
|
|
||||||
@@ -167,21 +167,21 @@ METHOD Generate() CLASS GenerateHTML
|
|||||||
? Round( ( hb_MilliSeconds() - ::nStart ) / 1000, 3 )
|
? Round( ( hb_MilliSeconds() - ::nStart ) / 1000, 3 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateHTML
|
METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateHTML
|
||||||
|
|
||||||
::super:NewDocument( cDir, cFilename, cTitle, EXTENSION, cLang )
|
::super:NewDocument( cDir, cFilename, cTitle, EXTENSION, cLang )
|
||||||
::NewFile()
|
::NewFile()
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateHTML
|
METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateHTML
|
||||||
|
|
||||||
::super:NewIndex( cDir, cFilename, cTitle, EXTENSION, cLang )
|
::super:NewIndex( cDir, cFilename, cTitle, EXTENSION, cLang )
|
||||||
::NewFile()
|
::NewFile()
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD BeginSection( cSection, cFilename ) CLASS GenerateHTML
|
METHOD BeginSection( cSection, cFilename ) CLASS GenerateHTML
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ METHOD BeginSection( cSection, cFilename ) CLASS GenerateHTML
|
|||||||
::TargetFilename := cFilename
|
::TargetFilename := cFilename
|
||||||
::Depth++
|
::Depth++
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD EndSection( cSection, cFilename ) CLASS GenerateHTML
|
METHOD EndSection( cSection, cFilename ) CLASS GenerateHTML
|
||||||
|
|
||||||
@@ -207,7 +207,7 @@ METHOD EndSection( cSection, cFilename ) CLASS GenerateHTML
|
|||||||
HB_SYMBOL_UNUSED( cFilename )
|
HB_SYMBOL_UNUSED( cFilename )
|
||||||
::Depth--
|
::Depth--
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD AddReference( oEntry, cReference, cSubReference ) CLASS GenerateHTML
|
METHOD AddReference( oEntry, cReference, cSubReference ) CLASS GenerateHTML
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ METHOD AddReference( oEntry, cReference, cSubReference ) CLASS GenerateHTML
|
|||||||
ENDIF
|
ENDIF
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD AddEntry( oEntry ) CLASS GenerateHTML
|
METHOD AddEntry( oEntry ) CLASS GenerateHTML
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ METHOD AddEntry( oEntry ) CLASS GenerateHTML
|
|||||||
|
|
||||||
::CloseTag( "section" )
|
::CloseTag( "section" )
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD PROCEDURE WriteEntry( cField, cContent, lPreformatted ) CLASS GenerateHTML
|
METHOD PROCEDURE WriteEntry( cField, cContent, lPreformatted ) CLASS GenerateHTML
|
||||||
|
|
||||||
@@ -405,7 +405,7 @@ METHOD OpenTagInline( cText, ... ) CLASS GenerateHTML
|
|||||||
ENDIF
|
ENDIF
|
||||||
::cFile += "<" + cText + ">"
|
::cFile += "<" + cText + ">"
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD OpenTag( cText, ... ) CLASS GenerateHTML
|
METHOD OpenTag( cText, ... ) CLASS GenerateHTML
|
||||||
|
|
||||||
@@ -413,7 +413,7 @@ METHOD OpenTag( cText, ... ) CLASS GenerateHTML
|
|||||||
|
|
||||||
::cFile += hb_eol()
|
::cFile += hb_eol()
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD Tagged( cText, cTag, ... ) CLASS GenerateHTML
|
METHOD Tagged( cText, cTag, ... ) CLASS GenerateHTML
|
||||||
|
|
||||||
@@ -427,19 +427,19 @@ METHOD Tagged( cText, cTag, ... ) CLASS GenerateHTML
|
|||||||
|
|
||||||
::cFile += "<" + cTag + cResult + ">" + cText + "</" + cTag + ">" + hb_eol()
|
::cFile += "<" + cTag + cResult + ">" + cText + "</" + cTag + ">" + hb_eol()
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD CloseTagInline( cText ) CLASS GenerateHTML
|
METHOD CloseTagInline( cText ) CLASS GenerateHTML
|
||||||
|
|
||||||
::cFile += "</" + cText + ">"
|
::cFile += "</" + cText + ">"
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD CloseTag( cText ) CLASS GenerateHTML
|
METHOD CloseTag( cText ) CLASS GenerateHTML
|
||||||
|
|
||||||
::cFile += "</" + cText + ">" + hb_eol()
|
::cFile += "</" + cText + ">" + hb_eol()
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
STATIC FUNCTION StrEsc( cString )
|
STATIC FUNCTION StrEsc( cString )
|
||||||
|
|
||||||
@@ -572,14 +572,14 @@ METHOD AppendInline( cText, cFormat, lCode ) CLASS GenerateHTML
|
|||||||
::cFile += cText
|
::cFile += cText
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD Append( cText, cFormat, lCode ) CLASS GenerateHTML
|
METHOD Append( cText, cFormat, lCode ) CLASS GenerateHTML
|
||||||
|
|
||||||
::AppendInline( cText, cFormat, lCode )
|
::AppendInline( cText, cFormat, lCode )
|
||||||
::cFile += hb_eol()
|
::cFile += hb_eol()
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD RecreateStyleDocument( cStyleFile ) CLASS GenerateHTML
|
METHOD RecreateStyleDocument( cStyleFile ) CLASS GenerateHTML
|
||||||
|
|
||||||
@@ -591,7 +591,7 @@ METHOD RecreateStyleDocument( cStyleFile ) CLASS GenerateHTML
|
|||||||
/* TODO: raise an error, could not create style file */
|
/* TODO: raise an error, could not create style file */
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
STATIC FUNCTION SymbolToHTMLID( cID )
|
STATIC FUNCTION SymbolToHTMLID( cID )
|
||||||
RETURN Lower( hb_StrReplace( cID, { ;
|
RETURN Lower( hb_StrReplace( cID, { ;
|
||||||
@@ -59,14 +59,14 @@ METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateAscii
|
|||||||
::lContinuous := .T.
|
::lContinuous := .T.
|
||||||
::super:NewDocument( cDir, cFilename, cTitle,, cLang )
|
::super:NewDocument( cDir, cFilename, cTitle,, cLang )
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateAscii
|
METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateAscii
|
||||||
|
|
||||||
::lContinuous := .T.
|
::lContinuous := .T.
|
||||||
::super:NewIndex( cDir, cFilename, cTitle,, cLang )
|
::super:NewIndex( cDir, cFilename, cTitle,, cLang )
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
CREATE CLASS GenerateText INHERIT TPLGenerate
|
CREATE CLASS GenerateText INHERIT TPLGenerate
|
||||||
|
|
||||||
@@ -97,14 +97,14 @@ METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateText
|
|||||||
::super:NewDocument( cDir, cFilename, cTitle, ".txt", cLang )
|
::super:NewDocument( cDir, cFilename, cTitle, ".txt", cLang )
|
||||||
::WriteEntry( "", cTitle + hb_eol(), .F. )
|
::WriteEntry( "", cTitle + hb_eol(), .F. )
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateText
|
METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateText
|
||||||
|
|
||||||
::super:NewIndex( cDir, cFilename, cTitle, ".txt", cLang )
|
::super:NewIndex( cDir, cFilename, cTitle, ".txt", cLang )
|
||||||
::WriteEntry( "", cTitle + hb_eol(), .F. )
|
::WriteEntry( "", cTitle + hb_eol(), .F. )
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD BeginSection( cSection, cFilename ) CLASS GenerateText
|
METHOD BeginSection( cSection, cFilename ) CLASS GenerateText
|
||||||
|
|
||||||
@@ -115,13 +115,13 @@ METHOD BeginSection( cSection, cFilename ) CLASS GenerateText
|
|||||||
ENDIF
|
ENDIF
|
||||||
::Depth++
|
::Depth++
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD AddIndex( oEntry ) CLASS GenerateText
|
METHOD AddIndex( oEntry ) CLASS GenerateText
|
||||||
|
|
||||||
::WriteEntry( FieldCaption( "NAME" ), oEntry:fld[ "NAME" ] + " - " + oEntry:fld[ "ONELINER" ], .F. )
|
::WriteEntry( FieldCaption( "NAME" ), oEntry:fld[ "NAME" ] + " - " + oEntry:fld[ "ONELINER" ], .F. )
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD AddEntry( oEntry ) CLASS GenerateText
|
METHOD AddEntry( oEntry ) CLASS GenerateText
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ METHOD AddEntry( oEntry ) CLASS GenerateText
|
|||||||
ENDIF
|
ENDIF
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD PROCEDURE WriteEntry( cCaption, cContent, lPreformatted ) CLASS GenerateText
|
METHOD PROCEDURE WriteEntry( cCaption, cContent, lPreformatted ) CLASS GenerateText
|
||||||
|
|
||||||
@@ -166,4 +166,4 @@ METHOD Generate() CLASS GenerateText
|
|||||||
|
|
||||||
::super:Generate()
|
::super:Generate()
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
@@ -72,7 +72,7 @@ METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateXML
|
|||||||
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + hb_eol() + ;
|
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + hb_eol() + ;
|
||||||
'<HarbourReference>' + hb_eol()
|
'<HarbourReference>' + hb_eol()
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateXML
|
METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateXML
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateXML
|
|||||||
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + hb_eol() + ;
|
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + hb_eol() + ;
|
||||||
'<HarbourReference>' + hb_eol()
|
'<HarbourReference>' + hb_eol()
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD BeginSection( cSection, cFilename ) CLASS GenerateXML
|
METHOD BeginSection( cSection, cFilename ) CLASS GenerateXML
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ METHOD BeginSection( cSection, cFilename ) CLASS GenerateXML
|
|||||||
ENDIF
|
ENDIF
|
||||||
::Depth++
|
::Depth++
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD EndSection( cSection, cFilename ) CLASS GenerateXML
|
METHOD EndSection( cSection, cFilename ) CLASS GenerateXML
|
||||||
|
|
||||||
@@ -101,13 +101,13 @@ METHOD EndSection( cSection, cFilename ) CLASS GenerateXML
|
|||||||
::Depth--
|
::Depth--
|
||||||
::cFile += Replicate( Chr( 9 ), ::Depth ) + '</Section>' + hb_eol()
|
::cFile += Replicate( Chr( 9 ), ::Depth ) + '</Section>' + hb_eol()
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD AddIndex( oEntry ) CLASS GenerateXML
|
METHOD AddIndex( oEntry ) CLASS GenerateXML
|
||||||
|
|
||||||
::WriteEntry( "ENTRY", oEntry:fld[ "NAME" ] + " - " + oEntry:fld[ "ONELINER" ], .F. )
|
::WriteEntry( "ENTRY", oEntry:fld[ "NAME" ] + " - " + oEntry:fld[ "ONELINER" ], .F. )
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD AddEntry( oEntry ) CLASS GenerateXML
|
METHOD AddEntry( oEntry ) CLASS GenerateXML
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ METHOD AddEntry( oEntry ) CLASS GenerateXML
|
|||||||
::cFile += '</Entry>' + hb_eol()
|
::cFile += '</Entry>' + hb_eol()
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD Generate() CLASS GenerateXML
|
METHOD Generate() CLASS GenerateXML
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ METHOD Generate() CLASS GenerateXML
|
|||||||
|
|
||||||
::super:Generate()
|
::super:Generate()
|
||||||
|
|
||||||
RETURN self
|
RETURN Self
|
||||||
|
|
||||||
METHOD PROCEDURE WriteEntry( cCaption, cContent, lPreformatted ) CLASS GenerateXML
|
METHOD PROCEDURE WriteEntry( cCaption, cContent, lPreformatted ) CLASS GenerateXML
|
||||||
|
|
||||||
@@ -7,10 +7,10 @@
|
|||||||
-gtcgi
|
-gtcgi
|
||||||
|
|
||||||
hbdoc.prg
|
hbdoc.prg
|
||||||
_genbase.prg
|
_base.prg
|
||||||
_genhtml.prg
|
_html.prg
|
||||||
_gentxt.prg
|
_txt.prg
|
||||||
_genxml.prg
|
_xml.prg
|
||||||
|
|
||||||
# NOTE: hbdoc doesn't work from other locations than
|
# NOTE: hbdoc doesn't work from other locations than
|
||||||
# the current one, so we don't install it yet.
|
# the current one, so we don't install it yet.
|
||||||
@@ -1329,8 +1329,8 @@ STATIC FUNCTION LoadHBX( cFileName, hAll )
|
|||||||
RETURN aDynamic
|
RETURN aDynamic
|
||||||
|
|
||||||
#if defined( __HBSCRIPT__HBSHELL )
|
#if defined( __HBSCRIPT__HBSHELL )
|
||||||
SET PROCEDURE TO "_genbase.prg"
|
SET PROCEDURE TO "_base.prg"
|
||||||
SET PROCEDURE TO "_gentxt.prg"
|
SET PROCEDURE TO "_txt.prg"
|
||||||
SET PROCEDURE TO "_genhtml.prg"
|
SET PROCEDURE TO "_html.prg"
|
||||||
SET PROCEDURE TO "_genxml.prg"
|
SET PROCEDURE TO "_xml.prg"
|
||||||
#endif
|
#endif
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
/*
|
/* Copyright 2004-2005 Francesco Saverio Giudice <info@fsgiudice.com>
|
||||||
* Copyright 2004-2005 Francesco Saverio Giudice <info@fsgiudice.com>
|
|
||||||
*
|
*
|
||||||
* Counter sample
|
* Counter sample
|
||||||
* usage:
|
* usage:
|
||||||
@@ -9,11 +8,11 @@
|
|||||||
|
|
||||||
#require "hbgd"
|
#require "hbgd"
|
||||||
|
|
||||||
/* Some digits images from:
|
/* Some digit images from:
|
||||||
http://www.digitmania.holowww.com/all.html */
|
https://web.archive.org/web/www.digitmania.holowww.com/all.html */
|
||||||
|
|
||||||
#define IMAGES_IN "digits" + hb_ps()
|
#define IMAGES_IN "imgs_in" + hb_ps()
|
||||||
#define IMAGES_OUT "imgs_out" + hb_ps()
|
#define IMAGES_OUT "imgs_out" + hb_ps()
|
||||||
|
|
||||||
#define DISPLAY_NUM 10
|
#define DISPLAY_NUM 10
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 792 B After Width: | Height: | Size: 792 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 687 B After Width: | Height: | Size: 687 B |
|
Before Width: | Height: | Size: 661 B After Width: | Height: | Size: 661 B |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 415 B |
|
Before Width: | Height: | Size: 438 B After Width: | Height: | Size: 438 B |
@@ -1633,7 +1633,7 @@ STATIC FUNCTION compile_file( cFileName, hConfig )
|
|||||||
IF cFileName == NIL
|
IF cFileName == NIL
|
||||||
cFileName := MEMVAR->server[ "SCRIPT_NAME" ]
|
cFileName := MEMVAR->server[ "SCRIPT_NAME" ]
|
||||||
ENDIF
|
ENDIF
|
||||||
cFileName := UOsFileName( hb_DirBase() + "tpl/" + cFileName + ".tpl" )
|
cFileName := UOsFileName( hb_DirBase() + "tpl/" + cFileName + ".html" )
|
||||||
IF hb_FileExists( cFileName )
|
IF hb_FileExists( cFileName )
|
||||||
cTpl := hb_MemoRead( cFileName )
|
cTpl := hb_MemoRead( cFileName )
|
||||||
BEGIN SEQUENCE
|
BEGIN SEQUENCE
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
To run samples:
|
|
||||||
|
|
||||||
(1) Make sure you have GTWVW library
|
|
||||||
(2) Compile/link the .prg/.hbp using hbmk2 <name>
|
|
||||||
|
|
||||||
|
|
||||||
BRIEF DESCRIPTIONS:
|
|
||||||
|
|
||||||
AS described in http://www.csacomputer.com/gtwvw/ :
|
|
||||||
prog0.prg : to be compiled with clipper
|
|
||||||
prog1.prg : 1st evolution with gtwvw
|
|
||||||
prog2.prg : 2nd evolution with gtwvw
|
|
||||||
|
|
||||||
Supporting routines: (required by wvwtest9.prg only)
|
|
||||||
_wvwmous.prg : sample of how to handle graphic primitives
|
|
||||||
|
|
||||||
Supporting files:
|
|
||||||
test.dbf
|
|
||||||
some .gif
|
|
||||||
some .bmp
|
|
||||||
some .ico
|
|
||||||
|
|
||||||
Main programs:
|
|
||||||
wvwtest9.prg : demo of several gtwvw features.
|
|
||||||
maincoor.prg : to show differences of MainCoord and Standard Mode.
|
|
||||||
inpfocus.prg : demo of how to handle input on non topmost window.
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 1999 Eddie Runia
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
* any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; see the file LICENSE.txt. If not, write to
|
|
||||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA (or visit https://www.gnu.org/licenses/).
|
|
||||||
*
|
|
||||||
* As a special exception, the Harbour Project gives permission for
|
|
||||||
* additional uses of the text contained in its release of Harbour.
|
|
||||||
*
|
|
||||||
* The exception is that, if you link the Harbour libraries with other
|
|
||||||
* files to produce an executable, this does not by itself cause the
|
|
||||||
* resulting executable to be covered by the GNU General Public License.
|
|
||||||
* Your use of that executable is in no way restricted on account of
|
|
||||||
* linking the Harbour library code into it.
|
|
||||||
*
|
|
||||||
* This exception does not however invalidate any other reasons why
|
|
||||||
* the executable file might be covered by the GNU General Public License.
|
|
||||||
*
|
|
||||||
* This exception applies only to the code released by the Harbour
|
|
||||||
* Project under the name Harbour. If you copy code from other
|
|
||||||
* Harbour Project or Free Software Foundation releases into a copy of
|
|
||||||
* Harbour, as the General Public License permits, the exception does
|
|
||||||
* not apply to the code that you add in this way. To avoid misleading
|
|
||||||
* anyone as to the status of such modified files, you must delete
|
|
||||||
* this exception notice from them.
|
|
||||||
*
|
|
||||||
* If you write modifications of your own for Harbour, it is your choice
|
|
||||||
* whether to permit this exception to apply to your modifications.
|
|
||||||
* If you do not wish that, delete this exception notice.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define CGI_SERVER_SOFTWARE 1
|
|
||||||
#define CGI_SERVER_NAME 2
|
|
||||||
#define CGI_GATEWAY_INTERFACE 3
|
|
||||||
#define CGI_SERVER_PROTOCOL 4
|
|
||||||
#define CGI_SERVER_PORT 5
|
|
||||||
#define CGI_REQUEST_METHOD 6
|
|
||||||
#define CGI_HTTP_ACCEPT 7
|
|
||||||
#define CGI_HTTP_USER_AGENT 8
|
|
||||||
#define CGI_HTTP_REFERER 9
|
|
||||||
#define CGI_PATH_INFO 10
|
|
||||||
#define CGI_PATH_TRANSLATED 11
|
|
||||||
#define CGI_SCRIPT_NAME 12
|
|
||||||
#define CGI_QUERY_STRING 13
|
|
||||||
#define CGI_REMOTE_HOST 14
|
|
||||||
#define CGI_REMOTE_ADDR 15
|
|
||||||
#define CGI_REMOTE_USER 16
|
|
||||||
#define CGI_AUTH_TYPE 17
|
|
||||||
#define CGI_CONTENT_TYPE 18
|
|
||||||
#define CGI_CONTENT_LENGTH 19
|
|
||||||
#define CGI_ANNOTATION_SERVER 20
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
-w3 -es2
|
|
||||||
|
|
||||||
-nulrdd
|
|
||||||
|
|
||||||
-gtcgi
|
|
||||||
|
|
||||||
guestbk.prg
|
|
||||||
_cgi.prg
|
|
||||||
_inifile.prg
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
;
|
|
||||||
; The Harbour Guestbook Script
|
|
||||||
; Copyright (C) 1999 Felipe G. Coury
|
|
||||||
;
|
|
||||||
; guestbk.ini - Script configuration file
|
|
||||||
;
|
|
||||||
;
|
|
||||||
; 1. Section [Header]
|
|
||||||
;
|
|
||||||
; This section defines the Guestbook fields and color look.
|
|
||||||
; DataFields=<n> n is the number of fields on guestbook
|
|
||||||
; DataFieldn=<fieldname> defines the name of the nth field of guestbook
|
|
||||||
; EvenLine=<color> color of even lines on guestbook
|
|
||||||
; OddLine=<color> color of odd lines on guestbook
|
|
||||||
[Header]
|
|
||||||
DataFields=7
|
|
||||||
DataField1=Name
|
|
||||||
DataField2=City
|
|
||||||
DataField3=State
|
|
||||||
DataField4=Country
|
|
||||||
DataField5=EMail
|
|
||||||
DataField6=Homepage
|
|
||||||
DataField7=Comments
|
|
||||||
EvenLine=#F0F0F0
|
|
||||||
OddLine=#000000
|
|
||||||
|
|
||||||
; 2. Section [Format]
|
|
||||||
; Formats each guestbook entry.
|
|
||||||
; FormatLines=<n> number of lines per entry
|
|
||||||
; FormatLinen=<format> format of the nth line of the entry. You can
|
|
||||||
; use metatags for replacing its content with the
|
|
||||||
; correspondent field value. Ex.:
|
|
||||||
; Format1=Name: <b><#Name></b>
|
|
||||||
; Format2=<a href="<#URL>"><#URL></a>
|
|
||||||
; Formats one line with "Name:" and the content
|
|
||||||
; of the "Name" field in bold and the other
|
|
||||||
; with a link to the "URL" field. The fields
|
|
||||||
; within metatags must be defined in the [Header]
|
|
||||||
; section. In addition to those tags you can use
|
|
||||||
; <#DateTime> tag, which will be expanded to the
|
|
||||||
; entry date on the format "Month DD, YYYY".
|
|
||||||
[Format]
|
|
||||||
FormatLines=3
|
|
||||||
Format1=<b><#Comments></b>
|
|
||||||
Format2=<a href="<#Homepage>"><#Name></a> <<a href="mailto:<#EMail>"><#EMail></a>>
|
|
||||||
Format3=<#City>, <#State> <#Country> - <#DateTime>
|
|
||||||
|
|
||||||
; 3. Section [Entries]
|
|
||||||
; This section is not a configuration section. The Guestbook itself controls
|
|
||||||
; it adding entries here. Should not be modified.
|
|
||||||
[Entries]
|
|
||||||
Entries=1
|
|
||||||
Name1=Felipe G. Coury
|
|
||||||
City1=Campinas
|
|
||||||
State1=SP
|
|
||||||
Country1=Brazil
|
|
||||||
EMail1=fcoury@flexsys-ci.com
|
|
||||||
Homepage1=http://www.flexsys-ci.com
|
|
||||||
Comments1=This is Harbour Guestbook. Powered by Harbour. Leave your message after the beep!!!<g>
|
|
||||||
DateTime1=July 25, 1999 12:00:00
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
Harbour Guestbook
|
|
||||||
Felipe Coury <fcoury@flexsys-ci.com>
|
|
||||||
|
|
||||||
|
|
||||||
How to create and test the Harbour Guestbook
|
|
||||||
|
|
||||||
You'll find guestbk.prg and guestbk.html files.
|
|
||||||
To build the executable, review guestbk.prg and
|
|
||||||
check the directories for locating guestbk.ini
|
|
||||||
and guestbk.html correctly.
|
|
||||||
|
|
||||||
With that done, build it using hbmk2. Put the resulting
|
|
||||||
executable and .html files on a script-enabled directory
|
|
||||||
and call guestbk executable via WebBrowser.
|
|
||||||
|
|
||||||
The best thing about this guestbook is its highly
|
|
||||||
configurable architecture. Please review guestbk.ini
|
|
||||||
for configuration options and further explanation.
|
|
||||||
|
|
||||||
That's it!
|
|
||||||
|
|
||||||
PS: If you don't have a WebServer, I will be pleased to
|
|
||||||
demonstrate it to you. Just contact me via ICQ, my
|
|
||||||
UIN is #19504786. Thanks!
|
|
||||||
@@ -42,11 +42,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* 1999-05-30 First implementation.
|
||||||
*
|
|
||||||
* Harbour Test of a CGI/HTML-Generator class.
|
|
||||||
*
|
|
||||||
* 1999-05-30 First implementation.
|
|
||||||
*
|
*
|
||||||
* Tips: - Use ShowResults to make dynamic html (to test dynamic
|
* Tips: - Use ShowResults to make dynamic html (to test dynamic
|
||||||
* results, put the exe file on CGI-BIN dir or equivalent);
|
* results, put the exe file on CGI-BIN dir or equivalent);
|
||||||
@@ -58,13 +54,31 @@
|
|||||||
* First attempt to convert Delphi's ISAPI dll of WebSites'
|
* First attempt to convert Delphi's ISAPI dll of WebSites'
|
||||||
* Function List
|
* Function List
|
||||||
* 1999-07-29 Changed QOut() calls to OutStd() calls.
|
* 1999-07-29 Changed QOut() calls to OutStd() calls.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fileio.ch"
|
#include "fileio.ch"
|
||||||
#include "hbclass.ch"
|
#include "hbclass.ch"
|
||||||
|
|
||||||
#include "cgi.ch"
|
#define CGI_SERVER_SOFTWARE 1
|
||||||
|
#define CGI_SERVER_NAME 2
|
||||||
|
#define CGI_GATEWAY_INTERFACE 3
|
||||||
|
#define CGI_SERVER_PROTOCOL 4
|
||||||
|
#define CGI_SERVER_PORT 5
|
||||||
|
#define CGI_REQUEST_METHOD 6
|
||||||
|
#define CGI_HTTP_ACCEPT 7
|
||||||
|
#define CGI_HTTP_USER_AGENT 8
|
||||||
|
#define CGI_HTTP_REFERER 9
|
||||||
|
#define CGI_PATH_INFO 10
|
||||||
|
#define CGI_PATH_TRANSLATED 11
|
||||||
|
#define CGI_SCRIPT_NAME 12
|
||||||
|
#define CGI_QUERY_STRING 13
|
||||||
|
#define CGI_REMOTE_HOST 14
|
||||||
|
#define CGI_REMOTE_ADDR 15
|
||||||
|
#define CGI_REMOTE_USER 16
|
||||||
|
#define CGI_AUTH_TYPE 17
|
||||||
|
#define CGI_CONTENT_TYPE 18
|
||||||
|
#define CGI_CONTENT_LENGTH 19
|
||||||
|
#define CGI_ANNOTATION_SERVER 20
|
||||||
|
|
||||||
#define IF_BUFFER 65535
|
#define IF_BUFFER 65535
|
||||||
|
|
||||||
56
tests/guestbk.ini
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
; The Harbour Guestbook Script Configuration file
|
||||||
|
; Copyright (C) 1999 Felipe G. Coury
|
||||||
|
|
||||||
|
; 1. Section [Header]
|
||||||
|
;
|
||||||
|
; This section defines the Guestbook fields and color look.
|
||||||
|
; DataFields=<n> n is the number of fields on guestbook
|
||||||
|
; DataFieldn=<fieldname> defines the name of the nth field of guestbook
|
||||||
|
; EvenLine=<color> color of even lines on guestbook
|
||||||
|
; OddLine=<color> color of odd lines on guestbook
|
||||||
|
[Header]
|
||||||
|
DataFields=7
|
||||||
|
DataField1=Name
|
||||||
|
DataField2=City
|
||||||
|
DataField3=State
|
||||||
|
DataField4=Country
|
||||||
|
DataField5=EMail
|
||||||
|
DataField6=Homepage
|
||||||
|
DataField7=Comments
|
||||||
|
EvenLine=#f0f0f0
|
||||||
|
OddLine=#000000
|
||||||
|
|
||||||
|
; 2. Section [Format]
|
||||||
|
; Formats each guestbook entry.
|
||||||
|
; FormatLines=<n> number of lines per entry
|
||||||
|
; FormatLinen=<format> format of the nth line of the entry. You can
|
||||||
|
; use metatags for replacing its content with the
|
||||||
|
; correspondent field value. Ex.:
|
||||||
|
; Format1=Name: <b><#Name></b>
|
||||||
|
; Format2=<a href="<#URL>"><#URL></a>
|
||||||
|
; Formats one line with "Name:" and the content
|
||||||
|
; of the "Name" field in bold and the other
|
||||||
|
; with a link to the "URL" field. The fields
|
||||||
|
; within metatags must be defined in the [Header]
|
||||||
|
; section. In addition to those tags you can use
|
||||||
|
; <#DateTime> tag, which will be expanded to the
|
||||||
|
; entry date on the format "Month DD, YYYY".
|
||||||
|
[Format]
|
||||||
|
FormatLines=3
|
||||||
|
Format1=<b><#Comments></b>
|
||||||
|
Format2=<a href="<#Homepage>"><#Name></a> <<a href="mailto:<#EMail>"><#EMail></a>>
|
||||||
|
Format3=<#City>, <#State> <#Country> - <#DateTime>
|
||||||
|
|
||||||
|
; 3. Section [Entries]
|
||||||
|
; This section is not a configuration section. The Guestbook itself controls
|
||||||
|
; it adding entries here. Should not be modified.
|
||||||
|
[Entries]
|
||||||
|
Entries=1
|
||||||
|
Name1=Felipe G. Coury
|
||||||
|
City1=Campinas
|
||||||
|
State1=SP
|
||||||
|
Country1=Brazil
|
||||||
|
EMail1=fcoury@flexsys-ci.com
|
||||||
|
Homepage1=https://example.org/
|
||||||
|
Comments1=This is Harbour Guestbook. Powered by Harbour. Leave your message after the beep!!!<g>
|
||||||
|
DateTime1=1999-07-25 12:00:00
|
||||||
@@ -44,9 +44,27 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* How to create and test the Harbour Guestbook
|
||||||
|
|
||||||
|
Build this using hbmk2. Put the resulting executable
|
||||||
|
and .html files on a script-enabled directory
|
||||||
|
and call guestbk executable via WebBrowser.
|
||||||
|
|
||||||
|
The best thing about this guestbook is its highly
|
||||||
|
configurable architecture. Please review guestbk.ini
|
||||||
|
for configuration options and further explanation.
|
||||||
|
|
||||||
|
That's it!
|
||||||
|
|
||||||
|
PS: If you don't have a WebServer, I will be pleased to
|
||||||
|
demonstrate it to you. Just contact me via ICQ, my
|
||||||
|
UIN is #19504786. Thanks! */
|
||||||
|
|
||||||
|
#define _WWW_ROOT_DIR_ hb_DirSepAdd( hb_DirSepToOS( "/www/root/" ) )
|
||||||
|
|
||||||
PROCEDURE Main()
|
PROCEDURE Main()
|
||||||
|
|
||||||
LOCAL oIni := TIniFile():New( "C:\inetpub\wwwroot\guestbk.ini" )
|
LOCAL oIni := TIniFile():New( _WWW_ROOT_DIR_ + "guestbk.ini" )
|
||||||
LOCAL oHTML := THtml():New()
|
LOCAL oHTML := THtml():New()
|
||||||
LOCAL cOddColor, cEvenColor
|
LOCAL cOddColor, cEvenColor
|
||||||
LOCAL cCode, i, j, l, cField, nEntry, cColor
|
LOCAL cCode, i, j, l, cField, nEntry, cColor
|
||||||
@@ -65,7 +83,6 @@ PROCEDURE Main()
|
|||||||
cField := oIni:ReadString( "Header", "DataField" + hb_ntos( i ), "" )
|
cField := oIni:ReadString( "Header", "DataField" + hb_ntos( i ), "" )
|
||||||
oIni:WriteString( "Entries", cField + hb_ntos( nEntry ), ;
|
oIni:WriteString( "Entries", cField + hb_ntos( nEntry ), ;
|
||||||
StrTran( StrTran( oHTML:QueryFields( cField ), Chr( 13 ) ), Chr( 10 ), "<br />" ) )
|
StrTran( StrTran( oHTML:QueryFields( cField ), Chr( 13 ) ), Chr( 10 ), "<br />" ) )
|
||||||
|
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
// Write fields to .ini file
|
// Write fields to .ini file
|
||||||
@@ -80,11 +97,9 @@ PROCEDURE Main()
|
|||||||
'<body></body></html>'
|
'<body></body></html>'
|
||||||
|
|
||||||
oHTML:ShowResult()
|
oHTML:ShowResult()
|
||||||
|
|
||||||
ELSE
|
ELSE
|
||||||
|
|
||||||
// Sets the metahtml file
|
// Sets the metahtml file
|
||||||
oHTML:SetHTMLFile( "C:\inetpub\wwwroot\guestbk.html" )
|
oHTML:SetHTMLFile( _WWW_ROOT_DIR_ + "guestbk.html" )
|
||||||
|
|
||||||
// Retrieves odd and even entries color
|
// Retrieves odd and even entries color
|
||||||
cOddColor := oIni:ReadString( "Header", "OddColor", "#FFFFFF" )
|
cOddColor := oIni:ReadString( "Header", "OddColor", "#FFFFFF" )
|
||||||
@@ -105,13 +120,11 @@ PROCEDURE Main()
|
|||||||
cField := oIni:ReadString( "Header", "DataField" + hb_ntos( j ), "" )
|
cField := oIni:ReadString( "Header", "DataField" + hb_ntos( j ), "" )
|
||||||
AAdd( aLine, { cField, ;
|
AAdd( aLine, { cField, ;
|
||||||
oIni:ReadString( "Entries", cField + hb_ntos( i ), "" ) } )
|
oIni:ReadString( "Entries", cField + hb_ntos( i ), "" ) } )
|
||||||
|
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
AAdd( aEntries, aLine )
|
AAdd( aEntries, aLine )
|
||||||
|
|
||||||
i--
|
i--
|
||||||
|
|
||||||
ENDDO
|
ENDDO
|
||||||
|
|
||||||
cCode := ""
|
cCode := ""
|
||||||
@@ -128,19 +141,17 @@ PROCEDURE Main()
|
|||||||
|
|
||||||
cLine := oIni:ReadString( "Format", "Format" + hb_ntos( j ), "" )
|
cLine := oIni:ReadString( "Format", "Format" + hb_ntos( j ), "" )
|
||||||
FOR l := 1 TO Len( aEntries[ i ] )
|
FOR l := 1 TO Len( aEntries[ i ] )
|
||||||
cLine := StrTran( cLine, "<#" + aEntries[ i, l, 1 ] + ">", ;
|
cLine := StrTran( cLine, "<#" + aEntries[ i ][ l ][ 1 ] + ">", ;
|
||||||
aEntries[ i, l, 2 ] )
|
aEntries[ i ][ l ][ 2 ] )
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
cLine := StrTran( cLine, "<#DateTime>", ;
|
cLine := StrTran( cLine, "<#DateTime>", ;
|
||||||
oIni:ReadString( "Entries", "DateTime" + hb_ntos( Len( aEntries ) - i + 1 ), "" ) )
|
oIni:ReadString( "Entries", "DateTime" + hb_ntos( Len( aEntries ) - i + 1 ), "" ) )
|
||||||
|
|
||||||
cCode += cLine + "</td></tr>" + hb_eol()
|
cCode += cLine + "</td></tr>" + hb_eol()
|
||||||
|
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
cCode += "</table>" + hb_eol()
|
cCode += "</table>" + hb_eol()
|
||||||
|
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
// Generates the output
|
// Generates the output
|
||||||
@@ -153,6 +164,6 @@ PROCEDURE Main()
|
|||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
#if defined( __HBSCRIPT__HBSHELL )
|
#if defined( __HBSCRIPT__HBSHELL )
|
||||||
SET PROCEDURE TO "_cgi.prg"
|
SET PROCEDURE TO "cgi.prg"
|
||||||
SET PROCEDURE TO "_inifile.prg"
|
SET PROCEDURE TO "inifile.prg"
|
||||||
#endif
|
#endif
|
||||||
@@ -104,7 +104,8 @@ METHOD New( cFileName ) CLASS TIniFile
|
|||||||
cFile := SubStr( cFile, nPos + 1 )
|
cFile := SubStr( cFile, nPos + 1 )
|
||||||
|
|
||||||
IF ! Empty( cLine )
|
IF ! Empty( cLine )
|
||||||
IF Left( cLine, 1 ) == "[" // new section
|
DO CASE
|
||||||
|
CASE Left( cLine, 1 ) == "[" // new section
|
||||||
IF ( nPos := At( "]", cLine ) ) > 1
|
IF ( nPos := At( "]", cLine ) ) > 1
|
||||||
cLine := SubStr( cLine, 2, nPos - 2 )
|
cLine := SubStr( cLine, 2, nPos - 2 )
|
||||||
ELSE
|
ELSE
|
||||||
@@ -114,10 +115,10 @@ METHOD New( cFileName ) CLASS TIniFile
|
|||||||
AAdd( ::Contents, { cLine, { /* this will be CurrArray */ } } )
|
AAdd( ::Contents, { cLine, { /* this will be CurrArray */ } } )
|
||||||
CurrArray := ::Contents[ Len( ::Contents ) ][ 2 ]
|
CurrArray := ::Contents[ Len( ::Contents ) ][ 2 ]
|
||||||
|
|
||||||
ELSEIF Left( cLine, 1 ) == ";" // preserve comments
|
CASE Left( cLine, 1 ) == ";" // preserve comments
|
||||||
AAdd( CurrArray, { NIL, cLine } )
|
AAdd( CurrArray, { NIL, cLine } )
|
||||||
|
|
||||||
ELSE
|
OTHERWISE
|
||||||
IF ( nPos := At( "=", cLine ) ) > 0
|
IF ( nPos := At( "=", cLine ) ) > 0
|
||||||
cIdent := Left( cLine, nPos - 1 )
|
cIdent := Left( cLine, nPos - 1 )
|
||||||
cLine := SubStr( cLine, nPos + 1 )
|
cLine := SubStr( cLine, nPos + 1 )
|
||||||
@@ -127,10 +128,9 @@ METHOD New( cFileName ) CLASS TIniFile
|
|||||||
ELSE
|
ELSE
|
||||||
AAdd( CurrArray, { cLine, "" } )
|
AAdd( CurrArray, { cLine, "" } )
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDIF
|
ENDCASE
|
||||||
cLine := "" // to stop prepend later on
|
cLine := "" // to stop prepend later on
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
ELSE
|
ELSE
|
||||||
cLine := cFile
|
cLine := cFile
|
||||||
cFile := ""
|
cFile := ""
|
||||||
@@ -202,7 +202,6 @@ METHOD PROCEDURE WriteString( cSection, cIdent, cString ) CLASS TIniFile
|
|||||||
ELSE
|
ELSE
|
||||||
AAdd( ::Contents[ i ][ 2 ], { cIdent, cString } )
|
AAdd( ::Contents[ i ][ 2 ], { cIdent, cString } )
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
ELSE
|
ELSE
|
||||||
AAdd( ::Contents, { cSection, { { cIdent, cString } } } )
|
AAdd( ::Contents, { cSection, { { cIdent, cString } } } )
|
||||||
ENDIF
|
ENDIF
|
||||||
@@ -211,7 +210,6 @@ METHOD PROCEDURE WriteString( cSection, cIdent, cString ) CLASS TIniFile
|
|||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
METHOD ReadNumber( cSection, cIdent, nDefault ) CLASS TIniFile
|
METHOD ReadNumber( cSection, cIdent, nDefault ) CLASS TIniFile
|
||||||
|
|
||||||
RETURN Val( ::ReadString( cSection, cIdent, Str( nDefault ) ) )
|
RETURN Val( ::ReadString( cSection, cIdent, Str( nDefault ) ) )
|
||||||
|
|
||||||
METHOD PROCEDURE WriteNumber( cSection, cIdent, nNumber ) CLASS TIniFile
|
METHOD PROCEDURE WriteNumber( cSection, cIdent, nNumber ) CLASS TIniFile
|
||||||
@@ -221,7 +219,6 @@ METHOD PROCEDURE WriteNumber( cSection, cIdent, nNumber ) CLASS TIniFile
|
|||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
METHOD ReadDate( cSection, cIdent, dDefault ) CLASS TIniFile
|
METHOD ReadDate( cSection, cIdent, dDefault ) CLASS TIniFile
|
||||||
|
|
||||||
RETURN hb_SToD( ::ReadString( cSection, cIdent, DToS( dDefault ) ) )
|
RETURN hb_SToD( ::ReadString( cSection, cIdent, DToS( dDefault ) ) )
|
||||||
|
|
||||||
METHOD PROCEDURE WriteDate( cSection, cIdent, dDate ) CLASS TIniFile
|
METHOD PROCEDURE WriteDate( cSection, cIdent, dDate ) CLASS TIniFile
|
||||||
@@ -252,7 +249,6 @@ METHOD PROCEDURE DeleteKey( cSection, cIdent ) CLASS TIniFile
|
|||||||
IF i > 0
|
IF i > 0
|
||||||
cIdent := Lower( cIdent )
|
cIdent := Lower( cIdent )
|
||||||
j := AScan( ::Contents[ i ][ 2 ], {| x | HB_ISSTRING( x[ 1 ] ) .AND. Lower( x[ 1 ] ) == cIdent } )
|
j := AScan( ::Contents[ i ][ 2 ], {| x | HB_ISSTRING( x[ 1 ] ) .AND. Lower( x[ 1 ] ) == cIdent } )
|
||||||
|
|
||||||
hb_ADel( ::Contents[ i ][ 2 ], j, .T. )
|
hb_ADel( ::Contents[ i ][ 2 ], j, .T. )
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
@@ -266,7 +262,6 @@ METHOD PROCEDURE EraseSection( cSection ) CLASS TIniFile
|
|||||||
DO WHILE ( i := AScan( ::Contents, {| x | HB_ISSTRING( x[ 1 ] ) .AND. HB_ISSTRING( x[ 2 ] ) } ) ) > 0
|
DO WHILE ( i := AScan( ::Contents, {| x | HB_ISSTRING( x[ 1 ] ) .AND. HB_ISSTRING( x[ 2 ] ) } ) ) > 0
|
||||||
hb_ADel( ::Contents, i, .T. )
|
hb_ADel( ::Contents, i, .T. )
|
||||||
ENDDO
|
ENDDO
|
||||||
|
|
||||||
ELSE
|
ELSE
|
||||||
cSection := Lower( cSection )
|
cSection := Lower( cSection )
|
||||||
IF ( i := AScan( ::Contents, {| x | HB_ISSTRING( x[ 1 ] ) .AND. Lower( x[ 1 ] ) == cSection .AND. HB_ISARRAY( x[ 2 ] ) } ) ) > 0
|
IF ( i := AScan( ::Contents, {| x | HB_ISSTRING( x[ 1 ] ) .AND. Lower( x[ 1 ] ) == cSection .AND. HB_ISARRAY( x[ 2 ] ) } ) ) > 0
|
||||||
@@ -286,13 +281,11 @@ METHOD ReadSection( cSection ) CLASS TIniFile
|
|||||||
AAdd( aSection, ::Contents[ i ][ 1 ] )
|
AAdd( aSection, ::Contents[ i ][ 1 ] )
|
||||||
ENDIF
|
ENDIF
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
ELSE
|
ELSE
|
||||||
cSection := Lower( cSection )
|
cSection := Lower( cSection )
|
||||||
IF ( i := AScan( ::Contents, {| x | HB_ISSTRING( x[ 1 ] ) .AND. x[ 1 ] == cSection .AND. HB_ISARRAY( x[ 2 ] ) } ) ) > 0
|
IF ( i := AScan( ::Contents, {| x | HB_ISSTRING( x[ 1 ] ) .AND. x[ 1 ] == cSection .AND. HB_ISARRAY( x[ 2 ] ) } ) ) > 0
|
||||||
|
|
||||||
FOR j := 1 TO Len( ::Contents[ i ][ 2 ] )
|
FOR j := 1 TO Len( ::Contents[ i ][ 2 ] )
|
||||||
|
|
||||||
IF ::Contents[ i ][ 2 ][ j ][ 1 ] != NIL
|
IF ::Contents[ i ][ 2 ][ j ][ 1 ] != NIL
|
||||||
AAdd( aSection, ::Contents[ i ][ 2 ][ j ][ 1 ] )
|
AAdd( aSection, ::Contents[ i ][ 2 ][ j ][ 1 ] )
|
||||||
ENDIF
|
ENDIF
|
||||||
@@ -307,7 +300,6 @@ METHOD ReadSections() CLASS TIniFile
|
|||||||
LOCAL i, aSections := {}
|
LOCAL i, aSections := {}
|
||||||
|
|
||||||
FOR i := 1 TO Len( ::Contents )
|
FOR i := 1 TO Len( ::Contents )
|
||||||
|
|
||||||
IF HB_ISARRAY( ::Contents[ i ][ 2 ] )
|
IF HB_ISARRAY( ::Contents[ i ][ 2 ] )
|
||||||
AAdd( aSections, ::Contents[ i ][ 1 ] )
|
AAdd( aSections, ::Contents[ i ][ 1 ] )
|
||||||
ENDIF
|
ENDIF
|
||||||