_file_chooser is a standalone file chooser widget.

_picture_chooser is a standalone picture chooser widget.

This version of the widgets should run on most Linux distros. However, regarding a few small details, special preference has been given to Ubuntu.

The choosers can be used for file selection ("Open", or "Save As" functions with or without a suggested file name), or for choosing folders only.

--------------------------------------------------------------------------------
In order to adjust the size, position etc. of these widgets, they each require
their own "INI" file in the same folder. They also require a list of the file
filters to be employed, again in the same folder:

For the file chooser:

_file_chooser.ini
_file_chooser_filters.ini

For the picture chooser:

_picture_chooser.ini
_picture_chooser_filters.ini

The widgets can, of course, be run without any INI files at all. In this case,
the widget will be placed in the centre of the screen, using the minimum
window dimensions. The default filter is "*.* All files".

Quite regardless of the INI settings when the widgets are launched, the operator is able to re-size or re-position them manually. The minimum sizes of the file and picture choosers are fixed.

--------------------------------------------------------------------------------
INI Parameters:

1.  Startup folder [/]:
2.  HD path to the image of the mounted CD-Rom drive [empty]
3.  HD path to the image of the mounted floppy diskette drive [empty]
4.  Indent size (no. blanks) [4]:
5.  Font name [default]:
6.  Font size [14]:
7.  Bold (yes or no) [no]:
8.  Italic (yes or no) [no]:
9.  Window left  (nnn or centre or center) [centre]:
10. Window top (nnn or centre or center) [centre]:
11. Window width or "max" or "min" (min=320) [320]:
12. Window height EXCLUDING PREVIEW PICTURE HEIGHT or "max" or "min" (min=240) [240]:
13. Output mode (HD or clipboard) [HD]:
14. Preview picture height (nnn pixels) [120 + 20 for margins]:
15. Treeview Node Folder Colour (see list of available colours) [red]:
16. Suggested File Name or "folder" or "folder/" [empty]:

In the above, options are described in normal brackets and default values are
given in square brackets.

The 14th parameter refers to the picture chooser only. The preview picture is
shown when the operator clicks on the file name of an image.

----------------------------------------
If a folder beyond a drive specification is given in the first line, e.g:-

/myfolder/mysubfolder

- then initially, only this folder and its contents (other subfolders) are shown
in the pane on the left of the widget. Subsequently, to see the folders of drive
/ (the root), simply click on the drive icon "/" at the top of the widget.

---------------------------------------
"Indent size" (line 4) refers to the amount of horizontal space between any given
node of the folder tree and nodes of the next level of the hierarchy. If a large
widget is drawn, the indents can be of more than 4 blanks. If a small widget is
drawn, the indents should be of 4 blanks or less.
---------------------------------------
As suggested by the 13th parameter ("Output mode") of the INI files, the
output from a widget (i.e. the HD path to a file) can be given in one of two ways:
within a text file on the HD in the widget folder, or on the clipboard. If the
output is in file form, it appears as:-

_file_chooser_choice.txt or
_picture_chooser_choice.txt

- for the file and picture choosers respectively.

--------------------------------------------------------------------------------
FILTERS

The filters to be employed must be as in the following examples, followed by a
BLANK:

*.*
*.pdf
*.doc
*.bmp

After the blank, any kind of descriptive information can be given. For example:

*.* All files
*.* (All files)
*.bmp Windows bitmap image
*.txt (Text document)
etc.

Any number of filters can be specified in _file_chooser_filters.ini or
_picture_chooser_filters.ini.

--------------------------------------------------------------------------------
Example _file_chooser.ini:

/home/bob/desktop
/media/cdrom
/media/floppy
4
default
12
no
no
centre
centre
300
200
clipboard

blue
new_file.txt

-------------------------------------------------------------------------------
Example _picture_chooser.ini:

/home/bob/Desktop/My Pictures
/media/cdrom

4
times
12
no
no
centre
centre
300
250
hd
200
lightbrown
folder/

-------------------------------------------------------------------------------
Any _file_chooser.ini can be quickly made into a _picture_chooser.ini by
(optionally) adding another parameter to fix the preview picture height.
-------------------------------------------------------------------------------
Example _file_chooser_filters.ini:

*.* All files
*.rev Runtime Revolution stacks
*.txt Text files

-------------------------------------------------------------------------------
Example _picture_chooser_filters.ini:

*.* (All files)
*.png (PNG images)
*.bmp (Windows Bitamp images)
*.jpg (JPEG images)

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
DEMO PACK

The demo pack consists of the following files:

1) __readme.txt (this file)

2) _file_chooser [program]
3) _file_chooser.ini
4) _file_chooser_filters.ini

5) _picture_chooser [program]
6) _picture_chooser.ini
7) _picture_chooser_filters.ini

8) Test File Choosers LINUX

You can copy the programs to any folder and execute them.
This will show you how the widgets run according to the defaults (i.e. with no
ini parameter input).

If you then copy the ini files to the same folder and after run the programs,
you can see how they run with an example set of ini parameters.



-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
LICENCE

You can use the standalone widgets without restriction, provided you do not hold the author responsible for accidental damages.
However, where appropriate, credit to www.howsoft.com (Bob Warren) would be
appreciated. 

If you have any suggestions for the improvement of the widgets or the demo stack,
please feel free.

You can communicate with Bob Warren at:
bobwarren@howsoft.com




