home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hot Shareware 35
/
hot35.iso
/
ficheros
/
LC
/
SIMPWN93.ZIP
/
SIMPWIN.ZIP
/
SIMPWN92.DOC
< prev
next >
Wrap
Text File
|
1998-06-23
|
22KB
|
666 lines
Simpwin v9.2 copyright 1994-97 by
Bruce O'Banion
MSDOS copyright 1987-91 Microsoft Corp.
Turobo C 2.0 and C++ 1.0 copyright Borland International
Table of Contents
General Info ............................ Page 3
Support ................................. Page 4
Simpwin 93 Functions .................... Page 5
Mouse 92 Functions ...................... Page 9
Defines ................................. Page 11
Legal Stuff ............................. Page 12
General Info
Simpwin 93 is a text graphic orientated Turbo c utility. The
basic system used is file allocation with a static 10k buffering
system. This system achieves a small static ram usage with
virtual unlimited capacity. Literally thousands of windows, menus,
and forms can be used and the library will remain a static 0k ram
usage. The libraries are small, ranging from less than 12k to max
14k for the large library. This gives you a total ram usage of max
17k with Mouse libs. 2k to 4k is call in and out with malloc for
some functions. All functions return 0 on success and 1 on failure
except cursor hide/show.
SKDEF92.H is the special key bios codes (F, ALT, PageUP/DN,
CURSOR) and should be included if these are to be used.
Swtut92 is a on line help and tutorial study code that can be
run in shell from the compiler. All of this documentation can be
viewed from it with full menuing selection.
Mouse 92 is the mouse functions and can be include or not used
in your program. These malloc nothing and are less than 3k.
Lfsw92.exe is a text font loader with the file name of the font
as a parameter. I have included readoc92.exe to print and read
documents. Also included is instal92.exe for auto install
deinstall. Page formating for docs is 69 characters lines by 56
lines for the paging to come out right. Pages begain at lines
1,57,113,169,225,ect... . Strings longer than 69 characters
will be truncated.
Instal92.exe takes two files, an install.lst with copy or
decompression commands and deinstal.lst (see files). Just
create a directory that you wish to use (C:\TEMP) and at the
prompt for the directory you have your instal92 files in type
instal92 and full path (instal92 C:\TEMP). I also have included
delist to creat your packing and deistall lists. Just make a text
file of the directory you have your packing files in
(DIR > list.txt) then copy it to a temp file with delist.exe then
execute and it will creat packing.lst and deinstal.lst for you.
You will all so find all the source code.
If you like this and want more contact me (see support). I am
trying a new concept that is old as computing: small and static.
I plan to bring several products out that follow this in the
future so give me some hints as to what you want.
Simpwn92 libraries were compiled on a 386 clone using Turbo C
2.0 and Turbo C++ 1.1. Coprocessor emulation was used.
Sincerely
Bruce R. O'Banion
President of Simply Soft
Support
I will be available for tech support at this address:
Bruce R. O'Banion
RT 1 Box 148A
Pauls Valley,OK 73075
Phone: 405-665-4042 (24hr answer machine)
405-665-4047
or leave me a note on at simplyst@telepath.com
or visit my Home Page:
http://www.telepath.com/simplyst/homepage.htm
Window Functions
_________________________________________________________________
Simp_window() is the basic window function. It dose not mask
so what is on screen a the time of call is lost. If you study the
simptut code you will see that I use simp_window() as a base
window and with mouse along with a screen save. The parameters for
this function are the corner coordinates left, top, right, bottom.
The boarder and shadow styles are next. Then come the text
attributes foreground and back ground. Next is the shadow
location. After that come the shadow attributes fore and back.
Last the boarder character if needed and the fill character. The
window coordinates are from 1 to 80 for left and right and 1 to 25
for top and bottom. Boarder styles are 0 through 5: 0 for no
boarder, 1 for single, 2 for double, 3 and 4 for single/double
line, and 5 for any ASCII character boarder. Shadow style are 0
through 3: 0 for no shadow, 1 for wide shadow, and 3 for narrow
shadow. Color attributes for text and shadows are standard text
colors 0 to 15. Colors 8 to 15 in the back ground set the blink
bit. The shadow locations are 1 to 4 (see simpwn92.h for defines).
And last the border and fill characters are any ASCII code 0
through 255.
Example:
simp_window(20,5,60,20,5,2,14,4,1,8,0,170,190);
This will display a window 40 x 15 with a boarder of
character 190 with a narrow shadow with yellow text on a red
background.
________________________________________________________________
Save_screen() will save the current screen to screen save file
at the designated record number. 0 is a fast buffer save.
Example:
save_screen(2);
This saves the current screen to record number 2 in screen.dat.
________________________________________________________________
Load_screen is the other half of screen save and works the
same. 0 is a fast buffer load.
Example:
load_screen(2);
This will load the screen record 2 from screen.dat and display
it.
________________________________________________________________
Window Functions
_________________________________________________________________
Init_window() initiates the temp files and mallocs the
buffering. It's parameters are the number of windows, screen
saves, and the drive to use (a ram disk can be used).
Example:
init_window(20,5,"D");
This will init the utility to use 20 windows, 5 screen saves,
and drive D.
________________________________________________________________
Uninit_window() will delete the temp files and free any
malloced buffers.
Example:
uninit_window();
This call frees malloc memory and removes the temp files.
________________________________________________________________
Popup_window() is the basic mask window call. It has the same
parameters as simp_window() except for the first one and that is
the record or file number. This call will not error if the file
number is greater than the number of windows initialized but after
the maxed initialized they must be called in sequence or the wrong
file number will be saved. Once called it can be called then in
any sequence. Popup_window() should be called only for windows
that are not made either by makefile or make_window() since it
will change the parameters saved for that window. The file number
can be defined as a name (est. QUIT_WIN) using a define statement.
Example:
Popup_window(31,20,10,60,12,1,2,7,0,1,8,0,0,0);
This will display window 31 that is 40 x 3 with a single
boarder, narrow shadow and lightgray characters on a black
background.
________________________________________________________________
Unpopup_window() restores the screen info save by the last
call to popup_window() for a particular file number. It has only
one parameter the file number.
Example:
unpopup_window(4);
This will unpop window 4.
________________________________________________________________
Window Functions
_________________________________________________________________
Get_string() is a standard string entry. It has backspace
with no cursor or insert. It is masked and formated. It's
parameters are:pointer to string, a mask string, a format string,
X and Y coordinates, Mask strip switch, and default display switch.
The mask string is any ASCII character for and space for a mask,
The format string is made up of spaces where masked and format
characters. Both mask and format must be consistent for proper
function. Error detection is in the debug lib but masked
characters and entries must match. The strip switch is ON for
stripping the mask form entry and 0 for the masks inclusion in
entry. The default display switch is ON or 1 to display what is
in the enter string and OFF or 0 for no display and mask display.
The x y coordinate are for display placement in the current window.
Example:
char name[10];
get_string(name," ","uAAAAAAAA",3,3,1,1);
This call will display the contents of name at coordinates 3,
3, mask all but alpha characters and force an upper case on the
first entry. It will strip the mask and if any character but
backspace is hit first clear name. It will exit on esc with no
data change or return.
Format characters:
* any ascii character
A alphanumeric character
U upper case alpha only
L lower case alpha only
u forced upper case alpha
l forced lower case alpha
9 digits 0 - 9 only
# digits 0 - 9 and -
F digits 0 - 9, -, . only
e digits 0 - 9, -, ., e, E only
h digits 0 - 9, a,b,c,d,e.f,A,B,C,D,E,F,- only
o digits 0 - 7,- only
T t, T, f, F only
Y y, Y, n, N only
________________________________________________________________
Clear_window() will clear and fill the current window with the
fill character. This can be any ASCII code character.
Example:
clear_window(0);
This will fill the current window with null or space characters
leaving the boarder untouched.
Window functions
__________________________________________________________________
Show_cursor() turns the IBM cursor off.
Example:
show_cursor();
This will show or display the IBM cursor.
________________________________________________________________
Hide_cursor() turns the IBM cursor off.
Example:
hide_cursor();
This will hide or turn off the IBM cursor display.
________________________________________________________________
Write_window() is like printf but has positioning parameters.
Example:
char name[20] = "bruce";
write_window(3,5,"My name is %s",name);
This will display 'My name is bruce' at 3,5 of the current
window.
________________________________________________________________
Read_text() will display a text file in the current window
truncating 0, wraparound 1 (both with page up/dn), wait for key 2,
and display and exit 3.
Example:
read_text("mou.doc",1);
This will display the text of mou.doc page by page int the
current window with wraparound.
________________________________________________________________
Mouse Functions
__________________________________________________________________
Mouinstall() sets up the mouse functions by there is no
uninitimouse required.
Example:
mouinstalled(void);
This sets the mouse driver and returns the number of buttons
installed.
________________________________________________________________
Moureset() resets the mouse driver.
Example:
moureset(void);
This resets the mouse diver.
________________________________________________________________
Moubuttonpressed() checks to see if a mouse button is pressed.
It takes the number of the button (LEFT 0,MID 2,RIGHT 1) and
returns number of presses since last checked.
Example:
moubottonpressed(0);
This returns the number of left button presses since last
checked.
________________________________________________________________
Mouhide() will hide the standard text mouse cursor.
Example:
mouhide(void);
This hides the standard cursor.
________________________________________________________________
Moushow() will display the standard text cursor.
Example:
moushow(void);
This Shows the cursor.
________________________________________________________________
Mouse Functions
_________________________________________________________________
Mousetposition() places the mousecursor at the coordinates x,
y.
Example:
mousetposition(5,7);
This puts the mouse cursor at position 5,7 in the 80x25 text
screen.
________________________________________________________________
Mouposition() gets the current x,y coordinates of the mouse in
the 80x25 text screens.
Example:
int x,y;
mouposition(&x,&y);
This returns the current cursor position for mouse in x,y.
________________________________________________________________
Mousetmaxposition() Limits mouse movement to the window found
in max and min x,y.
Example:
mousetmaxposition(4,10,5,9);
This limits the mouse to window 4,10,5,9.
________________________________________________________________
Moubuttonrelease() returns the number of releases since last
check for the button given (LEFT 0, MID 2,RIGHT 1).
Example:
moubottonrelease(1);
This returns the number of releases since last check of button
RIGHT.
________________________________________________________________
Moucursortype() selects the cursor type. ) is reverse video.
1 to 254 are the ASCII character codes. so any ASCII character
can be used as the cursor.
Example:
moucursortype(0x02);
This will make the cursor a HAPPY FACE.
_______________________________________________________________
Special key defines:
__________________________________________________________________
ESC 283 F1 15104 ALT_F1 26624 SHIFT_TAB 3840
PGDN 20736 F2 15360 ALT_F2 26880 BACKSPACE 3592
PGUP 18688 F3 15616 ALT_F3 27136 DEL 21248
CURSOR_UP 18432 F4 15872 ALT_F4 27392 TAB 3849
CURSOR_DN 20480 F5 16128 ALT_F5 27648
CURSOR_LEFT 19200 F6 16384 ALT_F6 27904
CURSOR_RIGHT 19712 F7 16640 ALT_F7 28160
ENTER 7181 F8 16896 ALT_F8 28416
HOME 18176 F9 17152 ALT_F9 28672
END 20224 F10 17408 ALT_F10 28928
ALT_A 7680 ALT_B 12288 ALT_C 11776 ALT_D 8192
ALT_E 4608 ALT_F 8448 ALT_G 8704 ALT_H 8960
ALT_I 5888 ALT_J 9216 ALT_K 9472 ALT_L 9728
ALT_M 12800 ALT_N 12544 ALT_O 6144 ALT_P 6400
ALT_Q 4096 ALT_R 4864 ALT_S 7936 ALT_T 5120
ALT_U 5632 ALT_V 12032 ALT_W 4352 ALT_X 11520
ALT_Y 5376 ALT_Z 11264
_________________________________________________________________
Other Defines:
boarder: shadow style: shadow location:
NO_BOARDER 0 NO_SHADOW 0 LOWER_LEFT 1
SINGLE_BOARDER 1 NARROW_SHADOW 2 UPPER_LEFT 2
DOUBLE_BOARDER 2 WIDE_SHADOW 1 LOWER_RIGHT 3
SIG_DUB_BOARDER 3 UPPER_RIGHT 4
DUB_SIG_BOARDER 4
ANY_BOARDER 5
_________________________________________________________________
Word Defines:
ON 1 OFF 0 YES 1 NO 0 EOF -1
_________________________________________________________________
Mouse Defines:
LEFTBUTTON 0 BLINKCUR 0x8000
RIGHTBUTTON 1 INVERSCHAR 0x3300
MIDBUTTONT 2 STANDARDCUR 0
_________________________________________________________________
DISCLAIMER - AGREEMENT
Users of Simpwin 9.3 must accept this disclaimer of warranty:
Simpwin92 is supplied as is. The author disclaims all
warranties, expressed or implied, including, without
limitation, the warranties of merchantability and of fitness
for any purpose. The author assumes no liability for damages,
direct or consequential, which may result from the use of
Simpwin92.
Simpwin 9.3 is a "freeware program" and is provided at no
charge to the user. Feel free to share it with your friends,
but please do not give it away altered in any way. You may
use any of the souce code but please give proper credit in
your docs.
Anyone distributing Simpwin 9.3 for any kind of remuneration
must first contact Bruce O'Banion for authorization.
Ombudsman Statement
"This program is produced by a member of the Association
of Shareware Professionals (ASP). ASP wants to make sure
that the shareware principle works for you. If you are
unable to resolve a shareware-related problem with an ASP
member by contacting the member directly, ASP may be able
to help. The ASP Ombudsman can help you resolve a dispute
or problem with an ASP member, but does not provide
technical support for members' products. Please write to
the ASP Ombudsman at 157-F Love Ave., Greenwood, IN 46142
USA, FAX 317-888-2195, or send email to omb@asp-shareware.org
****************************************************************
NOTE: simpwn93.zip is packaged on this disk using
Info-ZIP's compression utility. The installation program
uses UnZip to read zip files from the disk. Info-ZIP's
software (Zip, UnZip and related utilities) is free and
can be obtained as source code or executables from various
bulletin board services and anonymous-ftp sites, including
CompuServe's IBMPRO forum and ftp.uu.net:/pub/archiving/
zip/*.
****************************************************************
TURBO C++ 1.0 copyright 1990 Borland International
TURBO C 2.0 copyright 1987,1988 Borland International
MS-DOS 5.0 copyright 1987-1991 Microsoft Corp.