Sign in Join
FPDoc Onlineexperiment

TCustomControlBar class

In unit ExtCtrls

Implements a panel used to maintain and manage tool bars and tool buttons on a form.

Declaration

pascal
TCustomControlBar = class(TCustomPanel)

Inheritance

  1. TCustomControlBar
  2. TCustomPanel
  3. TCustomControl
  4. TWinControl
  5. TControl
  6. TLCLComponent
  7. TComponent
  8. TPersistent
  9. 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

AutoDockpublicNot used in the current LCL implementation.
AutoDragpublicIndicates if the control allows a band to be dragged even when DragManager is not used.
AutoSizepublicIndicates if bands are automatically sized and positioned on the control bar.
DockSitepublicAllows drag-docking of controls onto this control.
DrawingStylepublicFill style used for bands on the control bar.
GrabberCursorpublic
GradientDirectionpublicControls the direction for a gradient drawn on the control bar.
GradientStartColorpublicSpecifies the initial color used in a gradient drawn on the control bar.
GradientEndColorpublicSpecifies the ending color used in a gradient drawn on the control bar.
PicturepublicOptional image drawn before the visible bands for the control bar.
RowSizepublicHeight used for a band or a row of bands displayed on the control bar.
RowSnappublicIndicates if a band or row of bands snaps to the height for the control bar.

Methods

AlignControlToBandprotectedAligns the control for the specified band and updates its coordinates for use in subsequent resize operations.
AlignControlsToBandsprotectedAligns visible control bands in the container.
CalcBandHeightprotectedCalculates the vertical space needed for a band the control bar.
CalcBandHeightSnappedprotectedCalculates the vertical space needed for a band on the control bar when RowSnap is enabled.
CalcInnerBevelWidthprotectedCalculates the cumulative width for all borders and bevels used on the control bar.
CalcLowestBandBottomPxprotectedGets the largest value in the Bottom property for visible bands on the control bar.
CalculatePreferredSizeprotectedCalculates the preferred height and width used during auto-sizing.
ChangeCursorprotectedChanges the cursor to the specified shape.
CheckBandsSizeAndVisibilityprotectedUpdates the size and visibility for TCtrlBand instances defined in the control bar.
CMBiDiModeChangedprotectedHandles the CM_BIDIMODECHANGED message.
CMBorderChangedprotectedHandles the CM_BORDERCHANGED message.
CreateWndprotectedEnsures the default values taken from Cursor and Width are assigned when the window handle is created.
DoBandMoveprotectedSignals the OnBandMove event handler for the specified control and drawing rectangle.
DoBandPaintprotectedSignals the OnBandPaint event handler using the specified arguments.
DragControlprotectedSignals an assigned OnBandDrag event handler and starts a drag operation for the specified control.
DragOverprotectedCalled when an object is dragged over this control; Determines whether a drop is acceptable, using the OnDragOver handler.
GetControlInfoprotectedSignals the OnBandInfo event handler to store control information to the arguments for the method.
InitializeClassprotectedClass constructor which initializes class constants.
InitializeBandprotectedConfigures a control bar band and calculates its row position, order, and geometry including client decorations.
InitializeMoveprotectedPrepares visible bands on the control bar for a drag and drop operation.
LoadedprotectedPerforms actions needed when component loading has been completed.
IsBandOverlapprotectedDetermines if the display rectangles for two bands overlap.
MouseDownprotectedHandles a mouse down message in the control.
MouseMoveprotectedHandles a mouse move message including dragging a control band.
MouseUpprotectedHandles a mouse up message that ends a drag operation for a control band.
MoveBandprotectedPerforms actions needed when a band is moved to new position.
NormalizeRowsprotectedOrders visible bands on the control by their coordinates, and hides empty rows.
PaintprotectedDraws the control with its image, decorations, and visible bands.
PictureChangedprotectedRedraws the image on the control bar when the Picture property has been changed.
ResizeprotectedSignals the OnResize event handler (when assigned) and re-aligns bands and their controls.
SetCursorprotectedSets the Cursor to the specified TCursor shape.
ShiftBandsprotectedShifts the positions for a range of bands by the specified amount.
SortVisibleBandsprotectedCalculates the number of visible bands (and controls) and optionally sorts visible bands to reflect their Top and Left coordinates.
WMSizeprotectedHandles the LM_SIZE message for the control.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
BeginUpdatepublicIncrements the internal counter used to track the number of active update requests.
EndUpdatepublicDecrements the internal counter used to track update requests, and calls Invalidate when the counter reaches zero (0).
FlipChildrenpublicFlips the horizontal display coordiantes for child controls.
HitTestpublicGets the control for the visible band under the specified mouse coordinates.
InsertControlpublicCreates and stores a new band for the specified control.
MouseToBandPospublicGets the visible band on the control bar at the specified mouse coordinates.
RemoveControlpublicRemoves the band with the specified control.
StickControlspublicAligns controls to both their bands and the control bar.

Events

OnBandDragpublicEvent handler signalled when a drag operation is about to begin for a band on the control bar.
OnBandInfopublicEvent handler signalled to get the insets rectangles, preferred size, and row count for the control bar.
OnBandMovepublicEvent handler signalled when a control band is moved on the control bar.
OnBandPaintpublicEvent handler signalled to render a visible band on the specified control with the specified paint options.
OnCanResizepublicNot used in the current implementation of TCustomControlBar / TControlBar.
OnPaintpublicEvent handler signalled to perform default drawing in the inherited Paint method.

Fields

cFullGrabberprotectedSpace needed for the width of the grabber including the control bar and its border.
FBandsprotectedMember with the list of TCtrlBand instances for the control bar.
FBandMoveprotectedMember with the band move status flag for the control bar.
FCursorLockprotectedMember with the cursor lock flag set when ChangeCursor is called.
FDefCursorprotectedMember with the default cursor shape for the control bar.
FGrabberCursorprotected
FHoveredBandprotectedMember with the band under the mouse cursor during a drag operation.
FInitDragprotectedMember with the initial coordinates for the band being dragged on the control bar.
FInnerBevelWidthprotectedMember with the width for inner bevels following a CM_BORDERCHANGED control message.
FLockResizeprotectedMember with a flag set to prevent resizing while the row size is updated for the control bar.
FPrevWidthprotectedMember with the Width for the control bar after its Handle is created.
FVisiBandsprotectedMember with the visible bands for the control bar.
FVisiBandsExprotectedMember with the visible bands on the control bar excluding a band being dragged.
FUpdateCountpublicMember with the update counter for the control bar.

Types and constants

cBandBorderHprotectedSpace reserved for the horizontal border in a control bar.
cBandBorderVprotectedSpace reserved for the vertical border in a control bar
cGrabWidthprotectedSpace 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.