[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Graphics' (#lcl)

TCustomIcon

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TCustomIcon - base class for TIcon

Declaration

Source position: graphics.pp line 1586

type TCustomIcon = class(TRasterImage)

protected

  FCurrent: Integer;

  

FCurrent - local variable to hold current sequence number

  FRequestedSize: TSize;

  

FRequestedSize - local variable to hold requested size of Icon

  procedure MaskHandleNeeded; override;

  

MaskHandleNeeded - method to signal that a handle is required for the Mask

  procedure PaletteNeeded; override;

  

PaletteNeeded - method to signal that a Palette is required

  function CanShareImage(); override;

  

CanShareImage - returns True if specified class of image can be shared

  procedure CheckRequestedSize;

  

CheckRequestedSize - method to ensure correct size requested

  function GetIndex();

  

GetIndex - returns the Index value of the Icon with specified format and size (.icn files can contain several versions of image)

  function GetBitmapHandle; override;

  

GetBitmapHandle - returns a Birmap Handle for the Image

protected

  class function GetDefaultSize; virtual;

  

GetDefaultSize - returns default size for Icon

protected

  function GetMasked; override;

  

GetMasked - returns True if the Image is Masked

  function GetMaskHandle; override;

  

GetMaskHandle - returns a bitmap handle for the Mask

  function GetPalette; override;

  

GetPalette - returns a Handle for the Palette

  function GetPixelFormat; override;

  

GetPixelFormat - returns the pixel format for the Image

  function GetRawImagePtr; override;

  

GetRawImagePtr - returns a pointer to the Raw Image

  function GetRawImageDescriptionPtr; override;

  

GetRawImageDescriptionPtr - returns a pointer to a raw image description

  function GetTransparent; override;

  

GetTransparent - returns True if the graphic is transparent

protected

  class function GetTypeID; virtual;

  

GetTypeID - returns Identifier for type of Icon

  class function GetSharedImageClass; override;

  

GetSharedImageClass - returns the class of Shared Raster Image

protected

  procedure HandleNeeded; override;

  

HandleNeeded - method to signal that a handle is required

  function InternalReleaseBitmapHandle; override;

  

InternalReleaseBitmapHandle - releases Bitmap Handle and returns its value

  function InternalReleaseMaskHandle; override;

  

InternalReleaseMaskHandle - releases Mask Handle and returns its value

  function InternalReleasePalette; override;

  

InternalReleasePalette - releases Palette Handle and returns its value

  procedure ReadData(); override;

  

ReadData - reads data for the Graphic from a stream

  procedure ReadStream(); override;

  

ReadStream - loads imagedata into rawimage, this method shouldn't call changed()

  procedure SetMasked(); override;

  

SetMasked - specifies if the image is to be masked

  procedure SetPixelFormat(); override;

  

SetPixelFormat - specifies the format for Pixels in this Image

  procedure SetTransparent(); override;

  procedure UnshareImage(); override;

  

UnshareImage - stops an image from being shared: if CopyContent is True, the Image gets copied

  procedure UpdateCurrentView;

  

UpdateCurrentView - updates the current appearance of the Icon

  procedure SetHandle(); override;

  function UpdateHandle(); virtual;

  function UpdateHandles(); override;

  

UpdateHandles - called when handles are created from rawimage (true when handle changed)

  procedure WriteStream(); override;

  

WriteStream - specifies which stream to be used for writing

public

  constructor Create; override;

  

Create - constructor for TGraphic: calls inherited Create

  procedure Add();

  

Add - an Icon formatted as AFormat, with specified Height and Width

  procedure Assign(); override;

  

Assign checks if Source is correct data type, then copies image data

  procedure AssignImage(); virtual;

  

AssignImage - copies information from the source image to the current one

  procedure Clear; override;

  

Clear the Icon and release its resources

  procedure Delete();

  

Delete the indexed Icon

  procedure Remove();

  

Remove the Icon specified by AFormat, AHeight and AWidth

  procedure GetDescription();

  

GetDescription - find the description for the Icon

  procedure SetSize(); override;

  

SetSize - write the size (width, height) of the Icon

public

  class function GetFileExtensions; override;

  

GetFileExtensions returns valid file extensions, in this case 'ico'

public

  function LazarusResourceTypeValid(); override;

  

Check that the Resource specified for reading or writing is a valid type - result True if it is

  procedure LoadFromResourceName(); override;

  procedure LoadFromResourceID(); override;

  procedure LoadFromResourceHandle();

  function BitmapHandleAllocated; override;

  

BitmapHandleAllocated - returns True if a handle has been allocated for the Bitmap

  function MaskHandleAllocated; override;

  

MaskHandleAllocated - returns True if a handle has been allocated for the Mask

  function PaletteAllocated; override;

  

PaletteAllocated - returns True if a Palette has been allocated

  procedure SetHandles(); override;

  

SetHandles - allows the user to specify handles

  function GetBestIndexForSize();

  

GetBestIndexForSize - returns the best estimate of the index value for size

  property Current: Integer; [rw]

  

Current - the sequence number of the current Icon

  property Count: Integer; [r]

  

Count - the number of references to this Icon

end;

Inheritance

TCustomIcon

  

TCustomIcon - base class for TIcon

|

TRasterImage

  

TRasterImage - base class for a number of graphic controls, including TCustomBitmap and TCustomIcon, which use a raster of dots to display graphic information

|

TGraphic

  

TGraphic - Base class for dealing with Graphic images

|

TPersistent

|

TObject

The latest version of this document can be found at lazarus-ccr.sourceforge.net.