[Overview][Types][Classes][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
TCustomImageList - 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 |
procedure WSRegisterClass; override; |
|
WSRegisterClass - Register this Class for the current Widget Set |
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(); |
|
CreateSize - runtime constructor for image(s) with given height and width |
destructor Destroy; override; |
|
|
procedure AssignTo(); override; |
|
|
procedure Assign(); override; |
|
|
procedure WriteData(); virtual; |
|
WriteData to a stream |
procedure ReadData(); virtual; |
|
ReadData from a stream |
procedure BeginUpdate; |
|
BeginUpdate - start updating the data |
procedure EndUpdate; |
|
EndUpdate - finish updating the data |
function Add(); |
|
Add an Image and Mask to the list. Returns the index of the added image or -1 if unsucessful |
function AddIcon(); |
|
AddIcon - add an icon to the list, returning the index of the icon or -1 if not successful (not yet supported) |
procedure AddImages(); |
|
AddImages - adds images from another imagelist to the list |
function AddMasked(); |
|
AddMasked - adds one or more bitmaps to the list. Every instance of MaskColor will be converted to transparent. Returns index of added bitmap, or -1 if unsuccessful |
function AddLazarusResource(); |
|
AddLazarusResource - load TBitmap from lazarus resources and add it |
procedure Change; |
|
Change - software method to force OnChange event |
procedure Clear; |
|
Clear - removes all images from the list |
procedure Delete(); |
|
Delete the image specified by AIndex |
procedure Draw(); |
|
Draw the image specified by AIndex on the specified canvas at position AX, AY |
procedure FillDescription(); |
|
FillDescription - fills the description with the default info of the imagedata |
procedure GetBitmap(); |
|
GetBitmap - creates a copy of the indexed image |
procedure GetFullBitmap(); |
||
procedure GetFullRawImage(); |
||
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 bitmaps into the list at the index position. If Mask is nil, the image has no transparent parts |
procedure InsertMasked(); |
|
InsertMasked - adds one or more bitmaps to the list. Every instance of MaskColor will be converted to transparent |
procedure Move(); |
|
Move an image from the CurIndex location to NewIndex location |
procedure Replace(); |
|
Replace an indexed image with the Bitmap given |
procedure ReplaceMasked(); |
|
ReplaceMasked - replaces the indexed image with the image given. Every instance of MaskColor will be converted to transparent |
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 |
property AllocBy: Integer; [rw] |
|
AllocBy - allocate images by an integer value |
property BlendColor: TColor; [rw] |
|
BlendColor - the colour for a blend |
|
BkColor - background colour (default none) |
|
property Count: Integer; [r] |
|
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 |
property Height: Integer; [rw] |
|
Height of images on list |
property Width: Integer; [rw] |
|
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; |
|
TCustomImageList - base class for TImageList (not the same as a TBitmap collection) |
|
| | ||
TLCLReferenceComponent |
||
? | ||
TObject |
TCustomImageList - base class for TImageList (not the same as a TBitmap collection)
Ancestor of TDragImageList which is base class for TImageList in Unit Controls
Delphi's TCustomImageList is based on the Win32 imagelists which has internally only one bitmap to hold all images. This reduces handle allocation. The original Lazarus TCustomImageList implementation was LCL only based, so for other platforms the single bitmap implementation had some speed drawbacks. Therefore it was implemented as a list of bitmaps, however it doesn't reduce handle allocation. In its current form, the imagelist is again based on a 32bit RGBA raw imagedata and the widgetset is notified when images are added or removed, so the widgetset can create its own optimal storage. The LCL keeps only the data, so all transparency info will be stored cross platform. (not all platforms have an 8bit alpha channel). NOTE: due to its implementation, the TCustomImageList is not a TBitmap collection. If a fast storage of bitmaps is needed, create your own list!