Class TCustomCheckOutline (unit CheckOutline)

Inherits from

TCustomGrid

Constructors


constructor Create(AOwner: TComponent);

TCustomCheckOutline


Functions

function Add(Index: LongInt; const Text: string): LongInt;


function AddChild(Index: LongInt; const Text: string): LongInt;


function AddChildObject(Index: LongInt; const Text: string; const Data: Pointer): LongInt;


function AddObject(Index: LongInt; const Text: string; const Data: Pointer): LongInt;


procedure BeginUpdate;


procedure Clear;


procedure Delete(Index: LongInt);


destructor Destroy;


procedure EndUpdate;


procedure FullCollapse;


procedure FullExpand;


function GetDataItem(Value: Pointer): Longint;


function GetItem(X, Y: Integer): LongInt;


function GetNodeDisplayWidth(Node: TCheckOutlineNode): Integer;


function GetTextItem(const Value: string): Longint;


function GetVisibleNode(Index: LongInt): TCheckOutlineNode;


function Insert(Index: LongInt; const Text: string): LongInt;


function InsertObject(Index: LongInt; const Text: string; const Data: Pointer): LongInt;


procedure LoadFromFile(const FileName: string);


procedure LoadFromStream(Stream: TStream);


procedure SaveToFile(const FileName: string);


procedure SaveToStream(Stream: TStream);


procedure SetUpdateState(Value: Boolean);


procedure ToggleChecked(Index:LongInt);


function BadIndex(Value: TCheckOutlineNode): Boolean;


procedure Click;


function ClickInCheckbox(x,y:integer):boolean;


procedure Collapse(Index: LongInt);


procedure DblClick;


procedure DefineProperties(Filer: TFiler);


procedure DeleteNode(Node: TCheckOutlineNode; CurIndex: LongInt);


procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState);


procedure Expand(Index: LongInt);

Raise EOutlineError.

procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);


procedure KeyDown(var Key: Word; Shift: TShiftState);


procedure KeyPress(var Key: Char);


procedure Loaded;


procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);


procedure MouseMove(Shift: TShiftState; X, Y: Integer);


procedure Move(Destination, Source: LongInt; AttachMode: TAttachMode);


procedure SetDisplayWidth(Value: Integer);


function SetGoodIndex(Value: TCheckOutlineNode): TCheckOutlineNode;


procedure SetLevel(Node: TCheckOutlineNode; CurLevel, NewLevel: Cardinal);


function AttachNode(Index: LongInt; Str: string; Ptr: Pointer; AttachMode: TAttachMode): LongInt;


procedure ChangeBitmap(Value: TBitmap; Kind: TCheckOutlineBitmap);


procedure ClearBitmap(var Bitmap: TBitmap; Kind: TCheckOutlineBitmap);


procedure CMFontChanged(var Message: TMessage);


function CompareNodes(Value1, Value2: TCheckOutlineNode): TOutlineNodeCompare;


procedure CreateGlyph;


procedure DoExpand(Node: TCheckOutlineNode);


procedure DrawPictures(BitMaps: array of TBitmap; ARect: TRect);


procedure DrawText(Node: TCheckOutlineNode; Rect: TRect);


procedure DrawTree(ARect: TRect; Node: TCheckOutlineNode);


procedure Error(const ErrorString: string);


function Get(Index: LongInt): TCheckOutlineNode;


function GetChecked(Index: LongInt): Boolean;


function GetItemCount: LongInt;


function GetPicture(Index: Integer): TBitmap;


function GetSelectedItem: LongInt;


function GetStrings: TStrings;


procedure Init;


function IsCurItem(Value: LongInt): Boolean;


procedure MoveNode(Destination, Source: LongInt; AttachMode: TAttachMode);


procedure ReadBinaryData(Stream: TStream);


procedure ResetSelectedItem;


function ResizeGrid: Boolean;


procedure SetCheckboxWidth(value:integer);


procedure SetChecked(Index: LongInt; Value: Boolean);


procedure SetCurItem(Value: LongInt);


procedure SetGapWidth(value:integer);


procedure SetHorzScrollBar;


procedure SetItemHeight(Value: Integer);

procedure SetMaskColor(Value: TColor);

procedure TCustomCheckOutline.


procedure SeTOutlineOptions(Value: TOutlineOptions);


procedure SeTOutlineStyle(Value: TOutlineStyle);


procedure SetPicture(Index: Integer; Value: TBitmap);


procedure SetRowFromNode(Node: TCheckOutlineNode);


procedure SetRowHeight;


procedure SetSelectedItem(Value: Longint);


procedure SetStrings(Value: TStrings);


procedure SetStyle(Value: TOutlineType);


function StoreBitmap(Index: Integer): Boolean;


procedure wmKillFocus(var msg:TWmKillFocus);


procedure WMSize(var Message: TWMSize);


procedure WriteBinaryData(Stream: TStream);


Properties

property BackColor : TColor


property Canvas :


property CheckBoxWidth : Integer


property CheckChildren : Boolean


property Checked : Boolean


property GapWidth : Integer


property ItemCount : LongInt


property Items : TCheckOutlineNode


property Row :


property SelectedItem : Longint


property TextColor : TColor


property ItemHeight : Integer


property ItemSeparator : string


property Lines : TStrings


property Options : TOutlineOptions


property OutlineStyle : TOutlineStyle


property PictureChecked : TBitmap


property PictureClosed : TBitmap


property PictureLeaf : TBitmap


property PictureMinus : TBitmap


property PictureOpen : TBitmap


property PicturePlus : TBitmap


property PictureUnchecked : TBitmap


property Style : TOutlineType


Events

event OnlyWhenFocused : Boolean


event OnCollapse : EOutlineChange


event OnDrawItem : TDrawItemEvent


event OnExpand : EOutlineChange


Variables

LongLabel : TLongEdit;


fBackColor : TColor;


FBlockInsert : Boolean;


FCheckboxWidth : Integer;


FCheckChildren : Boolean;


FCurItem : TCheckOutlineNode;


FFontSize : Integer;


FGapWidth : Integer;


FGoodNode : TCheckOutlineNode;


FIgnoreScrollResize : Boolean;


FItemHeight : Integer;


FOldBitmaps : TCheckOutlineBitmaps;


FOnCollapse : EOutlineChange;


FOnDrawItem : TDrawItemEvent;


FOnExpand : EOutlineChange;


fOnlyWhenFocused : Boolean;


FOptions : TOutlineOptions;


FOutlineStyle : TOutlineStyle;


FPictures : TCheckBitmapArray;


FRootNode : TCheckOutlineNode;


FSelectedItem : TCheckOutlineNode;


FSeparator : string;


FSettingHeight : Boolean;


FSettingWidth : Boolean;


FStrings : TStrings;


FStyle : TOutlineType;


fTextColor : TColor;


FUserBitmaps : TCheckOutlineBitmaps;


OldFormMouseMove : TMouseMoveEvent;


OldIndex : integer;


UpdateCount : Integer;



Constructors


constructor Create(AOwner: TComponent);

TCustomCheckOutline


Functions


function Add(Index: LongInt; const Text: string): LongInt;


function AddChild(Index: LongInt; const Text: string): LongInt;


function AddChildObject(Index: LongInt; const Text: string; const Data: Pointer): LongInt;


function AddObject(Index: LongInt; const Text: string; const Data: Pointer): LongInt;


procedure BeginUpdate;


procedure Clear;


procedure Delete(Index: LongInt);


destructor Destroy;


procedure EndUpdate;


procedure FullCollapse;


procedure FullExpand;


function GetDataItem(Value: Pointer): Longint;


function GetItem(X, Y: Integer): LongInt;


function GetNodeDisplayWidth(Node: TCheckOutlineNode): Integer;


function GetTextItem(const Value: string): Longint;


function GetVisibleNode(Index: LongInt): TCheckOutlineNode;


function Insert(Index: LongInt; const Text: string): LongInt;


function InsertObject(Index: LongInt; const Text: string; const Data: Pointer): LongInt;


procedure LoadFromFile(const FileName: string);


procedure LoadFromStream(Stream: TStream);


procedure SaveToFile(const FileName: string);


procedure SaveToStream(Stream: TStream);


procedure SetUpdateState(Value: Boolean);


procedure ToggleChecked(Index:LongInt);


function BadIndex(Value: TCheckOutlineNode): Boolean;


procedure Click;


function ClickInCheckbox(x,y:integer):boolean;


procedure Collapse(Index: LongInt);


procedure DblClick;


procedure DefineProperties(Filer: TFiler);


procedure DeleteNode(Node: TCheckOutlineNode; CurIndex: LongInt);


procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState);


procedure Expand(Index: LongInt);

Raise EOutlineError.Create(ErrorString);


procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);


procedure KeyDown(var Key: Word; Shift: TShiftState);


procedure KeyPress(var Key: Char);


procedure Loaded;


procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);


procedure MouseMove(Shift: TShiftState; X, Y: Integer);


procedure Move(Destination, Source: LongInt; AttachMode: TAttachMode);


procedure SetDisplayWidth(Value: Integer);


function SetGoodIndex(Value: TCheckOutlineNode): TCheckOutlineNode;


procedure SetLevel(Node: TCheckOutlineNode; CurLevel, NewLevel: Cardinal);


function AttachNode(Index: LongInt; Str: string; Ptr: Pointer; AttachMode: TAttachMode): LongInt;


procedure ChangeBitmap(Value: TBitmap; Kind: TCheckOutlineBitmap);


procedure ClearBitmap(var Bitmap: TBitmap; Kind: TCheckOutlineBitmap);


procedure CMFontChanged(var Message: TMessage);


function CompareNodes(Value1, Value2: TCheckOutlineNode): TOutlineNodeCompare;


procedure CreateGlyph;


procedure DoExpand(Node: TCheckOutlineNode);


procedure DrawPictures(BitMaps: array of TBitmap; ARect: TRect);


procedure DrawText(Node: TCheckOutlineNode; Rect: TRect);


procedure DrawTree(ARect: TRect; Node: TCheckOutlineNode);


procedure Error(const ErrorString: string);


function Get(Index: LongInt): TCheckOutlineNode;


function GetChecked(Index: LongInt): Boolean;


function GetItemCount: LongInt;


function GetPicture(Index: Integer): TBitmap;


function GetSelectedItem: LongInt;


function GetStrings: TStrings;


procedure Init;


function IsCurItem(Value: LongInt): Boolean;


procedure MoveNode(Destination, Source: LongInt; AttachMode: TAttachMode);


procedure ReadBinaryData(Stream: TStream);


procedure ResetSelectedItem;


function ResizeGrid: Boolean;


procedure SetCheckboxWidth(value:integer);


procedure SetChecked(Index: LongInt; Value: Boolean);


procedure SetCurItem(Value: LongInt);


procedure SetGapWidth(value:integer);


procedure SetHorzScrollBar;


procedure SetItemHeight(Value: Integer);

procedure SetMaskColor(Value: TColor);

procedure TCustomCheckOutline.SetMaskColor(Value: TColor); begin FMaskColor := Value; Invalidate; end;


procedure SeTOutlineOptions(Value: TOutlineOptions);


procedure SeTOutlineStyle(Value: TOutlineStyle);


procedure SetPicture(Index: Integer; Value: TBitmap);


procedure SetRowFromNode(Node: TCheckOutlineNode);


procedure SetRowHeight;


procedure SetSelectedItem(Value: Longint);


procedure SetStrings(Value: TStrings);


procedure SetStyle(Value: TOutlineType);


function StoreBitmap(Index: Integer): Boolean;


procedure wmKillFocus(var msg:TWmKillFocus);


procedure WMSize(var Message: TWMSize);


procedure WriteBinaryData(Stream: TStream);


Properties


property BackColor : TColor


property Canvas :


property CheckBoxWidth : Integer


property CheckChildren : Boolean


property Checked : Boolean


property GapWidth : Integer


property ItemCount : LongInt


property Items : TCheckOutlineNode


property Row :


property SelectedItem : Longint


property TextColor : TColor


property ItemHeight : Integer


property ItemSeparator : string


property Lines : TStrings


property Options : TOutlineOptions


property OutlineStyle : TOutlineStyle


property PictureChecked : TBitmap


property PictureClosed : TBitmap


property PictureLeaf : TBitmap


property PictureMinus : TBitmap


property PictureOpen : TBitmap


property PicturePlus : TBitmap


property PictureUnchecked : TBitmap


property Style : TOutlineType


Events


event OnlyWhenFocused : Boolean


event OnCollapse : EOutlineChange


event OnDrawItem : TDrawItemEvent


event OnExpand : EOutlineChange


Variables


LongLabel : TLongEdit;


fBackColor : TColor;


FBlockInsert : Boolean;


FCheckboxWidth : Integer;


FCheckChildren : Boolean;


FCurItem : TCheckOutlineNode;


FFontSize : Integer;


FGapWidth : Integer;


FGoodNode : TCheckOutlineNode;


FIgnoreScrollResize : Boolean;


FItemHeight : Integer;


FOldBitmaps : TCheckOutlineBitmaps;


FOnCollapse : EOutlineChange;


FOnDrawItem : TDrawItemEvent;


FOnExpand : EOutlineChange;


fOnlyWhenFocused : Boolean;


FOptions : TOutlineOptions;


FOutlineStyle : TOutlineStyle;


FPictures : TCheckBitmapArray;


FRootNode : TCheckOutlineNode;


FSelectedItem : TCheckOutlineNode;


FSeparator : string;


FSettingHeight : Boolean;


FSettingWidth : Boolean;


FStrings : TStrings;


FStyle : TOutlineType;


fTextColor : TColor;


FUserBitmaps : TCheckOutlineBitmaps;


OldFormMouseMove : TMouseMoveEvent;


OldIndex : integer;


UpdateCount : Integer;