Contains definitions for TCustomImageList, the base class for TImageList.
Type of an ImageList index (integer), unused!
Exists for Delphi compatibility only, but is unused there as well.
Use a TChangelink to get notified of imagelist changes.
Change
- software emulation of the OnChange event
OnChange
- event handler for a change in the Imagelist
Sender
- the imagelist that has notified us of a change
Defines transparency and blending of rendered images.
Blending means that the Color is merged with the previous contents of the destination area by a degree defined by an alpha value.

What's "blending"?

right?

Applies 25% of BlendColor.
Applies 50% of BlendColor.
Draw using BkColor for the background, transparent if BkColor is clNone.
Always draw transparently, ignore BkColor and BlendColor.
Indicates whether a mask shall be used in rendering an image.
The mask specifies the transparent part of the image

What's the effect of applying a mask?

right?

Don't apply a mask.
Apply the mask.
Base class for TImageList (not the same as a TBitmap collection)

An ImageList contains images (bitmaps or icons) of the same Width and Height, accessible by index. The images are stored in one big (wide) bitmap, whose width is Width*Count.

When an image of a different Width or Height is inserted, the previous contents of the list are discarded!

It's okay, however, to insert an imagelist-like bitmap, that contains multiple bitmaps of the same Width and Height as used by the ImageList. This allows to insert e.g. other (compatible) ImageLists, or bitmaps for multiple states of essentially the same image (button pressed, released and disabled).

Transparency is implemented in the alpha channel of the raw 32 bit RGBA imagedata array - but not all platforms support such an alpha channel.

The painting of an image from the list is handled by the widgetset, no bitmap or icon component is involved. The widgetset can use a different internal organization of the data, optimized for immediate painting of an image.

NOTE: A TCustomImageList is not a TBitmap collection. If a storage of distinct bitmaps is needed, create your own list of TBitMaps (array or TList).

Please note also that inserting or moving images will affect the index of all following images, what can cause trouble with index constants. In such cases a bitmap collection may better fit your needs.

Windows ImgageLists can contain a list of monochrome mask bitmaps, present when Masked=True.

Currently only the insertion of Bitmaps is supported. Other image types should be rendered as bitmaps of Width and Height, which then can be inserted.

Image overlays also are unsupported.

What exactly does this mean to the user?

What about Mask, HotSpot and ShareImages?

Does the LCL support this feature, or is only the TransparentColor used to make images transparent?

The size of the allocated Data list, in number of images.
Change flag, remembers changes while update notifications are locked (FUpdateCount > 0).
List of TChangeLinks which are notified of changes.
Holds the pixel data of all images.
Counter for BeginUpdate/EndUpdate calls.
Allocates data for ACount images, rounded up by AllocBy.
The number of images to allocate room for.
The list only can increase. Use Clear to reduce it to the empty list.
Insert bitmap (with split if necessary) into position AIndex with shifting other images.
Where to insert the images.
The image (BitMap) handle.
The mask (BitMap) handle.
Width in pixels

of?

Height of all images in pixels.

?

Moves an image from CurIndex to NewIndex, without notifying the widgetset.
the index of the image to be moved
the new index of the image

?

?

Copies the imagedata into the FData array and then frees the image.
Pointer to the updated image data
the index of the location where the image should be set
the new image
Notifies all subscribed objects of a change in the imagelist.
Initialize
- sets up the list
Initializes the internal bitmap structures and the changelink list. It is used by the Create and CreateSize constructors.
Sets both the Width and Height of all images.
Changed values clear the entire list.
Writes the ImageList data into the stream.
Restores the ImageList data from the stream.
Start updating the data, block the OnChange event.

Use together with EndUpdate to speed up the insertion of multiple images.

Every BeginUpdate must be matched by an EndUpdate, i.e. update operations can be nested.

EndUpdate
- finish updating the data, call Change.
Decrements the internal UpdateCount and, when it reaches zero, does whatever is required to reflect the new content.
Adds an Image and Mask bitmap to the list. Returns the index of the added image or -1 if unsucessful.

      Adds one or more (bitmap width / imagelist width) bitmaps to the list.
      If Mask is nil, the image has no transparent parts.

The index of the added image, -1 if unsuccesful.
a bitmap image
a bitmap which defines the transparent parts of Image
Adds an icon to the list, returning the index of the icon or -1 if not successful.
Adding graphics other than bitmaps can be implemented by converting the graphics item into a bitmap, which then can be added to the image list. Most graphics classes support such a conversion, so that specialized methods are redundant.
The index of the added icon, -1 if unsuccesful.
The Icon to be added.
Adds images from another imagelist to the list.
Both lists must have the same image Width and Height, else the old images are discarded.
The ImageList containing the images to add.
Adds one or more (bitmap width / imagelist width) transparent bitmaps to the list.

Every pixel of MaskColor will become transparent.

Image can contain multiple images of the same Width and Height. The image width must be a multiple of Width, and the image height must equal Height, else all old images in the list are discarded.

The index of the first added image, -1 if unsuccesful.
The bitmap to be added.
The color acting as transparant color.
Loads a bitmap from a lazarus resources and adds it.
Index of the first added image.
The name of the Lazarus resource.
The mask color for transparent images, clNone for solid (opaque) images.
Send change notifications, if the list has changed and updates are not locked.
Notifies all members of the ChangeLinkList, and calls the OnChange handler.
Removes all images from the list.
Initialize the list for image(s) with the given height and width.

This constructor overrides the default initial size of the images (16x16 pixels).

The Width and Height is reset with every insertion of a bitmap. It may be useful, however, to initialize a list for the insertion of graphics other than bitmaps, so that the images can be rendered as bitmaps of the intended width and height, before they are inserted.

The width of all images, in pixels.
The height of all images, in pixels.
Delete the specified image.
the index of the image to be deleted. -1 for delete all.
Paint an image
Paints the image specified by AIndex on Canvas at position AX, AY.
The image index.
If False, draw the image disabled (dithered).

?

?

?

Copies the selected image into the given bitmap
the index of the requested image
a bitmap as a container for the bitmap
how to copy
Returns the offset from the drawing position to the image origin.
A HotSpot is used only in a TDragImageList, here it is (0,0).
Inserts one or more images into the list at the index position.

The inserted bitmap can consist of multiple images, of the same width and height, which become accessible as distinct images in the ImageList.

The height of the inserted images must match the ImageList height, else the ImageList content is replaced by the added images. The width must be a multiple of the ImageList width, so that the list always contains an integral number of images.

If Mask is nil, the inserted images have no transparent parts. Use InsertMasked to insert bitmaps with a specific transparent color.

insert position
bitmap to insert
transparency mask, Nil for opaque
Insert an Icon into the list.
insertion point
The Icon to insert.
Adds one or more transparent bitmaps to the list.
MaskColor is the RGB color of the transparent pixels. Every occurence of a MaskColor pixel will be converted into a transparent pixel.
The index of the inserted image.
The bitmap to be inserted.
The color acting as transparant color.
Move an image from index CurIndex to NewIndex.
the index of the image to be moved
the new index of the image
Replace
the indexed image with the Bitmap given
AMask can be nil, if the image has no transparent parts.
the index of the replaceded image
a bitmap image
a bitmap which defines the transparent parts of Image
ReplaceMasked
- replaces the indexed image with the image given.
Every pixel of MaskColor will be converted to transparent.
The index of the replaced image.
A bitmap image.
The color acting as transparant color.
Registers an TChangeLink object to get notified of a change of the imagelist.
a reference to changelink object
Unregisters an notification object.
Reference to the changelink object to remove.
The length of the image list is increased in multiples of AllocBy images. Default is 4.
Other list types allow to set the list Capacity directly - not so for an ImageList.
The color for used in blending (dithering) an image.
The background color to use for transparent parts.

BkColor is intended to speed up drawing of transparent images, on a background of known color (=BkColor). In this case the image can be drawn opaque, eliminating the need for really masking out and merging with existing background.

does this really apply? depending on the widgetset?

The number of images in the list
The default drawing style - focussed, selected, normal or transparent.
The unique height of all images in the list.
Setting to an different value clears the entire list!
The unique width of all images in the list.
Setting to an different value clears the entire list!
OnChange
- event handler for a change in the imagelist
True when mask images are stored with every image (unused!).
This property exists only for Delphi compatibility

?

True when this image list is shared. Unused!
This property exists only for Delphi compatibility. True means that the imagelist widget is freed together with the ImageList

?

Unused!
This property exists only for Delphi compatibility

?

FillDescription
- fills the description with the default info of the imagedata
the description to copy

?

the target bitmap
how to copy
Exports the entire internal image (color array) and description.
Exports an image as TRawImage.
the index of the image to copy
the target bitmap
Reference
to the imagelist
Assures that Index is not out of the list bound.
Raises an EInvalidOperation exception when the index is out of bounds.
The index to check.
Set to True when the index is used for insertion (default is False).
Returns the Handle of the Reference.
The widget handle.
Instructs the widgtset to create an imagelist.
Reference object for the created widget.
ignored
Draws an image stretched to ARect.

?

?

?

?

Check for equivalence with another ImageList
This is an expensive operation, since both imagelists are written into memory streams, which then are compared bytewise.
True when the image lists are equal.
The object (ImageList) to compare with.