home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
text
/
ncclib.zip
/
NCCREAD.ME
< prev
next >
Wrap
Text File
|
1993-05-02
|
32KB
|
762 lines
NccLib Documentation
The documentation is sparce at this time. We are working on the doc's
everyday. Please fill out and return the registration form so as to
make sure you recieve to Norton Guide file and new and updated
documentation.
The source to the Demo program is included. The programs may be used
in any way except you may not just recompile the source and sell the
program. You may use any of the functions from the demo in any of your
programs free from any copyrights. Please do not just change the
copyright message and claim them as yours.
The demo programs have alot of comments thru out so make use of them to
show the correct way to use the functions. If you only use the functions
in the library the demo programs are your best source of help. They are
written at a way to be easy to understand. A Norton Guides file is in
the works and will be sent to all registered owners of NccLib free of
charge.
To install the library just copy it to your Clipper library directory
and copy the header files to your Clipper include directory.
There are DOC's files included. These should be of good help.
List of functions in NccLib ;
ARRAYDSP........ Display an array
Syntax: ArrayDsp( xArray, ; // Array to be viewed
xHead, ; // Heading
xfoot, ; // Footing
tr, ; // TopRow for element display
lc, ; // LeftColumn for elements
br, ; // BottomRow for element display
rc, ; // RightColumn for element display
cPos, ; // CurrentPosition
rPos, ; // RelativePosition
xplode, ; // Explode flag
ExitKeys, ; // Array of keys to exit on
keyReader ; // Key reader block
)
BAILOUT......... Clock function, turn off the clock
Syntax: Bailout()
Turn it off before you exit the program.
CLOCK........... Calls asmclock to turn on or off the clock
Syntax: clock( cflag )
cflag = 'ON' or 'OFF'
@ 0,maxcol()-7 say clock( 'on' )
CDATE........... Convert the date in month, day and year and
place on screen
Syntax: cDate(<exp>)
DIRPICK......... Window with directory with mouse support
#include "Directry.ch"
Syntax: DirPick(dfl, tr, lc)
dfl = '*.dbf'
tr = top row
lc = left colum
DVIEWARRAY...... Create an object to view arrays
create class dViewARRAY from NccViewit
export:
instvar dView_Array
instvar CurrentItem
method dvArraySkip
endclass
constructor new( top, left, bottom, right, aArray ), ;
new( top, left, bottom, right )
DVIEWTXT........ Create an object to view text files
#include "class(y).ch"
#include "inkey.ch"
#include "fileio.ch"
#define CRLF Chr(13)+Chr(10)
create class dViewTXT from NccViewit
export:
instvar Handle File handle
instvar FilePos readonly
instvar FileLen readonly
instvar MaxLineLen Maximum Line Length
instvar Width Width of display
instvar LeftPosition Leftmost position in txt
instvar TabDisplacement Left/Right Movement offset
instvar Line readonly Current Line
method Activate
method StandardKeys
method Left = dvfLeft
method Right = dvfRight
method PanEnd
method PanHome
method dvFirst Go Top
method dvLast Go Bottom
method dvSkipper Skip
method dvNextLn
method dvPrevLn
method dvReadLn
method dvFileSet
endclass
constructor new( top, left, bottom, right, nHandle ), ;
new( top, left, bottom, right )
DTO_STRING...... Function to convert to string
Data Type to str
Syntax: dto_string(xfield)
DVIEWDBF........ Create a browse object
#include "class(y).ch"
#include "inkey.ch"
#include "Nccview.ch"
#include "dbstruct.ch"
#define MAX_LN_LEN 250
#define FORWARD 1
#define BACKWARD -1
create class dViewDBF from NccViewit
instvar HeadLine
instvar TopLine
instvar CompiledLine
instvar PositionChanged
instvar Width
instvar cCount
instvar LastFieldDisplayed
method BuildLine
method LineFill
export:
instvar Head
instvar HeadSep
instvar ColSep
instvar LeftPosition
instvar Structure
instvar Headings
instvar WorkArea
method Left = dvbLeft
method Right = dvbRight
method PanEnd
method PanHome
method Activate
method StandardKeys
method RefreshAll
method RecInfo
method DBFline
EndClass
constructor new( top, left, bottom, right, xWorkArea ), ;
new( top, left, bottom, right )
FILEBASE........
Syntax: FileBase( cFile,cExt )
FORMATNU......... Format a number
Syntax.....: x = Format_num(<par1>[,<par2>][,<par3>][,<par4>][,<par5>])
<par1>
Number to format
<par2>
Width to format within
<par3>
Decimal places
<par4>
T - Trim to Smallest
R - Allign to Right
L - Allign to Left
<par5>
Character(s) to place beside number on left
«NB» Used only if par4 = 'r'
GET_STR......... Get a String
Syntax.....: <var> := get_str([<exp1>][,<exp2>][,<exp3>])
....Simulate a READ
<exp1> - Number of Characters to Read...default 10
<exp2> - Type of input to accept...eg. [N]umeric [A]lpha [F] Dos File...default is all ['']
<exp3> - Display input...'S'...default is to hide
HANDLES......... Get file handels
IMPLODE......... Implode a window or box
Syntax: implode( winHandle )
MONTHBEG........ Finds First date for month
Syntax: x = MonthBeg(<exp>)
<exp> - Date or month
<D> <N>
MONTHEND........ Finds Last date for month
Syntax: x = MonthEnd(<exp>)
<exp> - Date or month
<D> <N>
MOUSESYS........ Turn the mouse and create a mouse object
Syntax: Mouse := MouseSys()
Mouse:Activate()
Mouse:Hide()
NCCBAR.......... Create a menu bar object
#include "class(y).ch"
#include "set.ch"
#include "inkey.ch"
#define D_ALT 5001
create class NccBar
instvar colset
instvar screen
instvar ActivateKeys
instvar quickkeys
method sayPrompt
export:
instvar winDelay
instvar winExplode
instvar promptColumns
instvar menusActive
instvar MouseActive
instvar BarReader
instvar Exception
instvar ExceptBlock
instvar cur
instvar promptSpace
instvar prompts
instvar row
instvar StandardColor
instvar InverseColor
instvar LetterColor
instvar GrayedColor
method Activate
method Terminate
method Show = Activate
method Hide
method Left = bLeft
method Right = bRight
method Highlight
method Display
method DehighLight
method AddMenuPrompt
method BarChoice
method BarSelection
method MenuChoice
method MenuSelection
method PromptId
method PromptActive
method PromptCheck
method PromptMessage
method PromptSubMenu
method isActivateKey
method isQuickKey
method PromptQuickKey
method KeySeek
method findkey
method BarUpdate
endclass
constructor new( nRow )
NCCMEMO......... Edit a memo field in a window
Syntax: NccMemo(field,tr,tc,br,bc,"header","footer","line_width","key to save changes")
NCCMESG......... Message function
Syntax: NccMesg(<string>,<row>,<col>[,<color>][,<wait>][,<'bell'>][,<'save_scrn'>])
<col> - Column or "Center" or
"Center,"+str(lc)+","+str(rc)+' " ' ==>- var? are string variables
"Center,00,80" ==> "center,00,80"
<color> - color variable
NCCMREAD........ Generic MouseReader For arraydsp()
#include "inkey.ch"
#include "mouse.ch"
Function dView_MouseReader(o,TopRow,LeftColumn,BottomRow,RightColumn)
NCCPOPUP........ Popup for messages and or options
Syntax: NccPopUp( cText,cNewColor,nPadding, bReader )
NCCVALID........ Valid checking
Syntax: ValidChk("<File2>",<File1->Field>[,flag])
if flag is logical and .F. no message will be echoed
Default is .T.
Checks a secondary file <File2> for validity of <File1->Field>
or <memvar->variable>
NCCVBAR......... Window scroll bar
Scroll Vertical Bar
#include "class(y).ch"
create class NccVBar
instvar Screen
instvar Current
instvar Hidden
instvar nOnBar
export:
instvar TopRow
instvar LeftColumn
instvar BottomRow
instvar RightColumn
instvar Bar100
instvar StandardColor
instvar InverseColor
method Hide
method Show
method Activate
method Update
method ReDraw
endclass
constructor new( Top, Left, Bottom, Right, Bar100 )
NCCHBAR......... Scroll bar in a window
Scroll Horizontal Bar
#include "class(y).ch"
create class NccHBar
instvar Screen
instvar Current
instvar Hidden
instvar nOnBar
export:
instvar TopRow
instvar LeftColumn
instvar BottomRow
instvar RightColumn
instvar Bar100
instvar StandardColor
instvar InverseColor
method Hide
method Show
method Activate
method Update
method ReDraw
endclass
constructor new( Top, Left, Bottom, Right, Bar100 )
N_BOXUP......... Pop up a box with a message
Syntax: N_BoxUp( x,cNewColor,padding )
NCCMENU......... Create a menu bar object
#include "class(y).ch"
#include "set.ch"
#include "inkey.ch"
#include "nccview.ch"
#define D_ALT 5001
create class NccMenu from NccViewit
instvar screen
instvar st
instvar sb
export:
instvar active noassign
instvar winHandle noassign
instvar winDelay
instvar winExplode
instvar shadow
instvar MouseActive
instvar cur
instvar MenuReader
instvar Exception
instvar ExceptBlock
instvar prompts
instvar border
instvar bordercolor
instvar lettercolor
instvar grayedcolor
instvar MessageColor
method AddPrompt
method AddPromptLine
method PromptId
method PromptActive
method PromptCheck
method PromptMessage
method PromptSubMenu
method Activate
method Show
method Hide
method Terminate
method Up
method Down
method Highlight
method DeHighlight
method MenuChoice
method MenuSelection
method KeySeek
method MenuStatus
method MenuSkipper
method MenuLine
method FindId
method PageDown = stub
method PageUp = stub
method Home = stub
method End = stub
endclass
constructor new( nTop, nLeft, nBottom, nRight ), ;
( nTop, nLeft, nBottom, nRight )
NCCMOUSE........ Create a mouse object
#include "Class(y).ch"
#include "inkey.ch"
#define MASK '░▒▓█'
LEFT_BUTTON 1
RIGHT_BUTTON 2
BOTH_BUTTONS 3
create class NccMouse
instvar mAttr
instvar mChar
method mCursor
export:
instvar isMouse noassign
instvar Column noassign
instvar Row noassign
instvar Button noassign
instvar Visible noassign
instvar Ascii noassign
instvar Delay
method Activate
method MouseRead
method Show
method Hide
method GoTo
method ButtonHold
method ClearButtons
method Update
endclass
constructor new()
NCCPROMPT.......Class NccPrompt
#include "class(y).ch"
create class NccPrompt
export:
instvar id
instvar text
instvar active
instvar checked
instvar submenu
instvar message
instvar hotkey
instvar keypos
endclass
constructor new( nId, cTitle, lActive, lChecked, cMessage, oSubMenu )
NCCVIEWIT....... Main browse object function
#include "class(y).ch"
#include "inkey.ch"
#include "Nccview.ch"
create class NccViewit
method dvSkip
method dvStatus
method dvSkipblock
method Settle
method DisplayData
export:
instvar AtTop noassign
instvar AtBottom noassign
instvar TopRow
instvar LeftColumn
instvar BottomRow
instvar RightColumn
instvar UseStyle
instvar Refresh
instvar RelativeRow
instvar CurrentRow
instvar CurrentStatus
instvar StandardColor
instvar InverseColor
instvar DataBlock
instvar WhileBlock
instvar StatusBlock
instvar SkipBlock
instvar GoTopBlock
instvar GoBottomBlock
instvar BufferedDisplay
instvar UserSlot
method Up
method Down
method PageUp
method PageDown
method Home
method End = dvEnd
method GoTop
method GoBottom
method Activate
method Terminate
method While
method RefreshCurrent = Highlight
method RefreshAll = Refresh
method Stabilize
method ForceStable
method HighLight
method DehighLight
method ShowStatus
method StandardKeys
endclass
constructor new( nTop, nLeft, nBottom, nRight )
NPOP_ASK........ Pop up a window and ask a question
Syntax: Npop_Ask( p_Data, p_Valid, p_Color, p_Padding )
NCCSTRIP........ Removes chars in exp1 from exp2
Syntax.....: x = Strip(<exp1>,<exp2>)
NEXTASCI........ Return the next ASCII char.
Syntax: NextASCII( x )
NEXTINSE........ Return the next in sequence
Syntax: NextInSeq( x )
NMONTHS......... Calculates the number of months between two dates
Syntax: x = nMonths(<exp1>, <exp2>)
SHADOW.......... Shadow function in C
Syntax: shadow(t, l, b, r)
STRTOARRAY...... Convert a string to an array
Syntax: StrToArray( cString, cDelimiter, crlf_strip )
UNIQ_FNAME...... Create a unique name
Syntax: x = Uniq_fname([<exp>])
<exp> - file ending
WORDAMT......... Count the words in a text file or string
Syntax: wordAMT(cl_Amt)
WINBOX.......... Create a window.
Syntax: WinBox(<exp1>,<exp2>,<exp3>,<exp4>,<exp5>,<exp6>,<exp7>,<exp8>)
<exp1> .. <exp4> === Border Coordinates numeric
<exp5> === Delay factor numeric
<exp6> === Number (1 .. 5) or Character string
<exp7> === .t. ,.f. for shadow
<exp8> === .t. ,.f. for explode
There are more functions. Look at the NccLib.lst file. We are working on more
documentation. Also look at the demo programs for function use.
Main functions in demo program.
Menu bar objects ;
Bar := MenuSys() Calls function to create menu object.
Bar := NccBar():New(1) Create a new menu bar object.
Bar:AddMenuPrompt( FILE , ' File ' ) Method function to add
a menu option on the bar.
Bar:PromptSubMenu( FILE , Menu_(1, Bar) ) Method function to create
a submenu object for the
bar menu option.
Bar:PromptQuickKey( WIN_ZOOM , K_ALT_Z ) Method function to
create a hot key for
a menu option.
Bar:Display() Method Function from menu bar object to
display the menu.
Bar:MouseActive := .t.
Bar:MenusActive := .t. Method functions to activate the menu and
Bar:BarChoice( 2, .f. ) position the cursor on what menu option
Bar:MenuChoice( 1, .f. ) you want to start on.
Mouse objects ;
Mouse := MouseSys() Function to create the mouse object.
Mouse:Activate() Method function to activate the mouse object.
Mouse:Hide() Method function to hide the mouse will setting
up the screen.
Mouse:MouseRead() Method function for a mouse read.
nKey := Mouse:Ascii Instance varible to convert keyboard strokes.
Browse objects ;
dViewDBF():New( WinTop() +4, ; Create a new browse object.
WinLeft() +1, ;
WinBottom() -1, ;
WinRight() -1 ;
)
o:Head := "═" Instance variables in browse object for
headings and column seperators.
o:HeadSep := "╤"
o:ColSep := "│"
Licensing agreement
Use of NccLib constitutes your acceptance of these terms and
conditions and your agreement to abide by them.
I have read and agreed to the terms of the National Computer
Consultants License Agreement. I understand that I am not
entitled to make any copies of the distribution diskette and or
file except for archival purposes. I understand that I may
compile this software into complete, executable programs and
distribute those programs without royalty to National Computer
Consultants. I understand that I may not distribute this software
in any other way. I understand that I may not make any copies of
the documentation for any purpose.
You must signify your consent to this License Agreement by
signing and returning the enclosed registration paper. If you
do not agree to the terms of the License Agreement, you must
return the software with its documentation and destroy any
copies of the software that you have made.
Warrantee
National Computer Consultants specifically disclaims all
warranties, expressed or implied, including but not limited to
implied warranties of merchantability and fitness for a particular
purpose. In no event shall National Computer Consultants be liable
for any loss of profit or any other commercial damage, including
but not limited to special incidental, consequential or other
damages.
NccLib Support Policy
Who may receive support
Only registered users of NccLib may receive support. To
register simply fill out the registration paper that is
enclosed with the NccLib package that you receive, fill
out the information, and send it directly to National
Computer Consultants. Please understand that this is
Freeware and support may not be as prompt as you would
like.
What you must do
Before contacting our Customer Support please have the
following information on hand:
1. NccLib library used.
2. Computer make and model.
3. DOS version.
4. Network software if applicable.
5. Clipper version ( Clipper 5.2 )
How to Contact NccLib Software Technical support
The best method for support of any Clipper product (including
Clipper itself) is on CompuServe's Clipper forum or DBA (Data
Based Advisor's forum). Simply post messages to the user ID
70324,634.
The reason this is the best support is because you benifit
from the other users of NccLib who frequent the forum, the
NccLib Software Support folks, and Greg Rice (NccLib's
Author).
Otherwise either fax or call between 9:am and 5:pm (EST)
National Computer Consultants
4119 N State Road 7
Suite 1138
Lauderdale Lakes, Florida 33319
Support: (305) 475-7740
FAX: (305) 473-4892
CompuServe 70324,634