Defines several specialist button classes
A set of constants to define the position of a glyph on a button.
A set of constants to define the state of a SpeedButton.
A small image that can be attached to buttons
Button Glyph: The graphics and legend on a button
If you drop a component on the form editor you don´t need to add code to explicitly create it. The component is automatically created together with the the form, and destroyed when the form is destroyed.

However, if you create the component by code don´t forget to free it when it is no longer needed.

Constructors allocate memory and system resources needed by the object. They also call the constructor of any sub-objects present in the class.
Create
- constructor for TButtonGlyph: frees the Images cache then creates a Glyph Bitmap
If you call Destroy for an object which hasn´t being initialized yet it will generate an error. Always use the Free method to deallocate objects, because it verifies if object variable doesn´t contain the value nil.

Take the following precautions when creating your own Destroy method:

* Declare Destroy with the override directive, because it is a virtual method.

* Always call 'inherited Destroy;' as the last thing on the destructor code.

* An exception may be raised on the constructor in case there is not enought memory to create an object, or something else goes wrong. If the exception is not handled inside the constructor, the object will be only partially built. In this case Destroy will be called, so your destructor must check if the resources were really allocated before disposing of them.

* Remember to call Free for all objects created on the constructor.
TObject.Destroy
Destroy
- destructor for TButtonGlyph: frees caches and calls inherited Destroy
Draw the image in the specified rectangle, within the client rectangle at specified offset, with the specified state and transparency
The small bitmap image to be drawn on the button
The number of glyphs to be drawn
Event handler for a change in the glyph
TBitBtnKind
- enumerated type of possible kinds of BitButtons.

TBitBtnKind - enumerated type of possible kinds of BitButtons.

    bkCustom,
    bkOK,
    bkCancel,
    bkHelp,
    bkYes,
    bkNo,
    bkClose,
    bkAbort,
    bkRetry,
    bkIgnore,
    bkAll,
    bkNoToAll,
    bkYesToAll

TBitBtnKinds
- set of TBitBtnKind
TCustomBitBtn
- the ancestor class for TBitBtn.
TCustomBitBtn is the ancestor for TBitBtn. If you want to define your own bitbutton class, you should use this class to derive it from.
FButtonGlyph
- local variable holding the Glyph for this button
ActionChange
- Change the action associated with this BitButton

Click

- the procedure which allows programmatic simulation of a mouse click, and thus activation of the Action associated with the OnClick event

What to do if the Glyph has been changed
Calls inherited Create then initialises layout, style and spacing, creates the Button Glyph
TComponent.Create TCustomButton.Create
frees Button Glyph then calls inherited Destroy
TComponent.Destroy
The BitMap Glyph to be displayed on the button
The number of glyphs for display
What kind of BitButton? Custom, OK, Cancel, Yes, No etc
Layout of button - Glyph at top, bottom, left or right
The margin to be left around glyphs
The spacing around the BitButton
Indicates the policy for showing or hiding the glyph image of this button
A Button with a small image attached
Bit Button: a push button control on a toolbar causing a particular action to be executed. It often displays a glyph or small graphic to denote its function.
HowToUseStdCtrls

// standard properties, which should be supported by all descendants

The (default) action to be associated with this control

Can either read the action already associated with the control (GetAction), or write an action to be associated (SetAction)

// standard properties, which should be supported by all descendants

Either reads a flag containing alignment instructions (FAlign) or writes alignment instructions (SetAlign)

May have no alignment, may have custom or client alignment, or can be aligned to top, bottom, left or right

// standard properties, which should be supported by all descendants

Determines how the control is to be anchored to its client or parent conrol

Either reads a flag containing the set of anchors to be used, or writes a set of anchors. If they have been written, this is indicated in IsAnchorsStored

// standard properties, which should be supported by all descendants

Determines the border spacing for this control

Reads flag to find stored spacing values required for the border of the control, or writes the flag to set the spacing.

The properties are defined in the parent class TControlBorderSpacing

Setting this property to true, will have the effect that when the user hits ESC this button is Clicked, even if the button does not have focus. Usually the Button which reacts to ESC sets the ModalResult of the form to mrCancel.

Gets caption as a text-string (GetText), or stores the new caption (SetText). Shows flag if caption is stored (IsCaptionStored).

By default, the Caption appears the same as the control Name in the Object Inspector, and the developer needs to set it explicitly to some new text.

The VCL implementation relies on the virtual Get/SetTextBuf to exchange text between widgets and VCL. This means a lot of (unnecesary) text copies.

The LCL uses strings for exchanging text (more efficient). To maintain VCL compatibility, the virtual RealGet/SetText is introduced. These functions interface with the LCLInterface.

The default Get/SetTextBuf implementation calls the RealGet/SetText. As long as the Get/SetTextBuf isn't overridden Get/SetText calls RealGet/SetText to avoid PChar copying.

To keep things optimal, LCL implementations should always override RealGet/SetText. Get/SetTextBuf is only kept for compatibility.

// standard properties, which should be supported by all descendants

Determine Constraints (max and min height and width) for this control; reads the size constraints or stores new ones.

Defines if a button is the Default on a form. That is, pressing ENTER will execute its onClick method, whether the control has focus or not!

// standard properties, which should be supported by all descendants

Whether the control is Enabled. If not, it usually appears 'greyed-out'

Reads a flag to see whether the control is enabled, or stores a new value. If stored, sets a flag to say so.

// standard properties, which should be supported by all descendants

Reads a flag to see what font should be used, or sets a flag to store it. If stored, sets a flag to say so

The properties of Font are defined in the parent class TFont

// standard properties, which should be supported by all descendants

Reads or Writes flag if bounds are changed

// standard properties, which should be supported by all descendants

This is often the default action for many controls, and is often the ONLY action specified by the programmer. The action can be spcified by the user, either by typing explicit code into the implementation section for this control, or by selecting an action from a pre-supplied ActionList

Reads or writes a flag if a mouse click is detected, and sets a flag if a value is stored.

OnKeyDown - event handler for instance when key is down while control has focus

Differs from OnKeyPress in that the key may have already been down when the control received focus; with OnKeyPress the key needs to become pressed while the control has focus.

OnKeyPress - event controller for a key being pressed while the control has focus

Differs from OnKeyDown in that the key needs to become pressed while the control has focus; with OnKeyDown the key may have already been down when the control received focus.

OnKeyUp - event handler for instance when a key is up (not pressed) while the control has focus

The key may already have been up when the control received focus, or a pressed key may become released during the time the control has focus.

// standard properties, which should be supported by all descendants
Reads or Writes flag if control is re-sized.
// standard properties, which should be supported by all descendants
Reads the details of the pop-up menu, or stores them.
Properties are defined in the parent class TPopupMenu
// standard properties, which should be supported by all descendants
Reads flag or writes one to determine if a hint is to be shown when mouse hovers over this control. If value is stored, a storage flag is set. Display of the actual hint is controlled by OnShowHint
Reads or writes information in flag; default is -1

    The Visible property represents the ability to see a visual control.
              If Visible is True the control is shown, otherwise it is hidden.
              Calling Show sets, among others, Visible to True.
              Setting Visible to False is equivalent to calling Hide method.

The Visible property does not depend on control's parent visibility. Use IsVisible method to consider this and get real visibility.
Links a TSpeedButton with an action.
SetGroupIndex
- stores the value of the index within the list of links
SetChecked
- stores the Checked status (True or False)
The ancestor class for TSpeedButton

TCustomSpeedButton is the ancestor for TSpeedButton. If you want to define your own speedbutton class, you should use this class to derive it from.

The Speed Button is designed to automate a process when it is selected. An user pushes a 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 carry an descriptive glyph, and has a state (checked or not, etc)

FState
- local variable to hold the state of the speedbutton (whether checked or not)
Find the number of Glyphs
What to do if the Glyph has changed
SetDown
- specifies the boolean value of Down (ie whether or not button was pressed)
SetGroupIndex
- specifies the value of the Group Index
SetFlat
- specifies whether or not the button is displayed Flat
SetMargin
- specifies the size of the margin
SetNumGlyphs
- specifies the number of glyphs
SetSpacing
- specifies the spacing between buttons
This is the procedure that is actually used by SetTextBuf, and stores text as a string rather than performing read-write to a PChar buffer
UpdateState
- brings the state up oto date, implementing any pending changes, and rendering non-valid if InvalidateOnChange is True
MouseInControl
- returns True if the mouse cursor is in the control

Loaded is called by the streaming system when a root component was completely read from a stream and all properties and references to other objects have been resolved by the streaming system. Descendents of TComponent should override this method to do some additional processing of properties after all published properties have been set from values obtained from the stream.

Application programmers should never call Loaded directly, this is done automatically by the streaming system.

Create - constructor for TCustomSpeedButton: calls inherited Create and initialises many defaults and properties

Among the properties set are Glyph, initial bounds, control style, layout, colour, caption and mouse responses

TGraphicControl.Create
Create
- constructor for TCustomSpeedButton: calls inherited Create and initialises many defaults and properties
Destroy
- destructor for TCustomSpeedButton: frees Glyph then calls inherited Destroy
TGraphicControl.Destroy
Boolean flag to determine whether all buttons are allowed to be Up (default false)
The button has been set in the Down state
Whether the button is to be displayed Flat or in relief
The Bitmap glyph to be used on this button
The Index within the group of speedbuttons
The button layout - Glyph at top, bottom, left or right
Margin - the space around glyph and caption
A value of -1 centers the content. If Spacing is -1 too then there is the same space on the left, between the glyph and caption, and on the right.
The number of Glyphs available
Spacing between Glyph and Caption
If Spacing is -1 and Margin is -1 then Glyph and Caption are centered and there is the same amount of space between Glyph and Caption and on the left and right. If Spacing is -1 and Margin is not -1 then Spacing will fill the remaining space.
Whether button is transparent
A Button used to represent states (checked or not, etc)
The Speed Button is designed to automate a process when it is selected. An user pushes a 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 carry an descriptive glyph, and has a state (checked or not, etc)
HowToUseStdCtrls

// standard properties, which should be supported by all descendants

The (default) action to be associated with this control

Can either read the action already associated with the control (GetAction), or write an action to be associated (SetAction)

// standard properties, which should be supported by all descendants

Either reads a flag containing alignment instructions (FAlign) or writes alignment instructions (SetAlign)

May have no alignment, may have custom or client alignment, or can be aligned to top, bottom, left or right

// standard properties, which should be supported by all descendants

Determines how the control is to be anchored to its client or parent conrol

Either reads a flag containing the set of anchors to be used, or writes a set of anchors. If they have been written, this is indicated in IsAnchorsStored

// standard properties, which should be supported by all descendants

Determines the border spacing for this control

Reads flag to find stored spacing values required for the border of the control, or writes the flag to set the spacing.

The properties are defined in the parent class TControlBorderSpacing

// standard properties, which should be supported by all descendants

Determine Constraints (max and min height and width) for this control; reads the size constraints or stores new ones.

Gets caption as a text-string (GetText), or stores the new caption (SetText). Shows flag if caption is stored (IsCaptionStored).

By default, the Caption appears the same as the control Name in the Object Inspector, and the developer needs to set it explicitly to some new text.

The VCL implementation relies on the virtual Get/SetTextBuf to exchange text between widgets and VCL. This means a lot of (unnecesary) text copies.

The LCL uses strings for exchanging text (more efficient). To maintain VCL compatibility, the virtual RealGet/SetText is introduced. These functions interface with the LCLInterface.

The default Get/SetTextBuf implementation calls the RealGet/SetText. As long as the Get/SetTextBuf isn't overridden Get/SetText calls RealGet/SetText to avoid PChar copying.

To keep things optimal, LCL implementations should always override RealGet/SetText. Get/SetTextBuf is only kept for compatibility.

// standard properties, which should be supported by all descendants

Whether the control is Enabled. If not, it usually appears 'greyed-out'

Reads a flag to see whether the control is enabled, or stores a new value. If stored, sets a flag to say so.

    The Visible property represents the ability to see a visual control.
              If Visible is True the control is shown, otherwise it is hidden.
              Calling Show sets, among others, Visible to True.
              Setting Visible to False is equivalent to calling Hide method.

The Visible property does not depend on control's parent visibility. Use IsVisible method to consider this and get real visibility.

// standard properties, which should be supported by all descendants

This is often the default action for many controls, and is often the ONLY action specified by the programmer. The action can be spcified by the user, either by typing explicit code into the implementation section for this control, or by selecting an action from a pre-supplied ActionList

Reads or writes a flag if a mouse click is detected, and sets a flag if a value is stored.

Double-clicking is much more common in a Windows environment than in Unix or Linux, where single-clicking is the default method for selecting an object. However, in all environments there could be valid use for a double-click, and a method should be supplied if appropriate.

Event handler for mouse movement within the current control
// standard properties, which should be supported by all descendants
Reads or Writes flag if control is re-sized.

// standard properties, which should be supported by all descendants

Reads or Writes flag if bounds are changed

// standard properties, which should be supported by all descendants
Reads flag or writes one to determine if a hint is to be shown when mouse hovers over this control. If value is stored, a storage flag is set. Display of the actual hint is controlled by OnShowHint
// standard properties, which should be supported by all descendants
Reads the details of the pop-up menu, or stores them.
Properties are defined in the parent class TPopupMenu
Find the index for the image and the effect to be used for drawing it
The list of available images from which selection can be made
The width of the glyph image
The height of the glyph image
Paint the background
Draw the glyph in the specified canvas in the specified rectangle at a given offset within the client, with specified state and transparency
FindDownButton
- returns the button that is down
Should accelerator character be shown (ie underlined character denoting key to be pressed for quick action)?
Should caption be displayed?

// standard properties, which should be supported by all descendants

Reads the value for colour, or stores the value, and sets a flag if the colour is stored.

The default colour is the same as the window in which the control is located.

// standard properties, which should be supported by all descendants

Reads a flag to see what font should be used, or sets a flag to store it. If stored, sets a flag to say so

The properties of Font are defined in the parent class TFont

GetDrawDetails
- returns the structured details for drawing
LoadGlyphFromLazarusResource
- method for loading a glyph from a Lazarus Resource file (.lrs)
LoadGlyphFromLazarusResource
- method for loading the glyph from a Lazarus resource file (.lrs)
GetGlyphSize
- returns the size of the glyoh within the specified PaintRect
GetTextSize
- returns the size of the text within the specified PaintRect
TGetDefaultBitBtnGlyph
- generic method to return a default Bit Button Glyph of specified Kind
GetLCLDefaultBtnGlyph
- generic method to return the LCL default button glyph of the specified Kind
LoadGlyphFromLazarusResource
- generic method to load a button glyph with specified name from a Lazarus Resource file (.lrs)