Category : C Source Code
Archive   : EVISION1.ZIP
Filename : USERDOC.TXT

 
Output of file : USERDOC.TXT contained in archive : EVISION1.ZIP



ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ ³
³ ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ³
³ ±±ÛÛÛÛÛÛÛÛÛ±±ÛÛÛÛÛÛÛÛÛ±±ÛÛÛÛÛÛÛÛÛ±±ÛÛ±±±±±±ÛÛ±±±±ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿±± ³
³ ±±ÛÛ ±ÛÛ ÛÛ ±ÛÛ ±ÛÛ ±±±±±ÛÛ ±±±³ ³ ± ³
³ ±±ÛÛ ±±±±±±±±ÛÛ ±±±±ÛÛ ±ÛÛ ±±±±±±±±ÛÛ ±±±±±ÛÛ ±±±³ Û ÛßÛ ³ ± ³
³ ±±ÛÛÛÛÛÛÛÛÛ±±ÛÛÛÛÛÛÛÛÛ ±ÛÛÛÛÛÛÛÛÛ±±ÛÛÛÛÛÛÛÛÛÛ ±±±³ Û Ü ÛÜÛ ³ ± ³
³ ±±ÛÛ ±ÛÛ ÛÛ ±± ÛÛ ±± ÛÛ ±±±³ ³ ± ³
³ ±±ÛÛ ±±±±±±±±ÛÛ ±±±±ÛÛ ±±±±±±±±ÛÛ ±±±±±ÛÛ ±±±±±±±ÃÄÄÄÄÄÄÄÄÄÄÄÄ´ ± ³
³ ±±ÛÛÛÛÛÛÛÛÛ±±ÛÛ ±±±±ÛÛ ±ÛÛÛÛÛÛÛÛÛ ±±±±±ÛÛ ±±±±±±±³ User Guide ³ ± ³
³ ±±± ±± ±±±±± ±± ±±±±±± ±±±±±±±ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ± ³
³ ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ± ³
³ ±±ÛÛ±±±±±ÛÛ±±ÛÛ±±ÛÛÛÛÛÛÛÛÛ±±ÛÛ±±ÛÛÛÛÛÛÛÛÛ±±ÛÛÛÛÛÛÛÛÛ±±±±±±±±±±±±± ³
³ ±±ÛÛ ±±±±ÛÛ ±ÛÛ ±ÛÛ ±ÛÛ ±ÛÛ ÛÛ ±ÛÛ ÛÛ ±±±±±±±±±±±± ³
³ ±±ÛÛ ±±±±ÛÛ ±ÛÛ ±ÛÛ ±±±±±±±±ÛÛ ±ÛÛ ±±±±ÛÛ ±ÛÛ ±±±±ÛÛ ±±±±±±±±±±±± ³
³ ±±ÛÛ ±±±±ÛÛ ±ÛÛ ±ÛÛÛÛÛÛÛÛÛ±±ÛÛ ±ÛÛ ±±±±ÛÛ ±ÛÛ ±±±±ÛÛ ±±±±±±±±±±±± ³
³ ±±ÛÛ ±±±±ÛÛ ±ÛÛ ±± ÛÛ ±ÛÛ ±ÛÛ ±±±±ÛÛ ±ÛÛ ±±±±ÛÛ ±±±±±±±±±±±± ³
³ ±±±ÛÛ ±±ÛÛ ±±ÛÛ ±±±±±±±±ÛÛ ±ÛÛ ±ÛÛ ±±±±ÛÛ ±ÛÛ ±±±±ÛÛ ±±±±±±±±±±±± ³
³ ±±±±ÛÛÛÛÛ ±±±ÛÛ ±ÛÛÛÛÛÛÛÛÛ ±ÛÛ ±ÛÛÛÛÛÛÛÛÛ ±ÛÛ ±±±±ÛÛ ±±±±±±±±±±±± ³
³ ±±±±± ±±±± ±± ±± ±± ±± ±±±±± ±±±±±±±±±±±± ³
³ ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ³
³ ³
³ The easy to use, reliable and powerful library for a textmode ³
³ based user interface. ³
³ ³
³ This manual may be freely distributed in its original form. ³
³ Modifications of any kind are prohibited. ³
³ ³
³ This manual and software are made available without warranties. ³
³ TNG SOFT nor the author shall be held liable to the user or any ³
³ other person or entity with respect to any liability, loss, or ³
³ damage caused or alleged to be caused directly or indirectly by ³
³ this manual or software. ³
³ ³
³ This software is shareware, and must be registered. ³
³ ³
³ This library is the property of the author. ³
³ You are granted the rights to use only. ³
³ ³
³ EasyVision is a registered trademark of TNG SOFT. ³
³ ³
³ The original manual and software may be obtained from ³
³ ³
³ STARFLEET COMMAND BBS ³
³ (418) 525-6899/4740/6803 ³
³ FidoNet: 1:240/1701 ³
³ F'req magic name > EVISION ³
³ ³
³ ³
³ ßÛß ÛßÛ Ûßß Ûßß ÛßÛ Ûßß ßÛß ³
³ Û Û Û ÛÜÛ ÜÜÛ ÛÜÛ Ûß Û The Next Generation Software ³
³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ





EasyVision 1.0 User's Guide Page 2




Chapter 1: Overview ..................................... 7
Why EasyVision .......................... 7
What is EasyVision ...................... 7
Current version ......................... 8
A word about registration ............... 8
What's next ? ........................... 9

Chapter 2: Getting started .............................. 10
Library specifics ....................... 10
Installation ............................ 10
How to use this library ................. 11
How to use this document ................ 11

Chapter 3: Using EasyVision's functions ................. 13
assert .................................. 14
getkey .................................. 15
getheap ................................. 17
freeheap ................................ 17
hstrlen ................................. 18
hstrcpy ................................. 18
savevideo ............................... 19
restorevideo ............................ 19
savecursor .............................. 20
restorecursor ........................... 20

Chapter 4: Using EasyVision's classes ................... 21

Chapter 5: EasyVision's TDesktop class .................. 22
settextmode ............................. 23
setdeskcolors ........................... 23
settexture .............................. 24
settitle ................................ 24
open .................................... 25
close ................................... 25
insert .................................. 26
refresh ................................. 26

Chapter 6: EasyVision's TStatusline class ............... 27
setleftcolors ........................... 28
setrightcolors .......................... 28
displayleft ............................. 29
displayright ............................ 29
refresh ................................. 30











EasyVision 1.0 User's Guide Page 3





Chapter 7: EasyVision's TMenubar class .................. 31
setcolors ............................... 32
sethelp ................................. 33
setslptr ................................ 33
addmenu ................................. 34
additem ................................. 35
trough .................................. 36
itemavail ............................... 36
refresh ................................. 37

Chapter 8: EasyVision's TWindow class ................... 38
wingetscreenheight ...................... 39
wingetscreenwidth ....................... 39
winsetpos ............................... 40
wingetrow ............................... 41
wingetcol ............................... 41
winsetsize .............................. 42
wingetheight ............................ 42
wingetwidth ............................. 42
winsetcolors ............................ 43
winsettitle ............................. 43
winsethelp .............................. 44
winsetslptr ............................. 44
winopen ................................. 45
winclose ................................ 45
winclear ................................ 46
winwrite ................................ 47
winswrite ............................... 49
wintext ................................. 50
wintextfile ............................. 51
winmove ................................. 52
winscroll ............................... 52
wininput ................................ 53

fieldsetlengths ......................... 54
fieldsetcolors .......................... 54
fieldsetftr ............................. 55
fieldsetattrib .......................... 55
fieldcreate ............................. 56

fieldinput .............................. 57
fieldsetasw ............................. 58
fieldgetasw ............................. 58

buttonsetcolors ......................... 59
buttoncreate ............................ 60
buttonpush .............................. 62
buttoninput ............................. 63
buttonsetavail .......................... 64





EasyVision 1.0 User's Guide Page 4





Chapter 9: EasyVision's Demo Program .................... 65
The demo program ........................ 65

Chapter 10: Things you should not do ..................... 66

Appendix A: Extended keycodes ............................ 67

Appendix B: Color codes and Symbolic constants ........... 68

Appendix C: Trademarks ................................... 69

Appendix D: Common Questions and Answers ................. 70









































EasyVision 1.0 User's Guide Page 5




This page intentionally left blank





















































EasyVision 1.0 User's Guide Page 6




This page intentionally left blank





















































EasyVision 1.0 User's Guide Page 7




ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
C H A P T E R 1 Overview
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

Welcome to EasyVision 1.0 ! This C++ library provides an easy to
use, reliable and powerful textmode based user interface.


Why EasyVision ?
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

After looking at some shareware and commercial user interface
packages, and reading comments about them from a lot of C and C++
programmers, it was clear that something was missing. When
people talked about TURBO VISION from BORLAND, it was their
opinion that it was too difficult to use. In my own opinion, I
think that TURBO VISION is one of the greatest work of software
engineering around. It is the most powerful and professional
user interface in existence. It is so well implemented and
thought out that it is the standard in textmode interfaces that
everyone is following, including EasyVison ! (Hope they don't
sue me...) But, it is so big that it is a language in itself,
and that is what makes people afraid of using it !

On the other hand, there are those shareware libraries. Some of
them are extraordinarily well done, but are still much to big.
I'm thinking about CXL right now. Others are to small and to
unreliable to develop serious software.

So, what's a C++ programmer to do ? Maybe just what I did, and
write all of his interface himself. But what a waste if I'm the
only one using it ! Why not make it available to everyone ?
Well, that's what EasyVision is all about !


What is EasyVision
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

EasyVision is a textmode based, windowed user interface. It
provides a DESKTOP, a STATUSLINE, a MENUBAR, WINDOWS, CONTEXT
SENSITIVE ONLINE HELP, and much much more...

EasyVision was created with 2 important priorities.










EasyVision 1.0 User's Guide Page 8





First, it should be EASY to learn and EASY to use. Provide only
the big, important functions to the user. A user doesn't need a
library function if he can write it himself in less than 25 lines
of code. But make sure that those big functions are REALLY
powerful and produce professional looking results ! This library
hasn't been written to provide every fonctions needed to
developpe full featured word processors or the likes. It is
there to give you a strong and reliable skeleton for your
programs. It is up to you to come up with the 'meat'.

Second, those functions should be totally bug free and crash
proof. EasyVision should validate all parameters to make sure
nothing wrong can happen. Don't rely on the good will of the
programmer to check out is code for out of range or
non-initialised parameters.

That was what EasyVision was suppose to be. Well, EasyVision is
still better than that ! At this point, if you haven't already
done so, you should run the demonstation program 'EVISION.EXE' to
see the results of about 200 lines of C++ codes that uses the
EasyVision library...

If you find the results interesting, it is up to you to go on.
All functions and classes are FULLY documented in the following
pages. The source code of the demonstration program is also
included (and commented) in the archive. It provides you with
'real' examples of how to use this library.


Current Version
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

The complete history of EasyVision can be found in the
HISTORY.TXT file, included in the archive.


A word about registration
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

EasyVision 1.0 is made available under the shareware concept.
This means that after an evaluation period of 30 days, you should
register this software with its author. Furthermore, if you use
this software to create your own shareware software, YOU MUST
REGISTER EASYVISION.

Registration grants you a life-time license to use this software,
and all following versions or updates.

EasyVision is NOT crippled in any way. There is absolutly no
differences between the registered or unregistered version.



EasyVision 1.0 User's Guide Page 9





To register this software, fill in the REGISTER.TXT registration
form included in the archive. Registration is $25 CANADIAN. You
will receive via 'snail mail' an official registered user
certificate with your registration number. For $35 CANADIAN,
you'll also receive a bonded printed copy of the latest version
of this manual.

EasyVision and TNG SOFT ENTERPRISES are registered trade marks.


What's Next ?
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

There won't be many new commands ! EasyVision will always remain
EASY to use, to leave the programmer at more important tasks.
However, I welcome your suggestions to what you think is missing
from this package. Remember though, that I will never include
functions that are not directly related to the user interface.

I will try to improve the functions and classes already there.
I'd like to add an integrator for the windows, allowing
background windows to be brought in the foreground, a window
refresh function, better text output facilities and mouse
support.

So, that's about it for now ! Have fun and enjoy !


R‚my Gendron
author of EasyVision























EasyVision 1.0 User's Guide Page 10




ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
C H A P T E R 2 Getting started
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

Installing and using the EasyVision library is very simple.


Library specifics
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

EasyVision was developped under TURBO C++ 1.01, then later
transfered to BORLAND C++ 3.0.

The code was compiled under the HUGE memory model. All
prototypes were declared as FAR functions and all pointers were
explicitely declared HUGE. This will provide full compatibility
when linking to any memory model size.

Unless you REALLY know what you are doing, you should always use
HUGE pointers. FAR pointers can cause wrap around and comparison
problems because they are not normalised. All EasyVision's
functions use huge pointers.

The video output is done through direct screen writes. This
makes for incredibly fast output. Going through the BIOS is just
to slow. However, under multitaskers like Deskview, who often
work in textmode, screen bleeds can occur if the application is
running in the background. Use the virtualising options when
running under DeskView.

All EasyVision's header files use conditional compilation to
prevent redeclaration errors at compile time. So, if you're not
sure if a header was previously included (possibly by another
header file), feel free to include it again.


Installation
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

Unpack the archive in a temporary directory. If you haven't done
so, you should really print all of the USER'S GUIDE for easier
reading. It as been formatted to print at 60 lines per pages.

Put all header files (.HPP) into an INCLUDE directory. Just to
be sure you won't overwrite existing header files, you should
make a separate include directory, then include it in the
'include' path of your compilator.

Then put the EasyVision library (EVISION.LIB) into one of your
LIBRARY directories.



EasyVision 1.0 User's Guide Page 11






How to use this library
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

To use an EasyVision function or class, just include its header
file in your source code. YOU MUST NOT write a prototype
yourself based on the prototype written in this manual. The real
prototypes have additional informations in them. So, for
example:

#include // A standard header file
#include "getkey.hpp" // An EasyVision header file

void main ()
{
...
// Here you can use the 'getkey' function
...
return ;
}

You then have to link all your modules together, including the
EVISION.LIB library. You do that by including EVISION.LIB in
your project. EVISION.LIB must be in one of your LIBRARY
directories. That's all there is to it !

If you get linker errors, that's probably because you compiled
your sources in C ANSI. You must compile in C++, or else make
interfaces with the 'extern C' keyword.

All arguments to functions are FULLY validated. An EasyVision
function will never let you get away if it is called incorrectly.
If something is wrong, the program is stopped and a plain english
error message tells you what went wrong, where and why ! In the
function descriptions, when it says that you SHOULD NOT or CANNOT
do something, it means that if you do it, you'll get an
EasyVision error message. Your program will not crash !

See the chapter THINGS YOU SHOULD NOT DO for hints on things to
watch out for.


How to use this document
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

The following conventions are used in the document:

All of EasyVision's functions were declared of type
far, but the far modifier was left out of the
prototypes in this manual.



EasyVision 1.0 User's Guide Page 12





The following symbols were used in the text:

'' Regular C and C++ keywords

{} EasyVision keywords

<> Arguments to functions

[] Optional arguments are enclosed in brakets

--> Important remarks (that you MUST read)

CAPS Keyboard keys

Chapter 3 describes all EasyVision's functions. Chapter 4
introduces you to the basics of using a class object. Then
chapters 5 to 8 describe the 4 EasyVision's classes.

At the end, reference informations can be found in appendixes.

I will gladly answer any questions. I WILL NOT ANSWER THROUGH
NETMAIL. YOU MUST REACH ME VIA THE C++ FIDONET ECHOMAIL
CONFERENCE. I think that most questions can be answered by
looking at the included demo program (DEMO.CPP).





























EasyVision 1.0 User's Guide Page 13




ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
C H A P T E R 3 Using EasyVision's Functions
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

This version of the EasyVision library has 10 functions. They
provide for parameter validations, fatal errors handling,
keyboard inputs, automatic F1 online help. Also, some frequently
used functions have been rewritten to accept huge parameters
without the need for typecasting. All these functions are fully
described in the following pages.

A function description uses the following format:


FUNCTION NAME
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Short description of this function behavior.

þ Syntax #include "header.h"
ReturnType FonctionName (, , ...) ;

YOU MUST NEVER WRITE A PROTOTYPE FOR A FUNCTION
YOURSELF. ALWAYS USE THE PROPER HEADER FILES. THEY
HAVE ADDITIONAL INFORMATIONS IN THEM !

--> When parameters are in brakets ([]), they are optional.
IF YOU WANT TO INCLUDE AN OPTIONAL PARAMETER, ALL
PARAMETERS BEFORE THAT ONE MUST BE INCLUDED AS WELL.

þ Remarks Parameters and usage are described here when needed.

þ Return The returned value of the function is explained here.

þ Example Examples of various calls to this function.



So, here are the EasyVision's functions...














EasyVision 1.0 User's Guide Page 14




ASSERT
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary This function will ASSERTain that a is
TRUE. If it is, it will return immediately with no
effect, and minimum overhead.

If the condition is FALSE, the program will be
terminated in an orderly fashion. {assert} will clear
the screen, print an error message, and terminate the
program with a call to 'exit'. This closes all open
files, releases any memory allocated on the heap and
exit to DOS with an ERROR LEVEL of 1.

þ Syntax #include "assert.hpp"
void assert (int condition [,char huge *fctname, int
errorcode, char huge *errortext]) ;

þ Remarks If evaluates to FALSE, the program will be
terminated and , the current function name
will be displayed. This will help find the location of
the error. You can specify an error code. If 0, you
must provide an error message with the parameter
. You can also use predefined error codes.
In this case, you don't need to specify an error
message.

1: "Not enough memory to instantiate a class on the
heap."
2: "Not enough memory to create a struct on the
heap."
3: "Not enough memory to allocate the requested
amount of bytes."
4: "Out of memory."
5: "File not found."
6: "Path not found."
7: "File access denied."
8: "Input/Output error."
9: "Unrecoverable fatal error."

þ Return None

þ Example assert (nbrecord>0,"datasearch",0,"Database empty !") ;











EasyVision 1.0 User's Guide Page 15




GETKEY
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary This is a replacement for the familiar 'getch'
function.

þ Syntax #include "getkey.hpp"
int getkey (int filter [,char *helptext]) ;

þ Remarks One of 'getch' weakness is its inability to deal with
the way extended keys are internaly represented. Those
are the keys that don't have an ASCII code associated
with them. For exemple, the function, arrow and
editing keys all return an extended keycode.

This new {getkey} function will deal with these
extended keys by adding 256 to the extended key code.
Appendix A lists all of the extended keycodes currently
available on an extended keyboard.

You MUST specify a to be used by the {getkey}
function. A filter of 0 will allow any key to be read
and returned by the function. You can also provide the
ASCII or extended key code (remember to add 256 to the
real code) of the only key allowed to be returned by
the function. This provides an easy way to WAIT FOR a
specific key. The function will then return with that
keycode, only when that key has been pressed.

--> When you call {getkey}, it will first flush the
keyboard buffer of any keys already present. When
waiting for a key, if the F1 key is pressed, an help
window will pop up automatically ! You can optionaly
give {getkey} a pointer to some context sensitive
. If no pointer is supplied, it is assumed
that no help is available at this time, and the help
window pops up saying so. This help window will take
care of itself. You don't have to worry about screen
coordinates, colors, key input or anything.

The help text is an array of chars, that need not be
formated in any way. The help window will read the
array and display it with word wrapping at the end of
the lines. It can also be of any length. If the text
cannot fit in one window, a more prompt will be
showned. At any time, the user can leave help with the
ESC key.







EasyVision 1.0 User's Guide Page 16





Any extra spaces will be removed from the text, leaving
only one space between each word. Any leading spaces
to a line will also be removed. If you want to begin a
line with spaces, or separate some words with more than
one space, you must use the underscore (_) character.
You can highlight you text by surrounding characters
with the tilde (~) character.

--> If the F1 key is pressed, the help window is showned
and closed, then the function waits for another key.
F1 will never be returned by that function ! If a
is provided, the F1 key will still bring the
help window. Beware of NEVER setting the filter to an
impossible key entry or to the F1 keycode (315), or you
will be trapped by the {getkey} function !

þ Return If a normal key was pressed, the returned value is an
int representing the ASCII code of that key. (1-255)

If an extended key was pressed, the returned value is
an int representing the extended key code plus 256.
(256-396)

þ Example getkey (0) ; // Returns the first key pressed
// No help is available
getkey (13,edithelp) ; // Wait for the ENTER key
// With help available


























EasyVision 1.0 User's Guide Page 17




GETHEAP
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Getheap replaces 'farmalloc'.

þ Syntax #include "farheap.hpp"
char huge *getheap (unsigned long nbytes) ;

þ Remarks Allocates bytes on the far heap.

þ Return In C++ you cannot assign a void pointer to a typed
pointer without a typecast. As you will most often
want a huge pointer to char, this is what this function
returns. If you want to assign this pointer to a
pointer to a different type, just use a typecast.

þ Example char huge *ptr1 ;
int huge *ptr2 ;
ptr1 = getheap (1024) ;
ptr2 = (int huge*) getheap (100) ;


FREEHEAP
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Freeheap replaces 'farfree'.

þ Syntax #include "farheap.hpp"
void freeheap (void huge *heapptr) ;

þ Remarks The only difference from 'farfree' is that this
function offers the convenience of accepting a huge
pointer as argument.

þ Return None

þ Example char huge *ptr ;
ptr = getheap (sizeof (object)) ; // Allocate memory
freeheap (ptr) ; // Free memory
ptr = NULL ; // Always a good idea














EasyVision 1.0 User's Guide Page 18




HSTRLEN
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary This is a huge version of 'strlen'. It returns the
length of a string.

þ Syntax #include "hugefcts.hpp"
size_t hstrlen (char huge *string) ;

þ Remarks The only difference with 'strlen' is that this function
offers the convenience of accepting a huge pointer as
argument.

þ Return The length of the string. The type size_t is defined
in as an unsigned int.

þ Example length = hstrlen (text) ;


HSTRCPY
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary This is a huge version of 'strcpy'. It copies a string
into another.

þ Syntax #include "hugefcts.hpp"
char huge *hstrcpy (char huge *dest, char huge *src) ;

þ Remarks The only difference from 'strcpy' is that this function
offers the convenience of accepting huge pointers as
arguments.

þ Return A huge pointer to the destination string.

þ Example char huge *string ;
string = getheap (20) ;
hstrcpy (string,"Hello there !") ;

















EasyVision 1.0 User's Guide Page 19




SAVEVIDEO
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary This will save the current screen attributes in a
text_info structure. It has exactly the same effects
as a call to 'gettextinfo'. The difference is that it
can also save the actual screen content.

þ Syntax #include "screen.hpp"
void savevideo (text_info huge *ti[, char huge*huge
*savedscr]) ;

þ Remarks All members of the text_info structure are filled
with this function. is a huge pointer to a
huge char pointer. If this argument is provided, the
screen content will also be saved to a buffer in the
heap, and the huge pointer to char will be set to point
to this buffer.

þ Return None

þ Example text_info ti ;
char huge *scrbfr ;
savevideo (&ti,&scrbfr) ;


RESTOREVIDEO
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary This function will restore the screen video mode and
the text window size from a text_info structure. It
can also restore the screen content if it was saved by
a previous call to {savevideo}.

þ Syntax #include "screen.hpp"
void restorevideo (text_info huge *ti[, char huge*huge
*savedscr]) ;

þ Remarks The text_info structure must have been previously
filled with {savevideo}. The same is true for the
previous screen content.

þ Return None

þ Example restorevideo (&ti,&scrbfr) ;









EasyVision 1.0 User's Guide Page 20




SAVECURSOR
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary This function will save all cursor attributes,
INCLUDING THE CURSOR TYPE, in a {cur_info} structure.
Those attributes are: colors, x pos, y pos and
cursorshape. It will not save the other screen
attributes, and is therefore faster than {savevideo}.

þ Syntax #include "screen.hpp"
void savecursor (cur_info huge *ci) ;

þ Remarks The cur_info structure is as follow, and is defined in
"screen.hpp".

struct cur_info
{
unsigned char attribute ; // Cursor colors
unsigned char curx ; // Cursor X position
unsigned char cury ; // Cursor Y position
unsigned int curtype ; // Cursor type
} ;

þ Return None

þ Example cur_info ci ;
savecursor (&ci) ;


RESTORECURSOR
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary This function will restore all cursor attributes,
INCLUDING THE CURSOR TYPE, from a cur_info structure.

þ Syntax #include "screen.hpp"
void restorecursor (cur_info huge *ci) ;

þ Remarks The cursor attributes must have been previously saved
with {savecursor}.

þ Return None

þ Example cur_info ci ;
savecursor (&ci) ;
...
restorecursor (&ci) ;







EasyVision 1.0 User's Guide Page 21




ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
C H A P T E R 4 Using EasyVision's Classes
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

The EasyVision library has 4 classes. They provide a desktop, a
statusline, a menubar and windows. Those classes are fully
described in the following pages.

A classe description uses the following format:

First, the description of the class itself, its behavior, how it
is related to the other classes and the interface. Then, each
member function of the class is presented in the following
format:


MEMBER FUNCTION NAME
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Short description of this function behavior.

þ Syntax #include "header.h"
ReturnType FonctionName (, , ...) ;

YOU MUST NEVER WRITE A PROTOTYPE FOR A FUNCTION
YOURSELF. ALWAYS USE THE PROPER HEADER FILES. THEY
HAVE ADDITIONAL INFORMATIONS IN THEM !

--> When parameters are in brakets ([]), they are optional.
IF YOU WANT TO INCLUDE AN OPTIONAL PARAMETER, ALL
PARAMETERS BEFORE THAT ONE MUST BE INCLUDED AS WELL.

þ Remarks Parameters and usage are described here when needed.

þ Return The returned value of the function is explained here.

þ Example Examples of various calls to this function.



Using classes is quite easy ! First you declare a pointer to
this class. Then you instantiate (create) an object of this
class type with the operator 'new'. Now you can call the
classe's member functions with the '->' operator. When you're
finished, you free the memory taken by this class instance with
'delete'.

Many examples are available in the source code of the EasyVision
demo program (DEMO.CPP).




EasyVision 1.0 User's Guide Page 22




ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
C H A P T E R 5 EasyVision's TDESKTOP class
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

The {tdesktop} class is the first one to be instantiated in a
program that uses the EasyVision user interface.

This class will save the current screen, initialise the video
screen to the video mode of your choice, and display the desktop.
The desktop is the background on which the menubar, the
statusline and your windows will be displayed. You will also
call this class at the end of your program to restore the
previous video mode, restore the previous screen and reset
default colors and cursor position.

The {tdesktop} class as built in default values. Only one call
is required to do the work. The desktop will autosize itself to
the screen. However, if you would like to change those default
behaviors, other functions are provided to do so.

The {tdesktop} class can be used alone by itself. That is, it
can be the only class you will use in your application.

On the following pages, you will find each of tdesktop's member
functions.

An example of instantiating a {tdesktop} object is given in the
source code of the EasyVision's demo program (DEMO.CPP).

























EasyVision 1.0 User's Guide Page 23




TDESKTOP::SETTEXTMODE
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets the textmode in which {open} will draw the
desktop. This has no effect on the current textmode.
It will only take effect when {open} will be called.
The {refresh} function uses the current textmode. This
call is optional. If it is not made before a call to
{open}, textmode C80 (3) is assumed.

þ Syntax #include "tdesktop.hpp"
void settextmode (int mode) ;

þ Remarks Symbolic constant | Value | Text mode
------------------+-------+-------------------------
LASTMODE | -1 | Previous text mode
BW40 | 0 | Black and white, 40 cols
C40 | 1 | Color, 40 columns
BW80 | 2 | Black and white, 80 cols
C80 | 3 | Color, 80 columns
MONO | 7 | Monochrome, 80 columns
C4350 | 64 | EGA 43-line, VGA 50-line

To use the symbolic constants, must be
included.

þ Return None

þ Example desktop->settextmode (C80) ;


TDESKTOP::SETDESKCOLORS
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets the colors in which {open} or {refresh} will draw
the desktop.

þ Syntax #include "tdesktop.hpp"
void setdeskcolors (int back, int fore) ;

þ Remarks This has no effect on the current colors. It will only
be used when {open} or {refresh} will be called. This
call is optional. If {setdeskcolors} is not called
before a call to {open}, BLUE on LIGHTGRAY is assumed.
See appendix B for a list of available colors, color
codes and symbolic constants.

þ Return None

þ Example desktop->setdeskcolors (RED,LIGHTGRAY) ;




EasyVision 1.0 User's Guide Page 24




TDESKTOP::SETTEXTURE
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets the character with which {open} or {refresh} will
draw the desktop.

þ Syntax #include "tdesktop.hpp"
void settexture (char asciicode) ;

þ Remarks You must provide the character used to draw the
desktop, in the form of its ASCII code. Only ASCII
code greater or equal to 32 are accepted. This has no
effect on the current screen. It will only be used
when {open} or {refresh} will be called. This call is
optional. If {settexture} is not called before a call
to {open}, '°' is assumed.

þ Return None

þ Example desktop->settexture (' ') ; // Plain desktop


TDESKTOP::SETTITLE
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets the title, and title colors displayed at the very
top line of the desktop.

þ Syntax #include "tdesktop.hpp"
void settitle (char huge *text[, int back, int fore]) ;

þ Remarks The colors for the title are optional. If they are not
provided, the desktop's colors will be used. This is
used only if you do not intend to have a menubar, or if
you will have something displayed before the menubar is
created. This has no effect on the current desktop.
It will only be used when {open} or {refresh} will be
called. This call is optional. If {settitle} is not
called before a call to {open}, no title will be
displayed. To reset a previously defined title, use ""
as argument. You can give a pointer argument
that points to a text of any length, but only the part
of the title that will fit on the titlebar will be
displayed. So don't worry about the length of your
title...

þ Return None

þ Example desktop->settitle ("EasyVision 1.0",RED,BLACK) ;





EasyVision 1.0 User's Guide Page 25




TDESKTOP::OPEN
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Opens the desktop.

þ Syntax #include "tdesktop.hpp"
void open () ;

þ Remarks This will save the screen before the program was
started, initialise the video screen and then display
the desktop according to the default values, or those
set by the previous functions. This call is NOT
optional. You cannot 'reopen' an already opened
desktop. You must use the {refresh} function for that
action, or first close it.

If the desktop as been closed, it can then be re-
opened. This could be done for instance if you were to
shell to DOS or to another program.

þ Return None

þ Example desktop->open () ;


TDESKTOP::CLOSE
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Closes the Desktop.

þ Syntax #include "tdesktop.hpp"
void close () ;

þ Remarks This will restore the video screen as it were before
the desktop was opened. This call is NOT optional.
You must first {close} the desktop with this function
if you want to re-open it.

{close} does not reset any of the desktop settings.
You can easily re-open it after a shell to DOS for
example.

þ Return None

þ Example desktop->close () ;









EasyVision 1.0 User's Guide Page 26




TDESKTOP::INSERT
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Insert a {tstatusline} or {tmenubar} object into the
desktop.

þ Syntax #include "tdesktop.hpp"
void insert (tstatusline huge *sl) ;
void insert (tmenubar huge *mb) ;

þ Remarks The desktop has a {refresh} function that will redraw
the screen. Initialy, it will only redraw the desktop.
If you want it to be able to redraw the statusline and
menubar, you must {insert} them into the desktop.

This function is overloaded. You use the same function
to insert the statusline or the menubar.

--> You cannot insert more than one object of the same type
in the desktop, or the previous one will be lost.

þ Return None

þ Example desktop->insert (statusline) ;


DESKTOP::REFRESH
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary The desktop has a {refresh} function that will redraw
the screen. Using this function can be DANGEROUS...

þ Syntax #include "tdesktop.hpp"
void refresh () ;

þ Remarks If you want it to be able to redraw the statusline and
menubar, you must first {insert} them into the desktop.

--> The refresh function will use the current values for
colors, texture, etc... not the values when it was
opened. This means that you can change the desktop
colors for instance, and then {refresh} it.

--> IN EASYVISION 1.0, WINDOWS CANNOT BE REFRESHED. YOU
MUST MAKE ABSOLUTELY CERTAIN THAT THIS FUNCTION CANNOT
BE CALLED WHEN WINDOWS ARE OPENED, OR YOU WILL BE IN
BIG TROUBLE.

þ Return None

þ Example desktop->refresh () ;



EasyVision 1.0 User's Guide Page 27




ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
C H A P T E R 6 EasyVision's TSTATUSLINE class
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

The {tstatusline} class provides a standard statusline on the
last line of the screen. It is divided into 2 areas, each one
completely independent.

The left area is 10 spaces wide, including the dividing character
'|'. You have 8 spaces to display a message in this area. The
suggested message for this area is '~F1~ Help'. The right area
occupies the remainder of the line.

The {tstatusline} class as built in default values. The
statusline will autosize itself to the screen. However, if you
would like to change those default beheviors, other functions
will allow you to do so.

The {tstatusline} class can be used alone by itself. That is, it
can be the only class you will use in your application.

On the following pages, you will find each of the tstatusline's
member functions.

Examples of instantiating a {tstatusline} object are given in the
source code of the EasyVision's demo program (DEMO.CPP).



























EasyVision 1.0 User's Guide Page 28




TSTATUSLINE::SETLEFTCOLORS
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets the background, foreground and highlight colors
used by the {displayleft} function, when writing to the
left statusline.

þ Syntax #include "tstatusline.hpp"
void setleftcolors (int back[, int fore, int high]) ;

þ Remarks and are optional. If they are not
provided, defaults to BLACK, and to RED.
You can use color macros if is included.
Appendix B gives a descrition of available color codes

and macros.

þ Return None

þ Example statusline->setleftcolors (LIGHTGRAY,BLACK,RED) ;


TSTATUSLINE::SETRIGHTCOLORS
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets the background, foreground and highlight colors
used by the {displayright} function, when writing to
the right statusline.

þ Syntax #include "tstatusline.hpp"
void setrightcolors (int back[, int fore, int high]) ;

þ Remarks and are optional. If they are not
provided, defaults to BLACK, and to RED.
You can use color macros if is included.
Appendix B gives a descrition of available color codes
and macros.

þ Return None

þ Example statusline->setrightcolors (LIGHTGRAY,BLACK,RED) ;















EasyVision 1.0 User's Guide Page 29




TSTATUSLINE::DISPLAYLEFT
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Displays a message on the statusline, in the left area.

þ Syntax #include "tstatusline.hpp"
void displayleft ([char huge *text]) ;

þ Remarks The argument can point to a msg of any length,
including the '~' characters. If the message is too
long to fit in the area, only the first 8 characters
will be displayed. There is no need to clear the
statusline before using this function. You can toggle
between normal foreground statusline color and the
highlight color with the special character '~' (tilde).
To clear the statusline, call this function with no
parameter.

þ Return None

þ Example statusline->displayleft ("~F1~ Help") ; // Display text
statusline->displayleft () ; // Clear left statusline


TSTATUSLINE::DISPLAYRIGHT
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Displays a message on the statusline, in the right
area.

þ Syntax #include "tstatusline.hpp"
void displayright ([char huge *text]) ;

þ Remarks The argument can point to a msg of any length,
including the '~' characters. If the message is too
long to fit in the area, only the first 'n-2'
characters will be displayed, assuming the right area
is n characters wide. There is no need to clear the
statusline before using this function. You can toggle
between normal foreground statusline color and the
highlight color with the special character '~' (tilde).
To clear the statusline, call this function with no
parameter.

þ Return None

þ Example statusline->displayright ("This is ~EasyVision~ !") ;
statusline->displayright () ; // Clear right area






EasyVision 1.0 User's Guide Page 30




TSTATUSLINE::REFRESH
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary The statusline object has a {refresh} function that
will redraw it on the screen.

þ Syntax #include "tstatusline.hpp"
void refresh () ;

þ Remarks It will redraw the statusline and redisplay the last
message.

--> The refresh function will use the current values for
colors. This means that you can change the statusline
colors and then, {refresh} it with the new colors.

þ Return None

þ Example statusline->refresh () ;



































EasyVision 1.0 User's Guide Page 31




ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
C H A P T E R 7 EasyVision's TMENUBAR class
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

The {tmenubar} class provides a menubar on the first line of the
screen, with pull down menus and scrolling selection cursor. It
also activates an interrupt driven clock displayed at the end of
the menubar.

A menubar acts as a filter. You make the user inputs go 'trough'
the menubar. If the input is the F10 key, or an ALT-key
corresponding to a menu hotkey, the menubar is activated. If
not, the input returns unchanged.

Items created in the menus are assigned return values. When the
user selects an item, his input is changed to this return value
and returned from the menubar.

The {tmenubar} class as built in default values. The menubar
will autosize itself to the screen. However, if you would like
to change those default beheviors, functions will allow you to do
so.

The {tmenubar} class can be used alone by itself. That is, it
can be the only class you will use in your application.

YOU SHOULD NEVER INSTANTIATE MORE THAN ONE MENUBAR. RESULTS
COULD BE DANGEROUS.

On the following pages, you will find each of {tmenubar}'s member
functions.

Examples of instantiating and using a {tmenubar} object are given
in the source code of the EasyVision's demo program (DEMO.CPP).



















EasyVision 1.0 User's Guide Page 32




TMENUBAR::SETCOLORS
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets the background, foreground, highlight, cursor and
clock colors used by the {tmenubar} object.

þ Syntax #include "tmenubar.hpp"
void setcolors ([int back, int fore, int high, int
cursor, int clockback, int clockfore]) ;

þ Remarks All arguments are optional. If they are not provided,
they will default to the following values:

back = LIGHTGRAY
fore = BLACK
high = RED
cursor = GREEN
clockback = RED
clockfore = WHITE

You can use color macros if is included.
Appendix B gives a descrition of available color codes
and macros.

If you don't make a call to this function, the
previously mentioned default values are assumed.

--> When a menu has been created, it is thereafter illegal
to change the allready selected colors.

þ Return None

þ Example menubar->setcolors (BLUE,WHITE,RED,MAGENTA) ;





















EasyVision 1.0 User's Guide Page 33




TMENUBAR::SETHELP
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets the pointer to some help text that will be
displayed when F1 is pressed while in the menubar.

þ Syntax #include "tmenubar.hpp"
void sethelp (char huge *helptext) ;

þ Remarks The help text format is explained in the {getkey}
function description.

þ Return None

þ Example menubar->sethelp (menuhelp) ;


TMENUBAR::SETSLPTR
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets the pointer to the statusline.

þ Syntax #include "tmenubar.hpp"
void setslptr (tstatusline huge *slptr) ;

þ Remarks When you create menus and menu items, you can optionaly
give them a short help text that will be displayed on
the statusline when the menu cursor is on them. You
therefore need to tell the menubar where is the
statusline object. This is optional. If this pointer
is not set, the statusline help texts will not be
displayed.

þ Return None

þ Example menubar->setslptr (statusline) ;


















EasyVision 1.0 User's Guide Page 34




TMENUBAR::ADDMENU
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Adds a menu on the menubar.

þ Syntax #include "tmenubar.hpp"
void addmenu (char huge *name, int hotkey[, char huge
*sltext]) ;

þ Remarks : It can be of any length, but must fit on the
menubar. The first 2 characters of the
menubar are left blank, and the 10 lasts are
reserved for the menubar clock. 2 spaces
will be inserted between each menu.

: It must be a letter (A-Z), case insensitive.
If the letter is present in the menu name, it
will be highlighted.

: This is a short help text that will be
displayed on the statusline when this menu is
selected. It can be of any length.
{setslptr} must have been previously called.

þ Return None

þ Example menubar->addmenu ("Files",'F',"Create, open files") ;



























EasyVision 1.0 User's Guide Page 35




TMENUBAR::ADDITEM
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Adds an item in the last created menu.

þ Syntax #include "tmenubar.hpp"
void additem ([char huge *text, int hotkey, int
returnval, char huge *sltext]) ;

þ Remarks : This is the text displayed for this menu
entry. It can be of any length. The menu
will autosize itself to accomadate the widest
item.

: It must be a letter (A-Z), case insensitive.
If the letter is present in the item text, it
will be highlighted.

: If this item is selected, the user input
will be change to this value.

: This is a short help text that will be
displayed on the statusline when this item is
selected. It can be of any length.
{setslptr} must have been previously called.

--> If {additem} is called with no arguments, it will
insert a separator in the menu.

þ Return None

þ Example menubar->additem ("Open F3",'O',317,"Open file") ;






















EasyVision 1.0 User's Guide Page 36




TMENUBAR::TROUGH
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Makes an input go trough the menubar.

þ Syntax #include "tmenubar.hpp"
int trough (int key) ;

þ Remarks If is F10, the menubar is activated, but no menus
are opened. If is a menu hotkey, this menu is
opened.

þ Return If is not F10 or a menu hotkey, {trough} returns
unchanged. If the menubar is activated, then if
the user enters ESC, {trough} returns with 0.
Otherwise it returns with the return value of the menu
item selected.

þ Example int inchar ;
inchar = menubar->trough (getkey (0)) ;


TMENUBAR::ITEMSETAVAIL
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets availability of a menu item to TRUE or FALSE.

þ Syntax #include "tmenubar.hpp"
void itemsetavail (int menuhotkey, int itemhotkey, int
state) ;

þ Remarks You must provide the of the menu in which
the item exist, and the of the item
itself. Setting a menu item to TRUE will make it
available, to FALSE not available.

--> When a menu item is created, it is available by
default.

þ Return None

þ Example menubar->itemsetavail ('F','O',FALSE) ;












EasyVision 1.0 User's Guide Page 37




TMENUBAR::REFRESH
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary The menubar object has a {refresh} function that will
redraw it on the screen.

þ Syntax #include "tmenubar.hpp"
void refresh () ;

þ Remarks None

þ Return None

þ Example menubar->refresh () ;








































EasyVision 1.0 User's Guide Page 38




ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
C H A P T E R 8 EasyVision's TWINDOW class
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

The {twindow} class provides powerful window functions to your
programs. A window is where all your program's screen
inputs/outputs will take place.

The {twindow} class comes with many member functions. They allow
for manipulating the window position, size and attributes. Text
can be easily written to the window. Input fields will give you
formatted and secured user inputs. Push buttons will provide
options selection. All this and many more features.

The {twindow} class as built in default values. However, if you
would like to change those default beheviors, functions will
allow you to do so.

The {twindow} class can be used alone by itself. That is, it can
be the only class you will use in your application.

--> You can open simultanously as many windows as you like.
When you open a window, what was under it is saved to
be restored when you'll close it.

--> EasyVision doesn't keep track of the way windows
overlap. It doesn't know if a window is over or under
another one. Therefore, you should NEVER close a window
if another window covers part of it. Always close the
ones that are in the foreground first.

--> You must NEVER work with a window that is under another
one. If you do so, the integrity of the desktop will
be compromised.

On the following pages, you will find each of {twindow}'s member
functions.

Examples of instantiating and using a {twindow} object are given
in the source code of the EasyVision's demo program (DEMO.CPP).













EasyVision 1.0 User's Guide Page 39




TWINDOW::WINGETSCREENHEIGHT
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Returns the video screen height in lines.

þ Syntax #include "twindow.hpp"
int wingetscreenheight () ;

þ Remarks This could be needed if you wanted to center a window.

þ Return An 'int', the height of the screen.

þ Example lines = window->wingetscreenheight () ;


TWINDOW::WINGETSCREENWIDTH
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Returns the video screen width in columns.

þ Syntax #include "twindow.hpp"
int wingetscreenwidth () ;

þ Remarks This could be needed if you wanted to center a window.

þ Return An 'int', the width of the screen.

þ Example Cols = window->wingetscreenwidth () ;


























EasyVision 1.0 User's Guide Page 40




TWINDOW::WINSETPOS
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets the position of the window on the desktop.

þ Syntax #include "twindow.hpp"
void winsetpos (int row, int col) ;

þ Remarks and are the topleft corner of the window TO
BE OPENED. The first and last lines of the desktop are
reserved for the menubar and statusline and you can't
have part of the window off the screen. Therefore,
this function will validate all coordinates and change
them to get a valide window position.

--> If you set the size of the window before setting its
position, this size will be taken into account to
calculate the valide range of the and
arguments.

--> You CANNOT use this function once the window has been
opened. Use the {winmove} function instead.

þ Return None

þ Example window->winsetpos (10,12) ; // Topleft corner at 10,12




























EasyVision 1.0 User's Guide Page 41




TWINDOW::WINGETROW
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Returns the window row position of its topleft corner.

þ Syntax #include "twindow.hpp"
int wingetrow () ;

þ Remarks The top left corner of the screen is (1,1).

þ Return Row position of window.

þ Example row = window->wingetrow () ;


TWINDOW::WINGETCOL
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Returns the window column position, topleft corner.

þ Syntax #include "twindow.hpp"
int wingetcol () ;

þ Remarks The top left corner of the screen is (1,1).

þ Return Column position of window.

þ Example col = window->wingetcol () ;


























EasyVision 1.0 User's Guide Page 42




TWINDOW::WINSETSIZE
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets the size of the window.

þ Syntax #include "twindow.hpp"
void winsetsize (int height, int width) ;

þ Remarks and represent the size of the window,
frames included. The first and last lines of the
desktop are reserved for the menubar and statusline.
Also, you can't have part of the window off the screen.
Therefore, this function will validate the asked size
and change it to get a valide window size.

--> You CANNOT change the size of a window once it has been
opened.

þ Return None

þ Example window->winsetsize (10,60) ; // 10 rows by 60 cols


TWINDOW::WINGETHEIGHT
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Returns the window's height in lines.

þ Syntax #include "twindow.hpp"
int wingetheight () ;

þ Remarks The top and bottom frames are included in the height.

þ Return An 'int', the height of the window.

þ Example heigth = window->wingetheight () ;


TWINDOW::WINGETWIDTH
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Returns the window's width in columns.

þ Syntax #include "twindow.hpp"
int wingetwidth () ;

þ Remarks The left and right frames are included in the width.

þ Return An 'int', the width of the window.

þ Example width = window->wingetwidth () ;



EasyVision 1.0 User's Guide Page 43




TWINDOW::WINSETCOLORS
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets the background and foreground colors of a window.

þ Syntax #include "twindow.hpp"
void winsetcolors ([int back, int fore]) ;

þ Remarks These are the colors used to draw the window. Those
colors will be used by other functions when the color
arguments are optional. and are
optional, and will default to LIGHTGRAY and WHITE
respectively.

--> You CANNOT change the default colors of a window once
it has been opened.

þ Return None

þ Example window->winsetcolors (BLUE,WHITE) ;


TWINDOW::WINSETTITLE
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

þ Summary Sets the title displayed on the top frame of a window.

þ Syntax #include "twindow.hpp"
void winsettitle (char huge *title) ;

þ Remarks can point to a title of any length, and only<br /> the portion that will fit on the top frame will be<br /> displayed. If you don't give a title before opening a<br /> window, no title will be displayed.<br /> <br /> --> You CANNOT set a title after a window has been opened.<br /> <br /> þ Return None<br /> <br /> þ Example window->winsettitle ("User's file") ;<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 44<br /> <br /> <br /> <br /> <br /> TWINDOW::WINSETHELP<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Sets a pointer to some context sensitive help text that<br /> will be displayed if the F1 help key is pressed while<br /> in this window.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void winsethelp (char huge *ptrtohelp) ;<br /> <br /> þ Remarks The format of the help text is described in the<br /> {getkey} function.<br /> <br /> þ Return None<br /> <br /> þ Example window->winsethelp (inputhelp) ;<br /> <br /> <br /> TWINDOW::WINSETSLPTR<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Sets a pointer to an instantiated {tstatusline} object.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void winsetslptr (tstatusline huge *slptr) ;<br /> <br /> þ Remarks Input fields and buttons in a window can be given a<br /> short help text that will be displayed on the<br /> statusline when they are selected. To enable this<br /> function, you must give the window a ptr to your<br /> statusline.<br /> <br /> þ Return None<br /> <br /> þ Example window->winsetslptr (statusline) ;<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 45<br /> <br /> <br /> <br /> <br /> TWINDOW::WINOPEN<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Opens a window.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void winopen () ;<br /> <br /> þ Remarks The window is opened with default attributes, or the<br /> ones set by the previous functions. You CANNOT open an<br /> already opened window.<br /> <br /> Default attributes for a window are:<br /> <br /> Position is (row=2, col=1).<br /> Size is (height=3, width=6).<br /> Colors are WHITE on LIGHTGRAY.<br /> The cursor is on line 1.<br /> <br /> þ Return None<br /> <br /> þ Example window->winopen () ;<br /> <br /> <br /> TWINDOW::WINCLOSE<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Closes a window.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void winclose () ;<br /> <br /> þ Remarks You CANNOT close an already closed window. When you<br /> close a window, all its attributes are reset to their<br /> default values as if you had just declared this object.<br /> Your previous settings like size and colors aren't in<br /> effect anymore.<br /> <br /> All memory taken by the window is released. What was<br /> under this window when it was opened is restored.<br /> <br /> --> You should NEVER close a window that has part of itself<br /> hidden under another window. Always close the ones in<br /> the foreground first. This is your responsability !<br /> EasyVision doesn't know your window layer position and<br /> won't tell you if something goes wrong.<br /> <br /> þ Return None<br /> <br /> þ Example window->winclose () ;<br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 46<br /> <br /> <br /> <br /> <br /> TWINDOW::WINCLEAR<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Clears part or all the window content.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void winclear ([int left, int top, int right, int<br /> bottom]) ;<br /> <br /> þ Remarks The window must be opened to call this function. All<br /> arguments are validated and if incorrect, changed to<br /> fall within valide window coordinates.<br /> <br /> All arguments are optional, and will default to:<br /> <br /> left = 1 , top = 1,<br /> right = rightmost column, bottom = bottom line.<br /> <br /> So, calling this function with no arguments will clear<br /> the entire window.<br /> <br /> --> Beware that this function will also clear static text,<br /> buttons and input fields, BUT NOT REMOVE THEM. This<br /> will make them invisible, until you use them again. It<br /> is your responsability to make sure you don't erase<br /> them !<br /> <br /> þ Return None<br /> <br /> þ Example window->winclear (1,1,999,3) ; // Erases first 3 lines<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 47<br /> <br /> <br /> <br /> <br /> TWINDOW::WINWRITE<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Writes text to the window. Many options are available.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void winwrite (char huge *text[, int row, int col, int<br /> format, int fore, int back]) ;<br /> <br /> þ Remarks The window must be opened. The <text> argument can<br /> point to a text string of any length, but only the<br /> first 132 characters will be considered.<br /> <br /> --> This function will only print on 1 line of the window.<br /> If the string is longer than an entire line, only what<br /> will fit will be printed. NO LINE WRAPPING WILL OCCUR<br /> with this function !<br /> <br /> All arguments are optional, except for <text>.<br /> <br /> <text> : Pointer to the text to be printed.<br /> <br /> <row> : The {winwrite} function keeps track of the<br /> last line printed to, with an internal<br /> cursor. After each {winwrite}, the cursor is<br /> positioned on the next line.<br /> <br /> When you use <row>, it tells where the text<br /> is to be printed. Row 1 is the first line<br /> under the top frame.<br /> <br /> This argument is optional. If it is not<br /> given, or if you use the macro 'WSAME',<br /> {winwrite} will use it's internal cursor<br /> position. Text will be printed on the cursor<br /> line, and the cursor will move to the next<br /> line.<br /> <br /> --> If you DON'T give the <row> argument and<br /> write to the last window line, all the window<br /> will be scrolled up 1 line. YOU MUST MAKE<br /> SURE YOU DON'T HAVE ANY STATIC TEXT, BUTTONS<br /> OR INPUT FIELDS. THEY WILL BE SCROLLED UP<br /> ALSO AND THE WINDOW INTEGRITY WILL HAVE BEEN<br /> COMPROMISED !<br /> <br /> --> If you give the <row> argument, you can then<br /> write to the last line and no scrolling will<br /> occur. The window cursor will stay on the<br /> last line.<br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 48<br /> <br /> <br /> <br /> <br /> <br /> <col> : Column where text will start. This argument<br /> is optional. If it is not given, or if you<br /> use the macro 'WSAME', it will default to 1.<br /> <br /> <format>: Determines how the text string is justify.<br /> <br /> 0: No justification. <col> is used.<br /> 1: Left justified. <col> has no effect.<br /> 2: Centered. <col> has no effect.<br /> 3: Right justified. <col> has no effect.<br /> <br /> This argument is optional. If it is not<br /> given, it will default to 0.<br /> <br /> <fore> : Foreground color used. This argument is<br /> optional. It it is not given, or if you use<br /> the macro 'WSAME', it will default to the<br /> window foreground color.<br /> <br /> <back> : Background color used. This argument is<br /> optional. If it is not given, or if you use<br /> the macro 'WSAME', it will default to the<br /> window background color.<br /> <br /> þ Return None<br /> <br /> þ Example // Writes to current line, left justified, current<br /> // window colors, and move cursor to next line<br /> <br /> window->winwrite ("Hello") ;<br /> <br /> // Writes to current line, centered, current window<br /> // colors, and move cursor to next line. Even if<br /> // <col> is 1, it has no effect.<br /> <br /> window->winwrite ("Hello",WSAME,1,2) ;<br /> <br /> // Writes to specific line, specific column, specific<br /> // colors<br /> <br /> window->winwrite ("Hello",5,10,0,YELLOW,RED) ;<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 49<br /> <br /> <br /> <br /> <br /> TWINDOW::WINSWRITE<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Writes STATIC text to the window. Many options are<br /> available.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void winswrite (char huge *text[, int row, int col, int<br /> format, int fore, int back]) ;<br /> <br /> þ Remarks All comments for {winwrite} are still true for<br /> {winswrite}.<br /> <br /> Currently, the {twindow} class doesn't have a {refresh}<br /> function like the {tdesktop}, {tstatusline} and<br /> {tmenubar} classes. The {winswrite} function has been<br /> implemented to make possible a future {refresh}<br /> function.<br /> <br /> The {winswrite} function acts exactly as the {winwrite}<br /> function. However, all the calls to {winswrite} are<br /> saved in a queue. Later, when the {refresh} function<br /> is implemented, all calls to {winswrite} will be remade<br /> to redisplay those static texts.<br /> <br /> --> All calls to this function allocate memory, and are<br /> much slower than a call to the regular {winwrite}.<br /> {winswrite} SHOULD ONLY BE USED for text that will not<br /> be erased until the window is closed. For instance, an<br /> identifier for an input field, or some other<br /> identifications.<br /> <br /> --> You SOULD NEVER USE this function if you intend to<br /> scroll the window or erase it. Use it only if you want<br /> your text to be available to the {refresh} function.<br /> <br /> þ Return None<br /> <br /> þ Example See the {winwrite} examples<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 50<br /> <br /> <br /> <br /> <br /> TWINDOW::WINTEXT<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Displays a text array in current window with word<br /> wrapping and 'PgDown/Esc' prompts.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void wintext (char huge *textptr [,int fore, int high,<br /> int helpflag]) ;<br /> <br /> þ Remarks The window must be opened to call this function.<br /> <br /> <textptr>:This points to the text to be displayed.<br /> This text can be of any length. The format<br /> of this text is explained in the {getkey}<br /> function.<br /> <br /> A 'PgDown' prompt will be created to allow<br /> the user to see the remaining text if it<br /> couldn't all fit in the window.<br /> <br /> An 'Esc' prompt will be created to allow the<br /> user to stop viewing text at his convenience.<br /> <br /> --> When you use this function, make sure the<br /> window is totally empty. Everything that was<br /> in the window is erased when you call this<br /> function.<br /> <br /> <fore> : Foreground color used. This argument is<br /> optional. If it is not given, or if you use<br /> the macro 'WSAME', the default foreground<br /> color of the window will be used.<br /> <br /> <high> : Highlight color used. This argument is<br /> optional. If it is not given, the color<br /> YELLOW will be used for highlights.<br /> <br /> <helpflag>: Determines if the F1 help key will be<br /> available when the text is displayed. 0<br /> means NO, 1 means YES. This argument is<br /> optional and default to 1. You should never<br /> have to set this to 0. It's internaly used<br /> to prevent the F1 help routine to call itself<br /> from help.<br /> <br /> þ Return None<br /> <br /> þ Example window->wintext (instructions) ;<br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 51<br /> <br /> <br /> <br /> <br /> TWINDOW::WINTEXTFILE<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Displays a text file from disk in current window with<br /> word wrapping and 'PgDown/Esc' prompts.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void wintextfile (char huge *path [,int fore, int<br /> high]) ;<br /> <br /> þ Remarks This function acts exactly the same as {wintext}. The<br /> only difference is that it gets it's input text from a<br /> disk file.<br /> <br /> <path> : Complete path to disk file. If the file<br /> cannot be found, 'File not found' is<br /> displayed instead.<br /> <br /> <fore> : Foreground color used. This argument is<br /> optional. If it is not given, or if you use<br /> the macro 'WSAME', the default foreground<br /> color of the window will be used.<br /> <br /> <high> : Highlight color used. This argument is<br /> optional. If it is not given, the color<br /> YELLOW will be used for highlights.<br /> <br /> --> The <helpflag> argument is not used. Help is<br /> always available.<br /> <br /> þ Return None<br /> <br /> þ Example window->wintextfile ("C:\\autoexec.bat") ;<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 52<br /> <br /> <br /> <br /> <br /> TWINDOW::WINMOVE<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Moves the windows to a new location.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void winmove (int row, int col) ;<br /> <br /> þ Remarks The window must be opened. <row> and <col> are the<br /> topleft corner of the window. The first and last lines<br /> of the desktop are reserved for the menubar and<br /> statusline and you can't have part of the window off<br /> the screen. Therefore, this function will validate all<br /> coordinates and change them to get a valide window<br /> position.<br /> <br /> þ Return None<br /> <br /> þ Example window->winmove (10,12) ;<br /> <br /> <br /> TWINDOW::WINSCROLL<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Moves window in 1 of 4 direction.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void winscroll (char direction) ;<br /> <br /> þ Remarks The entire window will be moved, if possible, 1<br /> character in the requested direction. The name can be<br /> a little confusing. It is not the window content that<br /> is scrolled. It's the entire window.<br /> <br /> The argument is a character, case insensitive:<br /> <br /> U: Up, D: Down, L: Left, R: Right.<br /> <br /> þ Return None<br /> <br /> þ Example window->winscroll ('U') ; // Move window up 1 line<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 53<br /> <br /> <br /> <br /> <br /> TWINDOW::WININPUT<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Allow inputs to be made in multiple input fields, and<br /> push buttons selection.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> int wininput () ;<br /> <br /> þ Remarks You must have created at least 1 input field prior to<br /> calling this function.<br /> <br /> The user will be able to move between input fields and<br /> buttons with TAB and SHIFT-TAB.<br /> <br /> þ Return If no push buttons were created, {wininput} will return<br /> <br /> with 13 or 27. 13 means the user confirmed the inputs<br /> by pressing ENTER. 27 means the user aborted the input<br /> by pressing ESC.<br /> <br /> If buttons were created, {wininput} will return with<br /> the identification value of the button pushed.<br /> <br /> þ Example userinput = window->wininput () ;<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 54<br /> <br /> <br /> <br /> <br /> TWINDOW::FIELDSETLENGTHS<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Sets the length of the next input field to be created<br /> and the length of its answer buffer.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void fieldsetlengths (int answer, int field) ;<br /> <br /> þ Remarks <answer>: The maximum length of the input buffer. The<br /> user is allow to enter a string no longer<br /> than this limit. The upper limit is 32K.<br /> That should be enough !<br /> <br /> <field> : The length of the input field in the window<br /> in characters. The input field cannot be<br /> wider than the window. The input field<br /> cannot be wider than the answer buffer<br /> length.<br /> <br /> þ Return None<br /> <br /> þ Example window->fieldsetlengths (40,20) ;<br /> <br /> <br /> TWINDOW::FIELDSETCOLORS<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Sets the colors used in the next input field to be<br /> created.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void fieldsetcolors ([int back, int foreon, int<br /> foreoff]) ;<br /> <br /> þ Remarks <back> : Background color used. This argument is<br /> optional. If it is not given, or if the<br /> macro 'WSAME' is used, it will default to the<br /> window default background color.<br /> <br /> <foreon>: Foreground color used when the field is<br /> active. This argument is optional. If it is<br /> not given, it will default to WHITE.<br /> <br /> <foreoff>:Foreground color used when the field is<br /> inactive. This argument is optional. If it<br /> is not given, it will default to DARKGRAY.<br /> <br /> þ Return None<br /> <br /> þ Example window->fieldsetcolors (GREEN,WHITE,WHITE) ;<br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 55<br /> <br /> <br /> <br /> <br /> TWINDOW::FIELDSETFTR<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Sets the filter for the next input field to be created.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void fieldsetftr (int ftrtype [,char huge *extra]) ;<br /> <br /> þ Remarks An input field will allow only certain characters as<br /> input. <ftrtype> will determine what characters are<br /> accepted.<br /> <br /> 0: All characters are allowed, except control chars.<br /> 1: A-Z and a-z only. *** Space (32) not allowed ***<br /> 2: 0-9 only.<br /> 3: A-Z, a-z and 0-9 only.<br /> 4: No characters allowed.<br /> <br /> <extra> : Include, between quotes, other characters<br /> that you want accepted by the filter. Often<br /> used to include the space char (ASCII 32).<br /> <br /> þ Return None<br /> <br /> þ Example window->fieldsetftr (3,"\:_") ; // Enough for a path<br /> <br /> <br /> TWINDOW::FIELDSETATTRIB<br /> <br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Sets attributes for the next input field to be created.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void fieldsetattrib ([int caps, int restore, int<br /> empty]) ;<br /> <br /> þ Remarks <caps> : If set to 1, all inputs will be converted to<br /> CAPS. This argument is optional and will<br /> default to 0.<br /> <br /> <restore>:If set to 1, what was under a field will be<br /> restored when the field is inactive. This<br /> argument is optional and will default to 0.<br /> <br /> <empty> : If set to 0, the user won't be allowed to<br /> input an empty string. This argument is<br /> optional and will default to 1.<br /> <br /> þ Return None<br /> <br /> þ Example window->fieldsetattrib (1) ; // Switch to CAPS<br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 56<br /> <br /> <br /> <br /> <br /> TWINDOW::FIELDCREATE<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Create a new input field in the window.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void fieldcreate (int row, int col [,char huge<br /> *defaultasw, char huge *sltext]) ;<br /> <br /> þ Remarks The window must be opened prior to calling this<br /> function.<br /> <br /> Fields have default built in behaviors when a window is<br /> first created. If you don't call any function to set<br /> their attributes, buttons will default to the<br /> following:<br /> <br /> The field and the answer buffer will have a length of 1<br /> character.<br /> <br /> The field will be WHITE on BLUE.<br /> <br /> The default filter will be 1, with no extra characters.<br /> <br /> CAPS LOCK will not be activated, what is under the<br /> field won't be restored when the field is inactive, and<br /> the user will be permitted to enter an empty string.<br /> <br /> <row> : Row of input field.<br /> <br /> <col> : Column of input field. <row> and <col> are<br /> validated to make sure the input field fits<br /> into the window. If the position is<br /> incorrect, it will be automatically changed.<br /> <br /> <defaultasw>: This is the default answer that will be<br /> put in the input field. This argument is<br /> optional. If it is not given, the field will<br /> be initialy empty.<br /> <br /> <sltext>: This is a short help text that will be<br /> displayed on the status line when the field<br /> is active. This arguement is optional. If<br /> it is not given, no help text will be<br /> displayed. {winsetslptr} must have been<br /> called.<br /> <br /> þ Return None<br /> <br /> þ Example window->fieldcreate (2,2,"Canada","Enter country") ;<br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 57<br /> <br /> <br /> <br /> <br /> TWINDOW::FIELDINPUT<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Get user input from one input field.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> int fieldinput ([int fieldnb]) ;<br /> <br /> þ Remarks You must have created at least 1 input field to use<br /> this function. Fields are given numbers when they are<br /> created. The first field created is number 1.<br /> <br /> <fieldnb>:This is the field from which you will make<br /> the input. This field must exist. This<br /> argument is optional. If it is not given, it<br /> will default to 1.<br /> <br /> If you want to take inputs from many fields, you should<br /> consider using the {wininput} function instead.<br /> <br /> þ Return {fieldinput} with return with an ASCII code<br /> representing how the user terminated the input. This<br /> can be CR, ESC, TAB or SHIFT-TAB.<br /> <br /> þ Example window->fieldinput (f) ;<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 58<br /> <br /> <br /> <br /> <br /> TWINDOW::FIELDSETASW<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Sets a field current content.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void fieldsetasw (char huge *answer [,int fieldnb]) ;<br /> <br /> þ Remarks Even if the content is immediately changed, the field<br /> on the screen will be updated only when it is<br /> activated.<br /> <br /> <answer>: String to copy to the field. It can be of<br /> any length, but only what will fit in the<br /> answer buffer will be copied.<br /> <br /> <fieldnb>:Number of the field to copy to. This<br /> argument is optional and will default to 1.<br /> <br /> þ Return None<br /> <br /> þ Example window->fieldsetasw ("C:\\UTILS\\",5) ;<br /> <br /> <br /> TWINDOW::FIELDGETASW<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Reads the content of the answer buffer of an input<br /> field.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void fieldgetasw (char huge *dest [,int fieldnb]) ;<br /> <br /> þ Remarks The answer buffer of field <fieldnb> is copied to<br /> <dest>. <fieldnb> is optional and will default to 1.<br /> <br /> --> There is no way for the function to know if your<br /> destination is big enough to hold the content of the<br /> answer buffer. YOU MUST MAKE ABSOLUTELY SURE THAT YOUR<br /> DESTINATION IS AS BIG AS THE ANSWER BUFFER.<br /> <br /> þ Return None<br /> <br /> þ Example window->fieldgetasw (response,nb) ;<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 59<br /> <br /> <br /> <br /> <br /> TWINDOW::BUTTONSETCOLORS<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Sets the colors used for all the window's buttons.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void buttonsetcolors ([int back, int foreon, int<br /> foreoff, int high]) ;<br /> <br /> þ Remarks All buttons use the same color configuration. You<br /> can't use this function once a button has been created.<br /> <br /> <back> : Background color of all buttons. This<br /> argument is optional and will default to<br /> GREEN.<br /> <br /> <foreon>: Foreground color of active buttons. This<br /> argument is optional and will default to<br /> WHITE.<br /> <br /> <foreoff>:Foreground color of inactive buttons. This<br /> argument is optional and will default to<br /> BLACK.<br /> <br /> <high> : Highlight color of all buttons. This<br /> argument is optional and will default to<br /> YELLOW.<br /> <br /> þ Return None<br /> <br /> þ Example window->buttonsetcolors (BLUE,WHITE,BLACK,RED) ;<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 60<br /> <br /> <br /> <br /> <br /> TWINDOW::BUTTONCREATE<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Creates a new button.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void buttoncreate (int row, int col, char huge *name,<br /> int buttonkey [,char huge *sltext]) ;<br /> <br /> þ Remarks The window must be opened to use this function. The<br /> window must be big enough to hold the button. It must<br /> be at least 4 lines high, and 11 columns wide.<br /> <br /> You can create as many buttons as you want. There is<br /> no upper limit.<br /> <br /> Button have default built in values when a window is<br /> first created. You don't need to call the<br /> {buttonsetcolors} function. If you don't, buttons will<br /> default to a GREEN background, WHITE text when active,<br /> BLACK text when inactive, and YELLOW highlight. The<br /> availability status of a newly created button always<br /> defaults to 1 (available).<br /> <br /> The first button created will be considered the default<br /> button. This button will be activated when you request<br /> a {buttoninput}.<br /> <br /> <row> : Row position of the new button.<br /> <br /> <col> : Column position of the new button. If <row><br /> and <col> are not valide, they will be<br /> changed to a correct position.<br /> <br /> --> You must make sure buttons don't overlap. A<br /> button needs an empty line under and to the<br /> right of itself.<br /> <br /> <name> : The name to put on the button. It can be of<br /> any length, but only the first 8 characters<br /> will be considered. Names aren't<br /> automatically centered on the buttons.<br /> Center the name manually by inserting spaces<br /> in the name.<br /> <br /> <buttonkey>: This is the ASCII code that will identify<br /> a particular button. Some rules are to be<br /> observed:<br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 61<br /> <br /> <br /> <br /> <br /> <br /> If the identification code of the button<br /> matches a character in its name, that<br /> character will be highlighted.<br /> <br /> TAB/SHIFT-TAB and arrow keys codes cannot be<br /> used to identify a button. (9, 271, 328, 336,<br /> 331, 333)<br /> <br /> <sltext>: This is a short help text that will be<br /> displayed on the status line when the button<br /> is active. This arguement is optional. If<br /> it is not given, no help text will be<br /> displayed. {winsetslptr} must have been<br /> called.<br /> <br /> þ Return None<br /> <br /> þ Example window->buttoncreate (10,2," Save",'S',"Save file") ;<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 62<br /> <br /> <br /> <br /> <br /> TWINDOW::BUTTONPUSH<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Push a button.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void buttonpush (int buttonkey) ;<br /> <br /> þ Remarks <buttonkey> is the identification code (case<br /> insensitive) of the button you want to push. If the<br /> button doesn't exist, the function has no effect.<br /> Otherwise, the button is pushed in a 3D fashion.<br /> <br /> þ Return None<br /> <br /> þ Example window->buttonpush ('S') ;<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 63<br /> <br /> <br /> <br /> <br /> TWINDOW::BUTTONINPUT<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Makes user go trough the buttons with TAB/SHIFT-TAB.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> int buttoninput ([int inchar, int first, int tabexit]);<br /> <br /> þ Remarks You must have created at least 1 button to call this<br /> function, and there must be at least one button<br /> available.<br /> <br /> <inchar>: The initial user input (ASCII code). This<br /> could come from some previous processing.<br /> For instance, the result of an input field.<br /> This argument is optional and will default to<br /> 0.<br /> <br /> <first> : Determines which button will first be made<br /> active during the input. 1 means the first<br /> created button, 0 means the last. This<br /> argument is optional and will default to 1.<br /> <br /> <tabexit>:0 means the user can't get out of the input<br /> by going past the first or last button with<br /> TAB or SHIFT-TAB. Instead the active button<br /> will wrap around. 1 means it can get out.<br /> This argument is optional and will default to<br /> 0.<br /> <br /> þ Return The function returns an int. It is the identification<br /> code of the button that was pushed. If the function<br /> was permitted to exit (<tabexit> = 1), then it can also<br /> return the TAB or SHIFT-TAB code. TAB (9) means the<br /> user got past the last button, SHIFT-TAB (271) means he<br /> got past the first button.<br /> <br /> þ Example inchar = window->buttoninput () ; // Can't return until<br /> // button is pressed<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 64<br /> <br /> <br /> <br /> <br /> TWINDOW::BUTTONSETAVAIL<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> þ Summary Sets the availability of a button.<br /> <br /> þ Syntax #include "twindow.hpp"<br /> void buttonsetavail (int buttonkey, int state) ;<br /> <br /> þ Remarks The button specified MUST exist.<br /> <br /> <buttonkey>: The identification code of the button that<br /> you want to change.<br /> <br /> <state> : 1 means this button is available. 0 means it<br /> is not. When a button is created with<br /> {buttoncreate}, its availability status is<br /> automatically set to 1.<br /> <br /> þ Return None<br /> <br /> þ Example window->buttonsetavail ('S',0) ; // Save button OFF<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 65<br /> <br /> <br /> <br /> <br /> ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ<br /> ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ<br /> C H A P T E R 9 EasyVision's demo program<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> I am a true believer in 'You learn faster by looking at<br /> examples'. So, I have included a demo program with EasyVision.<br /> This demo program is included in the archive under the name<br /> DEMO.CPP. The compiled version is available under EVISION.EXE.<br /> <br /> I have tried to use as many functions as possible in this short<br /> source code. It is fully commented and illustrate the working<br /> relationship between all those functions and classes.<br /> <br /> I really think that 90% of your questions can be answered by<br /> going through this demo program. You are invited to try some<br /> modifications of your own, and see the results.<br /> <br /> I'll say it again... You should really print all of this<br /> documentation for easier reading. It's always a good idea to<br /> have the docs nearby when everything seems to go wrong.<br /> <br /> <br /> The Demo Program<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> A couple of things are to be remembered from this demo source<br /> code:<br /> <br /> First, you should always use HUGE POINTERS in your code. You'll<br /> be on the safe side and avoid many problems.<br /> <br /> I have used a global variable for the general help text. You<br /> should put all texts and prompts in a separate ressource file.<br /> This will make it easy to update prompts or make an alternate<br /> language file.<br /> <br /> EasyVision won't prevent you from using 'printf' statements.<br /> However, you should work within the EasyVision boundaries and use<br /> the provided output functions.<br /> <br /> All classes come with built in default values. Often, only one<br /> call is needed to use them if the defaults are to your taste.<br /> <br /> Looking at this demo program, you can see that you can make great<br /> looking software faster than ever. Take the time to become<br /> familiar with EasyVision. The rewards will be less frustrations<br /> and more enjoyment out of your programming. Have fun !<br /> <br /> Remy Gendron<br /> author of EasyVision<br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 66<br /> <br /> <br /> <br /> <br /> ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ<br /> ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ<br /> C H A P T E R 10 Things you should not do<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> Here are a couple of things I have found to be hasardeous to your<br /> health. I'd like to share them with you...<br /> <br /> Use this library without printing the manual.<br /> Use this library without looking at the example demo program.<br /> Use this library without registering !<br /> Use printf statements.<br /> Use scanf statements.<br /> Instantiate more than one {tmenubar} object.<br /> Smoke.<br /> Use 3000 {winswrite} statements.<br /> Use {wintextfile} on really big text files. It's kindda slow.<br /> Using BC++ 3.0 on a slow computer.<br /> Using a function without reading its documentation twice.<br /> Make fun of your brother in law if he's a karate black belt.<br /> <br /> You should begin to get the idea... Be careful, that's all I<br /> ask...<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 67<br /> <br /> <br /> <br /> <br /> ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ<br /> ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ<br /> A P P E N D I X A Extended keycodes<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> Extended keycodes are returned when you press a key that doesn't<br /> have an associated ASCII code. They are represented by stuffing<br /> 2 codes into the keyboard buffer. A 0 followed by an extended<br /> key keycode in the range 0 through 255.<br /> <br /> The EasyVision {getkey} function deals with these codes by<br /> returning values (int) in the range 0 through 511. The standard<br /> ASCII codes are returned unchanged (Guess why ?). Extended<br /> keycodes are added 256 to their real value for convenience, and<br /> are returned as a single number. Here they are...<br /> <br /> 259 NUL<br /> 271 Shift-TAB<br /> 272-281 Alt Q/W/E/R/T/Y/U/I/O/P<br /> 286-294 Alt A/S/D/F/G/H/J/K/L<br /> 300-306 Alt Z/X/C/V/B/N/M<br /> 315-324 F1 to F10<br /> 327 Home<br /> 328 Up arrow key<br /> 329 Page Up<br /> 331 Left arrow key<br /> 333 Right arrow key<br /> 335 End<br /> 336 Down arrow key<br /> 337 Page Down<br /> 338 Ins<br /> 339 Del<br /> 340-349 Shift-F1 to Shift-F10<br /> 350-359 Ctrl-F1 to Ctrl-F10<br /> 360-369 Alt-F1 to Alt-F10<br /> 370 Ctrl-Print Screen<br /> 371 Ctrl-Left arrow key<br /> 372 Ctrl-Right arrow key<br /> 373 Ctrl-End<br /> 374 Ctrl-Page Down<br /> 375 Ctrl-Home<br /> 376-387 Alt 1/2/3/4/5/6/7/8/9/0/-/=<br /> 388 Ctrl-Page Up<br /> 389 F11<br /> 390 F12<br /> 391 Shift-F11<br /> 392 Shift-F12<br /> 393 Ctrl-F11<br /> 394 Ctrl-F12<br /> 395 Alt-F11<br /> 396 Alt-F12<br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 68<br /> <br /> <br /> <br /> <br /> <br /> ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ<br /> ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ<br /> A P P E N D I X B Color Codes and Symbolic constants<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> When asked for a color argument, you must provide one of the<br /> following values. As an alternative, you can also use special<br /> MACROS, provided <conio.h> as been included.<br /> <br /> <br /> <br /> Available background colors:<br /> <br /> 0 BLACK<br /> 1 BLUE<br /> 2 GREEN<br /> 3 CYAN<br /> 4 RED<br /> 5 MAGENTA<br /> 6 BROWN<br /> 7 LIGHTGRAY<br /> <br /> <br /> <br /> Available foreground colors:<br /> <br /> 0 BLACK 8 DARKGRAY<br /> 1 BLUE 9 LIGHTBLUE<br /> 2 GREEN 10 LIGHTGREEN<br /> 3 CYAN 11 LIGHTCYAN<br /> 4 RED 12 LIGHTRED<br /> 5 MAGENTA 13 LIGHTMAGENTA<br /> 6 BROWN 14 YELLOW<br /> 7 LIGHTGRAY 15 WHITE<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 69<br /> <br /> <br /> <br /> <br /> <br /> ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ<br /> ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ<br /> A P P E N D I X C Trademarks<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> Turbo vision from Borland<br /> <br /> DeskView from Quarterdeck<br /> <br /> EasyVision from TNG SOFT ENTERPRISES<br /> <br /> CXL from Mike Smedley<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> EasyVision 1.0 User's Guide Page 70<br /> <br /> <br /> <br /> <br /> <br /> ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ<br /> ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ<br /> A P P E N D I X D Common Questions and Answers<br /> ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /> <br /> As this is the first release of this software, I don't have any<br /> questions or answers. Doesn't make for a big appendix D...<br /> <br /> I will gladly answer any questions relating to this software. I<br /> can be reach via the C++ FidoNet echomail conference. Address<br /> your message to 'Remy Gendron'. Don't make a mistake in the name<br /> because I don't read the echo. The name must be correct if I<br /> want to be alerted to your message.<br /> <br /> I will not send answers through Netmail. It costs something !<br /> But the real reason is that it won't benefit anyone else.<br /> <br /> Any comments, bug reports or suggestions will be appreciated.<br /> <br /> <br /> <br /> <br /> STARFLEET COMMAND BBS<br /> (418) 525-6899/4740/6803<br /> FidoNet: 1:240/1701<br /> <br /> <br /> <br /> or<br /> <br /> <br /> <br /> TNG SOFT ENTERPRISES<br /> 2480 Ave de Vitre<br /> Quebec, Quebec<br /> Canada<br /> G1J 4A6<br /> <br /> <br /> <br /> Thank you for using this software !<br /> <br /> Remy Gendron<br /> Author of EasyVision<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br><br> </div><!--/entry --> </div><!-- .entry-container --> <footer class="post-footer postdata fix"> </footer><!-- .post-footer --> <div class='postdata line'> </div> <section id="comments"> <h3 class="comments"><span class="icon"> </span> 3 Responses to “Category : C Source Code<br>Archive   : EVISION1.ZIP<br>Filename : USERDOC.TXT<br>”</h3> <ol class="commentlist"> <li id="comment-468" class="comment even thread-even depth-1 plain-nested"> <div id="div-comment-468" class="comment-body"> <div class="comment-author fix vcard"> <img alt='' src='https://secure.gravatar.com/avatar/8f76d6c77c12a5a1083dce633a326642?s=48&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/8f76d6c77c12a5a1083dce633a326642?s=96&d=mm&r=g 2x' class='avatar avatar-48 photo' height='48' width='48' loading='lazy' decoding='async'/> <div class="comment-author-link"> <cite class="fn">Daniel</cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"><a href="https://www.pcorner.com/list/#comment-468"> January 27, 2013 at 3:59 pm</a> </div> </div> <p>Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!</p> </div> <div class="reply"> </div> </li><!-- #comment-## --> <li id="comment-1491" class="comment odd alt thread-odd thread-alt depth-1 plain-nested"> <div id="div-comment-1491" class="comment-body"> <div class="comment-author fix vcard"> <img alt='' src='https://secure.gravatar.com/avatar/6b4f9d1304972a01f7c30ad1710ddc18?s=48&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/6b4f9d1304972a01f7c30ad1710ddc18?s=96&d=mm&r=g 2x' class='avatar avatar-48 photo' height='48' width='48' loading='lazy' decoding='async'/> <div class="comment-author-link"> <cite class="fn">Joshie</cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"><a href="https://www.pcorner.com/list/#comment-1491"> March 18, 2014 at 4:57 pm</a> </div> </div> <p>This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.</p> </div> <div class="reply"> </div> </li><!-- #comment-## --> <li id="comment-31187" class="comment even thread-even depth-1 plain-nested"> <div id="div-comment-31187" class="comment-body"> <div class="comment-author fix vcard"> <img alt='' src='https://secure.gravatar.com/avatar/e91d5d889b8284060613b258afef30f7?s=48&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/e91d5d889b8284060613b258afef30f7?s=96&d=mm&r=g 2x' class='avatar avatar-48 photo' height='48' width='48' loading='lazy' decoding='async'/> <div class="comment-author-link"> <cite class="fn">DiskingRound</cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"><a href="https://www.pcorner.com/list/#comment-31187"> January 14, 2015 at 10:57 pm</a> </div> </div> <p>But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: <a href="http://www.os2museum.com/wp/mtswslnk/" rel="nofollow ugc">http://www.os2museum.com/wp/mtswslnk/</a></p> </div> <div class="reply"> </div> </li><!-- #comment-## --> </ol> <div class="navigation fix"> <div class="alignleft"></div> <div class="alignright"></div> </div> </section> <!-- #comments --> </article><!--/post --> </div><!-- #content --> </div><!-- #main-col --> <div id='sidebar-shell-1' class='sidebar-shell sidebar-shell-right'> <div class="dbx-group right boxed warea" id="sidebar"> <!--widget start --><aside id="block-6" class="dbx-box suf-widget widget_block"><div class="dbx-content"> <h2 class="wp-block-heading">Donate</h2> </div></aside><!--widget end --><!--widget start --><aside id="block-7" class="dbx-box suf-widget widget_block widget_text"><div class="dbx-content"> <p>Please help defray the cost of running this free service, send Zelle payment to The Programmer's Corner at donation@pcorner.com</p> </div></aside><!--widget end --><!--widget start --><aside id="text-7" class="dbx-box suf-widget widget_text"><div class="dbx-content"> <div class="textwidget"><div style="display:inline-block;width:160px;height:1200px;overflow:hidden"> <div style="height:600px;overflow:hidden"> <script type="text/javascript"> amzn_assoc_placement = "adunit0"; amzn_assoc_enable_interest_ads = "true"; amzn_assoc_tracking_id = "zca-20"; amzn_assoc_ad_mode = "auto"; amzn_assoc_ad_type = "smart"; amzn_assoc_marketplace = "amazon"; amzn_assoc_region = "US"; amzn_assoc_linkid = "ea8faac85a6c9ee94ab5174bccaeb487"; amzn_assoc_emphasize_categories = "13900871"; amzn_assoc_fallback_mode = {"type":"search","value":"DOS Windows"}; amzn_assoc_default_category = "All"; </script> <script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US"></script> </div> <div style="width:160px;height:600px;overflow:hidden"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:inline-block;width:160px;height:600px" data-ad-client="ca-pub-8001169946558833" data-ad-slot="3404908173"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div></div> </div></aside><!--widget end --><!--widget start --><aside id="text-4" class="dbx-box suf-widget widget_text"><div class="dbx-content"> <div class="textwidget"><div class="alignleft" style="height:250px"> <script type='text/javascript'> amzn_assoc_ad_type = 'banner'; amzn_assoc_tracking_id = 'zca-20'; amzn_assoc_marketplace = 'amazon'; amzn_assoc_region = 'US'; amzn_assoc_placement = 'assoc_banner_placement_default'; amzn_assoc_linkid = 'IHR4HJGBAKD7GTXW'; amzn_assoc_campaigns = 'primemain'; amzn_assoc_p = '12'; amzn_assoc_banner_type = 'promotions'; amzn_assoc_banner_id = '1MDTME9E9G651CJTDA82'; amzn_assoc_width = '300'; amzn_assoc_height = '250'; </script> <script src='//z-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&Operation=GetScript&ID=OneJS&WS=1'></script> </div></div> </div></aside><!--widget end --><!--widget start --><aside id="text-6" class="dbx-box suf-widget widget_text"><div class="dbx-content"> <div class="textwidget"><div class="alignleft" style="height:250px"> <script type='text/javascript'> amzn_assoc_ad_type = 'banner'; amzn_assoc_tracking_id = 'zca-20'; amzn_assoc_marketplace = 'amazon'; amzn_assoc_region = 'US'; amzn_assoc_placement = 'assoc_banner_placement_default'; amzn_assoc_linkid = 'ITD6QMTPEKWARMWK'; amzn_assoc_campaigns = 'student_usa'; amzn_assoc_p = '12'; amzn_assoc_banner_type = 'promotions'; amzn_assoc_banner_id = '048JV5R198MXDXRBR1R2'; amzn_assoc_width = '300'; amzn_assoc_height = '250'; </script> <script src='//z-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&Operation=GetScript&ID=OneJS&WS=1'></script> </div></div> </div></aside><!--widget end --><!--widget start --><aside id="text-5" class="dbx-box suf-widget widget_text"><div class="dbx-content"> <div class="textwidget"><div class="alignleft" style="height:250px"> <script type='text/javascript'> amzn_assoc_ad_type = 'banner'; amzn_assoc_tracking_id = 'zca-20'; amzn_assoc_marketplace = 'amazon'; amzn_assoc_region = 'US'; amzn_assoc_placement = 'assoc_banner_placement_default'; amzn_assoc_linkid = 'VDMKO73JLHN6K4FF'; amzn_assoc_campaigns = 'echo'; amzn_assoc_p = '12'; amzn_assoc_banner_type = 'promotions'; amzn_assoc_banner_id = '146870N94VDD8MAPHT02'; amzn_assoc_width = '300'; amzn_assoc_height = '250'; </script> <script src='//z-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&Operation=GetScript&ID=OneJS&WS=1'></script> </div></div> </div></aside><!--widget end --><!--widget start --><aside id="block-3" class="dbx-box suf-widget widget_block widget_text"><div class="dbx-content"> <p></p> </div></aside><!--widget end --></div><!--/sidebar --> </div> </div><!-- /container --> </div><!--/wrapper --> <footer> <div id='page-footer'> <div class='col-control'> <div id="cred"> <table> <tr> <td class="cred-left">© 2018 <a href='http://www.pcorner.com'>The Programmer's Corner</a> by Personalized Computer Systems </td> <td class="cred-center"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-8001169946558833" data-ad-slot="6568049104"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </td> <td class="cred-right"></td> </tr> </table> </div> </div> </div> </footer> <!-- 9 queries, 54MB in 0.667 seconds. --> <!-- location footer --> <script type='text/javascript'> //<![CDATA[ jQuery(document).ready(function($) { $('html').MagicLiquidizerTable({ whichelement: 'table', breakpoint: '780', headerSelector: 'thead td, thead th, tr th', bodyRowSelector: 'tbody tr, tr', table: '' }) }) //]]> </script> <script type='text/javascript' src='https://www.pcorner.com/wp-includes/js/comment-reply.min.js?ver=6.2.3' id='comment-reply-js'></script> </body> </html> <!-- Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/ Object Caching 19/22 objects using disk Database Caching 17/23 queries in 0.007 seconds using disk Served from: www.pcorner.com @ 2023-12-03 00:42:40 by W3 Total Cache --><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" data-cf-beacon='{"rayId":"82f7c55e3ccf0a9b","version":"2023.10.0","r":1,"token":"bb4034281aa041b0a0eb74cc298dc9b6","b":1}' crossorigin="anonymous"></script>