Unit TreeListView

Description

This unit contains the TTreeListView which is a combination of a TreeView and a ListView. This means that you can organize the items in a tree and show additional information in columns.

Overview

Classes, Interfaces, Objects and Records

Name Description
Class TObjectList This is a list storing TObjects for the TreeListView
Class TTreeListItems This is the list used for storing (sub)-items
Class TRecordItemList This list stores the items in the detail columns
Class TTreeListRecordItem This is a item shown in the detail columns
Record TItemHierarchyStack stores the parent items of an item, don't use the members
Packed Record TItemDataRec can be used to store abitrary 64 bit data in every item (will be removed as soon as the generics are really usable)
Class TTreeListItem This is an item which can contain subitems and items in the detail columns
Class TTreeListView This is the main TreeListView-class and the only class you need to create yourself.

Functions and Procedures

procedure Register;

Types

TListEventTyp = (...);
TListEvent = procedure (list: TObjectList; typ: TListEventTyp) of object;
TRealItemCounting=set of (ricCountCollapsedsubItems);
pbool=pboolean;
TTreeListItemCompare = function (i1, i2: TTreeListItem): longint of object;
TTreeListViewOption = (...);
TTreeListViewOptions=set of TTreeListViewOption;
TExpandMode = (...);
TLineMode = (...);
TExpandItemEvent = procedure (Sender: TObject; Item: TTreeListItem);
TCustomDrawEventTyp = (...);
TCustomBackgroundDrawEvent = procedure (sender:TObject;eventTyp_cdet:TCustomDrawEventTyp;var defaultDraw:Boolean) of object;
TCustomItemDrawEvent = procedure (sender:TObject;eventTyp_cdet:TCustomDrawEventTyp;item:TTreeListItem;var defaultDraw:Boolean) of object;
TCustomRecordItemDrawEvent = procedure (sender:TObject;eventTyp_cdet:TCustomDrawEventTyp;recordItem:TTreeListRecordItem;var defaultDraw:Boolean) of object;
TCustomRecordItemPositioningEvent = procedure (sender:TObject; visualColumnIndex: integer; recordItem:TTreeListRecordItem; var aposition: TRect) of object;
TItemEvent = procedure (sender:TObject;item:TTreeListItem) of object;
TRecordItemEvent = procedure (sender:TObject;recorditem:TTreeListRecordItem) of object;
TCompareTreeListItemsEvent = procedure (sender: TObject; item1, item2: TTreeListItem; var result: longint)of object;
TUserSortItemsEvent = procedure (sender: TObject; var sortColumn: longint; var invertSorting: boolean) of object;

Constants

PACKAGE_VERSION = '1.0.0.repo';

Description

Functions and Procedures

procedure Register;
 

Types

TListEventTyp = (...);
 
Values
  • levBeginEdit
  • levEndEdit
  • levAdd
  • levInsert
  • levClear
  • levDelete
  • levExchange
  • levMove
  • levSort
  • levAssign
TListEvent = procedure (list: TObjectList; typ: TListEventTyp) of object;
 
TRealItemCounting=set of (ricCountCollapsedsubItems);

This specifies if invisible/collapsed items are counted

pbool=pboolean;
 
TTreeListItemCompare = function (i1, i2: TTreeListItem): longint of object;

This is a typical compare function

TTreeListViewOption = (...);

General appearance/behaviour options

Values
  • tlvoMultiSelect: Specifies if multiple items can be selected
  • tlvoToolTips: Specifies if tooltips are shown when item text is longer than the column
  • tlvoRightMouseSelects: Determines if you can select items using the right mouse button
  • tlvoHotTrackRecordTextItems: Determines if the record items are hot tracked
  • tlvoStriped: Determines if the item background is drawn alternating
  • tlvoStripInvisibleItems: Controls if invisible items are counted when the control determines if a item is odd or even (if on items are striped, if off positions are striped)
  • tlvoColumnsDragable: Controls if the columns of the header control can be reordered (needs FPC)
  • tlvoSorted: Controls of the items should be sorted
    Notice that items are only sorted in endUpdate (and the first time tlvoSorted is set), so new inserted or changed items are not automatically sorted until you call endUpdate
  • tlvoAlwaysFullRepaint
  • tlvoDragScrolling: repaints everything even after a small change
TTreeListViewOptions=set of TTreeListViewOption;

The list can be scrolled by dragging an item up and down (like standard Android lists)

TExpandMode = (...);
 
Values
  • emExpandByClick
  • emExpandByDoubleClick
  • emExpandNot
TLineMode = (...);
 
Values
  • lmNone
  • lmSolid
  • lmDot
TExpandItemEvent = procedure (Sender: TObject; Item: TTreeListItem);
 
TCustomDrawEventTyp = (...);
 
Values
  • cdetPrePaint
  • cdetPostPaint
TCustomBackgroundDrawEvent = procedure (sender:TObject;eventTyp_cdet:TCustomDrawEventTyp;var defaultDraw:Boolean) of object;
 
TCustomItemDrawEvent = procedure (sender:TObject;eventTyp_cdet:TCustomDrawEventTyp;item:TTreeListItem;var defaultDraw:Boolean) of object;
 
TCustomRecordItemDrawEvent = procedure (sender:TObject;eventTyp_cdet:TCustomDrawEventTyp;recordItem:TTreeListRecordItem;var defaultDraw:Boolean) of object;
 
TCustomRecordItemPositioningEvent = procedure (sender:TObject; visualColumnIndex: integer; recordItem:TTreeListRecordItem; var aposition: TRect) of object;
 
TItemEvent = procedure (sender:TObject;item:TTreeListItem) of object;
 
TRecordItemEvent = procedure (sender:TObject;recorditem:TTreeListRecordItem) of object;
 
TCompareTreeListItemsEvent = procedure (sender: TObject; item1, item2: TTreeListItem; var result: longint)of object;
 
TUserSortItemsEvent = procedure (sender: TObject; var sortColumn: longint; var invertSorting: boolean) of object;
 

Constants

PACKAGE_VERSION = '1.0.0.repo';
 

Authors


Generated by PasDoc 0.16.0.