TFileMenuHandler v1.0
 by Harry Kakoulidis 
 11/1999

haka@mailbox.gr
hakakou@hotmail.com 

Component for handling Recent files list and Open, Save, Save As, Exit Commands. Has a  recent list (MRU) if wanted with ini. Will call your file handlers only when needed so you dont have to worry about changed files, loading Open/Save dialog boxes, history lists, terminating, querring user to save changes etc...
Extremly customazible for every environment. Appends the history list to your selected MenuItem. Minimize error-checking, just load,save,make new. Supports up to 35 files, exe parameters. Tested with Delphi 4.

This is Freeware. Please copy FilMen10.zip unchanged.
If you find bugs, have options etc, please send at my e-mail.

The use of this component is at your own risk. I do not take any responsibility for any damages.

-------------------------------------------------------------------------
PUBLISHED PROPERTIES
* AddShortcut        : Will the menu items have shortcuts?
* DefaultFileName    : The filename of new files. Ex. 'File.txt'
* EnableMenuList     : Will the recent list be shown?
* FileChangedString  : The text of the Save Changes box.
* FileChangedCaption : The caption of the previous
* FileMenu           : You select the MenuItem that the recent list will append to.  
* IniFileName        : Ini Filename (automatically written at the executable path.
* LoadNewOnStart     : If you want a new file created on start
* MaxList            : Num. of Recent Items
* MoveToTop          : If when selecting an item it moves to top
* NewItemImageIndex  : Image index of the new items
* OpenDialog         : An OpenDialog that you have set 
* ParamCountLook     : What ParamStr num to look for that might contain a filepath. When 0: Don't look. 
it's properties
* SaveDialog         : The same with a SaveDialog


EVENTS
OnNew       :    Code that creates a new file
OnSave       :    Code that saves your file
OnOpen         :    Code that loads your file
OnNewFormCaption  :  Code to write the caption 

The above are called only when needed. For example if the user is editing a changed file, and selects New, OnNew will not be called unless TFileMenuHandler gets confirmation from him, opening a save dialog if necessary.


Important variable
* IsDirty    : Set to true when your file changes


Other public variables (not needed to use component)
* RecentList : A StringList (don't change)
* FileName   : Current file loaded (read-only)
* IsNew      : If a new file is open (read-only)
* IniPath    : Read to get your ini file path. If this is not set then the ini will be created in the exe dir. If you set it NOT IN ONCREATE BUT IN ONSHOW and after, it will create the ini in the path specified.


For an easy to follow implementation, follow the steps in the example.

TO INSTALL: Go to Component Menu and Install in your favorite Package. When registered, it is under 'HAKA'. Change if you like.
