library nuvola;

{
[Nuvola] [1.1]
Delphi 2005
December 2007

LICENSE
                                            F
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
"http://www.mozilla.org/MPL/"

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
the specific language governing rights and limitations under the License.

The Original Code is "[nuvola], [icons.pas] and [icons.dfm]".

The Initial Developer of the Original Code is Martin Holmes (Victoria,
BC, Canada, "http://www.mholmes.com/"). Copyright (C) 2005 Martin Holmes 
and the University of Victoria Computing and Media Centre. The code was
co-developed for university and personal projects, and rights are shared
by Martin Holmes and the University of Victoria. All Rights Reserved.

This library was written following guidelines supplied by Doni Devito
on the borland.delphi.ide.general newsgroup. I much appreciate his
sharing his code.

This dll encapsulates selections from the Nuvola icon set by David Vignoni,
rendered into bitmap form using the GIMP, for use as toolbar button icons in
applications. The Nuvola icon set is released under the LGPL, therefore this
library is released under the same terms (see below).

Dependencies:

icons.pas (a form containing 12 image lists).

GNU Lesser General Public License

Adapted images from the Nuvola Icon Theme for KDE by David Vignoni.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA.

Additions and adaptations are by Martin Holmes.

To use this library in your project, this is what you
need to do:

1. Create twelve image lists in your project, named appropriately
   to match the image lists in this library.

2. Add these functions to the interface of your source file, after the
   uses clause:

      function Fnc_Img16Normal: integer; stdcall;
      function Fnc_Img16Disabled: integer; stdcall;
      function Fnc_Img16Hot: integer; stdcall;
      function Fnc_Img24Normal: integer; stdcall;
      function Fnc_Img24Disabled: integer; stdcall;
      function Fnc_Img24Hot: integer; stdcall;
      function Fnc_Img32Normal: integer; stdcall;
      function Fnc_Img32Disabled: integer; stdcall;
      function Fnc_Img32Hot: integer; stdcall;
      function Fnc_Img48Normal: integer; stdcall;
      function Fnc_Img48Disabled: integer; stdcall;
      function Fnc_Img48Hot: integer; stdcall;

3. Add these to the implementations clause, right after the word "implementation":

      function Fnc_Img16Normal: integer; external 'nuvola.dll';
      function Fnc_Img16Disabled: integer; external 'nuvola.dll';
      function Fnc_Img16Hot: integer; external 'nuvola.dll';
      function Fnc_Img24Normal: integer; external 'nuvola.dll';
      function Fnc_Img24Disabled: integer; external 'nuvola.dll';
      function Fnc_Img24Hot: integer; external 'nuvola.dll';
      function Fnc_Img32Normal: integer; external 'nuvola.dll';
      function Fnc_Img32Disabled: integer; external 'nuvola.dll';
      function Fnc_Img32Hot: integer; external 'nuvola.dll';
      function Fnc_Img48Normal: integer; external 'nuvola.dll';
      function Fnc_Img48Disabled: integer; external 'nuvola.dll';
      function Fnc_Img48Hot: integer; external 'nuvola.dll';

4. In the FormShow, or somewhere else suitable, add a series of twelve
   calls like this:

      il16Normal.Handle := Fnc_Img16Normal;

5. Assign the 12 image lists in your own project to actions, menus, toolbars
   etc.

6. Since those image lists will be empty during development, you'll need to
   choose image numbers for components based on the list in the icons.pas file.
}

uses
  SysUtils,
  Classes,
  icons in 'icons.pas' {frmIcons};

{$R *.res}
var
  SaveExit: Pointer;

procedure LibExit;
begin
  FreeAndNil(frmIcons);  // library exit code
  ExitProc := SaveExit;  // restore exit procedure chain
end;

exports
  Fnc_Img16Normal,
  Fnc_Img16Disabled,
  Fnc_Img16Hot,
  Fnc_Img24Normal,
  Fnc_Img24Disabled,
  Fnc_Img24Hot,
  Fnc_Img32Normal,
  Fnc_Img32Disabled,
  Fnc_Img32Hot,
  Fnc_Img48Normal,
  Fnc_Img48Disabled,
  Fnc_Img48Hot;

begin
  frmIcons := TfrmIcons.Create(nil);
  ExitProc := @LibExit;  // install LibExit exit procedure
end.
