*** empty log message ***

This commit is contained in:
Antonio Linares
1999-10-16 07:08:52 +00:00
parent 2ec528357d
commit 5629a13879
5 changed files with 154 additions and 17 deletions

View File

@@ -1,3 +1,15 @@
19991016-08:52 GMT+1 Antonio Linares <alinares@fivetech.com>
+ source/rtl/browse.prg
+ New function Browse() added
(early prototype. Still some missing functionality).
* source/rtl/dummy.prg
- function Browse() removed.
* makefile.b32
+ added browse.prg
(warning I have not updated other makefiles!)
+ tests/testbrdb.prg
+ New sample added.
19991016-00:10 EDT David G. Holm <dholm@jsd-llc.com>
* doc/gmake.txt
@@ -53,7 +65,7 @@
Right Ctrl adds 4096, Left Alt adds 8192, and Right Alt adds
16,384. Normal keys are in the range 0 to 255. A value that
is larger than 255 represents an extended key. All state keys
generate key codes. Use the test program INKEYTST with two
generate key codes. Use the test program INKEYTST with two
parameters (such as S and X) to display the codes. NOTE 2: This
is just an experiment to see if allowing Harbour to get all
key codes when run under Windows is a good idea. NOTE 3: If
@@ -67,17 +79,17 @@
Fri Oct 15 16:42:30 1999 Gonzalo A. Diethelm <Gonzalo.Diethelm@jda.cl>
* config/lib.cf:
* source/debug/Makefile:
* source/pp/Makefile:
* source/rdd/Makefile:
* source/rdd/dbfcdx/Makefile:
* source/rdd/dbfntx/Makefile:
* source/rdd/nulsys/Makefile:
* source/rtl/Makefile:
* source/runner/Makefile:
* source/tools/Makefile:
* source/vm/Makefile:
* config/lib.cf:
* source/debug/Makefile:
* source/pp/Makefile:
* source/rdd/Makefile:
* source/rdd/dbfcdx/Makefile:
* source/rdd/dbfntx/Makefile:
* source/rdd/nulsys/Makefile:
* source/rtl/Makefile:
* source/runner/Makefile:
* source/tools/Makefile:
* source/vm/Makefile:
Now Makefiles that will create a library use LIBNAME for the
library's name; the LIB variable is not used anymore, so it will
not conflict with the widely used environment variable with that
@@ -105,7 +117,7 @@ Fri Oct 15 16:42:30 1999 Gonzalo A. Diethelm <Gonzalo.Diethelm@jda.cl>
Thu Oct 14 17:29:32 1999 Gonzalo A. Diethelm <Gonzalo.Diethelm@jda.cl>
* source/rtl/dates.c:
* source/rtl/dates.c:
Fixed an include guard so that HB_DONT_DEFINE_BASIC_TYPES is
defined for both gcc and mingw32.

View File

@@ -24,7 +24,7 @@
PROJECT: harbour.exe harbour.lib lib\b32\terminal.lib lib\b32\termwin.lib
harbour.lib : achoice.obj adir.obj alert.obj arrays.obj asort.obj \
browdb.obj classes.obj codebloc.obj copyfile.obj \
browdb.obj browse.obj classes.obj codebloc.obj copyfile.obj \
dates.obj dates2.obj datesx.obj debug.obj debugger.obj \
descend.obj devoutp.obj dir.obj do.obj dynsym.obj dummy.obj \
environ.obj fieldbl.obj cmdarg.obj errorapi.obj errorsys.obj \
@@ -48,6 +48,7 @@ alert.obj : alert.c extend.h hbdefs.h
arrays.obj : arrays.c extend.h hbdefs.h
asort.obj : asort.c extend.h hbdefs.h
browdb.obj : browdb.c extend.h hbdefs.h
browse.obj : browse.c extend.h hbdefs.h
classes.obj : classes.c extend.h hbdefs.h
cmdarg.obj : cmdarg.c extend.h hbdefs.h
codebloc.obj : codebloc.c extend.h hbdefs.h
@@ -122,10 +123,10 @@ adir.c : adir.prg harbour.exe
alert.c : alert.prg harbour.exe
asort.c : asort.prg harbour.exe
browdb.c : browdb.prg harbour.exe
browse.c : browse.prg harbour.exe
debugger.c : debugger.prg harbour.exe
devoutp.c : devoutp.prg harbour.exe
dummy.c : dummy.prg harbour.exe
terror.c : terror.prg harbour.exe
errorsys.c : errorsys.prg harbour.exe
fieldbl.c : fieldbl.prg harbour.exe
fileread.c : fileread.prg harbour.exe
@@ -140,6 +141,7 @@ stringp.c : stringp.prg harbour.exe
tbcolumn.c : tbcolumn.prg harbour.exe
tbrowse.c : tbrowse.prg harbour.exe
tclass.c : tclass.prg harbour.exe
terror.c : terror.prg harbour.exe
tget.c : tget.prg harbour.exe
tgetlist.c : tgetlist.prg harbour.exe
readvar.c : readvar.prg harbour.exe

View File

@@ -0,0 +1,110 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Quick Clipper Browse()
*
* Copyright 1999 Antonio Linares <alinares@fivetech.com>
* www - http://www.harbour-project.org
*
* 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 of the License, or
* (at your option) any later version, with one exception:
*
* The exception is that if you link the Harbour Runtime Library (HRL)
* and/or the Harbour Virtual Machine (HVM) 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 HRL
* and/or HVM code into it.
*
* 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; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
* their web site at http://www.gnu.org/).
*
*/
#include "box.ch"
#include "common.ch"
#include "inkey.ch"
function Browse( nTop, nLeft, nBottom, nRight )
local oBrw
local cOldScreen
local n, nKey, nOldCursor
local lExit := .f.
if ! Used()
return .f.
end
DEFAULT nTop TO 1, nLeft TO 0, nBottom TO MaxRow(), nRight TO MaxCol()
nOldCursor = SetCursor( 0 )
cOldScreen = SaveScreen( nTop, nLeft, nBottom, nRight )
@ nTop, nLeft, nBottom, nRight BOX B_DOUBLE
oBrw = TBrowseDb( nTop + 1, nLeft + 1, nBottom - 1, nRight - 1 )
oBrw:HeadSep = Chr( 205 )
for n = 1 to FCount()
oBrw:AddColumn( TbColumnNew( FieldName( n ), FieldBlock( FieldName( n ) ) ) )
next
while ! lExit
oBrw:ForceStable()
nKey = InKey( 0 )
do case
case nKey == K_ESC
lExit = .t.
case nKey == K_UP
oBrw:Up()
case nKey == K_DOWN
oBrw:Down()
case nKey == K_END
oBrw:End()
case nKey == K_HOME
oBrw:Home()
case nKey == K_LEFT
oBrw:Left()
case nKey == K_RIGHT
oBrw:Right()
case nKey == K_PGUP
oBrw:PageUp()
case nKey == K_PGDN
oBrw:PageDown()
case nKey == K_CTRL_PGUP
oBrw:GoTop()
case nKey == K_CTRL_PGDN
oBrw:GoBottom()
endcase
end
RestScreen( nTop, nLeft, nBottom, nRight, cOldScreen )
SetCursor( nOldCursor )
return .t.

View File

@@ -77,7 +77,6 @@ FUNCTION __dbTotal() ; RETURN NIL
FUNCTION __dbUpdate() ; RETURN NIL
FUNCTION __dbZap() ; RETURN NIL
FUNCTION Browse() ; RETURN .T.
FUNCTION dbEdit() ; RETURN NIL
FUNCTION IsPrinter() ; RETURN .T.
FUNCTION NetName() ; RETURN ""
@@ -97,4 +96,3 @@ FUNCTION ReadKill() ; RETURN .F.
FUNCTION ReadUpdated() ; RETURN .T.
FUNCTION Updated() ; RETURN .T.
FUNCTION __SetFormat() ; RETURN NIL

View File

@@ -0,0 +1,15 @@
/*
* $Id$
*/
// Testing Browse()
function Main()
SET COLOR TO "W+/B"
CLS
USE Test
Browse()
return nil