*** TIniPlus ***
by Arash Ramin -
http://www.digitalroom.net
version 1.12 (February 19, 2000)
***** NOTE *****
- ReadFont method signature has changed! See below (REFERENCE & HISTORY)
DESCRIPTION
-----------
An extension to the standard TIniFile class:
- Adds ReadColor/WriteColor, ReadFont/WriteFont methods.
- Adds ReadFloat/WriteFloat to C++Builder 1 and Delphi 2/3
(via conditional compilation).
- Retrieves and restores a window (or control's) size/position with
ReadWinPos, WriteWinPos at runtime.
Freeware provided I'm not held liable for any use or misuse etc.
Please e-mail any suggestions or comments! (address available on web site)
COMPATIBILITY
-------------
Delphi 2/3/4/5
C++Builder 1/3/4
USAGE
-----
Delphi:
- Add unit (iniplus) to USES clause, ensuring that it's in the
project/environment path.
C++Builder:
- Add iniplus.pas to project OR
install as a component (it won't show up on the component palette!)
- Include header file (iniplus.hpp) in units that need it.
REFERENCE
---------
- Constructor and all new functions work essentially the same as TIniFile.
- The exceptions are ReadFont and ReadWinPos noted below.
- ReadWinPos/WriteWinPos will retrieve/restore a control or window's top, left,
width, height properties.
function ReadFloat(const Section, Ident: String; Default: Double) : Double;
procedure WriteFloat(const Section, Ident: String; Value: Double);
function ReadColor(const Section, Ident: String; Default: TColor) : TColor;
procedure WriteColor(const Section, Ident: String; Value: TColor);
{for ReadFont the font isn't returned in a function, but passed in
as a parameter, since it is a VCL object so we just pass a reference to it.
There is no default setting - in such a case the font is unaltered}
procedure ReadFont(const Section, Ident: String; Font: TFont);
procedure WriteFont(const Section, Ident: String; Value: TFont);
{for ReadWinPos, the size/pos. settings are loaded directly to the control.
There is no default setting - in such a case the size/pos. remains unaltered}
procedure ReadWinPos(const Section, Ident: String; Win: TControl);
procedure WriteWinPos(const Section, Ident: String; Win: TControl);
HISTORY
-------
Version 1.12 (February 19, 2000)
- Changed ReadFont signature to conform to ReadWinPos and other methods:
procedure ReadFont(const Section, Ident: String; Default: TFont; Font: TFont)
has become -->
procedure ReadFont(const Section, Ident: String; Font: TFont);
(see REFERENCE above for new usage)
- Fixed: on a conversion error (EConvertError), ReadWinPos would not set
the window back to its specified default size & position.
Version 1.11 (July 07, 1999)
- Minor source code tweaks (thanks to Andreas Schmidt) and documentation updates
Version 1.1 (March 17, 1999)
- Added ReadWinPos, WriteWinPos to retrieve/restore a control's size/position
Version 1.0 (September 28, 1998)
- Initial Release