Class TCustomBWHeader (unit BWHeader)

Inherits from

TCustomControl

Constructors


constructor Create(AOwner:TComponent);

Public declarations

=============================================================================



Functions

destructor Destroy;

FFixClick:=false; // Left for future FAscBmp.

function GetSectionAt(X,Y:integer):TBWHeaderSection;


function GetSectionRect(SectionNum:integer):TRect;

dmDragMove: with ScreenToClient(Pos) do DoDragOver(Source, X, Y, Message.

procedure CMMouseEnter(var Message: TMessage);


procedure CMMouseLeave(var Message: TMessage);


function CreateSections:TBWHeaderSections;

Protected declarations

procedure DoStartDrag(var DragObject: TDragObject);

if not FFixClick then

procedure DragCanceled;


procedure DragDrop(Source: TObject; X, Y: Integer);


procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);


function InResizeArea (X:integer; var HitSection:TBWHeaderSection):boolean;


procedure Paint;


procedure Resize;

BF_BOTTOMRIGHT

procedure WMLButtonDown(var Message: TWMLButtonDown);


procedure WMLButtonUp(var Message: TWMLButtonUp);

really in client width

procedure WMMouseMove(var Message: TWMMouseMove);

not Resizing

procedure AllocateLineDC;

if not assigned(OnDragOver) then

procedure CMDrag(var Message: TCMDrag);


procedure DrawLine;


function GetColumnsWidth: integer;

-ResizeWidth

procedure InvalidateRight(value:integer);


procedure RedrawSection(SectionNum:integer; R:TRect);


procedure RedrawSections;

case

procedure ReleaseLineDC;


procedure SetSections(value:TBWHeaderSections);


Properties

property AllowDrag : boolean


property ResizeOnDrag : boolean


property Sections : TBWHeaderSections


property SectionsWidth : integer


property Tracking : boolean


Events

event OnResize : TNotifyEvent

property FixClick : boolean read FFixClick write FFixClick; // Left for future

event OnSectionClick : TBWHeaderSectionEvent


event OnSectionDelete : TBWHeaderSectionEvent


event OnSectionDraw : TBWSectionRedrawEvent


event OnSectionResize : TBWHeaderSectionEvent


event OnSectionResizing : TBWSectionResizingEvent


Variables

FAllowDrag : boolean;


FAscBmp : TBitmap;


FButtonLeft : TBWHeaderSection;

FFixClick : boolean; // Left for future

FButtonRight : TBWHeaderSection;


FButtons : boolean;


FDescBmp : TBitmap;


FDropSrc : TBWHeaderSection;


FDropTrg : TBWHeaderSection;


FHeaderLine : integer;


FHeaderLineVis : boolean;


FLeftBmp : TBitmap;


FLineDC : HDC;


FLineTab : integer;


FOnResize : TNotifyEvent;


FOnSectionClick : TBWHeaderSectionEvent;


FOnSectionDelete : TBWHeaderSectionEvent;


FOnSectionDraw : TBWSectionRedrawEvent;


FOnSectionResize : TBWHeaderSectionEvent;


FOnSectionResizing : TBWSectionResizingEvent;


FPainting : boolean;


FPressCoord : TPoint;


FPressed : boolean;


FPressedItem : TBWHeaderSection;


FResizeOnDrag : boolean;


FResizeSection : TBWHeaderSection;


FResizing : boolean;


FRightBmp : TBitmap;


FSections : TBWHeaderSections;

Private declarations

FTracking : boolean;


FTrackSection : TBWHeaderSection;



Constructors


constructor Create(AOwner:TComponent);

Public declarations

=============================================================================


Functions


destructor Destroy;

FFixClick:=false; // Left for future FAscBmp.TransparentMode:=tmAuto; FDescBmp.TransparentMode:=tmAuto; FLeftBmp.TransparentMode:=tmAuto; FRightBmp.TransparentMode:=tmAuto;


function GetSectionAt(X,Y:integer):TBWHeaderSection;


function GetSectionRect(SectionNum:integer):TRect;

dmDragMove: with ScreenToClient(Pos) do DoDragOver(Source, X, Y, Message.Result<>0);


procedure CMMouseEnter(var Message: TMessage);


procedure CMMouseLeave(var Message: TMessage);


function CreateSections:TBWHeaderSections;

Protected declarations


procedure DoStartDrag(var DragObject: TDragObject);

if not FFixClick then


procedure DragCanceled;


procedure DragDrop(Source: TObject; X, Y: Integer);


procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);


function InResizeArea (X:integer; var HitSection:TBWHeaderSection):boolean;


procedure Paint;


procedure Resize;

BF_BOTTOMRIGHT


procedure WMLButtonDown(var Message: TWMLButtonDown);


procedure WMLButtonUp(var Message: TWMLButtonUp);

really in client width


procedure WMMouseMove(var Message: TWMMouseMove);

not Resizing


procedure AllocateLineDC;

if not assigned(OnDragOver) then


procedure CMDrag(var Message: TCMDrag);


procedure DrawLine;


function GetColumnsWidth: integer;

-ResizeWidth


procedure InvalidateRight(value:integer);


procedure RedrawSection(SectionNum:integer; R:TRect);


procedure RedrawSections;

case


procedure ReleaseLineDC;


procedure SetSections(value:TBWHeaderSections);


Properties


property AllowDrag : boolean


property ResizeOnDrag : boolean


property Sections : TBWHeaderSections


property SectionsWidth : integer


property Tracking : boolean


Events


event OnResize : TNotifyEvent

property FixClick : boolean read FFixClick write FFixClick; // Left for future


event OnSectionClick : TBWHeaderSectionEvent


event OnSectionDelete : TBWHeaderSectionEvent


event OnSectionDraw : TBWSectionRedrawEvent


event OnSectionResize : TBWHeaderSectionEvent


event OnSectionResizing : TBWSectionResizingEvent


Variables


FAllowDrag : boolean;


FAscBmp : TBitmap;


FButtonLeft : TBWHeaderSection;

FFixClick : boolean; // Left for future


FButtonRight : TBWHeaderSection;


FButtons : boolean;


FDescBmp : TBitmap;


FDropSrc : TBWHeaderSection;


FDropTrg : TBWHeaderSection;


FHeaderLine : integer;


FHeaderLineVis : boolean;


FLeftBmp : TBitmap;


FLineDC : HDC;


FLineTab : integer;


FOnResize : TNotifyEvent;


FOnSectionClick : TBWHeaderSectionEvent;


FOnSectionDelete : TBWHeaderSectionEvent;


FOnSectionDraw : TBWSectionRedrawEvent;


FOnSectionResize : TBWHeaderSectionEvent;


FOnSectionResizing : TBWSectionResizingEvent;


FPainting : boolean;


FPressCoord : TPoint;


FPressed : boolean;


FPressedItem : TBWHeaderSection;


FResizeOnDrag : boolean;


FResizeSection : TBWHeaderSection;


FResizing : boolean;


FRightBmp : TBitmap;


FSections : TBWHeaderSections;

Private declarations


FTracking : boolean;


FTrackSection : TBWHeaderSection;