[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
The ancestor class for TSpeedButton.
Source position: buttons.pp line 304
type TCustomSpeedButton = class(TGraphicControl) |
||
protected |
||
|
Internal member used to store the TButtonState for the control. |
|
class procedure WSRegisterClass; override; |
|
Registers this component class with the current WidgetSet. |
function ButtonGlyph; |
|
Gets the TButtonGlyph used for the control. |
function GetNumGlyphs; |
|
Gets the value for the NumGlyphs property. |
procedure GlyphChanged(); virtual; |
|
Performs actions needed when the value in the Glyph property has been changed. |
function DialogChar(); override; |
|
Performs actions needed to handle an accelerator key for the control. |
procedure CalculatePreferredSize(); override; |
|
Calculates the default height and width required for the control. |
procedure MeasureDraw(); |
|
Calculates the Width and Height for theSpeedButton, and optionally renders the control. |
procedure MouseEnter; override; |
|
Invokes the OnMouseEnter handler. |
procedure MouseLeave; override; |
|
Invokes the OnMouseLeave handler. |
procedure MouseDown(); override; |
|
Handler for MouseDown events. |
procedure MouseMove(); override; |
|
Handler for MouseMove events. |
procedure MouseUp(); override; |
|
Invokes the OnMouseUp handler. |
procedure Notification(); override; |
|
Performs action needed when a sub-component is added or removed for the control. |
procedure Paint; override; |
|
Implements the default handler used to draw the control. |
procedure PaintBackground(); virtual; |
|
Paints the background for the control. |
procedure SetDown(); |
|
Sets the value for the Down property. |
procedure SetGroupIndex(); |
|
Sets the value for the GroupIndex property. |
procedure SetFlat(); |
|
Sets the value for the Flat property. |
procedure SetMargin(); |
|
Sets the value for the Margin property. |
procedure SetNumGlyphs(); |
|
Sets the value for the NumGlyphs property. |
procedure SetSpacing(); |
|
Sets the value for the Spacing property. |
procedure RealSetText(); override; |
|
Sets the value for the Caption property. |
procedure UpdateState(); virtual; |
|
Updates internal members used to track state changes in the control. |
function GetDrawDetails; virtual; |
|
GetDrawDetails - returns the structured details for drawing. |
property MouseInControl: Boolean; [r] |
|
MouseInControl - returns True if the mouse cursor is in the control. |
procedure ActionChange(); override; |
|
Performs action when a new value is assigned to the Action property for the control. |
function GetActionLinkClass; override; |
|
The default ActionLink class (TControlActionLink). |
class function GetControlClassDefaultSize; override; |
|
Returns the default size for this class of controls (when added to a form). |
procedure Loaded; override; |
|
Performs actions needed when LCL component streaming is completed for the control. |
function GetGlyphSize(); virtual; |
|
GetGlyphSize - returns the size of the glyph within the specified PaintRect. |
function GetTextSize(); virtual; |
|
GetTextSize - returns the size of the text within the specified PaintRect. |
function DrawGlyph(); virtual; |
|
Draws the glyph on the specified canvas in the specified rectangle at a given offset within the client, with specified state and transparency. |
public |
||
constructor Create(); override; |
|
Create - constructor for TCustomSpeedButton: calls inherited Create and initializes many defaults and properties. |
destructor Destroy; override; |
|
Destroy - destructor for TCustomSpeedButton: frees Glyph then calls inherited Destroy. |
function FindDownButton; |
|
FindDownButton - returns the button that is down. |
procedure Click; override; |
|
Signals OnClick and/or executes the ActionLink when the control has been clicked. |
procedure LoadGlyphFromResourceName(); |
|
Loads the image for the Glyph with the specified name from a resource instance. |
procedure LoadGlyphFromLazarusResource(); |
|
LoadGlyphFromLazarusResource - method for loading a glyph from a Lazarus Resource file (.lrs). |
property AllowAllUp: Boolean; [rw] |
|
Boolean flag which indicates if all buttons in a group are allowed to be Up (default is False). |
property Color: TGraphicsColor; |
|
The background color for the control. |
property Down: Boolean; [rw] |
|
Indicates if the button has been set to the Down state. |
property Flat: Boolean; [rw] |
|
Whether the button is to be displayed Flat or in relief. |
|
The Bitmap used for the glyph image on the button. |
|
property GroupIndex: Integer; [rw] |
|
The ordinal position for the control within a group of related speedbuttons. |
property Images: TCustomImageList; [rw] |
|
Contains images available for use as the glyph for the control. |
property ImageIndex: Integer; [rw] |
|
Ordinal position for the Image used as the glyph for the control. |
property ImageWidth: Integer; [rw] |
|
Display width for the glyph image in the control. |
property Layout: TButtonLayout; [rw] |
|
The button layout - Glyph at top, bottom, left or right. |
property Margin: Integer; [rw] |
|
Margin - the space around glyph and caption. |
property NumGlyphs: Integer; [rw] |
|
The number of Glyphs available. |
property ShowAccelChar: Boolean; [rw] |
|
Indicates if the accelerator charactershould be shown (i.e. underlined character denoting key to be pressed for quick action). |
property ShowCaption: Boolean; [rw] |
|
Indicates if the caption for the speed button is displayed. |
property Spacing: Integer; [rw] |
|
Spacing between Glyph and Caption. |
property Transparent: Boolean; [rw] |
|
Indicates if the control is drawn with transparency. |
end; |
|
The ancestor class for TSpeedButton. |
|
| | ||
|
TGraphicControl is the base class for all lightweight controls. |
|
| | ||
|
The base class for visible controls. |
|
| | ||
|
The base class for LCL components which have an associated widget. |
|
| | ||
TObject |
TCustomSpeedButton is a TGraphicControl descendant, and the ancestor for TSpeedButton. If you want to define your own SpeedButton class, you should derive it from this class.
A SpeedButton is designed to automatically perform a process when it is depressed. The user can push the button to start an action or set a mode. When a user clicks on a SpeedButton focus is not shifted; a Speed Button never gets focus. The button may have a descriptive glyph (symbol or pictograph), and has a state (checked or unchecked).