Reference TCustomDrawList
Declared in Codebot.Controls.Scrolling.pas on line 387
TCustomDrawList is a scroll list drawn by event handlers with optional buttons inside each item
TCustomDrawList = class(TScrollList)
protected
{ Invoke OnButtonCalc }
procedure ButtonCalc(ItemIndex: Integer; const Rect: TRectI; out Buttons: TButtonRects);
{ Invoke OnButtonDraw }
procedure ButtonDraw(Surface: ISurface; ItemIndex, Button: Integer; const Rect: TRectI; State: TDrawState);
{ Invoke OnButtonClick }
procedure ButtonClick(ItemIndex, Button: Integer);
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure DrawBackground(const Rect: TRectI); override;
procedure DrawItem(Index: Integer; var Rect: TRectI; State: TDrawState); override;
procedure Scroll(Delta: Integer); override;
{ When true scrolling moves the drawn content, otherwise the list repaints }
property AutoScroll: Boolean read FAutoScroll write SetAutoScroll;
{ OnButtonCalc defines the buttons inside an item }
property OnButtonCalc: TButtonCalcEvent read FOnButtonCalc write FOnButtonCalc;
{ OnButtonDraw draws a button inside an item }
property OnButtonDraw: TButtonDrawEvent read FOnButtonDraw write FOnButtonDraw;
{ OnButtonClick is invoked when a button inside an item is clicked }
property OnButtonClick: TButtonClickEvent read FOnButtonClick write FOnButtonClick;
{ OnDrawBackground draws the area behind the items }
property OnDrawBackground: TDrawRectEvent read FOnDrawBackground write FOnDrawBackground;
{ OnDrawItem draws an item }
property OnDrawItem: TDrawIndexEvent read FOnDrawItem write FOnDrawItem;
public
{ Create a new draw list }
constructor Create(AOwner: TComponent); override;
end;See also
ISurface in Codebot.Graphics.Types.pas
TButtonRects in Codebot.Graphics.Types.pas
TDrawIndexEvent in Codebot.Graphics.pas
TDrawRectEvent in Codebot.Graphics.pas
TDrawState in Codebot.Graphics.Types.pas
TRectI in Codebot.Graphics.Types.pas