[Overview][Types][Classes][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Base class for TImageList (not the same as a TBitmap collection)
Source position: imglist.pp line 107
type TCustomImageList = class(TLCLReferenceComponent) |
||
protected |
||
procedure CheckIndex(); |
|
CheckIndex - method for checking whether the indexed item is supposed to be inserted (default condition is False) |
function GetReferenceHandle; override; |
|
GetReferenceHandle - returns a handle for the reference |
procedure Initialize; virtual; |
|
Initialize - sets up the list |
procedure DefineProperties(); override; |
|
DefineProperties - defines the properties of the ImageList (stored in a file) |
procedure SetWidthHeight(); virtual; |
|
SetWidthHeight - specifies the dimensions for display |
protected |
||
class procedure WSRegisterClass; override; |
|
WSRegisterClass - Register this Class for the current Widget Set |
protected |
||
function WSCreateReference(); override; |
|
WSCreateReference - creates a reference for the Imagelist (returns this as a result), passing the defined parameters for the creation process |
public |
||
constructor Create(); override; |
|
|
constructor CreateSize(); |
|
Initialize the list for image(s) with the given height and width |
destructor Destroy; override; |
|
|
procedure AssignTo(); override; |
|
|
procedure Assign(); override; |
|
|
procedure WriteData(); virtual; |
|
Writes the ImageList data into the stream |
procedure ReadData(); virtual; |
|
Restores the ImageList data from the stream |
function Equals(); |
|
Check for equivalence with another ImageList |
procedure BeginUpdate; |
|
BeginUpdate - start updating the data |
procedure EndUpdate; |
|
EndUpdate - finish updating the data |
function Add(); |
|
Add an Image and Mask bitmap to the list. Returns the index of the added image or -1 if unsucessful |
function AddIcon(); |
|
Adds an icon to the list (not yet!), returning the index of the icon or -1 if not successful |
procedure AddImages(); |
|
AddImages - adds images from another imagelist to the list |
function AddMasked(); |
|
AddMasked - adds one or more bitmaps to the list |
function AddLazarusResource(); |
|
AddLazarusResource - load TBitmap from lazarus resources and add it |
procedure Change; |
|
Change - send change notifications |
procedure Clear; |
|
Clear - removes all images from the list |
procedure Delete(); |
|
Delete the specified image |
procedure Draw(); |
|
Paint an image |
procedure FillDescription(); |
|
FillDescription - fills the description with the default info of the imagedata |
procedure GetBitmap(); |
|
Copies the selected image into the given bitmap |
procedure GetFullBitmap(); |
||
procedure GetFullRawImage(); |
|
Copies the image description and the data pointer |
procedure GetRawImage(); |
|
GetRawImage - primitive method for loading an image: you have to fill in all the description fields yourself |
function GetHotSpot; virtual; |
|
GetHotSpot - returns the co-ordinates for the hotspot of the drag image |
procedure Insert(); |
|
Insert one or more images into the list at the index position. |
procedure InsertMasked(); |
|
InsertMasked - adds one or more transparent bitmaps to the list. |
procedure Move(); |
|
Move an image from index CurIndex to NewIndex |
procedure Replace(); |
|
Replace an indexed image with the Bitmap given |
procedure ReplaceMasked(); |
|
ReplaceMasked - replaces the indexed image with the image given. |
procedure RegisterChanges(); |
|
Registers an object to get notified of a change of the imagelist |
procedure StretchDraw(); |
|
StretchDraw - draw the image to fill the canvas |
procedure UnRegisterChanges(); |
|
UnRegisterChanges - remove the changes from the register |
|
AllocBy - allocate images by an integer value |
|
property BlendColor: TColor; [rw] |
|
BlendColor - the colour for a blend |
|
BkColor - background colour (default none) |
|
|
Count - number of images in the list |
|
property DrawingStyle: TDrawingStyle; [rw] |
|
DrawingStyle - focus, selected, normal or transparent |
property HandleAllocated; |
|
HandleAllocated - if True, a handle (reference) has been allocated to this component |
|
Height of images on list |
|
|
Width of images on list |
|
property OnChange: TNotifyEvent; [rw] |
|
OnChange - event handler for a change in the imagelist |
property Masked: Boolean; [rw] |
|
Masked - if True, a mask is applied to the bitmap |
property Reference: TWSCustomImageListReference; [r] |
|
Reference to the imagelist |
property ShareImages: Boolean; [rw] |
|
ShareImages - if True, images are allowed to be shared |
property ImageType: TImageType; [rw] |
|
ImageType - an image or a mask |
end; |
|
Base class for TImageList (not the same as a TBitmap collection) |
|
| | ||
|
Base class for all components having a handle. |
|
| | ||
|
TLCLComponent - base class for LCL components |
|
| | ||
| | ||
| | ||
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. [What exactly does this mean to the user?] 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).
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.
lazarus-ccr.sourceforge.net |