
BrowseMan
A Linkable tBrowse Painter for Clipper 5




Copyright (c) 1993 Rhino Publishing Ltd
All Rights Reserve



SOFTWARE LICENCE AGREEMENT
1.	Definitions
"Software" shall  mean the computer programs contained in the disks in this package, together with any updates subsequently provided by Rhino 
Publishing Ltd.
The term  "Documentation" shall mean all of the printed materials provided in this package or later supplied by Rhino Publishing Ltd.
"Software Copies" shall mean any actual copies or any portion of the computer programs and shall include partial or merged copies as permitted 
within this licence agreement or later supplied by Rhino Publishing Ltd, updates and back-ups.
2.	Licence
Rhino Publishing Ltd agrees to grant the user a non-exclusive and non-transferable licence to use the Software contained herein for internal purposes 
only. The rights granted herein are limited to use of the Software, Software Copies and Documentation as defined within the agreement. All rights not 
specifically granted in this licence are reserved by Rhino Publishing Ltd.
3.		Permitted Uses
The licensee may use the Software in the following ways:
-	Load the Software into RAM and use it on a single workstation or terminal.
-	Install the Software onto a permanent storage device
-	a hard or fixed disk drive.
-	Make up to three (3) back-up copies of the Software.
These copies are for back-up purposes only and the licensee must keep possession of them at all times. Where back-up copies are created, all 
information that appears on the original disk labels must be copied onto the back-up labels. This includes the copyright notice.
-	Modify the Software, merge it into another program or incorporate and distribute it in any standard Clipper executable files which you are 
then at liberty to distribute.
-	Copy the programs' source code in printed form for the purpose of modification and support in your use of the Software. The licensee must 
keep possession of the print-out at all times.
4. Prohibited Uses
You may not:
-	Use this Software across a network. Each programmer must be an original licensee i.e. he must purchase his own copy of the product.
5. Limitations
This licence grants the user limited rights to use the Software, Software Copies and Documentation as expressly provided in this licence. Rhino 
Publishing Ltd retains title to all the Software, Software Copies and Documentation. The licensee may not distribute copies of the Software or 
Documentation to others.
The licensee agrees to protect the Software, Software Copies, Documentation and source code from unauthorised publication, use, reproduction or 
distribution. Under no circumstances must you attempt to rewrite, decompile, disassemble or reverse-engineer any of the object modules. Rhino 
Publishing Ltd retains title to the source code at all times. Modification or rewriting of the source code does not give you rights of ownership. You 
may only own your source code by starting from scratch and writing your own original code.
Any Rhino Publishing Ltd proprietary right notices must not be obscured.
All rights not specifically granted in this licence are reserved by Rhino Publishing Ltd.
6. Term
This licence is effective from the day you open the package and use the Software and Documentation contained therein. It continues for twenty-five 
(25) years or until you destroy the entire contents of this package and any Software Copies.
This licence will terminate if the licensee fails to comply with any term or condition of the agreement. Upon such breach, Rhino Publishing Ltd 
reserves the right to terminate the licence upon notification in writing and to seek the remedies of injunction and other equitable relief in addition to 
any other remedies which may be available to the Company. Upon termination, the licensee will be required to return all copies of the Software and 
Documentation to Rhino Publishing Ltd. In these circumstances the licensee will not be entitled to any refund for amounts paid for the Software.
7. Limited Warranty
Rhino Publishing Ltd warrants to the original licensee that disks on which the computer programs are recorded are free from defects in workmanship 
and materials under normal use and service for a period of ninety (90) days from the date of delivery as evidenced by a copy of your receipt or 
invoice. Rhino Publishing Ltd's entire liability and your exclusive remedy shall be replacement of the disk not meeting Rhino Publishing Ltd's limited 
warranty and which is returned to Rhino Publishing Ltd with a copy of your dated receipt or invoice. If failure of the disk(s) has resulted from 
misapplication of the product, accident, abuse, unauthorised modification or theft, then Rhino Publishing Ltd shall have no responsibility to replace 
the disk(s) under this limited warranty.
Entire risk as to the results and performance of the program shall be assumed by the licensee. Should the program prove defective, the licensee shall 
assume the entire cost of all necessary servicing, repair or correction. Should a disk become damaged during the warranty period, Rhino Publishing 
Ltd will replace it for a replacement fee of 10.00. To replace a disk damaged by the customer during the warranty period, please send the disk itself, 
a copy of your dated receipt or invoice indicating proof of purchase and a cheque for 10.00 to:-
Rhino Publishing Limited
PO Box 255, Doncaster, DN4 7AW, England.
The licensee must insure or assume the risk of loss or damage in transit to any defective item being returned.
8. Other Limitations
EXCEPT AS SET OUT ABOVE, RHINO PUBLISHING LTD DOES NOT WARRANT, GUARANTEE OR MAKE ANY REPRESENTATION 
REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THE PROGRAM IN TERMS OF, ACCURACY, RELIABILITY, 
CORRECTNESS OR OTHERWISE. THE LICENSEE RELIES ON THE PROGRAM AND ITS RESULTS SOLELY AT HIS OWN RISK. THE 
ABOVE IS THE ONLY WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
IMPLIED WARRANTIES OF THE MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THAT IS MADE BY Rhino 
Publishing Ltd ON THIS PRODUCT.
NEITHER RHINO PUBLISHING LTD NOR THEIR AGENTS SHALL BE LIABLE FOR SPECIAL, CONSEQUENTIAL, INDIRECT OR 
OTHER SIMILAR DAMAGES, EVEN IF THEY HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
In no event shall our liability for any damages to you or any other person exceed the price paid for the licence to use the software, regardless of any 
form of the claim.
Additional statements by agents, employees, distributors or dealers of Rhino Publishing Ltd do not constitute warranties or conditions by Rhino 
Publishing Ltd, are not binding upon Rhino Publishing Ltd and should not be relied upon.

This agreement shall be governed by the laws of England and Wales.

You acknowledge that you have read this Agreement, understand it and agree to be bound by its terms and conditions. Furthermore, you agree that 
this is the complete and exclusive statement of Agreement between us and supersedes all prior Agreements, verbal or written, any proposals and other 
communications between us relating to the subject matter in this Agreement.


Contents

1.	Installation and on-line help (F1)	1
2.	Introduction	1
3.	Compiling and Linking	1
4.	Supplied Sample and Tutorial	2
5.	Commands	3
5.1.	BROWSE <cBrowse> [AT <t>,<l>,<b>,<r>]	3
5.2.	SET BROWSE PATH TO [<path>]	4
5.3.	SET BROWSE ENVIRONMENT TO [<myvar>]	4
6.	Functions	5
6.1.	BrowseManager( <cBrowse>,<t>,<l>,<b>,<r> )	5
6.2.	BrowseEnv( [<myvar>] )	5
6.3.	BrowsePath( [<path>] )	6
7.	Implementation Details	6
7.1.	BARMENU.PRG: BarMenu	6
7.2.	BBROWSE.PRG: BMBrowse	6
7.2.1.	Additional Methods	7
7.2.1.1.	InitDB( t, l, b, r )	7
7.2.1.2.	InitNew( t, l, b, r )	7
7.2.1.3.	goBottomSet( cBlock, bBlock )	7
7.2.1.4.	goTopSet( cBlock, bBlock )	8
7.2.1.5.	skipSet( cBlock, bBlock )	8
7.2.1.6.	sizeLeft( )	9
7.2.1.7.	sizeRight( )	9
7.2.1.8.	sizeUp( )	9
7.2.1.9.	sizeDown( )	10
7.2.1.10.	Alternate( )	10
7.2.1.11.	moveUp( )	10
7.2.1.12.	moveDown( )	11
7.2.1.13.	moveRight( )	11
7.2.1.14.	moveLeft( )	11
7.2.1.15.	MoveColLeft( nCol )	11
7.2.1.16.	MoveColRight( nCol )	12
7.2.1.17.	SetColours( )	12
7.2.1.18.	SetKey( nElement, nValue )	12
7.2.1.19.	AddAction( x )	13
7.2.1.20.	InsAction( x, nPos )	13
7.2.1.21.	SetAction( nPos, x )	14
7.2.1.22.	DelAction( nPos )	14
7.2.1.23.	SaveBack( )	15
7.2.1.24.	RestBack( )	15
7.2.1.25.	Cut( )	15
7.2.1.26.	Copy( )	16
7.2.1.27.	Paste( insert )	16
7.2.1.28.	SaveSet( )	16
7.2.1.29.	RestSet( a )	17
7.2.2.	Additional Instance variables	17
7.2.2.1.	Name	17
7.2.2.2.	eTop, eLeft, eBottom, eRight	17
7.2.2.3.	Border	17
7.2.2.4.	holder	17
7.2.2.5.	KeyMap	17
7.2.2.6.	ReDrawFrame	17
7.2.2.7.	ReDoActions	17
7.2.2.8.	BackScreen	18
7.2.2.9.	Actions	18
7.2.2.10.	cGoBottom	18
7.2.2.11.	cGoTop	18
7.2.2.12.	cSkip	18
7.2.2.13.	Blink	18
7.2.3.	Key Map Table	18
7.3.	BCOLUMN.PRG: BMColumn	18
7.3.1.	Additional Methods	19
7.3.1.1.	init( cHeading, xBlock )	19
7.3.1.2.	configure()	19
7.3.1.3.	sizeLeft( qty )	19
7.3.1.4.	sizeRight( qty )	20
7.3.1.5.	setBlock( cBlock, bBlock )	20
7.3.2.	Additional Instance variables	20
7.3.2.1.	cBlock	20
7.3.2.2.	cColor	20
7.4.	BOXMENU.PRG: BoxMenu	21
7.5.	MPROMPT.PRG: Prompt and MenuLine	21
8.	Technical Support	21


1.	Installation and on-line help (F1)
Installation is very easy.
o	Copy the BrowseMan disk along with its sub directories to a new sub directory.
o	Copy the LIB files to your library directory OR add the new LIB directory to your LIB 
environment variable.
o	Copy the supplied BM.CH and BMKEYMAP.CH files ( found in the new INCLUDE directory ) 
to your include directory OR add the new INCLUDE directory to the INCLUDE environment 
variable.
o	Copy the supplied Norton Guides (in the new NG directory) to your NG directory.
The software is now installed.
We have supplied on-line help for the design version of BrowseMan, this on-line help is data driven, the help file 
is supplied in DBF format in the files "bmhelp.dbf" and "bmhelp.dbt". We have placed these files in the sample 
directory. This makes running the tutorial easier as you may hit the <F1> at any time for on-line help.
For your applications to find these files you must use the command "Set browse help <x>" command, see the 
command section of this manual for more details. You may want to copy these files elsewhere, the choice is yours.
2.	Introduction
BrowseMan has grown from a Clipper Developers conference titled "writing a tBrowse painter in tBrowse". The 
main goal of BrowseMan is to remove the need to ever manually paint another tBrowse window again. 
BrowseMan has enhanced the built in tBrowse object by adding moving and sizing methods, along with methods 
to help save and restore itself from disk. 
BrowseMan consists of two library files, bmDesign.lib, a design version and bmRun.lib, a run time version. It also 
comes with complete source code for programmers wishing to see "behind the scenes", although knoweldge at this 
level is not required to use BrowseMan.
While we have supplied on-line guides to the internal implementation of BrowseMan, it should be noted that a 
technical knowledge at this level is not required to use BrowseMan. If you spend hours tracing the source code (of 
BrowseMan) trying to figure out implementation details you will waste valuable application development time. 
BrowseMan comes with a run time version of OODLES, OODLES is a full object oriented extension to Clipper 5. 
If you wish to rebuild BrowseMan, perhaps to add even more features, you will require OODLES to recompile the 
source code containing class definitions. Any other changes can be made without the need to purchase OODLES.
3.	Compiling and Linking
Several user defined commands have been implemented for BrowseMan (see Command section of this manual). 
For these to work you must use the pre-processor directive "#include bm.ch". This include file must be available to 
the compiler when compiling (as with any other include file), see installation instructions.
When linking your applications you have a choice of libraries. A run time only library (called bmRun.lib) which 
has no design abilities. This is used when you have completed designing the application. There is also the Design 
version (called bmDesign.lib).
To link using the bmDesign library (free format syntax):
	rtlink fi yourapp lib bmDesign
To link using the run time library:
	rtlink fi yourApp lib bmRun

If you have a full copy of OODLES, make sure that the library OODLES.LIB appears before either of these 
libraries.
Example:
	rtlink fi yourApp lib oodles, bmdesign
Failure to do this will cause your own objects to fail with a "Run Time version of OODLES; please Purchase the 
full version ..." error message.
4.	Supplied Sample and Tutorial
There is a sample directory containing a test program "test.prg".
After installation, change to this directory and build the sample program.
	rmake test  
This compiles and links two versions of the test program. TestDes.exe, a design version of test and TestRun.exe, a 
run time version of test.
Next run the testDes version. It takes two parameters, the name of a data table and the name of a browseMan file 
(a .BM extension). We will use the supplied people.dbf file.

	testDes people people

At present there is no browseMan file called "people.bm", this causes a BrowseMan to prompt for a style:-
<1> For your own Browse     -    <2> a DBEDIT style browse
We will choose <2>, for a DBEDIT style Browse. This creates a column object for each field in the current work 
area. It also creates column headers and seperators.

Next we will move into the BrowseMan menu system. We have designed this to be non-intrusive,  it does not use a 
SETKEY. The menu system looks at the alt key to see if it has been pressed. If it has it starts the BrowseMan 
menu. So keep the ALT key pressed until the menu appears.
If you release the alt key the menu disappears. Release and press the ALT key a few times, just to get used to it.
To pick one of the options keep the ALT keep depressed and hit one of the highlighted letters. Pick the Browse 
menu. Once the pull down menu has been selected it is not nessasary to keep the ALT key depressed, so release it.
Next, pick the Edit Browse Definition.
Use the cursor keys to move down to the Border Frame option.
At this point you will notice a sample browse to the right of the option. Move the cursor left and right to see which 
character you are filling in. See the @ BOX command for more information on the box drawing characters. Press 
the <F6> key for a fast way of drawing boxes. Remeber you may hit <F1> for on-line help at any time. The last 
character of the BOX command is not used (Character 9, the fill character) plus there are also four extra 
characters at the end which are the join characters for the header and footer.
When you have created the box filling characters hit return until the Edit Browse Definition is complete. At this 
point you are prompted with several choices regarding the columns. Choose <1> to ignore duplicates.
You should now have a border around you browse object.
Next Size the Browse Object:
	Choose the Browse option on the main menu.
	Choose the Size option.
	Use the cursor keys to size the Object. At any time you may press the space bar to see the results of the size. 
Hit return to finish the sizing.
Next Move the Browse Object:
	Choose the Browse option on the main menu.
	Choose the Move option.
	Use the cursor keys to move the object.

Next we will save the browse Object:
	Choose the Disk option on the main menu.
	Choose the save option.

Next quit the test program by pressing ESC.

You have now created and painted you first BrowseMan object. There should now be the file "people.bm" in the 
sample directory.

Next, restart the testDes program:
	testDes people people
This time instead of asking for a style, it loads the previously created browseMan object.
Next, try moving a column.
	Choose Column from the main menu.
	Choose the Move option. Use the cursor keys to move the Column around. Hit return to fisnish.
Next, resave the Object.  quit and restart. It has remembered the latest changes.
Next we will create a new column.
	Choose the Column option on the main menu.
	Choose the Add option.
	Enter the expression RECNO( ) without quotation marks, enter "recNo" s the description and hit return until 
the Add Column screen is completed (or hit control -W to save).
You now have a new column, save the Object.
next, we will generate some tBrowse code.
	Choose the Generate option from the main menu.
	Choose the TBrowse option.
	Hit return to the prompts.
You have now generated a "people.prg", which is the TBrowse equivalent to the BrowseMan Object. 
5.	Commands
5.1.	BROWSE <cBrowse> [AT <t>,<l>,<b>,<r>] 
Start a Browse at optional coordinates
Syntax
BROWSE <cBrowse> [AT <t>,<l>,<b>,<r>] 

Arguments
<cBrowse>	is the name of the browse
<t>	A Numeric representing the top row of the browse
<l>	A Numeric representing the left hand column of the browse
<b>	A Numeric representing the bottom row of the column
<r>	A Numeric representing the right hand column of the browse
Description
Load and execute the named browse. If one is not present on the disk the user may create their own or start with a 
DBEDIT style browse.
This command maps onto the function BrowseManager( ).
Example:
#include "bm.ch"
...
Browse fred at 5, 5, 20 , 60

See Also:
BrowseManager( )

5.2.	SET BROWSE PATH TO [<path>]
set the browse path
Syntax
SET BROWSE PATH TO [<path>]

Arguments
<path>	The directory where browse files may be found if not in the current directory.

Description
Set the Browse path for browse files if not in the current directory. This allows you to hold the browse files in a 
seperate directory to the data files.

Example:
#include "bm.ch"
...
Set Browse Path to \myapp\browman

See Also:
BrowsePath( )
5.3.	SET BROWSE ENVIRONMENT TO [<myvar>] 
Choose the Browse Environment Variable.
Syntax
SET BROWSE ENVIRONMENT TO [<myvar>] 
Arguments
<myvar>	is a Character string representing the name of the Browse manager Environment variable. 

Description
An environment variable is used by BrowseMan to define the path for the BrowseMan files. This command allows 
you to choose your own DOS browseMan environement variable.
Example:
#include "bm.ch"
...
// SET myBrowse=<path> at DOS
set browse environment to myBrowse
// now the files will be loaded from the directory contained in the myBrowse environmentvariable

See Also:
BrowseEnv( )
6.	Functions
6.1.	BrowseManager( <cBrowse>,<t>,<l>,<b>,<r> )
Start a Browse at optional coordinates
Syntax
browseManager(<cBrowse> [,<t>,<l>,<b>,<r>]  )
Arguments
<cBrowse>	is the name of the browse
<t>	A Numeric representing the top row of the browse
<l>	A Numeric representing the left hand column of the browse
<b>	A Numeric representing the bottom row of the column
<r>	A Numeric representing the right hand column of the browse

Description
Load and execute the named browse. If one is not present on the disk the user may create their own or start with a 
DBEDIT style browse.

Example:
browseMan( fred, 5, 5, 20 , 60 )

See Also:
Browse ... at ...
6.2.	BrowseEnv( [<myvar>] )
Choose the DOS browseMan environment.
Syntax
BrowseEnv( [<myvar>] )
Arguments
<myVar> is a character expression specifying the DOS environment variable.
Description
An environment variable is used by BrowseMan to define the path for the BrowseMan files. This command allows 
you to choose your own DOS browseMan environement variable.
Example:
browseEnv( "myBrowse")

See Also:
set browse envionment to 
6.3.	BrowsePath( [<path>] )
Set the browseMan file directory
Syntax
BrowsePath( [<path>] )
Arguments
<path> is an optional character representation of the path.
Description
When browseMan attempts to open a browseMan file it will also check the specified path if it is not in the present 
working directory.
Example:
BrowsePath( "\browMan\files")

See Also:
set Browse Path To
7.	Implementation Details
BrowseMan comes with complete source code plus a run time copy of OODLES. The folowing files contain class 
definitions (in OODLES).
Class definitions:-
File					Class
BARMENU.PRG:	BarMenu
BBROWSE.PRG:	BMBrowse
BCOLUMN.PRG:	BMColumn
BOXMENU.PRG:	BoxMenu
MPROMPT.PRG:	Prompt and MenuLine
There is also the EVENT.PRG file which drives the menu and prompt objects.
include files
MOUSEVEN.CH:	bit numbers for ALT, SHIFT and CONTROL keys (internal)
NEWMENU.CH:		commands for menu generation (internal)
SYSTEMS.CH:		Commands for pulling menus together (internal)
BM.CH:				commands for browseMan (See command section)
BMKEYMAP.CH:	keymap positions (See keymap section )
The main extension for the browseMan are the BBROWSE file, containing an extended tBrowse class and 
BCOLUMN, containing an extended TBColumn class. Both these classes need to be storable, that is, they may be 
saved to disk.
7.1.	BARMENU.PRG: BarMenu
BarMenu is used only in the painting section of BrowseMan. It may be used in your own applications but is 
supplied here purley as a supporting function. It is not in the runtime library of BrowseMan.
7.2.	BBROWSE.PRG: BMBrowse
BMBrowse is a derived class of the TBrowse class. It has all the characteristics of the TBrowse class plus some 
additional instance variables and additional methods. Several very useful extensions have been added; the ability 
to store itself to disk, sizing and moving and additional screen position to name a couple few. 
7.2.1.	Additional Methods
7.2.1.1.	InitDB( t, l, b, r )
Initialise the BBrowse object.
Syntax
oBrowse:InitDB( <t>, <l>, <b>, <r> )
Arguments
oBrowse is the object to initialise
<t> is a numeric describing the top row of the browse object.
<l> is a numeric describing the Left hand column of the browse object.
<b> is a numeric describing the bottom row of the browse object.
<r> is a numeric describing the right hand column of the browse object.
Description
InitDB( ) is identical to the TBrowse method TBrowseDB( ) method. It initialises the object with pre defined code 
blocks (and character representation of those code blocks) which know how to navigate a DBF table.
Example:
local oBM
oBM := initDB( 5, 5, 20, 60)	// coordinates 5, 5 to 20, 60

See Also:
The Clipper TBrowse method TBrowseDB( )

7.2.1.2.	InitNew( t, l, b, r )
Initialise the BBrowse object.
Syntax
oBrowse:InitNEW( <t>, <l>, <b>, <r> )
Arguments
oBrowse is the object to initialise
<t> is a numeric describing the top row of the browse object.
<l> is a numeric describing the Left hand column of the browse object.
<b> is a numeric describing the bottom row of the browse object.
<r> is a numeric describing the right hand column of the browse object.
Description
initNew( ) is identical to the TBrowse method TBrowseNEW( ) method. It initialises the object with no pre 
defined code blocks (or character representation of those code blocks) .
Example:
local oBM
oBM := initNEW( 5, 5, 20, 60)	// Coordinates 5, 5 to 20, 60
See Also:
The Clipper TBrowse method TBrowseDB( )
7.2.1.3.	goBottomSet( cBlock, bBlock )
Set the cGoBottom and goBottom instance variables
Syntax
oBrowse:goBottomSet( <cBlock> [, <bBlock>] )
Arguments
oBrowse is the object to set
<cBlock> is the character representation of the go bottom block
<bBlock> is the optional code block.
Description
It is important to ensure that the compiled code block and the character representation of the code block match. 
We have added the goBottomSet( ) method to ensure this. You may pass just the character representation of the 
goBottomBlock and this method will automatically compile and set the correct instance variables.
Example:
oBrowse:goBottomSet( "{ |n| myGoBottom( n ) }" )

See Also:
goTopSet( ), skipSet( )
7.2.1.4.	goTopSet( cBlock, bBlock )
Set the cGoTop and goTop instance variables
Syntax
oBrowse:goTopSet( <cBlock> [, <bBlock>] )
Arguments
oBrowse is the object to set
<cBlock> is the character representation of the go top block
<bBlock> is the optional code block.
Description
It is important to ensure that the compiled code block and the character representation of the code block match. 
We have added the goTopSet( ) method to ensure this. You may pass just the character representation of the 
goTopBlock and this method will automatically compile and set the correct instance variables.
Example:
oBrowse:goTopSet( "{ |n| myGoTop( n ) }" )

See Also:
goBottomSet( ), skipSet( )
7.2.1.5.	skipSet( cBlock, bBlock )

Syntax
oBrowse:skipSet( <cBlock> [, <bBlock>] )
Arguments
oBrowse is the object to set
<cBlock> is the character representation of the skip block
<bBlock> is the optional code block.
Description
It is important to ensure that the compiled code block and the character representation of the code block match. 
We have added the skipSet( ) method to ensure this. You may pass just the character representation of the 
goTopBlock and this method will automatically compile and set the correct instance variables.
Example:
oBrowse:skipSet( "{ |n| mySkipper( n ) }" )
See Also:
goBottomSet( ), goTopSet( )
7.2.1.6.	sizeLeft( )
Size the browse object left one character.
Syntax
oBrowse:sizeLeft( )
Arguments
None
Description
Size the browse object one character to the left. Repainting will occur on the next stabilisation. It is possible that 
one of the column object may dissappear from view as the browse window shrinks.
Example:
oBrowse:sizeLeft()
See Also:
sizeRight( ), sizeUp( ), sizeDown( )
7.2.1.7.	sizeRight( )
Size the browse object left one character.
Syntax
oBrowse:sizeRight( )
Arguments
None
Description
Size the browse object one character to the left. Repainting will occur on the next stabilisation. It is possible that 
an additional column object may appear as the browse window grows.
Example:
oBrowse:sizeRight()
See Also:
sizeLeft( ), sizeUp( ), sizeDown( )
7.2.1.8.	sizeUp( )
Size the browse object up one line.
Syntax
oBrowse:sizeUp( )
Arguments
None
Description
Raise the bottom row up one line. The bottom row of the browse data will disappear and the browse object is 
repainted on the next stabilise. 
Example:
oBrowse:sizeUp()
See Also:
sizeDown( ), sizeLeft( ), sizeRight( )
7.2.1.9.	sizeDown( )
Size the browse object down one line.
Syntax
oBrowse:sizeDown( )
Arguments
None
Description
lower the bottom row of the browse object by one line. An additional row of data will appear. BrowseMan will not 
allow a browse larger than the screen coordinates.
Example:
oBrowse:sizeDown()
See Also:
sizeUp( ), sizeLeft( ), sizeRight( )
7.2.1.10.	Alternate( )
Switch the browse object between the alternate screen coordinates
Syntax
oBrowse:alternate( )
Arguments
None
Description
A BBrowse object contains two set of display coordinates. This method allows the programmer to toggle between 
them.
Example:
oBrowse:alternate()
See Also:

Note:
When useing the sizing/moving/aternate or configure methods you must remember to call the saveback() method 
first.
7.2.1.11.	moveUp( )
Move the browse object up one line
Syntax
oBrowse:moveUp( )
Arguments
None
Description
Move the browse object up one line. Repainting will occur on the next stabilise. BrowseMan will not allow the 
object to be move outside of the screen coordinates.
Example:
oBrowse:moveUp()
See Also:
moveDown( ), moveRight( ), moveLeft( )

7.2.1.12.	moveDown( )
Move the browse object down one line
Syntax
oBrowse:moveDown( )
Arguments
None
Description
Move the browse object down one line. Repainting will occur on the next stabilise. BrowseMan will not allow the 
object to be move outside of the screen coordinates.
Example:
oBrowse:moveDown()
See Also:
moveUp( ), moveRight( ), moveLeft( )
7.2.1.13.	moveRight( )
Move the browse object right one column
Syntax
oBrowse:moveRight( )
Arguments
None
Description
Move the browse object right one column. Repainting will occur on the next stabilise. BrowseMan will not allow 
the object to be move outside of the screen coordinates.
Example:
oBrowse:moveRight()
See Also:
moveUp( ), moveDown( ), moveLeft( )
7.2.1.14.	moveLeft( )
Move the browse object left one column
Syntax
oBrowse:moveLeft( )
Arguments
None
Description
Move the browse object left one column. Repainting will occur on the next stabilise. BrowseMan will not allow the 
object to be move outside of the screen coordinates.
Example:
oBrowse:moveLeft()
See Also:
moveUp( ), moveDown( ), moveRight( )
7.2.1.15.	MoveColLeft( nCol )
Move a column left one column position within the browse
Syntax
oBrowse:moveColLeft( [<nCol>] )
Arguments
oBrowse is the object to act on.
<nCol> is the optional column number to move. It defaults to the current column.
Description
Either the current column object or a specified column is moved to the left one position within the browse object. 
So column number 5 would be column number 4 and the original column number 4 would become the new 
column number 5. 
Example:
oBrowse:moveColLeft()

See Also:
moveColRight( )
7.2.1.16.	MoveColRight( nCol )
Move a column right one column position within the browse
Syntax
oBrowse:moveColRight( [<nCol>] )
Arguments
oBrowse is the object to act on.
<nCol> is the optional column number to move. It defaults to the current column.
Description
Either the current column object or a specified column is moved to the right one position within the browse object. 
So, column number 4 would be column number 5 and the original column number 5 becomes the new column 
number 4. 
Example:
oBrowse:moveColRight()

See Also:
moveColLeft( )
7.2.1.17.	SetColours( )
Set up the internal colour tables based on the colorSpec instance variable.
Syntax
oBrowse:setColours( )
Arguments
None
Description
Set up the internal colour tables based on the colorSpec instance variable.
Example:
oBrowse:setColours( )

See Also:

7.2.1.18.	SetKey( nElement, nValue )
Associate a key value with one of the key table entries.
Syntax
oBrowse:setkey( <nElement>, <nValue> )
Arguments
<nElement> is the array element describing the internal key map. It must be between 1 and 16.
<nValue> is the key number to associate with this element.
Description
Associate a key value with one of the key map table entries. The key map table allows keys to be associated with 
actions. 
Example:
#include "bmkeymap.ch"
...
oBrowse:setKey( BMK_LEFT, 65 )		// make the character 'A' the 
move left key.

See Also:
Key Map Table
7.2.1.19.	AddAction( x )
Add an action block to the array of actions
Syntax
oBrowse:addAction ( <bAction> )
Arguments
oBrowse is the object to act on.
<bAction> is the code block to add to the array of actions.
Description
Adds the code block to the array of actions held in the instance variable Actions.
The array of actions is evaluated whenever the browse object is stabilised and the instance variable doActions is 
true. The browse object is passed as a parameter to each of the action code blocks.
Example:
oBrowse:addAction( { |x| doit( x ) } )
See Also:

Note:
This method is only implemented in the run time version of the library. 
7.2.1.20.	InsAction( x, nPos )
Insert an action block into the array of actions
Syntax
oBrowse:insAction( <bAction>, <nPos> )
Arguments
oBrowse is the browse object to act on
<bAction> is the code block to insert
<nPos> is the position to insert the code block within the array of action blocks.
Description
Inserts the code block to the array of actions held in the instance variable Actions.
The array of actions is evaluated whenever the browse object is stabilised and the instance variable doActions is 
true. The browse object is passed as a parameter to each of the action code blocks.
Example:
oBrowse:insAction( { |x| doit( x ) }, 3 )		// insert the 
action at the third position

See Also:
setAction( ), addAction( ), delAction( )
Note: 
This method is only implemented in the run time version of the library. 
7.2.1.21.	SetAction( nPos, x )
Set the action at a given position.
Syntax
oBrowse:setAction( <nPos>, <bAction> )
Arguments
oBrowse is the browse object to act on
<bAction> is the code block to set
<nPos> is the position to set the code block within the array of action blocks.
Description
Sets the code block to the array of actions held in the instance variable Actions.
The array of actions is evaluated whenever the browse object is stabilised and the instance variable doActions is 
true. The browse object is passed as a parameter to each of the action code blocks.
Example:
oBrowse:setAction( 3, { |x| doit( x ) } )		// sets the action 
at the third position
See Also:
delAction( ), addAction( ), insAction( )
Note: 
This method is only implemented in the run time version of the library. 
7.2.1.22.	DelAction( nPos )
Delete the action at the given position
Syntax
oBrowse:delAction( <nPos> )
Arguments
oBrowse is the browse object to act on
<nPos> is the position to delete the code block within the array of action blocks.
Description
Delete the code block within the array of actions held in the instance variable Actions.
The array of actions is evaluated whenever the browse object is stabilised and the instance variable doActions is 
true. The browse object is passed as a parameter to each of the action code blocks.
Example:
obrowse:delAction( 3 )		// delete the action at the third 
position
See Also:
addAction( ), insAction( ), setAction( )
Note: 
This method is only implemented in the run time version of the library. 
7.2.1.23.	SaveBack( )
Save the background of the browse object.
Syntax
oBrowse:saveBack( )
Arguments
None
Description
Saves the background of the browse object coordinates into the instance variable backScreen. This instance 
variable is then used if the object is moved, sized, alternated or configured.
Example:
oBrowse:saveBack()
See Also:
restBack( )
7.2.1.24.	RestBack( )
Restores the background screen at the browse coordinates.
Syntax
oBrowse:restBack( )
Arguments
None
Description
Restores the background screen from the instance variable backScreen.
Example:
oBrowse:restBack( )
See Also:
saveBack( )
7.2.1.25.	Cut( )
Cut the current column object into the clipboard
Syntax
oBrowse:cut( )
Arguments
None
Description
Cut the current column object into the clipboard ready for pasting.
Example:
oBrowse:cut( )
See Also:
copy( ), paste( )
Note:
This method is not in the run time version of the library.
7.2.1.26.	Copy( )
Copy the current column object into the clipboard
Syntax
oBrowse:copy( )
Arguments
None
Description
Copy the current column object into the clipboard ready for pasting.
Example:
oBrowse:copy( )
See Also:
copy( ), cut( )
Note:
This method is not in the run time version of the library.
7.2.1.27.	Paste( insert )
Paste the clipBoard into the browse object
Syntax
oBrowse:paste( <lInsert> )
Arguments
oBrowse is the object to act on
<lInsert> is a logical indicating insert mode. if TRUE the clipboard is inserted at the current position otherwise it 
is inserted after the current column.
Description
Cut the current column object into the clipboard ready for pasting.
Example:
oBrowse:paste( .t. )		// paste after the current column
See Also:
copy( ), cut( )
Note:
This method is not in the run time version of the library.
7.2.1.28.	SaveSet( )
Return the current setting of the browse object.
Syntax
oBrowse:saveSet()	--> <aSetting>
Arguments
oBrowse is the object to act on
<aSetting> is an array containing internal information about the browse object.
Description
This method is used only in preperation for storage to disk. It removes unwanted information before storage. The 
browse object MUST not be used until it has been restored.
Example:
aSave := oBrowse:saveSet()
See Also:
restSet( )
Note:
This method is not in the run time version of the library.
7.2.1.29.	RestSet( a )
Restores the browse object after a saveSet( ) .
Syntax
oBrowse:restSet( <aSave> )
Arguments
oBrowse is the object to act on
<aSave> is a previously saved array returned from saveSet( )
Description
This method is used only in restoring the browse object after a save to disk. It restores information which was not 
required for storage . 
Example:
oBrowse:restSet( aSave )
See Also:
saveSet( )
Note:
This method is not in the run time version of the library.
7.2.2.	Additional Instance variables
The Browse object contains many instance variables not found in the standard tBrowse class. While an 
understanding of these instance variables is not required when using BrowseMan we have included them for 
completeness.
7.2.2.1.	Name
The name of the Browse Object, this is used when storing itself to disk.
7.2.2.2.	eTop, eLeft, eBottom, eRight
An extra set of coordinates.  This allows the user to toggle between two sets of screen coordinates. Perhaps to 
toggle between a small TBrowse and a full screen TBrowse.
7.2.2.3.	Border
The contains a string used to draw the border of the browse. See the standard @ ...BOX command built into 
Clipper for more details, it has been enhanced to allow the joining of the border with the header and footer 
seperators. That's why it's 12 in length.
7.2.2.4.	holder
Used to contain a "normal" TBrowse object. All normal TBrowse methods  fired at a BMBrowse object are passed 
to this holder object. 
It should not be used directly within your applications.
7.2.2.5.	KeyMap
Used to store the KeyMap, a list of keys and corresponding actions. See the key map section for more details.
7.2.2.6.	ReDrawFrame
reDrawing of the frame may be switched off by setting this instance variable to false.
7.2.2.7.	ReDoActions
If reDoActions is set to true the array of actions is executed on a stablised browse object otherwise the array is 
ignored.
7.2.2.8.	BackScreen
Contains the background screen, this is used when moving or sizing to restore what is behind the browse object.
7.2.2.9.	Actions
An array of code blocks. In the run time library when stabilise is true this array of code blocks is automatically 
executed with the browse object passed as a paremeter. This enables advanced techniques to be implemented 
without the need to recompile the BrowseMan run time libraries. You may use these actions to perform any task 
when the browse is stabilised. Perhaps to highlight a column heading, or write a progress or thumb bar. 
7.2.2.10.	cGoBottom
A character representation of the GoBottom Block. When the Browse object is restored from disk this is macro 
compiled at run time. It cannot therefore contain references to local or static variables (as these are not found by 
the macro compiler). When setting up the BMBrowse object you must ALWAYS place the character 
representation of the goBottom Block. Failure to do so results in the object failing when restored from disk.
7.2.2.11.	cGoTop
A character representation of the GoTop Block. When the Browse object is restored from disk this is macro 
compiled at run time. It cannot therefore contain references to local or static variables (as these are not found by 
the macro compiler). When setting up the BMBrowse object you must ALWAYS place the character 
representation of the goTop Block. Failure to do so results in the object failing when restored from disk.
7.2.2.12.	cSkip
A character representation of the skip Block. When the Browse object is restored from disk this is macro compiled 
at run time. It cannot therefore contain references to local or static variables (as these are not found by the macro 
compiler). When setting up the BMBrowse object you must ALWAYS place the character representation of the 
skip Block. Failure to do so results in the object failing when restored from disk.

7.2.2.13.	Blink
This effects the Clipper set blink command/function.  The configure( ) method will reset the Clipper setblink( ) 
function with the value of this instance variable. See the Clipper setBlink( ) function for more details.
7.2.3.	Key Map Table
The key map is used to map keys (in the table) onto actions. The table is kept internally (in the instance variable 
keyMap) as an array with the elements positions as follows :-
Description	Number Default
BMK_UP				 1		K_UP
BMK_DOWN			 2		K_DOWN
BMK_LEFT			 3		K_LEFT
BMK_RIGHT			 4		K_RIGHT
BMK_HOME			 5		K_HOME
BMK_END				 6		K_END
BMK_PGUP			 7		K_PGUP
BMK_PGDN			 8		K_PGDN
BMK_PANLEFT		 9		K_CTRL_LEFT
BMK_PANRIGHT		10		K_CTRL_RIGHT
BMK_GOTOP			11		K_CTRL_PGUP
BMK_GOBOTTOM		12		K_CTRL_PGDN
BMK_PANHOME		13		K_CTRL_HOME
BMK_PANEND		14		K_CTRL_END
BMK_ESCAPE		15		K_ESC
BMK_SELECT		16		K_RETURN
7.3.	BCOLUMN.PRG: BMColumn
BMColumn is a replacement class for the TBColumn class. It has all the characteristics of the TBColumn class 
plus some additional instance variables and methods. The main extensions are the ability to store itself to disk and 
to size itself.
7.3.1.	Additional Methods
7.3.1.1.	init( cHeading, xBlock )
Initialise the column object.
Syntax
init( <cHeading>, <cBlock> )
Arguments
<cHeading> is the character representing the heading for the column.
<cBlock> is the character representation of the code block.
Description
Initialisation is normally done immediatly after object creation. A TBColumn object requires a heading and a code 
block. Because browseman objects are storable it requires a character represenation of the code block (for storage) 
which is then macro compiled to a code block.
Example:
oColumn := BMColumn():init( "Record No.", "{|| recno() }")

See Also:

7.3.1.2.	configure()
Fixes the code block after restore from disk.
Syntax
oColumn:Configure( )
Arguments
None
Description
When the column object is initially restored from disk the code blocks are returned as nil. The configure( ) method 
macro compiles the character cBlock instance variable to the block instance variable.
Example:
oColumn:configure()

See Also:

7.3.1.3.	sizeLeft( qty )
Resize the column object to the left.
Syntax
oColumn:sizeLeft( [<nQty>] )
Arguments
oColumn is the object to act on
<nQty> is an optional numeric quantity defaulting to 1, indicating the number of characters to size.
Description
Shink the column object by nQty characters. It does not allow the column to size past itself.
Example:
oColumn:sizeLeft( )		// shrink by 1 character
oColumn:sizeLeft( 4 )	// shrink by 4 characters

See Also:
sizeRight( )
7.3.1.4.	sizeRight( qty )
Resize the column object to the right.
Syntax
oColumn:sizeRight( [<nQty>] )
Arguments
oColumn is the object to act on
<nQty> is an optional numeric quantity defaulting to 1, indicating the number of characters to size.
Description
Grow the column object by nQty characters.
Example:
oColumn:sizeRight( )		// Grow by 1 character
oColumn:sizeRight( 4 )	// Grow by 4 characters

See Also:
sizeLeft( )
7.3.1.5.	setBlock( cBlock, bBlock )
A safer way to set the code blocks and character representation.
Syntax
oColumn:setBlock( <cBlock>[, <bBlock>] )
Arguments
oColumn is the object to act on
<cBlock> is the character representation of the block.
<bBlock> is the optional code block.
Description
A safer way to set the code blocks and character representation. It is required that the character representation is 
identical to the code block. Otherwise, when the object is restored from disk it will not have the correct behaviour. 
Do not reference local or static variables within the character expression as these cannot be reached by the macro 
compiler.
Example:
oColumn:setBlock( "{ || recno() } " , {|| recno() } )

See Also:

7.3.2.	Additional Instance variables
7.3.2.1.	cBlock
The character representation of the block code block. When the Browse object is restored from disk this is macro 
compiled at run time. It cannot therefore contain references to local or static variables (as these are not found by 
the macro compiler). When setting up the BMBrowse object you must ALWAYS place the character 
representation of the block. Failure to do so results in the object failing when restored from disk.
7.3.2.2.	cColor
A character represenation of the color block expression. If present when the browse object is restored from disk it 
is macro compiled at run time. It cannot therefore contain references to local or static variables (as these are not 
found by the macro compiler). 
7.4.	BOXMENU.PRG: BoxMenu
BoxMenu is used only in the painting section of BrowseMan. It may be used in your own applications but is 
supplied here purley as a supporting function. It is not in the runtime library of BrowseMan.
7.5.	MPROMPT.PRG: Prompt and MenuLine
MPrompt is used only in the painting section of BrowseMan. It may be used in your own applications but is 
supplied here purley as a supporting function. It is not in the runtime library of BrowseMan.
8.	Technical Support
Your first port of call should be the distributor or dealer you purchased this product from. If they are not able to 
immediately help they will contact us for assistance. They should return to you with the answer.
If you purchased directly from Rhino Publishing, or if you have purchased a Rhino Publishing support contract 
then fax us on (+44) 302 371 710. Or Phone us on (+44) 302 371 711.





Copyright (c) 1992, 1993 Rhino Publishing Ltd. All Rights Reserved
Page: 21



Copyright (c) 1992, 1993 Rhino Publishing Ltd. All Rights Reserved
Page: 1


