TButtonGlyph class
Represents an image that can be attached to a button.
Declaration
TButtonGlyph = class(TObject)Inheritance
- TButtonGlyph
- TObject
Description
TButtonGlyph is a
TObject descendant used to represent
the image with the symbol or pictograph displayed on a button, or in a column
in a grid. Use the properties and methods in the class to specify the image
displayed in the glyph, and the display settings required for the image.
Images and
ExternalImages are image lists with the
content that can be displayed in the glyph.
Glyph contains the
bitmap, scaled to the necessary display density, used in the class instance.
Width and
Height represent the dimensions for the
Glyph.
ShowMode determines when the image is displayed, just like its
usage in
TMenu and
TMenuItem.
TransparentMode indicates whether the glyph image is drawn with
transparency, as works in conjunction with the
Transparent
property in the parent control.
TButtonGlyph implements the
IImageCacheListener
interface used to provide support for cached images in
TImageList.
TButtonGlyph also implements the
IUnknown interface to
support the
QueryInterface method and reference counting.
TButtonGlyph is the type used to implement the
ButtonGlyph property in
TCustomBitBtn and
TCustomSpeedButton.
See also
Properties
TransparentMode | protected | Indicates the transparency mode used to render the glyph image. |
DrawEffectsEnabled | public | Indicates whether drawing effects are enabled for mouse-over and mouse-down events for the button glyph. |
Glyph | public | The bitmap image drawn as the glyph on the button. |
GlyphImageLayout | public | |
IsDesigning | public | Indicates whether change notifications are suppressed while editing property values. |
NumGlyphs | public | The number of glyphs available for button states. |
Images | public | The list of available images for the button glyph. |
LCLGlyphName | public | Stores the standard LCL resource name used for the Glyph in the class instance. |
ExternalImages | public | Contains a reference to an external list of images that can be used as the Glyph image, |
ExternalImageWidth | public | Width for the images in the ExternalImages property. |
ExternalImageIndex | public | Ordinal position for the bitmap in ExternalImages displayed when the button is Up (not pressed). |
ExternalHotImageIndex | public | Ordinal position in ExternalImages for the image displayed when the button is Hot (hovered). |
ExternalDisabledImageIndex | public | Ordinal position in ExternalImages for the image displayed when the button is Disabled. |
ExternalPressedImageIndex | public | Ordinal position in ExternalImages for the image displayed when the button is Pressed (down). |
ExternalSelectedImageIndex | public | Ordinal position in ExternalImages for the image displayed when the button is Selected (has focus). |
Width | public | The Width of the Glyph image. |
Height | public | The height of the glyph image. |
ShowMode | public | Indicates the logic used to display the Glyph image for the class instance. |
Methods
QueryInterface | public | Implements the method from IUnknown. |
_AddRef | public | Implements the method from IUnknown. |
_Release | public | Implements the method from IUnknown. |
CacheSetImageList | public | Stores the specified Image list in the Images property. |
CacheSetImageIndex | public | Sets the button state for the image in AIndex to the value specified in AImageIndex. |
CanShow | protected | Indicates if the glyph image can be drawn for the button glyph. |
CanShowGlyph | protected | Determines if an image is available for the button glyph. |
DoChange | protected | Performs actions needed when the glyph image has been changed for the class instance. |
GlyphChanged | protected | Provides a default implementation for the OnChange event handler. |
SetTransparentMode | protected | Sets the value for the TransparentMode property. |
Create | public | Create - constructor for TButtonGlyph: frees the Images cache then creates a Glyph Bitmap. |
Destroy | public | Destroy - destructor for TButtonGlyph: frees caches and calls inherited Destroy. |
GetImageIndexAndEffect | public | Gets the index for a glyph image using a given state, and the effect used to draw it. |
Draw | public | Draws the glyph for the button using the specified settings and state. |
Refresh | public | Updates the button glyph after changes to property values. |
Events
OnChange | public | Event handler signalled when the bitmap in Glyph has been changed. |
Inherited
From TObject (40)
AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
