home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d5xx
/
d584
/
wizardfiler.lha
/
WizardFiler
/
WizardFiler.doc
< prev
next >
Wrap
Text File
|
1992-01-04
|
9KB
|
231 lines
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
WIZARD FILER 1.01
A PUBLIC DOMAIN FILE REQUESTER BY ! WIZARD WORKS !
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Program: WizardFiler
Version: 1.01
Authors: Anders Bjerin (Original FileWindow 1.20)
Stefan Zeiger (WizardFiler)
Language: C (100%)
Compiler: SAS/C 5.10a
AmigaDOS: Tested with 1.3
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
PARTS OF ANDERS BJERIN'S DOCUMENTATION OF "FILEWINDOW 1.20"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(Ref.nr. 3A-146-1) :
~~~~~~~~~~~~~~~~~~~~
FILE WINDOW v1.20 was created by Anders Bjerin, and is distributed as
public domain with NO RIGHTS RESERVED. That means that you can do
what ever you want with the program.
You may use FILE WINDOW in your own programs, commercial or not, and
do not even need to mention that you have used it. You may alter the
source code to fit your needs, and you may spread it to anyone.
The reason why I created FILE WINDOW was that I never more wanted to
see that old stupid "Please type in filename:" prompt. It is a disgrace
for any program to use it, and VERY annoying for the user.
REMEMBER, one of the first things the user will see of your program is
the file requester. If you want your program to make a good impression,
and look solid, I would recommend you to use a good file requester.
FILE WINDOW is written to be as easy as possible to use, and is fully
amigaized. It is similar to other good file requesters, but has several
advantages:
1. FILE WINDOW dynamically allocates memory for each file. That means
that there is no memory wasted as it would have been if you had
statically allocated the filenames in arrays. It also means that the
memory is the only limitation on how many files the program can
display.
2. While FILE WINDOW is reading the directories, it is still obeying
your commands. You may change directory, type in the file name
yourself etc etc while the program still is working. All of us know
how irritating it is to see the little Zzz pointer in a program
while the disk is examined. This is especially annoying when you know
the filename, and only want to type it in.
3. FILE WINDOW was written for the Amiga. It uses boolean, string and
proportional gadgets, and is using them as recommended. For example,
the proportional gadget's knob changes size corresponding to how
many files/directories there are. (It is strange that there are
several file requesters using a static small knob instead. That
makes it much harder for the user to see how many files there are in
the directory.)
4. FILE WINDOW has a boolean gadget "<" which steps back one directory
each time it is pressed. (Same as "/ Parent dir")
5. You can specify a file-extension, and only the files with that
extension will be displayed. (Directories are always showed.)
The user can also change the extension since it is a string gadget.
(If there are any characters in the string gadget, the text "Ext:"
will be highlighted to tell the user that EXTENSION MODE is on.)
6. The files/directories are automatically sorted alphabetically while
they are taken from the disk. Directories first, highlighted with the
ending (Dir), and then the files.
7. FILE WINDOW deallocates all memory allocated, and is fool proof. If
something goes wrong (not enough memory, wrong directory name etc),
the program will open a requester and tell the user what the
problem is.
8. The source code is distributed with the program so you can alter it
to fit your needs.
9. FILE WINDOW is not as a normal file requester, since it uses a
(surprise, surprise) window instead of a requester to display the
files on. That means that the calling program does not need to
have a window itself, to be able to use FILE WINDOW. (A normal
requester always needs a pointer to a window.)
10. There are no Image structures in the code, so FILE WINDOW does not
need to be in the CHIP memory.
11. When FILE WINDOW has examined all files in the directory, the
program is put to sleep. That will speed up other programs, and
will not use unnecessary processing time.
12. Fast updating of the display.
FILE WINDOW is very easy to install in your program, and I have even
done an example on how to use it. The source code is full of comments
to make it easier for you to change something in the program.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
NOW SOME CHANGED DOCS FOR WIZARD FILER 1.01
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
HOW TO USE WIZARD FILER:
~~~~~~~~~~~~~~~~~~~~~~~~
operation=WizardFiler( title, ToShow, ToHide, x, y, screen, file );
operation: a variable which will contain the "flags" WIZARD FILER returned.
title: string containing the name of the WIZARD FILER.
ToShow: string to be used as a file pattern.
ToHide: string to be used as a file pattern.
x: x position of the WIZARD FILER.
y: y position of the WIZARD FILER.
screen: pointer to a screen if there exist one.
file: a string which will contain the file name together with
the entire path. (For example: "df0:letters/payments.doc".
Title is a string which will appear on the drag gadget. Write NULL if
you do not want any string there.
ToShow is a 100 character long string. 99 letters and the NULL ('\0') sign.
If you give WIZARD FILER a string, the program will only display
the files which match with your pattern. (Directories will always be
displayed.) If you do not want to use a file extension you simply write
NULL.
It's the same with ToHide, except that all files matching this pattern will
NOT be shown.
On a NTSC screen (200 lines) y can be between 0 and 37. On a PAL screen
(256 lines) between 0 and 93.
If your program is using a CUSTOM SCREEN you should give FILE WINDOW a
pointer to your screen. Otherwise, if you are using a WBENCH SCREEN you
simply write NULL.
Name is a string which can already contain a file name with path if
you want. If the string is empty, WIZARD FILER will start to display the
current directory. When the user has selected the file to LOAD or SAVE it
is here you should look for the file name with path.
Examples:
~~~~~~~~~
1. operation=WizardFiler( NULL, NULL, NULL, 0, 0, NULL, file);
operation has been declared as: USHORT operation;
file has been declared as : UBYTE file[TOTAL_LENGTH];
2. operation=WizardFiler(title, toshow, tohide, x, y, my_screen, file);
operation has been declared as: USHORT operation;
title -"- : UBYTE title[ANY_LENGTH];
toshow -"- : UBYTE toshow[100];
tohide -"- : UBYTE tohide[100];
x, y -"- : SHORT x, y;
my_screen -"- : struct Screen *my_screen;
file -"- : UBYTE file[TOTAL_LENGTH];
Remember to "include" the file "WizardFiler.h"!
ex: #include "WizardFiler.h"
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
ADDITIONAL REMARKS TO WIZARD FILER 1.01 BY STEFAN ZEIGER :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enhancements from FileWindow 1.20 to WizardFiler 1.00:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. 21 device gadgets with your devices, assign and volumes (in that order).
2. Display for 13 filenames instead of 8.
3. "GET DIR" gadget added, so that you can re-scan the currently displayed
directory, if an other program has changed it.
4. Proportional gadget calculations changed from "float" to "ULONG", so
that you don't need to link with a math library.
5. A very nice WB2.0 design.
6. "Hide" and "Show" gadgets with pattern matching.
Enhancements in WizardFiler 1.01:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Bug fixed. The device gadget in column 3, line 2 is now working.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Amiga is a registered trademark of Commodore-Amiga Inc.
AmigaDOS is a registered trademark of Commodore-Amiga Inc.
Lattice is a registered trademark of Lattice Inc.
SAS/C is a registrated trademark of SAS Institute Inc.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
R.I.P. (Remain in programming)
Stefan.
-----------------------------------------------------------------------------
STANDARD MAIL : ! WIZARD WORKS !
Stefan Zeiger
Seligenstaedter Weg 24
D-W-8756 Kahl
West Germany
VOICE : (49)-6188-2525
-----------------------------------------------------------------------------