TCustomControlBar class
Implements a panel used to maintain and manage tool bars and tool buttons on a form.
Declaration
TCustomControlBar = class(TCustomPanel)Inheritance
- TCustomControlBar
- TCustomPanel
- TCustomControl
- TWinControl
- TControl
- TLCLComponent
- TComponent
- TPersistent
- TObject
Descends from it: TControlBar
Description
TCustomControlBar is a
TCustomPanel descendant used to
maintain and manage tool bars and tool buttons added to the container.
Internally, it uses a TCtrlBands member to represent the TToolBar,
TToolButton, or TCoolBar classes added to the
container. Use InsertControl and RemoveControl to
maintain items in the container at run-time, or use the design-time support
provided in the Lazarus Form Designer.
See also
Properties
AutoDock | public | Not used in the current LCL implementation. |
AutoDrag | public | Indicates if the control allows a band to be dragged even when DragManager is not used. |
AutoSize | public | Indicates if bands are automatically sized and positioned on the control bar. |
DockSite | public | Allows drag-docking of controls onto this control. |
DrawingStyle | public | Fill style used for bands on the control bar. |
GrabberCursor | public | |
GradientDirection | public | Controls the direction for a gradient drawn on the control bar. |
GradientStartColor | public | Specifies the initial color used in a gradient drawn on the control bar. |
GradientEndColor | public | Specifies the ending color used in a gradient drawn on the control bar. |
Picture | public | Optional image drawn before the visible bands for the control bar. |
RowSize | public | Height used for a band or a row of bands displayed on the control bar. |
RowSnap | public | Indicates if a band or row of bands snaps to the height for the control bar. |
Methods
AlignControlToBand | protected | Aligns the control for the specified band and updates its coordinates for use in subsequent resize operations. |
AlignControlsToBands | protected | Aligns visible control bands in the container. |
CalcBandHeight | protected | Calculates the vertical space needed for a band the control bar. |
CalcBandHeightSnapped | protected | Calculates the vertical space needed for a band on the control bar when RowSnap is enabled. |
CalcInnerBevelWidth | protected | Calculates the cumulative width for all borders and bevels used on the control bar. |
CalcLowestBandBottomPx | protected | Gets the largest value in the Bottom property for visible bands on the control bar. |
CalculatePreferredSize | protected | Calculates the preferred height and width used during auto-sizing. |
ChangeCursor | protected | Changes the cursor to the specified shape. |
CheckBandsSizeAndVisibility | protected | Updates the size and visibility for TCtrlBand instances defined in the control bar. |
CMBiDiModeChanged | protected | Handles the CM_BIDIMODECHANGED message. |
CMBorderChanged | protected | Handles the CM_BORDERCHANGED message. |
CreateWnd | protected | Ensures the default values taken from Cursor and Width are assigned when the window handle is created. |
DoBandMove | protected | Signals the OnBandMove event handler for the specified control and drawing rectangle. |
DoBandPaint | protected | Signals the OnBandPaint event handler using the specified arguments. |
DragControl | protected | Signals an assigned OnBandDrag event handler and starts a drag operation for the specified control. |
DragOver | protected | Called when an object is dragged over this control; Determines whether a drop is acceptable, using the OnDragOver handler. |
GetControlInfo | protected | Signals the OnBandInfo event handler to store control information to the arguments for the method. |
InitializeClass | protected | Class constructor which initializes class constants. |
InitializeBand | protected | Configures a control bar band and calculates its row position, order, and geometry including client decorations. |
InitializeMove | protected | Prepares visible bands on the control bar for a drag and drop operation. |
Loaded | protected | Performs actions needed when component loading has been completed. |
IsBandOverlap | protected | Determines if the display rectangles for two bands overlap. |
MouseDown | protected | Handles a mouse down message in the control. |
MouseMove | protected | Handles a mouse move message including dragging a control band. |
MouseUp | protected | Handles a mouse up message that ends a drag operation for a control band. |
MoveBand | protected | Performs actions needed when a band is moved to new position. |
NormalizeRows | protected | Orders visible bands on the control by their coordinates, and hides empty rows. |
Paint | protected | Draws the control with its image, decorations, and visible bands. |
PictureChanged | protected | Redraws the image on the control bar when the Picture property has been changed. |
Resize | protected | Signals the OnResize event handler (when assigned) and re-aligns bands and their controls. |
SetCursor | protected | Sets the Cursor to the specified TCursor shape. |
ShiftBands | protected | Shifts the positions for a range of bands by the specified amount. |
SortVisibleBands | protected | Calculates the number of visible bands (and controls) and optionally sorts visible bands to reflect their Top and Left coordinates. |
WMSize | protected | Handles the LM_SIZE message for the control. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
BeginUpdate | public | Increments the internal counter used to track the number of active update requests. |
EndUpdate | public | Decrements the internal counter used to track update requests, and calls Invalidate when the counter reaches zero (0). |
FlipChildren | public | Flips the horizontal display coordiantes for child controls. |
HitTest | public | Gets the control for the visible band under the specified mouse coordinates. |
InsertControl | public | Creates and stores a new band for the specified control. |
MouseToBandPos | public | Gets the visible band on the control bar at the specified mouse coordinates. |
RemoveControl | public | Removes the band with the specified control. |
StickControls | public | Aligns controls to both their bands and the control bar. |
Events
OnBandDrag | public | Event handler signalled when a drag operation is about to begin for a band on the control bar. |
OnBandInfo | public | Event handler signalled to get the insets rectangles, preferred size, and row count for the control bar. |
OnBandMove | public | Event handler signalled when a control band is moved on the control bar. |
OnBandPaint | public | Event handler signalled to render a visible band on the specified control with the specified paint options. |
OnCanResize | public | Not used in the current implementation of TCustomControlBar / TControlBar. |
OnPaint | public | Event handler signalled to perform default drawing in the inherited Paint method. |
Fields
cFullGrabber | protected | Space needed for the width of the grabber including the control bar and its border. |
FBands | protected | Member with the list of TCtrlBand instances for the control bar. |
FBandMove | protected | Member with the band move status flag for the control bar. |
FCursorLock | protected | Member with the cursor lock flag set when ChangeCursor is called. |
FDefCursor | protected | Member with the default cursor shape for the control bar. |
FGrabberCursor | protected | |
FHoveredBand | protected | Member with the band under the mouse cursor during a drag operation. |
FInitDrag | protected | Member with the initial coordinates for the band being dragged on the control bar. |
FInnerBevelWidth | protected | Member with the width for inner bevels following a CM_BORDERCHANGED control message. |
FLockResize | protected | Member with a flag set to prevent resizing while the row size is updated for the control bar. |
FPrevWidth | protected | Member with the Width for the control bar after its Handle is created. |
FVisiBands | protected | Member with the visible bands for the control bar. |
FVisiBandsEx | protected | Member with the visible bands on the control bar excluding a band being dragged. |
FUpdateCount | public | Member with the update counter for the control bar. |
Types and constants
cBandBorderH | protected | Space reserved for the horizontal border in a control bar. |
cBandBorderV | protected | Space reserved for the vertical border in a control bar |
cGrabWidth | protected | Space reserved as the width of the grabber in a control bar. |
Inherited
From TCustomPanel (22)
AdjustClientRect Align Alignment BevelColor BevelInner BevelOuter BevelWidth CMParentColorChanged Color FullRepaint GetControlClassDefaultSize GetDefaultDockCaption ParentBackground ParentColor RealSetText SetParentBackground ShowAccelChar TabStop UpdateParentColorChange VerticalAlignment WordWrap WSRegisterClass
From TCustomControl (7)
BorderStyle Canvas DestroyWnd FontChanged PaintWindow SetColor WMPaint
From TWinControl (224)
AddControl AlignControls AllAutoSized AutoAdjustLayout AutoSizeDelayed AutoSizeDelayedHandle AutoSizeDelayedReport AutoSizePhases BeginUpdateBounds BorderWidth BoundsLockCount BroadCast Brush BrushCreated CachedClientHeight CachedClientWidth CanFocus CanSetFocus CanTab ChangeScale ChildClassAllowed ChildHandlesCreated ChildKey ChildSizing ClientRectNeedsInterfaceUpdate CMDoubleBufferedChanged CMEnabledChanged CMEnter CMExit CMParentDoubleBufferedChanged CMShowHintChanged CMShowingChanged CMVisibleChanged CNChar CNKeyDown CNKeyUp CNSysKeyDown CNSysKeyUp ContainsControl ControlAtPos ControlCount ControlKeyDown ControlKeyUp Controls ControlsAligned CreateBrush CreateDockManager CreateHandle CreateParams CreateParented CreateParentedControl CreateSubClass CustomAlignInsertBefore CustomAlignPosition DefaultHandler DefWndProc DesignerDeleting DestroyHandle DialogChar DisableAlign DoAddDockClient DoAdjustClientRectChange DoAlignChildControls DoAllAutoSize DoAutoSize DoChildSizingChange DockClientCount DockClients DockDrop DockManager DockOver DoConstraintsChange DoDockClientMsg DoDockOver DoDragMsg DoEnter DoExit DoFlipChildren DoFloatMsg DoGetDockCaption DoKeyDownBeforeInterface DoKeyPress DoKeyUpBeforeInterface DoRemainingKeyDown DoRemainingKeyUp DoRemoveDockClient DoSendBoundsToInterface DoSendShowHideToInterface DoSetBounds DoubleBuffered DoUnDock DoUndockClientMsg DoUTF8KeyPress EnableAlign EndUpdateBounds EraseBackground FinalizeWnd FindChildControl FindNextControl FixDesignFontsPPIWithChildren FixupTabList Focused FormEndUpdated GetAdjustedLogicalClientRect GetBorderStyle GetChildren GetChildrenRect GetClientOrigin GetClientRect GetControlIndex GetControlOrigin GetDeviceContext GetDockCaption GetEnumeratorControls GetEnumeratorControlsReverse GetMouseCapture GetParentHandle GetPreferredSizeClientFrame GetSiteInfo GetTabOrderList GetTextLen GetTopParentHandle Handle HandleAllocated HandleNeeded InitializeWnd IntfGetDropFilesTarget IntfUTF8KeyPress Invalidate InvalidateBoundsRealized InvalidateClientRectCache InvalidatePreferredChildSizes IsClientHeightStored IsClientWidthStored IsControlMouseMsg IsFlipped IsResizing IsSpecialSubControl KeyDown KeyDownAfterInterface KeyDownBeforeInterface KeyPress KeyUp KeyUpAfterInterface KeyUpBeforeInterface LockRealizeBounds MainWndProc NotifyControls OnAlignInsertBefore OnAlignPosition OnDockDrop OnDockOver OnEnter OnExit OnGetDockCaption OnGetSiteInfo OnKeyDown OnKeyPress OnKeyUp OnUnDock OnUTF8KeyPress PaintControls PaintHandler PaintTo ParentDoubleBuffered ParentFormHandleInitialized ParentHandlesAllocated ParentWindow PerformTab RealGetText ReAlign RealizeBounds RealizeBoundsRecursive ReloadDockedControl RemoveFocus Repaint ScaleBy ScaleControls ScrollBy ScrollBy_WS SelectFirst SelectNext SendDialogChar SendMoveSizeMessages SetBorderStyle SetBounds SetChildZPosition SetControlIndex SetDockManager SetFocus SetShape SetTempCursor ShowControl Showing TabOrder UnlockRealizeBounds Update UpdateControlState UpdateDockCaption UpdateShowing UseDockManager UTF8KeyPress VisibleDockClientCount WindowHandle WMChar WMContextMenu WMDestroy WMEnter WMEraseBkgnd WMExit WMKeyDown WMKeyUp WMKillFocus WMMove WMNotify WMSetFocus WMShowWindow WMSysChar WMSysKeyDown WMSysKeyUp WMWindowPosChanged WndProc WriteLayoutDebugReport WSSetText
From TControl (352)
AccessibleDescription AccessibleName AccessibleRole AccessibleValue Action ActionChange ActionLink ActiveDefaultControlChanged AddHandler AddHandlerOnBeforeDestruction AddHandlerOnChangeBounds AddHandlerOnEnabledChanged AddHandlerOnEnabledChanging AddHandlerOnKeyDown AddHandlerOnMouseWheel AddHandlerOnResize AddHandlerOnVisibleChanged AddHandlerOnVisibleChanging AdjustSize AnchorAsAlign AnchorClient AnchoredControlCount AnchoredControls AnchorHorizontalCenterTo AnchorParallel Anchors AnchorSame AnchorSide AnchorSideBottom AnchorSideChanged AnchorSideLeft AnchorSideRight AnchorSideTop AnchorToCompanion AnchorToNeighbour AnchorVerticalCenterTo AssignTo AutoSizing AutoSizingAll AutoSizingLockCount BaseBounds BaseParentClientSize BeforeDestruction BeforeDragStart BeginAutoDrag BeginAutoSizing BeginDrag BiDiMode BorderSpacing BoundsChanged BoundsRect BoundsRectForNewParent BringToFront CalculateDockSizes CanAutoSize Caption CaptureChanged CaptureMouseButtons ChangeBounds Changed CheckChildClassAllowed CheckNewParent CheckOnChangeBounds Click ClientHeight ClientOrigin ClientRect ClientToParent ClientToScreen ClientWidth CMChanged CMCursorChanged CMHintShow CMHitTest CMMouseEnter CMMouseLeave CMParentBiDiModeChanged CMParentFontChanged CMParentShowHintChanged CMSysFontChanged CMTextChanged CNPreferredSizeChanged ColorIsStored ConstrainedResize Constraints ControlFontClass ControlOrigin ControlState ControlStyle ControlToScreen CreateAccessibleObject CreateControlBorderSpacing CreateFloatingDockSite Cursor DblClick DefineProperties DesktopFont DisableAutoSizing DoAutoAdjustLayout DoBorderSpacingChange DoCallKeyEventHandler DoCallMouseWheelEventHandler DoCallNotifyHandler Dock Docked DockOrientation DockTrackNoTarget DoContextPopup DoDock DoEndDock DoEndDrag DoFixDesignFontPPI DoMouseDown DoMouseUp DoMouseWheel DoMouseWheelDown DoMouseWheelHorz DoMouseWheelLeft DoMouseWheelRight DoMouseWheelUp DoOnChangeBounds DoOnParentHandleDestruction DoOnResize DoOnShowHint DoScaleFontPPI DoStartDock DoStartDrag DragCanceled DragCursor DragDrop Dragging DragKind DragMode EditingDone EnableAutoSizing Enabled EnabledChanged EnabledChanging EndAutoSizing EndDrag ExecuteCancelAction ExecuteDefaultAction FindSubComponent FixDesignFontsPPI Floating FloatingDockSiteClass Font ForeignAnchorSideChanged FormIsUpdating GetAccessibleObject GetAction GetActionLinkClass GetAnchorsDependingOnParent GetCachedText GetCanvasScaleFactor GetChildAccessibleObjectAtPos GetClientScrollOffset GetColorResolvingParent GetCursor GetDefaultColor GetDefaultHeight GetDefaultWidth GetDockEdge GetDragImages GetEnabled GetFloating GetFloatingDockSiteClass GetLogicalClientRect GetMousePosFromMessage GetPalette GetParentBackground GetParentComponent GetPopupMenu GetPreferredSize GetRGBColorResolvingParent GetScrolledClientRect GetSelectedChildAccessibleObject GetSidePosition GetTextBuf GetTopParent HandleObjectShouldBeVisible HasHelp HasParent Height HeightIsAnchored HelpContext HelpKeyword HelpType Hide Hint HostDockSite InitiateAction InvalidateControl InvalidatePreferredSize IsAParentAligning IsBorderSpacingInnerBorderStored IsCaptionStored IsControl IsControlVisible IsEnabled IsParentColor IsParentFont IsParentOf IsProcessingPaintMsg IsRightToLeft IsVisible Left LMCaptureChanged LoadedAll LRDockWidth ManualDock ManualFloat MouseCapture MouseEnter MouseInClient MouseLeave Notification OnChangeBounds OnClick OnConstrainedResize OnContextPopup OnDblClick OnDragDrop OnDragOver OnEditingDone OnEndDock OnEndDrag OnMouseDown OnMouseEnter OnMouseLeave OnMouseMove OnMouseUp OnMouseWheel OnMouseWheelDown OnMouseWheelHorz OnMouseWheelLeft OnMouseWheelRight OnMouseWheelUp OnQuadClick OnResize OnShowHint OnStartDock OnStartDrag OnTripleClick Parent ParentBiDiMode ParentDestroyingHandle ParentFont ParentFontChanged ParentShowHint ParentToClient Perform PopupMenu PositionDockRect QuadClick ReadBounds ReadState Refresh RemoveAllHandlersOfObject RemoveHandler RemoveHandlerOnBeforeDestruction RemoveHandlerOnChangeBounds RemoveHandlerOnEnabledChanged RemoveHandlerOnEnabledChanging RemoveHandlerOnKeyDown RemoveHandlerOnMouseWheel RemoveHandlerOnResize RemoveHandlerOnVisibleChanged RemoveHandlerOnVisibleChanging ReplaceDockedControl RequestAlign Scale96ToFont Scale96ToForm Scale96ToScreen ScaleConstraints ScaleDesignToForm ScaleFontsPPI ScaleFontTo96 ScaleFontToScreen ScaleFormTo96 ScaleFormToDesign ScaleScreenTo96 ScaleScreenToFont ScreenToClient ScreenToControl SendToBack SessionProperties SetAction SetAlign SetAnchors SetAutoSize SetBiDiMode SetBoundsKeepBase SetDragMode SetEnabled SetHint SetInitialBounds SetName SetParent SetParentBiDiMode SetParentComponent SetTextBuf SetVisible SetZOrder ShouldAutoAdjust Show ShowHelp ShowHint TBDockHeight Text TextChanged Top TripleClick UndockHeight UndockWidth UpdateAnchorRules UpdateBaseBounds UpdateMouseCursor UpdateRolesForForm UseRightToLeftAlignment UseRightToLeftReading UseRightToLeftScrollBar Visible VisibleChanged VisibleChanging Width WidthIsAnchored WindowProc WMCancelMode WMLButtonDBLCLK WMLButtonDown WMLButtonQuadCLK WMLButtonTripleCLK WMLButtonUp WMMButtonDBLCLK WMMButtonDown WMMButtonQuadCLK WMMButtonTripleCLK WMMButtonUp WMMouseHWheel WMMouseMove WMMouseWheel WMRButtonDBLCLK WMRButtonDown WMRButtonQuadCLK WMRButtonTripleCLK WMRButtonUp WMXButtonDBLCLK WMXButtonDown WMXButtonQuadCLK WMXButtonTripleCLK WMXButtonUp
From TLCLComponent (6)
DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance WidgetSetClass
From TComponent (64)
_AddRef _Release CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetTypeInfo GetTypeInfoCount iicrGetComponent InsertComponent Invoke IsImplementorOf Loading Name ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState
From TPersistent (4)
Assign FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (35)
AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
