Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
cxGridCustomTableView.pas
Upload User: yyjgift
Upload Date: 2014-01-20
Package Size: 29104k
Code Size: 535k
Category:
Delphi VCL
Development Platform:
Delphi
- {********************************************************************}
- { }
- { Developer Express Visual Component Library }
- { ExpressQuantumGrid }
- { }
- { Copyright (c) 1998-2005 Developer Express Inc. }
- { ALL RIGHTS RESERVED }
- { }
- { The entire contents of this file is protected by U.S. and }
- { International Copyright Laws. Unauthorized reproduction, }
- { reverse-engineering, and distribution of all or any portion of }
- { the code contained in this file is strictly prohibited and may }
- { result in severe civil and criminal penalties and will be }
- { prosecuted to the maximum extent possible under the law. }
- { }
- { RESTRICTIONS }
- { }
- { THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES }
- { (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE }
- { SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS }
- { LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL }
- { ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. }
- { }
- { THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED }
- { FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE }
- { COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE }
- { AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT }
- { AND PERMISSION FROM DEVELOPER EXPRESS INC. }
- { }
- { CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON }
- { ADDITIONAL RESTRICTIONS. }
- { }
- {********************************************************************}
- unit cxGridCustomTableView;
- {$I cxVer.inc}
- interface
- uses
- {$IFDEF DELPHI6}
- Variants,
- {$ENDIF}
- Windows, Messages, Classes, Graphics, Controls, Forms, StdCtrls,
- cxClasses, cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters,
- cxStorage, cxPC, cxFilterControl, cxNavigator, cxListBox, cxEdit,
- cxDataStorage, cxCustomData, cxData, cxFilter, cxDataUtils, cxContainer,
- cxCheckBox, cxCheckListBox, cxStyles, cxGridCommon, cxGridCustomView;
- const
- cxGridFilterDefaultItemMRUItemsListCount = 5;
- cxGridFilterDefaultMaxDropDownCount = 15;
- cxGridFilterDefaultMRUItemsListCount = 10;
- cxGridItemDefaultMinWidth = 20;
- cxGridNavigatorDefaultOffset = 50;
- cxGridCustomizationFormDefaultWidth = 180;
- cxGridCustomizationFormDefaultHeight = 300;
- htCustomGridTableBase = 100;
- htFilter = htCustomGridTableBase + 1;
- htFilterActivateButton = htCustomGridTableBase + 2;
- htFilterCloseButton = htCustomGridTableBase + 3;
- htFilterDropDownButton = htCustomGridTableBase + 4;
- htFilterCustomizeButton = htCustomGridTableBase + 5;
- htRecord = htCustomGridTableBase + 6;
- htCell = htCustomGridTableBase + 7;
- htExpandButton = htCustomGridTableBase + 8;
- htCustomizationForm = htCustomGridTableBase + 9;
- ccNone = 0;
- ccCustomizationForm = 1;
- isCustomItemFirst = 0;
- isContent = isCustomItemFirst;
- isCustomItemLast = isContent;
- bbCustomTableFirst = bbCustomLast + 1;
- bbContent = bbCustomTableFirst;
- bbFilterBox = bbCustomTableFirst + 1;
- bbCustomTableLast = bbFilterBox;
- vsCustomTableFirst = vsCustomLast + 1;
- vsContent = vsCustomTableFirst;
- vsContentEven = vsCustomTableFirst + 1;
- vsContentOdd = vsCustomTableFirst + 2;
- vsFilterBox = vsCustomTableFirst + 3;
- vsInactive = vsCustomTableFirst + 4;
- vsIncSearch = vsCustomTableFirst + 5;
- vsSelection = vsCustomTableFirst + 6;
- vsCustomTableLast = vsSelection;
- type
- TcxGridItemDataBindingClass = class of TcxGridItemDataBinding;
- TcxCustomGridTableItemsListBox = class;
- TcxCustomGridTableCustomizationForm = class;
- TcxGridPopupListBox = class;
- TcxGridFilterPopup = class;
- TcxCustomGridTableController = class;
- TcxCustomGridRecord = class;
- TcxCustomGridTableViewData = class;
- TcxCustomGridFilterButtonViewInfo = class;
- TcxGridFilterActivateButtonViewInfo = class;
- TcxGridFilterButtonsViewInfo = class;
- TcxGridFilterViewInfo = class;
- TcxGridTableDataCellViewInfo = class;
- TcxCustomGridRecordViewInfoClass = class of TcxCustomGridRecordViewInfo;
- TcxCustomGridRecordViewInfo = class;
- TcxCustomGridRecordsViewInfo = class;
- TcxCustomGridTableViewInfo = class;
- TcxCustomGridTableViewInfoCacheItem = class;
- TcxCustomGridTableItem = class;
- TcxCustomGridTableFiltering = class;
- TcxCustomGridTableView = class;
- { changes }
- TcxGridDataChange = class(TcxCustomGridViewChange)
- public
- procedure Execute; override;
- function IsLockable: Boolean; override;
- end;
- TcxGridRecordChange = class(TcxCustomGridViewChange)
- private
- FItem: TcxCustomGridTableItem;
- FRecord: TcxCustomGridRecord;
- FRecordIndex: Integer;
- function GetGridView: TcxCustomGridTableView;
- function GetRecordViewInfo: TcxCustomGridRecordViewInfo;
- public
- constructor Create(AGridView: TcxCustomGridView; ARecord: TcxCustomGridRecord;
- ARecordIndex: Integer; AItem: TcxCustomGridTableItem = nil); reintroduce; virtual;
- procedure Execute; override;
- function IsCompatibleWith(AChange: TcxCustomGridChange): Boolean; override;
- function IsEqual(AChange: TcxCustomGridChange): Boolean; override;
- function IsItemVisible: Boolean;
- property GridRecord: TcxCustomGridRecord read FRecord;
- property GridView: TcxCustomGridTableView read GetGridView;
- property Item: TcxCustomGridTableItem read FItem;
- property RecordIndex: Integer read FRecordIndex;
- property RecordViewInfo: TcxCustomGridRecordViewInfo read GetRecordViewInfo;
- end;
- TcxGridFocusedRecordChange = class(TcxCustomGridViewChange)
- private
- FFocusedRecordIndex: Integer;
- FNewItemRecordFocusingChanged: Boolean;
- FPrevFocusedRecordIndex: Integer;
- public
- constructor Create(AGridView: TcxCustomGridView;
- APrevFocusedRecordIndex, AFocusedRecordIndex: Integer;
- ANewItemRecordFocusingChanged: Boolean); reintroduce; virtual;
- procedure Execute; override;
- property FocusedRecordIndex: Integer read FFocusedRecordIndex;
- property NewItemRecordFocusingChanged: Boolean read FNewItemRecordFocusingChanged;
- property PrevFocusedRecordIndex: Integer read FPrevFocusedRecordIndex;
- end;
- { hit tests }
- TcxGridFilterHitTest = class(TcxCustomGridViewHitTest)
- protected
- class function GetHitTestCode: Integer; override;
- end;
- TcxGridFilterCloseButtonHitTest = class(TcxCustomGridViewHitTest)
- protected
- class function GetHitTestCode: Integer; override;
- end;
- TcxGridFilterActivateButtonHitTest = class(TcxCustomGridViewHitTest)
- protected
- class function GetHitTestCode: Integer; override;
- end;
- TcxGridFilterDropDownButtonHitTest = class(TcxCustomGridViewHitTest)
- protected
- class function GetHitTestCode: Integer; override;
- end;
- TcxGridFilterCustomizeButtonHitTest = class(TcxCustomGridViewHitTest)
- protected
- class function GetHitTestCode: Integer; override;
- end;
- TcxGridRecordHitTest = class(TcxCustomGridViewHitTest)
- private
- FGridRecordIndex: Integer;
- FIsNewItemRecord: Boolean;
- FViewData: TcxCustomGridTableViewData;
- function GetGridRecord: TcxCustomGridRecord;
- procedure SetGridRecord(Value: TcxCustomGridRecord);
- protected
- class function GetHitTestCode: Integer; override;
- public
- class function CanClick: Boolean; virtual;
- property GridRecord: TcxCustomGridRecord read GetGridRecord write SetGridRecord;
- end;
- TcxGridRecordCellHitTest = class(TcxGridRecordHitTest)
- protected
- class function GetHitTestCode: Integer; override;
- public
- Item: TcxCustomGridTableItem;
- end;
- TcxGridExpandButtonHitTest = class(TcxGridRecordHitTest)
- protected
- class function GetHitTestCode: Integer; override;
- public
- class function CanClick: Boolean; override;
- end;
- TcxGridCustomizationFormHitTest = class(TcxCustomGridViewHitTest) {2m}
- protected
- class function GetHitTestCode: Integer; override;
- end;
- { data definitions }
- TcxGridDefaultValuesProvider = class(TcxCustomEditDefaultValuesProvider)
- public
- function IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; override;
- end;
- IcxGridDataController = interface
- ['{FEEE7E69-BD54-4B5D-BA0B-B6116B69C0CC}']
- procedure CheckGridModeBufferCount;
- function DoScroll(AForward: Boolean): Boolean;
- function DoScrollPage(AForward: Boolean): Boolean;
- function GetItemDataBindingClass: TcxGridItemDataBindingClass;
- function GetItemDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass;
- function GetNavigatorIsBof: Boolean;
- function GetNavigatorIsEof: Boolean;
- //function GetFilterPropertyValue(const AName: string; var AValue: Variant): Boolean;
- function GetScrollBarPos: Integer;
- function GetScrollBarRecordCount: Integer;
- //function SetFilterPropertyValue(const AName: string; const AValue: Variant): Boolean;
- function SetScrollBarPos(Value: Integer): Boolean;
- end;
- TcxGridDataController = class(TcxDataController,
- IcxCustomGridDataController, IcxGridDataController)
- private
- FLoadedData: TMemoryStream;
- function GetGridViewValue: TcxCustomGridTableView;
- procedure ReadData(Stream: TStream);
- procedure WriteData(Stream: TStream);
- protected
- { IcxCustomGridDataController }
- procedure AssignData(ADataController: TcxCustomDataController);
- procedure CreateAllItems;
- procedure DeleteAllItems;
- procedure GetFakeComponentLinks(AList: TList);
- function GetGridView: TcxCustomGridView;
- function IsDataChangeable: Boolean;
- function IsDataLinked: Boolean;
- function SupportsCreateAllItems: Boolean;
- { IcxGridDataController }
- procedure CheckGridModeBufferCount;
- function DoScroll(AForward: Boolean): Boolean;
- function DoScrollPage(AForward: Boolean): Boolean;
- //function GetFilterPropertyValue(const AName: string; var AValue: Variant): Boolean;
- function GetItemDataBindingClass: TcxGridItemDataBindingClass;
- function GetItemDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass;
- function GetNavigatorIsBof: Boolean;
- function GetNavigatorIsEof: Boolean;
- function GetScrollBarPos: Integer;
- function GetScrollBarRecordCount: Integer;
- //function SetFilterPropertyValue(const AName: string; const AValue: Variant): Boolean;
- function SetScrollBarPos(Value: Integer): Boolean;
- function CanSelectRow(ARowIndex: Integer): Boolean; override;
- procedure DefineProperties(Filer: TFiler); override;
- procedure DoValueTypeClassChanged(AItemIndex: Integer); override;
- procedure FilterChanged; override;
- function GetDefaultActiveRelationIndex: Integer; override;
- //function GetIncrementalSearchText(ARecordIndex, AItemIndex: Integer): string; override;
- function GetItemID(AItem: TObject): Integer; override;
- function GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; override;
- function GetSummaryItemClass: TcxDataSummaryItemClass; override;
- public
- procedure BeginFullUpdate; override;
- procedure EndFullUpdate; override;
- function CreateDetailLinkObject(ARelation: TcxCustomDataRelation;
- ARecordIndex: Integer): TObject; override;
- procedure FocusControl(AItemIndex: Integer; var Done: Boolean); override;
- function GetDetailDataControllerByLinkObject(ALinkObject: TObject): TcxCustomDataController; override;
- function GetDisplayText(ARecordIndex, AItemIndex: Integer): string; override;
- function GetFilterItemFieldCaption(AItem: TObject): string; override;
- function GetItem(Index: Integer): TObject; override;
- function GetItemSortByDisplayText(AItemIndex: Integer; ASortByDisplayText: Boolean): Boolean; override;
- function GetItemValueSource(AItemIndex: Integer): TcxDataEditValueSource; override;
- procedure Loaded; override;
- procedure UpdateData; override;
- //!!! maybe remove? check events
- function AddItemToFilter(AParent: TcxFilterCriteriaItemList; AItem: TcxCustomGridTableItem;
- AOperatorKind: TcxFilterOperatorKind; const AValue: Variant; ADisplayText: string = '';
- AReplaceExistent: Boolean = True): TcxFilterCriteriaItem;
- property GridView: TcxCustomGridTableView read GetGridViewValue;
- published
- property Filter;
- property Options;
- property Summary;
- property OnAfterCancel;
- property OnAfterDelete;
- property OnAfterInsert;
- property OnAfterPost;
- property OnBeforeCancel;
- property OnBeforeDelete;
- property OnBeforeInsert;
- property OnBeforePost;
- property OnNewRecord;
- property OnCompare;
- property OnDataChanged;
- property OnDetailCollapsing;
- property OnDetailCollapsed;
- property OnDetailExpanding;
- property OnDetailExpanded;
- property OnFilterRecord;
- property OnGroupingChanged;
- property OnRecordChanged;
- property OnSortingChanged;
- end;
- TcxGridFilterMRUValueItem = class(TcxMRUItem)
- public
- Value: Variant;
- DisplayText: string;
- constructor Create(const AValue: Variant; const ADisplayText: string);
- function Equals(AItem: TcxMRUItem): Boolean; override;
- end;
- TcxGridFilterMRUValueItemsClass = class of TcxGridFilterMRUValueItems;
- TcxGridFilterMRUValueItems = class(TcxMRUItems)
- private
- function GetItem(Index: Integer): TcxGridFilterMRUValueItem;
- public
- procedure Add(const AValue: Variant; const ADisplayText: string);
- procedure AddItemsTo(AValueList: TcxDataFilterValueList);
- property Items[Index: Integer]: TcxGridFilterMRUValueItem read GetItem; default;
- end;
- TcxGridItemDataBinding = class(TPersistent)
- private
- FData: TObject;
- FDefaultValuesProvider: TcxCustomEditDefaultValuesProvider;
- FItem: TcxCustomGridTableItem;
- FFilterMRUValueItems: TcxGridFilterMRUValueItems;
- function GetDataController: TcxCustomDataController;
- function GetFilter: TcxDataFilterCriteria;
- function GetFilterCriteriaItem: TcxFilterCriteriaItem;
- function GetFiltered: Boolean;
- function GetGridView: TcxCustomGridTableView;
- function GetValueType: string;
- function GetValueTypeClass: TcxValueTypeClass;
- procedure SetData(Value: TObject);
- procedure SetFiltered(Value: Boolean);
- procedure SetValueType(const Value: string);
- procedure SetValueTypeClass(Value: TcxValueTypeClass);
- protected
- function GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass;
- function GetDefaultValueTypeClass: TcxValueTypeClass; virtual;
- function GetFilterFieldName: string; virtual;
- function GetFilterMRUValueItemsClass: TcxGridFilterMRUValueItemsClass; virtual;
- procedure Init; virtual;
- function IsValueTypeStored: Boolean; virtual;
- property DefaultValuesProvider: TcxCustomEditDefaultValuesProvider read FDefaultValuesProvider;
- public
- constructor Create(AItem: TcxCustomGridTableItem); virtual;
- destructor Destroy; override;
- procedure Assign(Source: TPersistent); override;
- function DefaultCaption: string; virtual;
- function DefaultRepositoryItem: TcxEditRepositoryItem; virtual;
- function DefaultWidth(ATakeHeaderIntoAccount: Boolean = True): Integer; virtual;
- function GetDefaultValuesProvider(AProperties: TcxCustomEditProperties = nil): IcxEditDefaultValuesProvider;
- function IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean;
- function AddToFilter(AParent: TcxFilterCriteriaItemList; AOperatorKind: TcxFilterOperatorKind;
- const AValue: Variant; const ADisplayText: string = '';
- AReplaceExistent: Boolean = True): TcxFilterCriteriaItem; virtual;
- procedure GetFilterDisplayText(const AValue: Variant; var ADisplayText: string);
- procedure GetFilterStrings(AStrings: TStrings; AValueList: TcxDataFilterValueList);
- property Data: TObject read FData write SetData;
- property DataController: TcxCustomDataController read GetDataController;
- property Filter: TcxDataFilterCriteria read GetFilter;
- property FilterCriteriaItem: TcxFilterCriteriaItem read GetFilterCriteriaItem;
- property Filtered: Boolean read GetFiltered write SetFiltered;
- property FilterFieldName: string read GetFilterFieldName;
- property FilterMRUValueItems: TcxGridFilterMRUValueItems read FFilterMRUValueItems;
- property GridView: TcxCustomGridTableView read GetGridView;
- property Item: TcxCustomGridTableItem read FItem;
- property ValueTypeClass: TcxValueTypeClass read GetValueTypeClass write SetValueTypeClass;
- published
- property ValueType: string read GetValueType write SetValueType stored IsValueTypeStored;
- end;
- { view data }
- TcxCustomGridRecordClass = class of TcxCustomGridRecord;
- TcxCustomGridRecord = class
- private
- //FData: Pointer;
- FEatKeyPress: Boolean;
- FIndex: Integer;
- FRecordInfo: TcxRowInfo;
- FViewData: TcxCustomGridTableViewData;
- FViewInfo: TcxCustomGridRecordViewInfo;
- function GetController: TcxCustomGridTableController;
- function GetDataController: TcxCustomDataController;
- function GetDragHighlighted: Boolean;
- function GetFocused: Boolean;
- function GetGridView: TcxCustomGridTableView;
- function GetIsEditing: Boolean;
- function GetIsNewItemRecord: Boolean;
- function GetIsValid: Boolean;
- function GetLastParentRecordCount: Integer;
- function GetLevel: Integer;
- function GetPartVisible: Boolean;
- function GetRecordIndex: Integer;
- procedure SetExpanded(Value: Boolean);
- procedure SetFocused(Value: Boolean);
- protected
- procedure RefreshRecordInfo;
- procedure DoCollapse(ARecurse: Boolean); virtual;
- procedure DoExpand(ARecurse: Boolean); virtual;
- //function GetDestroyingOnExpanding: Boolean; virtual;
- function GetExpandable: Boolean; virtual;
- function GetExpanded: Boolean; virtual;
- function GetDrawFocused: Boolean; virtual;
- function GetDrawSelected: Boolean; virtual;
- function GetHasCells: Boolean; virtual;
- function GetIsData: Boolean; virtual;
- function GetIsFirst: Boolean; virtual;
- function GetIsLast: Boolean; virtual;
- function GetIsParent: Boolean; virtual;
- function GetIsParentRecordLast(AIndex: Integer): Boolean;
- function GetParentRecord: TcxCustomGridRecord; virtual;
- function GetSelected: Boolean; virtual;
- function GetVisible: Boolean; virtual;
- procedure SetSelected(Value: Boolean); virtual;
- function GetDisplayText(Index: Integer): string; virtual;
- function GetValueCount: Integer; virtual;
- function GetValue(Index: Integer): Variant; virtual;
- procedure SetDisplayText(Index: Integer; const Value: string); virtual;
- procedure SetValue(Index: Integer; const Value: Variant); virtual;
- function GetViewInfoCacheItemClass: TcxCustomGridViewInfoCacheItemClass; virtual; abstract;
- function GetViewInfoClass: TcxCustomGridRecordViewInfoClass; virtual; abstract;
- property EatKeyPress: Boolean read FEatKeyPress write FEatKeyPress;
- property IsParent: Boolean read GetIsParent;
- property RecordInfo: TcxRowInfo read FRecordInfo;
- property Controller: TcxCustomGridTableController read GetController;
- property DataController: TcxCustomDataController read GetDataController;
- //property DestroyingOnExpanding: Boolean read GetDestroyingOnExpanding;
- public
- constructor Create(AViewData: TcxCustomGridTableViewData; AIndex: Integer;
- const ARecordInfo: TcxRowInfo); virtual;
- destructor Destroy; override;
- function CanFocus: Boolean; virtual;
- procedure Collapse(ARecurse: Boolean);
- procedure DoKeyPress(var Key: Char);
- procedure Expand(ARecurse: Boolean);
- function GetFirstFocusableChild: TcxCustomGridRecord; virtual;
- function GetLastFocusableChild(ARecursive: Boolean): TcxCustomGridRecord; virtual;
- procedure Invalidate(AItem: TcxCustomGridTableItem = nil); virtual;
- procedure KeyDown(var Key: Word; Shift: TShiftState); virtual;
- procedure KeyPress(var Key: Char); virtual;
- procedure MakeVisible;
- //property Data: Pointer read FData write FData;
- property DragHighlighted: Boolean read GetDragHighlighted;
- property DrawFocused: Boolean read GetDrawFocused;
- property DrawSelected: Boolean read GetDrawSelected;
- property DisplayTexts[Index: Integer]: string read GetDisplayText write SetDisplayText;
- property Expandable: Boolean read GetExpandable;
- property Expanded: Boolean read GetExpanded write SetExpanded;
- property Focused: Boolean read GetFocused write SetFocused;
- property GridView: TcxCustomGridTableView read GetGridView;
- property HasCells: Boolean read GetHasCells;
- property Index: Integer read FIndex;
- property IsData: Boolean read GetIsData;
- property IsEditing: Boolean read GetIsEditing;
- property IsFirst: Boolean read GetIsFirst;
- property IsLast: Boolean read GetIsLast;
- property IsNewItemRecord: Boolean read GetIsNewItemRecord;
- property IsParentRecordLast[AIndex: Integer]: Boolean read GetIsParentRecordLast;
- property IsValid: Boolean read GetIsValid;
- property LastParentRecordCount: Integer read GetLastParentRecordCount;
- property Level: Integer read GetLevel;
- property ParentRecord: TcxCustomGridRecord read GetParentRecord;
- property PartVisible: Boolean read GetPartVisible;
- property RecordIndex: Integer read GetRecordIndex;
- property Selected: Boolean read GetSelected write SetSelected;
- property ValueCount: Integer read GetValueCount;
- property Values[Index: Integer]: Variant read GetValue write SetValue;
- property ViewData: TcxCustomGridTableViewData read FViewData;
- property ViewInfo: TcxCustomGridRecordViewInfo read FViewInfo;
- property Visible: Boolean read GetVisible;
- end;
- TcxCustomGridTableViewData = class(TcxCustomGridViewData)
- private
- FEditingRecord: TcxCustomGridRecord;
- FNewItemRecord: TcxCustomGridRecord;
- FRecords: TList;
- function GetController: TcxCustomGridTableController;
- function GetEditingRecord: TcxCustomGridRecord;
- function GetGridView: TcxCustomGridTableView;
- function GetInternalRecord(Index: Integer): TcxCustomGridRecord;
- function GetRecord(Index: Integer): TcxCustomGridRecord;
- function GetRecordCount: Integer;
- function GetViewInfo: TcxCustomGridTableViewInfo;
- function CreateRecord(AIndex: Integer): TcxCustomGridRecord;
- protected
- function GetRecordClass(ARecordInfo: TcxRowInfo): TcxCustomGridRecordClass; virtual; abstract;
- procedure AssignEditingRecord;
- procedure CreateNewItemRecord;
- procedure DestroyNewItemRecord;
- function GetNewItemRecordClass: TcxCustomGridRecordClass; virtual;
- procedure RecreateNewItemRecord;
- property Controller: TcxCustomGridTableController read GetController;
- property InternalRecords[Index: Integer]: TcxCustomGridRecord read GetInternalRecord;
- property ViewInfo: TcxCustomGridTableViewInfo read GetViewInfo;
- public
- constructor Create(AGridView: TcxCustomGridView); override;
- destructor Destroy; override;
- procedure Collapse(ARecurse: Boolean); virtual;
- procedure DestroyRecords;
- procedure Expand(ARecurse: Boolean); virtual;
- function GetRecordByIndex(AIndex: Integer): TcxCustomGridRecord;
- function GetRecordByRecordIndex(ARecordIndex: Integer): TcxCustomGridRecord;
- function GetRecordIndexByRecord(ARecord: TcxCustomGridRecord): Integer;
- function IsRecordIndexValid(AIndex: Integer): Boolean;
- procedure Refresh(ARecordCount: Integer); virtual;
- procedure RefreshRecords;
- procedure CheckNewItemRecord;
- function HasNewItemRecord: Boolean; virtual;
- property EditingRecord: TcxCustomGridRecord read FEditingRecord;
- property GridView: TcxCustomGridTableView read GetGridView;
- property NewItemRecord: TcxCustomGridRecord read FNewItemRecord;
- property RecordCount: Integer read GetRecordCount;
- property Records[Index: Integer]: TcxCustomGridRecord read GetRecord;
- end;
- { controller }
- // drag&drop objects
- TcxCustomGridTableDragAndDropObject = class(TcxCustomGridDragAndDropObject)
- private
- function GetController: TcxCustomGridTableController;
- function GetGridView: TcxCustomGridTableView;
- function GetViewInfo: TcxCustomGridTableViewInfo;
- protected
- procedure AfterScrolling; virtual;
- procedure BeforeScrolling; virtual;
- property Controller: TcxCustomGridTableController read GetController;
- property GridView: TcxCustomGridTableView read GetGridView;
- property ViewInfo: TcxCustomGridTableViewInfo read GetViewInfo;
- end;
- TcxGridArrowNumber = (anFirst, anLast);
- TcxGridArrowPlace = (apLeft, apTop, apRight, apBottom);
- TcxCustomGridTableMovingObject = class(TcxCustomGridTableDragAndDropObject)
- private
- FArrowsVisible: Boolean;
- FDragImage: TBitmap;
- FDragImageCanvas: TcxCanvas;
- FDragImageOffset: TPoint;
- FDragImagePos: TPoint;
- FDragImageSavingBitmap: TBitmap;
- FDragImageSavingPos: TPoint;
- FDragImageVisible: Boolean;
- FSavingBitmap: TBitmap;
- function GetArrowPlace(AArrowNumber: TcxGridArrowNumber): TcxGridArrowPlace;
- function GetCustomizationForm: TcxCustomGridTableCustomizationForm;
- function GetDragImageSavingCanvas: TCanvas;
- function GetSavingBitmap: TBitmap;
- function GetSavingCanvas: TCanvas;
- procedure CreateDragImage;
- procedure DestroyDragImage;
- protected
- procedure AfterScrolling; override;
- procedure BeforeScrolling; override;
- procedure DirtyChanged; override;
- function GetDragAndDropCursor(Accepted: Boolean): TCursor; override;
- procedure ChangeArrowsVisibility(AVisible: Boolean);
- procedure ChangeDragImagePosition(AVisible: Boolean = True);
- function AreArrowsVertical: Boolean; virtual;
- function CalculateDragImageOffset: TPoint; virtual;
- function CanRemove: Boolean; virtual; abstract;
- function GetArrowAreaBounds(APlace: TcxGridArrowPlace): TRect; virtual; abstract;
- function GetArrowBounds(APlace: TcxGridArrowPlace): TRect; virtual;
- function GetArrowsClientRect: TRect; virtual;
- function GetCustomizationFormListBox: TcxCustomGridTableItemsListBox; virtual; abstract;
- function GetDragImageBounds(AMousePos: TPoint): TRect; virtual;
- function GetSourceItem: TObject; virtual; abstract;
- function GetSourceItemBounds: TRect; virtual;
- function GetSourceItemViewInfo: TcxCustomGridCellViewInfo; virtual;
- procedure InitDragImage; virtual;
- function IsSourceCustomizationForm: Boolean; virtual; abstract;
- function IsValidDestination: Boolean; virtual; abstract;
- procedure BeginDragAndDrop; override;
- procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override;
- procedure EndDragAndDrop(Accepted: Boolean); override;
- property ArrowBounds[APlace: TcxGridArrowPlace]: TRect read GetArrowBounds;
- property ArrowPlaces[AArrowNumber: TcxGridArrowNumber]: TcxGridArrowPlace read GetArrowPlace;
- property ArrowsClientRect: TRect read GetArrowsClientRect;
- property CustomizationForm: TcxCustomGridTableCustomizationForm read GetCustomizationForm;
- property CustomizationFormListBox: TcxCustomGridTableItemsListBox read GetCustomizationFormListBox;
- property DragImage: TBitmap read FDragImage;
- property DragImageCanvas: TcxCanvas read FDragImageCanvas;
- property DragImageOffset: TPoint read FDragImageOffset;
- property DragImagePos: TPoint read FDragImagePos write FDragImagePos;
- property DragImageSavingBitmap: TBitmap read FDragImageSavingBitmap;
- property DragImageSavingCanvas: TCanvas read GetDragImageSavingCanvas;
- property DragImageSavingPos: TPoint read FDragImageSavingPos write FDragImageSavingPos;
- property DragImageVisible: Boolean read FDragImageVisible write FDragImageVisible;
- property SavingBitmap: TBitmap read GetSavingBitmap;
- property SavingCanvas: TCanvas read GetSavingCanvas;
- property SourceItem: TObject read GetSourceItem;
- property SourceItemBounds: TRect read GetSourceItemBounds;
- property SourceItemViewInfo: TcxCustomGridCellViewInfo read GetSourceItemViewInfo;
- public
- constructor Create(AControl: TcxControl); override;
- destructor Destroy; override;
- end;
- TcxGridItemContainerKind = Integer;
- TcxGridItemContainerZone = class
- public
- ItemIndex: Integer;
- constructor Create(AItemIndex: Integer);
- function IsEqual(Value: TcxGridItemContainerZone): Boolean; virtual;
- end;
- TcxCustomGridTableItemMovingObject = class(TcxCustomGridTableMovingObject)
- private
- FDestItemContainerKind: TcxGridItemContainerKind;
- FDestZone: TcxGridItemContainerZone;
- FOriginalDestItemContainerKind: TcxGridItemContainerKind;
- FSourceItem: TcxCustomGridTableItem;
- FSourceItemContainerKind: TcxGridItemContainerKind;
- procedure SetDestItemContainerKind(Value: TcxGridItemContainerKind);
- procedure SetDestZone(Value: TcxGridItemContainerZone);
- protected
- procedure CalculateDestParams(AHitTest: TcxCustomGridHitTest;
- out AContainerKind: TcxGridItemContainerKind; out AZone: TcxGridItemContainerZone); virtual;
- procedure CheckDestParams; virtual;
- function GetCustomizationFormListBox: TcxCustomGridTableItemsListBox; override;
- function GetSourceItem: TObject; override;
- function IsSourceCustomizationForm: Boolean; override;
- procedure BeginDragAndDrop; override;
- procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override;
- procedure EndDragAndDrop(Accepted: Boolean); override;
- property DestItemContainerKind: TcxGridItemContainerKind read FDestItemContainerKind
- write SetDestItemContainerKind;
- property DestZone: TcxGridItemContainerZone read FDestZone write SetDestZone;
- property OriginalDestItemContainerKind: TcxGridItemContainerKind
- read FOriginalDestItemContainerKind write FOriginalDestItemContainerKind;
- property SourceItem: TcxCustomGridTableItem read FSourceItem write FSourceItem;
- property SourceItemContainerKind: TcxGridItemContainerKind read FSourceItemContainerKind
- write FSourceItemContainerKind;
- public
- constructor Create(AControl: TcxControl); override;
- destructor Destroy; override;
- end;
- // customization form
- TcxCustomGridTableItemsInnerListBox = class(TcxInnerListBox)
- private
- FDragAndDropItemIndex: Integer;
- FMouseDownPos: TPoint;
- function GetContainer: TcxCustomGridTableItemsListBox;
- function GetDragAndDropItem: TObject;
- function GetGridView: TcxCustomGridTableView;
- function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass;
- {$IFDEF VCL}
- procedure WMCancelMode(var Message: TWMCancelMode); message WM_CANCELMODE;
- procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE;
- procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT;
- {$ENDIF}
- protected
- {$IFDEF VCL}
- procedure CreateParams(var Params: TCreateParams); override;
- procedure CreateWnd; override;
- {$ELSE}
- function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;
- procedure InitWidget; override;
- procedure Resize; override;
- {$ENDIF}
- {$IFDEF VCL}
- procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override;
- {$ELSE}
- function DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState): Boolean; override;
- {$ENDIF}
- procedure KeyDown(var Key: Word; Shift: TShiftState); override;
- procedure LookAndFeelChanged(Sender: TcxLookAndFeel;
- AChangedValues: TcxLookAndFeelValues); override;
- procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
- procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
- procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
- procedure CalculateBorderStyle;
- procedure CalculateItemHeight;
- property Container: TcxCustomGridTableItemsListBox read GetContainer;
- property DragAndDropItem: TObject read GetDragAndDropItem;
- property DragAndDropItemIndex: Integer read FDragAndDropItemIndex;
- property GridView: TcxCustomGridTableView read GetGridView;
- property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter;
- public
- constructor Create(AOwner: TComponent); override;
- end;
- TcxCustomGridTableItemsListBoxClass = class of TcxCustomGridTableItemsListBox;
- TcxCustomGridTableItemsListBox = class(TcxListBox)
- private
- function GetDragAndDropItem: TObject;
- function GetGridView: TcxCustomGridTableView;
- function GetInnerListBox: TcxCustomGridTableItemsInnerListBox;
- protected
- function CalculateItemHeight: Integer; virtual; abstract;
- function GetInnerListBoxClass: TcxInnerListBoxClass; override;
- function GetDragAndDropParams: TcxCustomGridHitTest; virtual; abstract;
- procedure RefreshItemsAsTableItems;
- property DragAndDropItem: TObject read GetDragAndDropItem;
- property GridView: TcxCustomGridTableView read GetGridView;
- public
- constructor Create(AOwner: TComponent); override;
- function IndexOfItem(AItem: TObject): Integer;
- procedure PaintDragAndDropItem(ACanvas: TcxCanvas; const R: TRect; AItem: TObject);
- procedure PaintItem(ACanvas: TcxCanvas; R: TRect; AIndex: Integer; AFocused: Boolean); virtual; abstract;
- procedure RefreshItems; virtual;
- property InnerListBox: TcxCustomGridTableItemsInnerListBox read GetInnerListBox;
- end;
- TcxCustomGridTableCustomizationFormClass = class of TcxCustomGridTableCustomizationForm;
- TcxCustomGridTableCustomizationForm = class(TForm)
- private
- FItemsListBox: TcxCustomGridTableItemsListBox;
- FItemsPage: TcxTabSheet;
- FController: TcxCustomGridTableController;
- FHookTimer: TcxTimer;
- FOffset: Integer;
- FPageControl: TcxPageControl;
- FStep: Integer;
- function GetGridView: TcxCustomGridTableView;
- function GetViewInfo: TcxCustomGridTableViewInfo;
- procedure HookTimerHandler(Sender: TObject);
- protected
- {$IFDEF VCL}
- procedure CreateParams(var Params: TCreateParams); override;
- {$ELSE}
- function WidgetFlags: Integer; override;
- {$ENDIF}
- procedure DoClose(var Action: TCloseAction); override;
- procedure DoShow; override;
- procedure CalculateConsts; virtual;
- procedure CreateControls; virtual;
- function CreatePage(const ACaption: string; AVisible: Boolean): TcxTabSheet;
- function GetItemsListBoxBounds: TRect; virtual;
- function GetItemsListBoxClass: TcxCustomGridTableItemsListBoxClass; virtual;
- function GetItemsPageCaption: string; virtual; abstract;
- function GetItemsPageVisible: Boolean; virtual;
- function GetContentBounds: TRect; virtual;
- function GetPageControlBounds: TRect; virtual;
- procedure InitPageControl; virtual;
- property ContentBounds: TRect read GetContentBounds;
- property GridView: TcxCustomGridTableView read GetGridView;
- property ItemsListBox: TcxCustomGridTableItemsListBox read FItemsListBox;
- property Offset: Integer read FOffset write FOffset;
- property PageControl: TcxPageControl read FPageControl;
- property Step: Integer read FStep write FStep;
- property ViewInfo: TcxCustomGridTableViewInfo read GetViewInfo;
- public
- constructor Create(AController: TcxCustomGridTableController); reintroduce; virtual;
- destructor Destroy; override;
- property Controller: TcxCustomGridTableController read FController;
- procedure ActivatePage(APage: TcxTabSheet);
- procedure RefreshData; virtual;
- property ItemsPage: TcxTabSheet read FItemsPage;
- end;
- // popups
- IcxCustomGridPopupOwner = interface
- ['{ACF62D23-6871-4735-A4CE-3B0888DB8FC3}']
- function ClosePopupWhenNilOwner: Boolean;
- function GetOwnerBounds: TRect;
- procedure PopupClosed;
- end;
- TcxCustomGridPopup = class(TcxCustomPopupWindow)
- private
- FGridView: TcxCustomGridTableView;
- FOwner: IcxCustomGridPopupOwner;
- procedure SetOwner(Value: IcxCustomGridPopupOwner);
- protected
- function CalculateOwnerBounds: TRect; virtual;
- procedure InitPopup; override;
- procedure Paint; override;
- procedure VisibleChanged; override;
- public
- constructor Create(AGridView: TcxCustomGridTableView); reintroduce; virtual;
- procedure CloseUp(AModalResult: Boolean = False); override;
- procedure Popup; reintroduce; virtual;
- property GridView: TcxCustomGridTableView read FGridView;
- property Owner: IcxCustomGridPopupOwner read FOwner write SetOwner;
- end;
- TcxGridPopupListBoxActionEvent = procedure(Sender: TcxGridPopupListBox;
- AItemIndex: Integer) of object;
- TcxGridPopupListBox = class(TcxListBox)
- private
- FItemTextOffsetHorz: Integer;
- FItemTextOffsetVert: Integer;
- FMinWidth: Integer;
- FPopup: TcxCustomGridPopup;
- FVisibleItemCount: Integer;
- FVisibleWidth: Integer;
- FOnAction: TcxGridPopupListBoxActionEvent;
- function GetGridView: TcxCustomGridTableView;
- protected
- function DrawItem(ACanvas: TcxCanvas; AIndex: Integer; const ARect: TRect;
- AState: TOwnerDrawState): Boolean; override;
- procedure KeyDown(var Key: Word; Shift: TShiftState); override;
- procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
- procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
- function CalculateItemHeight: Integer; virtual;
- procedure DoAction(AItemIndex: Integer); virtual;
- procedure DrawItemContent(ACanvas: TcxCanvas; AIndex: Integer; ARect: TRect;
- AState: TOwnerDrawState); virtual;
- function GetVisibleItemCount(AItems: TStrings): Integer; virtual;
- procedure Init; virtual;
- public
- constructor Create(APopup: TcxCustomGridPopup); reintroduce; virtual;
- procedure AdjustBounds(AItems: TStrings = nil); virtual;
- property GridView: TcxCustomGridTableView read GetGridView;
- property ItemTextOffsetHorz: Integer read FItemTextOffsetHorz write FItemTextOffsetHorz;
- property ItemTextOffsetVert: Integer read FItemTextOffsetVert write FItemTextOffsetVert;
- property MinWidth: Integer read FMinWidth write FMinWidth;
- property Popup: TcxCustomGridPopup read FPopup;
- property VisibleItemCount: Integer read FVisibleItemCount write FVisibleItemCount;
- property VisibleWidth: Integer read FVisibleWidth write FVisibleWidth;
- property OnAction: TcxGridPopupListBoxActionEvent read FOnAction write FOnAction;
- end;
- IcxGridFilterPopupOwner = interface(IcxCustomGridPopupOwner)
- ['{1FC070B2-36E5-4388-B22D-1FF5D240E95F}']
- function GetItem: TcxCustomGridTableItem;
- end;
- TcxGridFilterPopupListBox = class(TcxGridPopupListBox)
- private
- function GetPopup: TcxGridFilterPopup;
- protected
- procedure DrawItemContent(ACanvas: TcxCanvas; AIndex: Integer; ARect: TRect;
- AState: TOwnerDrawState); override;
- public
- property Popup: TcxGridFilterPopup read GetPopup;
- end;
- TcxGridFilterPopupClass = class of TcxGridFilterPopup;
- TcxGridFilterPopup = class(TcxCustomGridPopup)
- private
- FListBox: TcxGridFilterPopupListBox;
- FListBoxItems: TStringList;
- FValueList: TcxDataFilterValueList;
- function GetItem: TcxCustomGridTableItem;
- function GetFilter: TcxDataFilterCriteria;
- function GetOwnerValue: IcxGridFilterPopupOwner;
- procedure SetOwnerValue(Value: IcxGridFilterPopupOwner);
- procedure ListBoxAction(Sender: TcxGridPopupListBox; AItemIndex: Integer);
- protected
- procedure AddListBoxItems; virtual;
- procedure AdjustListBoxSize; virtual;
- procedure ApplyFilter(AItemIndex: Integer); virtual;
- function GetSelectedItemIndex: Integer; virtual;
- procedure InitPopup; override;
- function IsMRUItemsListSeparatorItem(AIndex: Integer): Boolean;
- property Filter: TcxDataFilterCriteria read GetFilter;
- property ListBox: TcxGridFilterPopupListBox read FListBox;
- property ListBoxItems: TStringList read FListBoxItems;
- property SelectedItemIndex: Integer read GetSelectedItemIndex;
- property ValueList: TcxDataFilterValueList read FValueList;
- public
- constructor Create(AGridView: TcxCustomGridTableView); override;
- destructor Destroy; override;
- procedure CloseUp(AModalResult: Boolean = False); override;
- property Item: TcxCustomGridTableItem read GetItem;
- property Owner: IcxGridFilterPopupOwner read GetOwnerValue write SetOwnerValue;
- end;
- TcxGridFilterMRUItemsPopupClass = class of TcxGridFilterMRUItemsPopup;
- TcxGridFilterMRUItemsPopup = class(TcxCustomGridPopup)
- private
- FListBox: TcxGridPopupListBox;
- function GetFiltering: TcxCustomGridTableFiltering;
- procedure ListBoxAction(Sender: TcxGridPopupListBox; AItemIndex: Integer);
- protected
- procedure AddFilterMRUItems(AStrings: TStrings); virtual;
- procedure ApplyFilterMRUItem(AItemIndex: Integer); virtual;
- function GetTextOffsetHorz: Integer; virtual;
- procedure InitPopup; override;
- property Filtering: TcxCustomGridTableFiltering read GetFiltering;
- property ListBox: TcxGridPopupListBox read FListBox;
- public
- constructor Create(AGridView: TcxCustomGridTableView); override;
- property TextOffsetHorz: Integer read GetTextOffsetHorz;
- end;
- TcxCustomGridCustomizationPopup = class(TcxCustomGridPopup)
- private
- FCheckListBox: TcxCheckListBox;
- procedure CheckListBoxCheckClick(Sender: TObject; AIndex: Integer;
- APrevState, ANewState: TcxCheckBoxState);
- procedure CheckListBoxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
- protected
- procedure AddCheckListBoxItems; virtual; abstract;
- procedure AdjustCheckListBoxSize; virtual;
- procedure CheckClicked(AIndex: Integer; AChecked: Boolean); virtual;
- procedure CreateCheckListBox; virtual;
- function GetDropDownCount: Integer; virtual; abstract;
- procedure InitPopup; override;
- procedure ItemClicked(AItem: TObject; AChecked: Boolean); virtual; abstract;
- public
- constructor Create(AGridView: TcxCustomGridTableView); override;
- procedure CloseUp(AModalResult: Boolean = False); override;
- property CheckListBox: TcxCheckListBox read FCheckListBox;
- end;
- TcxCustomGridItemsCustomizationPopupClass = class of TcxCustomGridItemsCustomizationPopup;
- TcxCustomGridItemsCustomizationPopup = class(TcxCustomGridCustomizationPopup)
- protected
- procedure AddCheckListBoxItems; override;
- function GetDropDownCount: Integer; override;
- procedure ItemClicked(AItem: TObject; AChecked: Boolean); override;
- end;
- // controllers
- TcxGridEditingControllerClass = class of TcxGridEditingController;
- TcxGridEditingController = class
- private
- FController: TcxCustomGridTableController;
- FEdit: TcxCustomEdit;
- FEditHiding: Boolean;
- FEditingItem: TcxCustomGridTableItem;
- FEditingItemSetting: Boolean;
- FEditList: TcxInplaceEditList;
- FEditPreparing: Boolean;
- FEditShowingTimer: TcxTimer;
- FEditShowingTimerItem: TcxCustomGridTableItem;
- FEditUpdateNeeded: Boolean;
- FInitiatingEditing: Boolean;
- FIsEditPlaced: Boolean;
- FIsErrorOnEditExit: Boolean;
- FPrevEditOnChange: TNotifyEvent;
- FPrevEditOnEditValueChanged: TNotifyEvent;
- function GetEditingProperties: TcxCustomEditProperties;
- function GetGridView: TcxCustomGridTableView;
- function GetIsEditing: Boolean;
- procedure SetEditingItem(Value: TcxCustomGridTableItem);
- procedure EditShowingTimerHandler(Sender: TObject);
- protected
- procedure AfterViewInfoCalculate; virtual;
- procedure BeforeViewInfoCalculate; virtual;
- procedure CancelEditUpdatePost;
- function CanRemoveEditFocus: Boolean; virtual;
- procedure CheckEdit;
- procedure CheckEditUpdatePost;
- procedure DoUpdateEdit;
- function GetHideEditOnExit: Boolean; virtual;
- function GetHideEditOnFocusedRecordChange: Boolean; virtual;
- procedure InitEdit; virtual;
- procedure PostEditUpdate;
- function PrepareEdit(AItem: TcxCustomGridTableItem; AOnMouseEvent: Boolean): Boolean; virtual;
- procedure UpdateEditValue;
- procedure UpdateValue;
- procedure AssignEditEvents; virtual;
- procedure UnassignEditEvents; virtual;
- procedure EditAfterKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); virtual;
- procedure EditChanged(Sender: TObject); virtual;
- procedure EditEditing(Sender: TObject; var CanEdit: Boolean); virtual;
- procedure EditExit(Sender: TObject); virtual;
- procedure EditFocusChanged(Sender: TObject); virtual;
- procedure EditKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); virtual;
- procedure EditKeyPress(Sender: TObject; var Key: Char); virtual;
- procedure EditKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); virtual;
- procedure EditPostEditValue(Sender: TObject); virtual;
- procedure EditValueChanged(Sender: TObject); virtual;
- property EditHiding: Boolean read FEditHiding;
- property EditingProperties: TcxCustomEditProperties read GetEditingProperties;
- property EditList: TcxInplaceEditList read FEditList;
- property EditUpdateNeeded: Boolean read FEditUpdateNeeded;
- property HideEditOnExit: Boolean read GetHideEditOnExit;
- property HideEditOnFocusedRecordChange: Boolean read GetHideEditOnFocusedRecordChange;
- property InitiatingEditing: Boolean read FInitiatingEditing;
- property IsEditPlaced: Boolean read FIsEditPlaced;
- property IsErrorOnEditExit: Boolean read FIsErrorOnEditExit;
- public
- constructor Create(AController: TcxCustomGridTableController); virtual;
- destructor Destroy; override;
- procedure HideEdit(Accept: Boolean); virtual;
- procedure RemoveEdit(AProperties: TcxCustomEditProperties); virtual;
- procedure ShowEdit(AItem: TcxCustomGridTableItem = nil); overload;
- procedure ShowEdit(AItem: TcxCustomGridTableItem; Key: Char); overload;
- procedure ShowEdit(AItem: TcxCustomGridTableItem; Shift: TShiftState; X, Y: Integer); overload;
- procedure UpdateEdit;
- procedure StartEditShowingTimer(AItem: TcxCustomGridTableItem);
- procedure StopEditShowingTimer;
- property Controller: TcxCustomGridTableController read FController;
- property Edit: TcxCustomEdit read FEdit;
- property EditingItem: TcxCustomGridTableItem read FEditingItem write SetEditingItem;
- property GridView: TcxCustomGridTableView read GetGridView;
- property IsEditing: Boolean read GetIsEditing;
- end;
- TcxGridDragOpenInfoExpand = class(TcxCustomGridDragOpenInfo)
- public
- GridRecord: TcxCustomGridRecord;
- constructor Create(AGridRecord: TcxCustomGridRecord); virtual;
- function Equals(AInfo: TcxCustomGridDragOpenInfo): Boolean; override;
- procedure Run; override;
- end;
- TcxCustomGridTableCanItemFocus = function(AOwner: TcxCustomGridTableView;
- AItemIndex: Integer; AData: TObject): Boolean;
- TcxCustomGridTableController = class(TcxCustomGridController)
- private
- FAllowCheckEdit: Boolean;
- FBlockRecordKeyboardHandling: Boolean;
- FCheckEditNeeded: Boolean;
- FCheckingCoordinate: Boolean;
- FClickedCellViewInfo: TcxGridTableDataCellViewInfo;
- FCustomization: Boolean;
- FCustomizationForm: TcxCustomGridTableCustomizationForm;
- FCustomizationFormBounds: TRect;
- FDragDropText: string;
- FDragScrollDirection: TcxDirection;
- FDragScrollTimer: TcxTimer;
- FDragHighlightedRecord: TcxCustomGridRecord;
- FEatKeyPress: Boolean;
- FEditingController: TcxGridEditingController;
- FFilterMRUItemsPopup: TcxGridFilterMRUItemsPopup;
- FFilterPopup: TcxGridFilterPopup;
- FFocusedItem: TcxCustomGridTableItem;
- FFocusOnRecordFocusing: Boolean;
- FForcingWidthItem: TcxCustomGridTableItem;
- FGridModeBufferCountUpdateNeeded: Boolean;
- FGridModeBufferCountUpdateTimer: TcxTimer;
- FIsCheckingCoordinates: Boolean;
- FIsPullFocusing: Boolean;
- FIsReadyForImmediateEditing: Boolean;
- FIsRecordUnselecting: Boolean;
- FItemsCustomizationPopup: TcxCustomGridItemsCustomizationPopup;
- FMovingItem: TcxCustomGridTableItem;
- FPullFocusingItem: TcxCustomGridTableItem;
- FPullFocusingMousePos: TPoint;
- FPullFocusingOriginHitTest: TcxCustomGridHitTest;
- FPullFocusingRecordId: Variant;
- FPullFocusingScrollingDirection: TcxDirection;
- FPullFocusingScrollingTimer: TcxTimer;
- FScrollDirection: TcxDirection;
- FScrollTimer: TcxTimer;
- FTopRecordIndex: Integer;
- FUnselectingRecordIndex: Integer;
- function GetDragAndDropObject: TcxCustomGridTableDragAndDropObject;
- function GetEditingItem: TcxCustomGridTableItem;
- function GetFilterMRUItemsPopup: TcxGridFilterMRUItemsPopup;
- function GetFilterPopup: TcxGridFilterPopup;
- function GetFocusedItemIndex: Integer;
- function GetFocusedRecordIndex: Integer;
- function GetGridView: TcxCustomGridTableView;
- function GetIncSearchingItem: TcxCustomGridTableItem;
- function GetIncSearchingText: string;
- function GetIsEditing: Boolean;
- function GetIsIncSearching: Boolean;
- function GetIsItemMoving: Boolean;
- function GetItemsCustomizationPopup: TcxCustomGridItemsCustomizationPopup;
- function GetMasterController: TcxCustomGridTableController;
- function GetMultiSelect: Boolean;
- function GetSelectedRecord(Index: Integer): TcxCustomGridRecord;
- function GetSelectedRecordCount: Integer;
- function GetViewData: TcxCustomGridTableViewData;
- function GetViewInfo: TcxCustomGridTableViewInfo;
- procedure SetCustomization(Value: Boolean);
- procedure SetDragHighlightedRecord(Value: TcxCustomGridRecord);
- procedure SetEditingItem(Value: TcxCustomGridTableItem);
- procedure SetFocusedItem(Value: TcxCustomGridTableItem);
- procedure SetFocusedItemIndex(Value: Integer);
- procedure SetFocusedRecordIndex(Value: Integer);
- procedure SetIncSearchingText(const Value: string);
- procedure SetInternalTopRecordIndex(Value: Integer);
- procedure SetScrollDirection(Value: TcxDirection);
- procedure SetTopRecordIndex(Value: Integer);
- procedure DragScrollTimerHandler(Sender: TObject);
- procedure GridModeBufferCountUpdateTimerHandler(Sender: TObject);
- procedure PullFocusingScrollingTimerHandler(Sender: TObject);
- procedure CreateScrollTimer;
- procedure DestroyScrollTimer;
- procedure ScrollTimerHandler(Sender: TObject);
- protected
- procedure AfterPaint; override;
- procedure BeforePaint; override;
- procedure DetailFocused(ADetail: TcxCustomGridView); override;
- procedure DoEnter; override;
- procedure DoExit; override;
- function MayFocus: Boolean; override;
- procedure RemoveFocus; override;
- procedure SetFocus; override;
- procedure AfterOffset; virtual;
- procedure BeforeKillFocus; override;
- procedure BeforeOffset; virtual;
- function CanAppend: Boolean; virtual;
- procedure CancelCheckEditPost;
- function CanDelete(ACheckOptions: Boolean): Boolean; virtual;
- function CanEdit: Boolean; virtual;
- procedure CheckCoordinates; virtual;
- function CanHScrollBarHide: Boolean; virtual;
- function CanInsert(ACheckOptions: Boolean): Boolean; virtual;
- procedure CheckEdit; virtual;
- procedure CheckTopRecordIndex(var Value: Integer); virtual;
- function FindNextCustomItem(AFocusedItemIndex, AItemCount: Integer;
- AGoForward, AGoOnCycle: Boolean; ACanFocus: TcxCustomGridTableCanItemFocus;
- AData: TObject; var AItemIndex: Integer; out ACycleChanged: Boolean): Boolean;
- procedure FocusedItemChanged(APrevFocusedItem: TcxCustomGridTableItem); virtual;
- function GetCancelEditingOnExit: Boolean; virtual;
- function GetFilterMRUItemsPopupClass: TcxGridFilterMRUItemsPopupClass; virtual;
- function GetFilterPopupClass: TcxGridFilterPopupClass; virtual;
- function GetFocusedRecord: TcxCustomGridRecord; virtual;
- function GetIsRecordsScrollHorizontal: Boolean; virtual; abstract;
- function GetItemsCustomizationPopupClass: TcxCustomGridItemsCustomizationPopupClass; virtual;
- function GetMaxTopRecordIndexValue: Integer; virtual;
- function GetPatternObject(AObject: TPersistent): TPersistent; override;
- function GetScrollBarOffsetBegin: Integer; virtual;
- function GetScrollBarOffsetEnd: Integer; virtual;
- function GetScrollBarPos: Integer; virtual;
- function GetScrollBarRecordCount: Integer; virtual;
- function GetVisibleRecordCount(AFirstRecordIndex: Integer;
- ACalculateDown: Boolean = True): Integer; virtual;
- procedure PostCheckEdit;
- procedure ProcessCheckEditPost;
- procedure ScrollData(ADirection: TcxDirection); virtual;
- procedure SetFocusedRecord(Value: TcxCustomGridRecord); virtual;
- procedure SetScrollBarPos(Value: Integer); virtual;
- procedure CancelGridModeBufferCountUpdate;
- procedure CheckGridModeBufferCountUpdatePost;
- procedure PostGridModeBufferCountUpdate;
- property GridModeBufferCountUpdateNeeded: Boolean read FGridModeBufferCountUpdateNeeded;
- // internal draganddrop data scrolling
- function CanScrollData(ADirection: TcxDirection): Boolean; virtual;
- function GetScrollDataTimeInterval(ADirection: TcxDirection): Integer; virtual;
- property ScrollDirection: TcxDirection read FScrollDirection write SetScrollDirection;
- // selection
- function CanPostponeRecordSelection: Boolean; virtual;
- function CanProcessMultiSelect(AIsKeyboard: Boolean): Boolean; overload; virtual;
- function CanProcessMultiSelect(AHitTest: TcxCustomGridHitTest;
- AShift: TShiftState): Boolean; overload; virtual;
- function CanProcessMultiSelect(AKey: Word; AShift: TShiftState;
- AFocusedRecordChanged: Boolean): Boolean; overload; virtual;
- procedure ChangeRecordSelection(ARecord: TcxCustomGridRecord; Value: Boolean);
- procedure CheckFocusedRecordSelectionWhenExit(ARecord: TcxCustomGridRecord);
- procedure DoMouseNormalSelection(AHitTest: TcxCustomGridHitTest); virtual;
- procedure DoMouseRangeSelection(AClearSelection: Boolean = True; AData: TObject = nil); virtual;
- procedure DoNormalSelection; virtual;
- procedure DoNormalSelectionWithAnchor(ASelect: Boolean = True);
- procedure DoRangeSelection(AClearSelection: Boolean = True);
- procedure DoToggleRecordSelection;
- procedure FinishSelection; virtual;
- procedure InvalidateFocusedRecord; virtual;
- procedure InvalidateSelection; virtual;
- function IsKeyForMultiSelect(AKey: Word; AShift: TShiftState;
- AFocusedRecordChanged: Boolean): Boolean; virtual;
- function IsRecordSelected(ARecord: TcxCustomGridRecord): Boolean;
- procedure MultiSelectKeyDown(var Key: Word; Shift: TShiftState); virtual;
- procedure MultiSelectMouseDown(AHitTest: TcxCustomGridHitTest; AShift: TShiftState); virtual;
- procedure MultiSelectMouseUp(AHitTest: TcxCustomGridHitTest; AShift: TShiftState); virtual;
- procedure SetSelectionAnchor(AGridRecordIndex: Integer);
- function SupportsAdditiveSelection: Boolean; virtual;
- function SupportsRecordSelectionToggling: Boolean; virtual;
- // navigation
- function CanFocusNextItem(AFocusedItemIndex, ANextItemIndex: Integer;
- AGoForward, AGoOnCycle, AGoToNextRecordOnCycle: Boolean): Boolean; virtual;
- function FocusedRecordHasCells(ACheckCellSelect: Boolean): Boolean;
- procedure FocusNextPage(ASyncSelection: Boolean); virtual;
- procedure FocusPrevPage(ASyncSelection: Boolean); virtual;
- function IsKeyForController(AKey: Word; AShift: TShiftState): Boolean; virtual;
- procedure ScrollPage(AForward: Boolean); virtual;
- procedure ScrollRecords(AForward: Boolean; ACount: Integer); virtual;
- procedure ShowNextPage; virtual;
- procedure ShowPrevPage; virtual;
- // pull focusing
- procedure DoPullFocusing(AHitTest: TcxGridRecordHitTest); virtual;
- procedure DoPullFocusingScrolling(ADirection: TcxDirection); virtual;
- function GetPullFocusingScrollingDirection(X, Y: Integer; out ADirection: TcxDirection): Boolean; virtual;
- function IsPullFocusingPosChanged: Boolean;
- procedure SavePullFocusingPos;
- procedure StartPullFocusing(AHitTest: TcxCustomGridHitTest); virtual;
- procedure StopPullFocusing;
- procedure StartPullFocusingScrolling(ADirection: TcxDirection);
- procedure StopPullFocusingScrolling;
- function SupportsPullFocusing: Boolean; virtual;
- property PullFocusingOriginHitTest: TcxCustomGridHitTest read FPullFocusingOriginHitTest;
- // delphi drag and drop
- function GetDragScrollDirection(X, Y: Integer): TcxDirection; virtual;
- function GetDragScrollInterval: Integer; virtual;
- function IsFirstRecordForDragScroll(ARecord: TcxCustomGridRecord): Boolean; virtual;
- function IsLastRecordForDragScroll(ARecord: TcxCustomGridRecord): Boolean; virtual;
- procedure ProcessDragFocusing(X, Y: Integer);
- procedure StartDragScroll(ADirection: TcxDirection);
- procedure StopDragScroll;
- function IsDragScroll: Boolean;
- //---
- function GetDragOpenInfo(AHitTest: TcxCustomGridHitTest): TcxCustomGridDragOpenInfo; virtual;
- function IsDragOpenHitTest(AHitTest: TcxCustomGridHitTest;
- out ADragOpenInfo: TcxCustomGridDragOpenInfo): Boolean;
- //---
- property DragHighlightedRecord: TcxCustomGridRecord read FDragHighlightedRecord write SetDragHighlightedRecord;
- // incsearching
- function GetItemForIncSearching: TcxCustomGridTableItem; virtual;
- procedure IncSearchKeyDown(var Key: Word; Shift: TShiftState); virtual;
- property ItemForIncSearching: TcxCustomGridTableItem read GetItemForIncSearching;
- // customization
- procedure CheckCustomizationFormBounds(var R: TRect); virtual;
- function GetCustomizationFormClass: TcxCustomGridTableCustomizationFormClass; virtual;
- function GetRealCustomizationFormBounds: TRect;
- procedure HideCustomizationForm;
- procedure ShowCustomizationForm;
- function GetEditingControllerClass: TcxGridEditingControllerClass; virtual;
- property AllowCheckEdit: Boolean read FAllowCheckEdit write FAllowCheckEdit;
- property BlockRecordKeyboardHandling: Boolean read FBlockRecordKeyboardHandling
- write FBlockRecordKeyboardHandling;
- property CancelEditingOnExit: Boolean read GetCancelEditingOnExit;
- property DragAndDropObject: TcxCustomGridTableDragAndDropObject read GetDragAndDropObject;
- property EatKeyPress: Boolean read FEatKeyPress write FEatKeyPress;
- property FocusOnRecordFocusing: Boolean read FFocusOnRecordFocusing write FFocusOnRecordFocusing;
- property ForcingWidthItem: TcxCustomGridTableItem read FForcingWidthItem write FForcingWidthItem;
- property InternalTopRecordIndex: Integer read FTopRecordIndex write SetInternalTopRecordIndex;
- property IsCheckingCoordinates: Boolean read FIsCheckingCoordinates;
- property IsReadyForImmediateEditing: Boolean read FIsReadyForImmediateEditing
- write FIsReadyForImmediateEditing;
- property IsRecordsScrollHorizontal: Boolean read GetIsRecordsScrollHorizontal;
- property MultiSelect: Boolean read GetMultiSelect;
- property ScrollBarOffsetBegin: Integer read GetScrollBarOffsetBegin;
- property ScrollBarOffsetEnd: Integer read GetScrollBarOffsetEnd;
- property ScrollBarRecordCount: Integer read GetScrollBarRecordCount;
- property ScrollBarPos: Integer read GetScrollBarPos write SetScrollBarPos;
- property ViewData: TcxCustomGridTableViewData read GetViewData;
- property ViewInfo: TcxCustomGridTableViewInfo read GetViewInfo;
- public
- constructor Create(AGridView: TcxCustomGridView); override;
- destructor Destroy; override;
- procedure BeginDragAndDrop; override;
- procedure ControlFocusChanged; override;
- procedure DoCancelMode; override;
- procedure DoKeyDown(var Key: Word; Shift: TShiftState); override;
- procedure EndDragAndDrop(Accepted: Boolean); override;
- function FindNextItem(AFocusedItemIndex: Integer;
- AGoForward, AGoOnCycle: Boolean; out ACycleChanged: Boolean;
- ARecord: TcxCustomGridRecord): Integer; virtual;
- function FindNextRecord(AFocusedRecordIndex: Integer;
- AGoForward, AGoOnCycle: Boolean; out ACycleChanged: Boolean): Integer;
- function HasFilterMRUItemsPopup: Boolean;
- function HasFilterPopup: Boolean;
- function HasFocusedControls: Boolean; override;
- function HasItemsCustomizationPopup: Boolean;
- function IsClickableRecordHitTest(AHitTest: TcxCustomGridHitTest): Boolean;
- function IsDataFullyVisible(AIsCallFromMaster: Boolean = False): Boolean; override;
- procedure KeyDown(var Key: Word; Shift: TShiftState); override;
- procedure KeyPress(var Key: Char); override;
- procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
- procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
- procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
- function ProcessDetailDialogChar(ADetail: TcxCustomGridView; ACharCode: Word): Boolean; override;
- function ProcessDialogChar(ACharCode: Word): Boolean; override;
- function SupportsTabAccelerators(AGridRecord: TcxCustomGridRecord): Boolean; virtual;
- {$IFDEF VCL}
- procedure WndProc(var Message: TMessage); override;
- {$ENDIF}
- procedure BeforeStartDrag; override;
- function CanDrag(X, Y: Integer): Boolean; override;
- procedure DragDrop(Source: TObject; X, Y: Integer); override;
- procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState;
- var Accept: Boolean); override;
- procedure DrawDragImage(ACanvas: TcxCanvas; R: TRect); override;
- procedure EndDrag(Target: TObject; X, Y: Integer); override;
- function GetDragDropText(ADragObject: TDragObject): string; virtual;
- procedure GetDragDropTextViewParams(out AParams: TcxViewParams); virtual;
- function GetDragImagesSize: TPoint; override;
- function HasDragImages: Boolean; override;
- procedure StartDrag(var DragObject: TDragObject); override;
- property DragDropText: string read FDragDropText;
- procedure CancelIncSearching;
- procedure CheckScrolling(const P: TPoint); virtual;
- procedure ClearSelection; virtual;
- procedure CreateNewRecord(AtEnd: Boolean); virtual;
- procedure DeleteSelection; virtual;
- procedure DoCheckCoordinates;
- function FocusFirstAvailableItem: Boolean;
- function FocusNextCell(AGoForward: Boolean; AProcessCellsOnly: Boolean = True;
- AAllowCellsCycle: Boolean = True): Boolean;
- function FocusNextItem(AFocusedItemIndex: Integer;
- AGoForward, AGoOnCycle, AGoToNextRecordOnCycle: Boolean): Boolean;
- function FocusNextRecord(AFocusedRecordIndex: Integer;
- AGoForward, AGoOnCycle, AGoIntoOutDetail: Boolean): Boolean;
- function FocusNextRecordWithSelection(AFocusedRecordIndex: Integer;
- AGoForward, AGoOnCycle, AGoIntoDetail: Boolean; ASyncSelection: Boolean = True): Boolean;
- function FocusRecord(AFocusedRecordIndex: Integer; ASyncSelection: Boolean): Boolean;
- procedure MakeFocusedItemVisible;
- procedure MakeFocusedRecordVisible;
- procedure MakeItemVisible(AItem: TcxCustomGridTableItem); virtual; abstract;
- procedure MakeRecordVisible(ARecord: TcxCustomGridRecord); virtual;
- procedure SelectAll; virtual;
- procedure SelectAllRecords;
- function GoToFirst: Boolean;
- function GoToLast(AGoIntoDetail: Boolean): Boolean;
- function GoToNext(AGoIntoDetail: Boolean; ASyncSelection: Boolean = True): Boolean;
- function GoToPrev(AGoIntoDetail: Boolean; ASyncSelection: Boolean = True): Boolean;
- function IsFinish: Boolean;
- function IsStart: Boolean;
- procedure RefreshCustomizationForm;
- property ClickedCellViewInfo: TcxGridTableDataCellViewInfo read FClickedCellViewInfo write FClickedCellViewInfo;
- property Customization: Boolean read FCustomization write SetCustomization;
- property CustomizationForm: TcxCustomGridTableCustomizationForm read FCustomizationForm;
- property CustomizationFormBounds: TRect read FCustomizationFormBounds
- write FCustomizationFormBounds;
- property EditingController: TcxGridEditingController read FEditingController;
- property EditingItem: TcxCustomGridTableItem read GetEditingItem write SetEditingItem;
- property FilterMRUItemsPopup: TcxGridFilterMRUItemsPopup read GetFilterMRUItemsPopup;
- property FilterPopup: TcxGridFilterPopup read GetFilterPopup;
- property FocusedItem: TcxCustomGridTableItem read FFocusedItem write SetFocusedItem;
- property FocusedItemIndex: Integer read GetFocusedItemIndex write SetFocusedItemIndex;
- property FocusedRecord: TcxCustomGridRecord read GetFocusedRecord write SetFocusedRecord;
- property FocusedRecordIndex: Integer read GetFocusedRecordIndex write SetFocusedRecordIndex;
- property GridView: TcxCustomGridTableView read GetGridView;
- property IncSearchingItem: TcxCustomGridTableItem read GetIncSearchingItem;
- property IncSearchingText: string read GetIncSearchingText write SetIncSearchingText;
- property IsPullFocusing: Boolean read FIsPullFocusing;
- property IsEditing: Boolean read GetIsEditing;
- property IsIncSearching: Boolean read GetIsIncSearching;
- property IsItemMoving: Boolean read GetIsItemMoving;
- property ItemsCustomizationPopup: TcxCustomGridItemsCustomizationPopup read GetItemsCustomizationPopup;
- property MasterController: TcxCustomGridTableController read GetMasterController;
- property MovingItem: TcxCustomGridTableItem read FMovingItem;
- property SelectedRecordCount: Integer read GetSelectedRecordCount;
- property SelectedRecords[Index: Integer]: TcxCustomGridRecord read GetSelectedRecord;
- property TopRecordIndex: Integer read FTopRecordIndex write SetTopRecordIndex;
- end;
- { painters }
- TcxCustomGridPartPainter = class(TcxCustomGridCellPainter);
- // filter
- TcxCustomGridFilterButtonPainter = class(TcxCustomGridCellPainter)
- private
- function GetViewInfo: TcxCustomGridFilterButtonViewInfo;
- protected
- function ExcludeFromClipRect: Boolean; override;
- property ViewInfo: TcxCustomGridFilterButtonViewInfo read GetViewInfo;
- end;
- TcxGridFilterCloseButtonPainter = class(TcxCustomGridFilterButtonPainter)
- protected
- procedure DrawContent; override;
- end;
- TcxGridFilterActivateButtonPainter = class(TcxCustomGridFilterButtonPainter)
- private
- function GetViewInfo: TcxGridFilterActivateButtonViewInfo;
- protected
- procedure DrawContent; override;
- property ViewInfo: TcxGridFilterActivateButtonViewInfo read GetViewInfo;
- end;
- TcxGridFilterDropDownButtonPainter = class(TcxCustomGridFilterButtonPainter)
- protected
- procedure DrawContent; override;
- end;
- TcxGridFilterCustomizeButtonPainter = class(TcxCustomGridFilterButtonPainter)
- protected
- procedure Paint; override;
- end;
- TcxGridFilterPainterClass = class of TcxGridFilterPainter;
- TcxGridFilterPainter = class(TcxCustomGridPartPainter)
- private
- FTextWasUnderlined: Boolean;
- function GetViewInfo: TcxGridFilterViewInfo;
- protected
- procedure DrawButtons; virtual;
- function ExcludeFromClipRect: Boolean; override;
- procedure Paint; override;
- procedure PrepareCanvasForDrawText; override;
- procedure UnprepareCanvasForDrawText; override;
- property ViewInfo: TcxGridFilterViewInfo read GetViewInfo;
- end;
- // records
- TcxGridTableDataCellPainterClass = class of TcxGridTableDataCellPainter;
- TcxGridTableDataCellPainter = class(TcxCustomGridCellPainter)
- private
- function GetViewInfo: TcxGridTableDataCellViewInfo;
- protected
- procedure DrawContent; override;
- procedure DrawFocusRect; virtual;
- procedure Paint; override;
- property ViewInfo: TcxGridTableDataCellViewInfo read GetViewInfo;
- end;
- TcxCustomGridRecordPainterClass = class of TcxCustomGridRecordPainter;
- TcxCustomGridRecordPainter = class(TcxCustomGridCellPainter)
- private
- function GetViewInfo: TcxCustomGridRecordViewInfo;
- protected
- procedure AfterPaint; override;
- procedure BeforePaint; override;
- procedure DrawBackground; override;
- procedure DrawExpandButton; virtual;
- function DrawExpandButtonBeforePaint: Boolean; virtual;
- procedure DrawFocusRect; virtual;
- procedure Paint; override;
- property ViewInfo: TcxCustomGridRecordViewInfo read GetViewInfo;
- end;
- TcxCustomGridRecordsPainterClass = class of TcxCustomGridRecordsPainter;
- TcxCustomGridRecordsPainter = class
- private
- FCanvas: TcxCanvas;
- FViewInfo: TcxCustomGridRecordsViewInfo;
- protected
- //procedure BeforePaint; virtual;
- procedure Paint; virtual;
- property Canvas: TcxCanvas read FCanvas;
- property ViewInfo: TcxCustomGridRecordsViewInfo read FViewInfo;
- public
- constructor Create(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridRecordsViewInfo); virtual;
- procedure MainPaint;
- end;
- // view
- TcxNavigatorSitePainter = class(TcxCustomGridCellPainter)
- protected
- function ExcludeFromClipRect: Boolean; override;
- end;
- TcxCustomGridTablePainter = class(TcxCustomGridPainter)
- private
- function GetController: TcxCustomGridTableController;
- function GetViewInfo: TcxCustomGridTableViewInfo;
- protected
- function CanOffset(AItemsOffset, DX, DY: Integer): Boolean; virtual;
- procedure DrawBackground; override;
- procedure DrawFilterBar; virtual;
- procedure DrawInfoText; virtual;
- procedure DrawNavigator; virtual;
- procedure DrawRecords; virtual;
- procedure Offset(AItemsOffset: Integer); overload; virtual;
- procedure Offset(DX, DY: Integer); overload; virtual;
- procedure PaintBefore; override;
- procedure PaintContent; override;
- public
- procedure DoOffset(AItemsOffset, DX, DY: Integer);
- procedure DrawFocusRect(const R: TRect; AHideFocusRect: Boolean); override;
- property Controller: TcxCustomGridTableController read GetController;
- property ViewInfo: TcxCustomGridTableViewInfo read GetViewInfo;
- end;
- { view infos }
- // part
- TcxGridPartAlignment = (gpaTop, gpaBottom);
- TcxCustomGridPartViewInfo = class(TcxCustomGridViewCellViewInfo)
- private
- FHeight: Integer;
- function GetGridView: TcxCustomGridTableView;
- function GetGridViewInfo: TcxCustomGridTableViewInfo;
- function GetIndex: Integer;
- procedure SetIndex(Value: Integer);
- protected
- function CalculateBounds: TRect; virtual;
- procedure CalculateInvisible; virtual;
- procedure CalculateVisible; virtual;
- function CustomDrawBackground(ACanvas: TcxCanvas): Boolean; override;
- function GetAlignment: TcxGridPartAlignment; virtual; abstract;
- //function GetHeight: Integer; override;
- function GetIsAutoWidth: Boolean; virtual; abstract;
- function GetIsPart: Boolean; virtual;
- function GetIsScrollable: Boolean; virtual; abstract;
- function GetPainterClass: TcxCustomGridCellPainterClass; override;
- function HasCustomDrawBackground: Boolean; override;
- procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override;
- property Height: Integer read FHeight write FHeight;
- property IsPart: Boolean read GetIsPart;
- public
- constructor Create(AGridViewInfo: TcxCustomGridTableViewInfo); reintroduce; virtual;
- destructor Destroy; override;
- procedure MainCalculate;
- property Alignment: TcxGridPartAlignment read GetAlignment;
- property GridView: TcxCustomGridTableView read GetGridView;
- property GridViewInfo: TcxCustomGridTableViewInfo read GetGridViewInfo;
- property Index: Integer read GetIndex write SetIndex;
- property IsAutoWidth: Boolean read GetIsAutoWidth;
- property IsScrollable: Boolean read GetIsScrollable;
- end;
- // filter
- TcxGridFilterButtonAlignment = (fbaLeft, fbaRight);
- TcxCustomGridFilterButtonViewInfoClass = class of TcxCustomGridFilterButtonViewInfo;
- TcxCustomGridFilterButtonViewInfo = class(TcxCustomGridViewCellViewInfo)
- private
- FContainer: TcxGridFilterButtonsViewInfo;
- function GetFilter: TcxDataFilterCriteria;
- function GetGridView: TcxCustomGridTableView;
- protected
- function CaptureMouseOnPress: Boolean; override;
- function GetAlignment: TcxGridFilterButtonAlignment; virtual;
- function GetCanvas: TcxCanvas; override;
- function GetHotTrack: Boolean; override;
- function GetVisible: Boolean; override;
- property Container: TcxGridFilterButtonsViewInfo read FContainer;
- property Filter: TcxDataFilterCriteria read GetFilter;
- public
- constructor Create(AContainer: TcxGridFilterButtonsViewInfo); reintroduce; virtual;
- property Alignment: TcxGridFilterButtonAlignment read GetAlignment;
- property GridView: TcxCustomGridTableView read GetGridView;
- end;
- TcxGridFilterCloseButtonViewInfo = class(TcxCustomGridFilterButtonViewInfo)
- protected
- function CalculateHeight: Integer; override;
- function CalculateWidth: Integer; override;
- procedure Click; override;
- function GetHitTestClass: TcxCustomGridHitTestClass; override;
- function GetPainterClass: TcxCustomGridCellPainterClass; override;
- end;
- TcxGridFilterActivateButtonViewInfo = class(TcxCustomGridFilterButtonViewInfo)
- private
- function GetChecked: Boolean;
- protected
- function CalculateHeight: Integer; override;
- function CalculateWidth: Integer; override;
- procedure Click; override;
- function GetHitTestClass: TcxCustomGridHitTestClass; override;
- function GetPainterClass: TcxCustomGridCellPainterClass; override;
- public
- property Checked: Boolean read GetChecked;
- end;
- TcxGridFilterDropDownButtonViewInfo = class(TcxCustomGridFilterButtonViewInfo,
- IcxCustomGridPopupOwner)
- private
- function GetDropDownWindow: TcxGridFilterMRUItemsPopup;
- protected
- { IcxCustomGridPopupOwner }
- function ClosePopupWhenNilOwner: Boolean;
- function GetOwnerBounds: TRect;
- procedure PopupClosed;
- procedure BeforeStateChange; override;
- function CalculateHeight: Integer; override;
- function CalculateWidth: Integer; override;
- function CaptureMouseOnPress: Boolean; override;
- procedure DropDown; virtual;
- function DropDownWindowExists: Boolean; virtual;
- function GetAlignment: TcxGridFilterButtonAlignment; override;
- function GetHitTestClass: TcxCustomGridHitTestClass; override;
- function GetIsCheck: Boolean; override;
- function GetPainterClass: TcxCustomGridCellPainterClass; override;
- function GetVisible: Boolean; override;
- procedure StateChanged; override;
- public
- destructor Destroy; override;
- procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1;
- AHeight: Integer = -1); override;
- property DropDownWindow: TcxGridFilterMRUItemsPopup read GetDropDownWindow;
- end;
- TcxGridFilterCustomizeButtonViewInfo = class(TcxCustomGridFilterButtonViewInfo)
- protected
- function CalculateHeight: Integer; override;
- function CalculateWidth: Integer; override;
- procedure Click; override;
- function GetAlignment: TcxGridFilterButtonAlignment; override;
- function GetAlignmentHorz: TAlignment; override;
- function GetAlignmentVert: TcxAlignmentVert; override;
- function GetBorders: TcxBorders; override;
- function GetBorderWidth(AIndex: TcxBorder): Integer; override;
- function GetHitTestClass: TcxCustomGridHitTestClass; override;
- function GetPainterClass: TcxCustomGridCellPainterClass; override;
- function GetText: string; override;
- function GetTextAreaBounds: TRect; override;
- procedure GetViewParams(var AParams: TcxViewParams); override;
- function GetVisible: Boolean; override;
- end;
- TcxGridFilterButtonsViewInfoClass = class of TcxGridFilterButtonsViewInfo;
- TcxGridFilterButtonsViewInfo = class
- private
- FFilterViewInfo: TcxGridFilterViewInfo;
- FItems: TList;
- function GetCount: Integer;
- function GetGridView: TcxCustomGridTableView;
- function GetHeight: Integer;
- function GetItem(Index: Integer): TcxCustomGridFilterButtonViewInfo;
- function GetWidth(AAlignment: TcxGridFilterButtonAlignment): Integer;
- function GetWidthLeftPart: Integer;
- function GetWidthRightPart: Integer;
- protected
- FDropDownButtonViewInfo: TcxGridFilterDropDownButtonViewInfo;
- procedure AddItems; virtual;
- procedure DestroyItems; virtual;
- property FilterViewInfo: TcxGridFilterViewInfo read FFilterViewInfo;
- property GridView: TcxCustomGridTableView read GetGridView;
- public
- constructor Create(AFilterViewInfo: TcxGridFilterViewInfo); virtual;
- destructor Destroy; override;
- function AddItem(AItemClass: TcxCustomGridFilterButtonViewInfoClass): TcxCustomGridFilterButtonViewInfo;
- procedure Calculate(const ABounds: TRect); virtual;
- function GetHitTest(const P: TPoint): TcxCustomGridHitTest; virtual;
- property Count: Integer read GetCount;
- property DropDownButtonViewInfo: TcxGridFilterDropDownButtonViewInfo read FDropDownButtonViewInfo;
- property Height: Integer read GetHeight;
- property Items[Index: Integer]: TcxCustomGridFilterButtonViewInfo read GetItem; default;
- property WidthLeftPart: Integer read GetWidthLeftPart;
- property WidthRightPart: Integer read GetWidthRightPart;
- end;
- TcxGridFilterViewInfoClass = class of TcxGridFilterViewInfo;
- TcxGridFilterViewInfo = class(TcxCustomGridPartViewInfo)
- private
- FButtonsViewInfo: TcxGridFilterButtonsViewInfo;
- function GetFilter: TcxDataFilterCriteria;
- function GetFiltering: TcxCustomGridTableFiltering;
- procedure CreateButtonsViewInfo;
- procedure DestroyButtonsViewInfo;
- protected
- function CalculateButtonsViewInfoBounds: TRect; virtual;
- function CalculateHeight: Integer; override;
- function CalculateWidth: Integer; override;
- function GetAlignment: TcxGridPartAlignment; override;
- function GetAlignmentVert: TcxAlignmentVert; override;
- function GetBackgroundBitmap: TBitmap; override;
- function GetHitTestClass: TcxCustomGridHitTestClass; override;
- function GetHotTrack: Boolean; override;
- function GetIsAutoWidth: Boolean; override;
- function GetIsCheck: Boolean; override;
- function GetIsScrollable: Boolean; override;
- function GetPainterClass: TcxCustomGridCellPainterClass; override;
- function GetText: string; override;
- function GetTextAreaBounds: TRect; override;
- procedure GetViewParams(var AParams: TcxViewParams); override;
- function GetVisible: Boolean; override;
- function HasMouse(AHitTest: TcxCustomGridHitTest): Boolean; override;
- function InvalidateOnStateChange: Boolean; override;
- procedure StateChanged; override;
- function GetButtonsViewInfoClass: TcxGridFilterButtonsViewInfoClass; virtual;
- property Filter: TcxDataFilterCriteria read GetFilter;
- property Filtering: TcxCustomGridTableFiltering read GetFiltering;
- public
- constructor Create(AGridViewInfo: TcxCustomGridTableViewInfo); override;
- destructor Destroy; override;
- procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1;
- AHeight: Integer = -1); override;
- function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override;
- property ButtonsViewInfo: TcxGridFilterButtonsViewInfo read FButtonsViewInfo;
- end;
- // cells
- TcxGridTableCellViewInfo = class(TcxCustomGridViewCellViewInfo)
- private
- FRecordViewInfo: TcxCustomGridRecordViewInfo;
- FSelected: Boolean;
- FSelectedCalculated: Boolean;
- function GetCacheItem: TcxCustomGridTableViewInfoCacheItem;
- function GetController: TcxCustomGridTableController;
- function GetGridView: TcxCustomGridTableView;
- function GetGridRecord: TcxCustomGridRecord;
- function GetSelected: Boolean;
- protected
- function CalculateSelected: Boolean; virtual;
- function GetAlwaysSelected: Boolean; virtual;
- function GetCanvas: TcxCanvas; override;
- function GetGridViewInfo: TcxCustomGridTableViewInfo;
- function GetHitTestClass: TcxCustomGridHitTestClass; override;
- function GetTransparent: Boolean; override;
- procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override;
- property AlwaysSelected: Boolean read GetAlwaysSelected;
- property CacheItem: TcxCustomGridTableViewInfoCacheItem read GetCacheItem;
- property Controller: TcxCustomGridTableController read GetController;
- public
- constructor Create(ARecordViewInfo: TcxCustomGridRecordViewInfo); reintroduce; virtual;
- procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1;
- AHeight: Integer = -1); override;
- function CanDrawSelected: Boolean; virtual;
- function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton;
- AShift: TShiftState): Boolean; override;
- property GridRecord: TcxCustomGridRecord read GetGridRecord;
- property GridView: TcxCustomGridTableView read GetGridView;
- property GridViewInfo: TcxCustomGridTableViewInfo read GetGridViewInfo;
- property RecordViewInfo: TcxCustomGridRecordViewInfo read FRecordViewInfo;
- property Selected: Boolean read GetSelected;
- end;
- TcxGridTableDataCellViewInfo = class(TcxGridTableCellViewInfo)
- private
- FEditViewData: TcxCustomEditViewData;
- FEditViewInfo: TcxCustomEditViewInfo;
- FIsLocalCopyOfEditViewData: Boolean;
- FItem: TcxCustomGridTableItem;
- FProperties: TcxCustomEditProperties;
- FStyle: TcxEditStyle;
- FWasFocusedBeforeClick: Boolean;
- function GetEditing: Boolean;
- function GetMousePos: TPoint;
- function GetProperties: TcxCustomEditProperties;
- function GetShowButtons: Boolean;
- protected
- procedure AfterCustomDraw(ACanvas: TcxCanvas); override;
- procedure BeforeCustomDraw(ACanvas: TcxCanvas); override;
- procedure CalculateEditViewInfo(AEditViewInfo: TcxCustomEditViewInfo;
- const AMousePos: TPoint); virtual;
- function CalculateHeight: Integer; override;
- function CalculateSelected: Boolean; override;
- function CanShowEdit: Boolean; virtual;
- function CanShowHint: Boolean; override;
- procedure CheckEditHotTrack(const AMousePos: TPoint);
- function CustomDraw(ACanvas: TcxCanvas): Boolean; override;
- procedure DoCalculateParams; override;
- procedure EditHotTrackChanged;
- function GetActivateEditOnMouseDown: Boolean; virtual;
- function GetAreaBoundsForHint: TRect; override;
- function GetAutoHeight: Boolean; virtual;
- function GetCellBoundsForHint: TRect; override;
- function GetDisplayValue: TcxEditValue; virtual;
- function GetEditBounds: TRect; virtual;
- function GetEditViewDataBounds: TRect; virtual;
- procedure GetEditViewDataContentOffsets(var R: TRect); virtual;
- function GetFocused: Boolean; virtual;
- function GetHitTestClass: TcxCustomGridHitTestClass; override;
- function GetHotTrack: Boolean; override;
- function GetMaxLineCount: Integer; virtual;
- function GetMultiLine: Boolean; override;
- function GetPainterClass: TcxCustomGridCellPainterClass; override;
- function GetShowEndEllipsis: Boolean; override;
- function GetText: string; override;
- function GetValue: Variant; virtual;
- procedure GetViewParams(var AParams: TcxViewParams); override;
- function HasCustomDraw: Boolean; override;
- function HasFocusRect: Boolean; virtual;
- procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override;
- procedure InitTextSelection; virtual;
- function InvalidateOnStateChange: Boolean; override;
- function IsTextSelected: Boolean; virtual;
- procedure MouseLeave; override;
- function NeedShowHint(const AMousePos: TPoint; out AHintText: TCaption;
- out AIsHintMultiLine: Boolean; out ATextRect: TRect): Boolean; override;
- procedure Offset(DX, DY: Integer); override;
- procedure RestoreParams(const AParams: TcxViewParams); override;
- procedure SaveParams(out AParams: TcxViewParams); override;
- procedure StateChanged; override;
- function UseStandardNeedShowHint: Boolean; virtual;
- procedure InitStyle; virtual;
- function CreateEditViewInfo: TcxCustomEditViewInfo;
- procedure CreateEditViewData;
- procedure DestroyEditViewData;
- property EditViewData: TcxCustomEditViewData read FEditViewData;
- procedure UpdateEdit;
- property ActivateEditOnMouseDown: Boolean read GetActivateEditOnMouseDown;
- property AutoHeight: Boolean read GetAutoHeight;
- property EditViewDataBounds: TRect read GetEditViewDataBounds;
- property MaxLineCount: Integer read GetMaxLineCount;
- property MousePos: TPoint read GetMousePos;
- property ShowButtons: Boolean read GetShowButtons;
- property WasFocusedBeforeClick: Boolean read FWasFocusedBeforeClick;
- public
- constructor Create(ARecordViewInfo: TcxCustomGridRecordViewInfo;
- AItem: TcxCustomGridTableItem); reintroduce; virtual;
- destructor Destroy; override;
- procedure BeforeRecalculation; override;
- procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1;
- AHeight: Integer = -1); override;
- function CanDrawSelected: Boolean; override;
- function GetInplaceEditParams: TcxInplaceEditParams;
- procedure Invalidate(ARecalculate: Boolean); reintroduce; virtual;
- function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton;
- AShift: TShiftState): Boolean; override;
- function MouseMove(AHitTest: TcxCustomGridHitTest; AShift: TShiftState): Boolean; override;
- function MouseUp(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton;
- AShift: TShiftState): Boolean; override;
- property DisplayValue: TcxEditValue read GetDisplayValue;
- //property Edit: TcxCustomEdit read GetEdit;
- property EditBounds: TRect read GetEditBounds;
- property Editing: Boolean read GetEditing;
- property EditViewInfo: TcxCustomEditViewInfo read FEditViewInfo;
- property Focused: Boolean read GetFocused;
- property Item: TcxCustomGridTableItem read FItem;
- property Properties: TcxCustomEditProperties read GetProperties;
- property Style: TcxEditStyle read FStyle;
- property Value: Variant read GetValue;
- end;
- // records
- TcxCustomGridRecordViewInfo = class(TcxCustomGridViewCellViewInfo)
- private
- FExpandButtonBounds: TRect;
- FExpanded: Boolean;
- FExpandedCalculated: Boolean;
- FIsRecordViewInfoAssigned: Boolean;
- FRecordsViewInfo: TcxCustomGridRecordsViewInfo;
- FSelected: Boolean;
- FSelectedCalculated: Boolean;
- function GetCacheItem: TcxCustomGridTableViewInfoCacheItem;
- function GetExpanded: Boolean;
- function GetFocused: Boolean;
- function GetGridView: TcxCustomGridTableView;
- function GetGridViewInfo: TcxCustomGridTableViewInfo;
- function GetIndex: Integer;
- function GetSelected: Boolean;
- procedure SetExpanded(Value: Boolean);
- protected
- FRecord: TcxCustomGridRecord;
- procedure CalculateExpandButtonBounds(var ABounds: TRect); virtual; abstract;
- function CalculateSelected: Boolean; virtual;
- function CanGenerateExpandButtonHitTest: Boolean; virtual;
- procedure ControlFocusChanged; virtual;
- function GetAutoHeight: Boolean; virtual;
- function GetBackgroundBitmap: TBitmap; override;
- function GetBackgroundBitmapBounds: TRect; virtual;
- function GetCanvas: TcxCanvas; override;
- function GetCellTransparent(ACell: TcxGridTableCellViewInfo): Boolean; virtual;
- function GetContentBounds: TRect; virtual;
- function GetExpandButtonAreaBounds: TRect; virtual;
- function GetFocusRectBounds: TRect; virtual;
- function GetHeight: Integer; override;
- function GetHideFocusRectOnExit: Boolean; virtual;
- function GetHitTestClass: TcxCustomGridHitTestClass; override;
- function GetVisible: Boolean; override;
- function HasFocusRect: Boolean; virtual;
- procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override;
- function IsClickHitTest(AHitTest: TcxCustomGridHitTest): Boolean; virtual;
- function IsDetailVisible(ADetail: TcxCustomGridView): Boolean; virtual;
- procedure Offset(DX, DY: Integer); override;
- procedure VisibilityChanged(AVisible: Boolean); virtual;
- property AutoHeight: Boolean read GetAutoHeight;
- property BackgroundBitmapBounds: TRect read GetBackgroundBitmapBounds;
- property CacheItem: TcxCustomGridTableViewInfoCacheItem read GetCacheItem;
- property ExpandButtonAreaBounds: TRect read GetExpandButtonAreaBounds;
- property Expanded: Boolean read GetExpanded write SetExpanded;
- public
- constructor Create(ARecordsViewInfo: TcxCustomGridRecordsViewInfo;
- ARecord: TcxCustomGridRecord); reintroduce; virtual;
- destructor Destroy; override;
- procedure BeforeRecalculation; override;
- function Click(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton;
- AShift: TShiftState): Boolean; reintroduce; virtual;
- function GetBoundsForInvalidate(AItem: TcxCustomGridTableItem): TRect; virtual;
- function GetBoundsForItem(AItem: TcxCustomGridTableItem): TRect; virtual;
- function GetCellViewInfoByItem(AItem: TcxCustomGridTableItem): TcxGridTableDataCellViewInfo; virtual;
- {procedure GetDataCellViewParams(AItem: TcxCustomGridTableItem;
- ACellViewInfo: TcxGridTableCellViewInfo; var AParams: TcxViewParams); virtual;}
- function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override;
- procedure MainCalculate(ALeftBound, ATopBound: Integer); virtual;
- function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton;
- AShift: TShiftState): Boolean; override;
- function ProcessDialogChar(ACharCode: Word): Boolean; virtual;
- procedure Recalculate;
- property ContentBounds: TRect read GetContentBounds;
- property ExpandButtonBounds: TRect read FExpandButtonBounds;
- property Focused: Boolean read GetFocused;
- property FocusRectBounds: TRect read GetFocusRectBounds;
- property GridView: TcxCustomGridTableView read GetGridView;
- property GridRecord: TcxCustomGridRecord read FRecord;
- property GridViewInfo: TcxCustomGridTableViewInfo read GetGridViewInfo;
- property Index: Integer read GetIndex;
- property HideFocusRectOnExit: Boolean read GetHideFocusRectOnExit;
- property RecordsViewInfo: TcxCustomGridRecordsViewInfo read FRecordsViewInfo;
- property Selected: Boolean read GetSelected;
- end;
- TcxCustomGridRecordsViewInfoClass = class of TcxCustomGridRecordsViewInfo;
- TcxCustomGridRecordsViewInfo = class
- private
- FBackgroundBitmap: TBitmap;
- {$IFDEF LINUX}
- FBackgroundBitmapBrush: TBrush;
- {$ENDIF}
- FBounds: TRect;
- FContentBounds: TRect;
- FGridViewInfo: TcxCustomGridTableViewInfo;
- FIncSearchingCellViewInfo: TcxGridTableDataCellViewInfo;
- FIsIncSearchingCellViewInfoCalculated: Boolean;
- FItems: TList;
- FItemsOffset: Integer;
- function GetCanvas: TcxCanvas;
- function GetController: TcxCustomGridTableController;
- function GetCount: Integer;
- function GetFirstRecordIndex: Integer;
- function GetGridView: TcxCustomGridTableView;
- function GetIncSearchingCellViewInfo: TcxGridTableDataCellViewInfo;
- function GetItem(Index: Integer): TcxCustomGridRecordViewInfo;
- function GetMaxCount: Integer;
- function GetTopRecordIndex: Integer;
- function GetViewData: TcxCustomGridTableViewData;
- procedure CreateItems;
- procedure DestroyItems;
- function CreateRecordViewInfo(AIndex: Integer): TcxCustomGridRecordViewInfo;
- protected
- FVisibleCount: Integer;
- procedure AfterCalculate; virtual;
- procedure BeforeCalculate; virtual;
- procedure BeforeItemRecalculation; virtual;
- procedure AfterOffset; virtual;
- procedure BeforeOffset; virtual;
- procedure Calculate; virtual;
- function CalculateBounds: TRect; virtual;
- function CalculateContentBounds: TRect; virtual;
- function CalculateIncSearchingCellViewInfo: TcxGridTableDataCellViewInfo; virtual;
- procedure CalculateVisibleCount; virtual;
- procedure CreateEditViewDatas;
- procedure DestroyEditViewDatas;
- function GetAreaBoundsForCellHint(ACellViewInfo: TcxGridTableDataCellViewInfo): TRect; virtual;
- function GetAutoDataRecordHeight: Boolean; virtual;
- function GetAutoRecordHeight: Boolean; virtual;
- function GetBackgroundBitmap: TBitmap; virtual;
- function GetItemLeftBound(AIndex: Integer): Integer; virtual; abstract;
- function GetItemsOffset(AItemCountDelta: Integer): Integer; virtual; abstract;
- function GetItemTopBound(AIndex: Integer): Integer; virtual; abstract;
- function GetRecordIndex(AViewInfoIndex: Integer): Integer;
- function GetViewInfoIndex(ARecordIndex: Integer): Integer;
- function IsEmpty: Boolean; virtual;
- procedure OffsetItem(AIndex, AOffset: Integer); virtual; abstract;
- procedure ControlFocusChanged; virtual;
- procedure VisibilityChanged(AVisible: Boolean); virtual;
- function GetPainterClass: TcxCustomGridRecordsPainterClass; virtual;
- {$IFDEF LINUX}
- property BackgroundBitmapBrush: TBrush read FBackgroundBitmapBrush;
- {$ENDIF}
- property Canvas: TcxCanvas read GetCanvas;
- property Controller: TcxCustomGridTableController read GetController;
- property FirstRecordIndex: Integer read GetFirstRecordIndex;
- property GridViewInfo: TcxCustomGridTableViewInfo read FGridViewInfo;
- property IncSearchingCellViewInfo: TcxGridTableDataCellViewInfo read GetIncSearchingCellViewInfo;
- property MaxCount: Integer read GetMaxCount;
- property TopRecordIndex: Integer read GetTopRecordIndex;
- property ViewData: TcxCustomGridTableViewData read GetViewData;
- public
- constructor Create(AGridViewInfo: TcxCustomGridTableViewInfo); virtual;
- destructor Destroy; override;
- function CanOffset(AItemCountDelta: Integer): Boolean; virtual;
- function GetCellHeight(ACellContentHeight: Integer): Integer; virtual;
- function GetHitTest(const P: TPoint): TcxCustomGridHitTest; virtual;
- function GetRealItem(ARecord: TcxCustomGridRecord): TcxCustomGridRecordViewInfo; virtual;
- procedure MainCalculate; virtual;
- procedure Offset(AItemCountDelta: Integer); overload; virtual;
- procedure Offset(DX, DY: Integer); overload; virtual;
- procedure Paint;
- property AutoDataRecordHeight: Boolean read GetAutoDataRecordHeight;
- property AutoRecordHeight: Boolean read GetAutoRecordHeight;
- property BackgroundBitmap: TBitmap read FBackgroundBitmap write FBackgroundBitmap;
- property Bounds: TRect read FBounds;
- property ContentBounds: TRect read FContentBounds;
- property Count: Integer read GetCount;
- property GridView: TcxCustomGridTableView read GetGridView;
- property Items[Index: Integer]: TcxCustomGridRecordViewInfo read GetItem; default;
- property ItemsOffset: Integer read FItemsOffset;
- property VisibleCount: Integer read FVisibleCount;
- end;
- // view
- TcxNavigatorSiteViewInfoClass = class of TcxNavigatorSiteViewInfo;
- TcxNavigatorSiteViewInfo = class(TcxCustomGridViewCellViewInfo)
- private
- function GetGridViewInfo: TcxCustomGridTableViewInfo;
- function GetNavigatorViewInfo: TcxNavigatorViewInfo;
- protected
- function CalculateHeight: Integer; override;
- function CalculateWidth: Integer; override;
- function GetHitTestClass: TcxCustomGridHitTestClass; override;
- function GetHotTrack: Boolean; override;
- function GetPainterClass: TcxCustomGridCellPainterClass; override;
- function GetVisible: Boolean; override;
- procedure MouseLeave; override;
- procedure GetViewParams(var AParams: TcxViewParams); override;
- function GetWidth: Integer; override;
- public
- function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton;
- AShift: TShiftState): Boolean; override;
- function MouseMove(AHitTest: TcxCustomGridHitTest; AShift: TShiftState): Boolean; override;
- function MouseUp(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton;
- AShift: TShiftState): Boolean; override;
- property GridViewInfo: TcxCustomGridTableViewInfo read GetGridViewInfo;
- property NavigatorViewInfo: TcxNavigatorViewInfo read GetNavigatorViewInfo;
- end;
- TcxCustomGridTableViewInfo = class(TcxCustomGridViewInfo, IcxNavigatorOwner)
- private
- FAllowCheckCoordinates: Boolean;
- FCalculateDown: Boolean;
- FFilterViewInfo: TcxGridFilterViewInfo;
- FFirstRecordIndex: Integer;
- FNavigatorSize: TPoint;
- FNavigatorSiteViewInfo: TcxNavigatorSiteViewInfo;
- FNavigatorViewInfo: TcxNavigatorViewInfo;
- FParts: TList;
- FRecordsViewInfo: TcxCustomGridRecordsViewInfo;
- function GetController: TcxCustomGridTableController;
- function GetExpandButtonSize: Integer;
- function GetFirstRecordIndex: Integer;
- function GetGridView: TcxCustomGridTableView;
- function GetPart(Index: Integer): TcxCustomGridPartViewInfo;
- function GetPartCount: Integer;
- function GetPartsBottomHeight: Integer;
- function GetPartsCustomHeight(AAlignment: TcxGridPartAlignment): Integer;
- function GetPartsTopHeight: Integer;
- function GetScrollableAreaWidth: Integer;
- function GetViewData: TcxCustomGridTableViewData;
- function GetVisibleRecordCount: Integer;
- procedure AddPart(AItem: TcxCustomGridPartViewInfo);
- procedure RemovePart(AItem: TcxCustomGridPartViewInfo);
- protected
- // IcxNavigatorOwner
- function GetNavigatorBounds: TRect; virtual;
- function GetNavigatorButtons: TcxCustomNavigatorButtons;
- function GetNavigatorCanvas: TCanvas;
- function GetNavigatorControl: TWinControl;
- function GetNavigatorFocused: Boolean;
- function GetNavigatorLookAndFeel: TcxLookAndFeel;
- function GetNavigatorOwner: TComponent;
- function GetNavigatorShowHint: Boolean;
- function GetNavigatorTabStop: Boolean;
- procedure NavigatorButtonsStateChanged;
- procedure NavigatorChanged(AChangeType: TcxNavigatorChangeType);
- procedure RefreshNavigator;
- procedure CreateViewInfos; override;
- procedure DestroyViewInfos(AIsRecreating: Boolean); override;
- procedure AfterCalculating; override;
- procedure AfterOffset; virtual;
- procedure BeforeOffset; virtual;
- procedure Calculate; override;
- function CalculateClientBounds: TRect; override;
- function CalculatePartBounds(APart: TcxCustomGridPartViewInfo): TRect; virtual;
- function CalculateVisibleEqualHeightRecordCount: Integer; virtual;
- procedure ControlFocusChanged; override;
- function GetDefaultGridModeBufferCount: Integer; virtual;
- procedure GetHScrollBarBounds(var ABounds: TRect); override;
- function GetFilterViewInfoClass: TcxGridFilterViewInfoClass; virtual;
- function GetIsInternalUse: Boolean; override;
- function GetNavigatorOffset: Integer; virtual;
- function GetNavigatorSiteBounds: TRect; virtual;
- function GetNavigatorSiteViewInfoClass: TcxNavigatorSiteViewInfoClass; virtual;
- function GetNavigatorViewInfoClass: TcxNavigatorViewInfoClass; virtual;
- function GetNoDataInfoTextAreaBounds: TRect; virtual;
- procedure GetNoDataInfoTextParams(out AParams: TcxViewParams); virtual;
- function GetNoDataInfoTextAreaVisible: Boolean; virtual;
- function GetNonRecordsAreaHeight(ACheckScrollBar: Boolean): Integer; virtual;
- function GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; virtual; abstract;
- function GetScrollableAreaBounds: TRect; virtual;
- function GetScrollableAreaBoundsForEdit: TRect; virtual;
- function GetScrollableAreaBoundsHorz: TRect; virtual;
- function GetScrollableAreaBoundsVert: TRect; virtual;
- function FirstRecordIndexAssigned: Boolean;
- procedure Offset(ARecordCountDelta: Integer); overload; virtual;
- procedure Offset(DX, DY: Integer); overload; virtual;
- procedure VisibilityChanged(AVisible: Boolean); override;
- function CanCheckCoordinates: Boolean; virtual;
- property AllowCheckCoordinates: Boolean read FAllowCheckCoordinates
- write FAllowCheckCoordinates;
- property Controller: TcxCustomGridTableController read GetController;
- property PartCount: Integer read GetPartCount;
- property Parts[Index: Integer]: TcxCustomGridPartViewInfo read GetPart;
- property ViewData: TcxCustomGridTableViewData read GetViewData;
- public
- constructor Create(AGridView: TcxCustomGridView); override;
- destructor Destroy; override;
- function CanOffset(ARecordCountDelta, DX, DY: Integer): Boolean; virtual;
- function CanOffsetView(ARecordCountDelta: Integer): Boolean; virtual;
- function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override;
- procedure DoOffset(ARecordCountDelta, DX, DY: Integer); virtual;
- // for extended lookup edit
- function GetNearestPopupHeight(AHeight: Integer; AAdditionalRecord: Boolean = False): Integer; virtual;
- function GetPopupHeight(ADropDownRecordCount: Integer): Integer; virtual;
- property CalculateDown: Boolean read FCalculateDown write FCalculateDown;
- property ExpandButtonSize: Integer read GetExpandButtonSize;
- property FilterViewInfo: TcxGridFilterViewInfo read FFilterViewInfo;
- property FirstRecordIndex: Integer read GetFirstRecordIndex write FFirstRecordIndex;
- property GridView: TcxCustomGridTableView read GetGridView;
- property NavigatorBounds: TRect read GetNavigatorBounds;
- property NavigatorOffset: Integer read GetNavigatorOffset;
- property NavigatorSize: TPoint read FNavigatorSize;
- property NavigatorSiteViewInfo: TcxNavigatorSiteViewInfo read FNavigatorSiteViewInfo;
- property NavigatorViewInfo: TcxNavigatorViewInfo read FNavigatorViewInfo;
- property NoDataInfoTextAreaBounds: TRect read GetNoDataInfoTextAreaBounds;
- property NoDataInfoTextAreaVisible: Boolean read GetNoDataInfoTextAreaVisible;
- property PartsBottomHeight: Integer read GetPartsBottomHeight;
- property PartsTopHeight: Integer read GetPartsTopHeight;
- property RecordsViewInfo: TcxCustomGridRecordsViewInfo read FRecordsViewInfo;
- property ScrollableAreaBounds: TRect read GetScrollableAreaBounds;
- property ScrollableAreaBoundsForEdit: TRect read GetScrollableAreaBoundsForEdit;
- property ScrollableAreaBoundsHorz: TRect read GetScrollableAreaBoundsHorz;
- property ScrollableAreaBoundsVert: TRect read GetScrollableAreaBoundsVert;
- property ScrollableAreaWidth: Integer read GetScrollableAreaWidth;
- property VisibleRecordCount: Integer read GetVisibleRecordCount;
- end;
- // cache
- TcxCustomGridTableViewInfoCacheItem = class(TcxCustomGridViewInfoCacheItem)
- private
- FHeight: Integer;
- FIsHeightAssigned: Boolean;
- function GetGridRecord: TcxCustomGridRecord;
- procedure SetHeight(Value: Integer);
- protected
- property GridRecord: TcxCustomGridRecord read GetGridRecord;
- public
- procedure UnassignValues(AKeepMaster: Boolean); override;
- property Height: Integer read FHeight write SetHeight;
- property IsHeightAssigned: Boolean read FIsHeightAssigned write FIsHeightAssigned;
- end;
- TcxCustomGridTableViewInfoCache = class(TcxCustomGridViewInfoCache)
- private
- function GetViewData: TcxCustomGridTableViewData;
- protected
- function GetItemClass(Index: Integer): TcxCustomGridViewInfoCacheItemClass; override;
- property ViewData: TcxCustomGridTableViewData read GetViewData;
- end;
- { view }
- // custom item
- TcxGridTableItemChange = (ticProperty, ticLayout, ticSize);
- TcxCustomGridTableItemCustomOptions = class(TPersistent)
- private
- FItem: TcxCustomGridTableItem;
- function GetGridView: TcxCustomGridTableView;
- protected
- procedure Changed(AChange: TcxGridTableItemChange = ticLayout); virtual;
- public
- constructor Create(AItem: TcxCustomGridTableItem); virtual;
- procedure Assign(Source: TPersistent); override;
- property GridView: TcxCustomGridTableView read GetGridView;
- property Item: TcxCustomGridTableItem read FItem;
- end;
- TcxGridItemShowEditButtons = (isebDefault, isebNever, isebAlways);
- TcxGridItemSortByDisplayText = (isbtDefault, isbtOn, isbtOff);
- TcxCustomGridTableItemOptionsClass = class of TcxCustomGridTableItemOptions;
- TcxCustomGridTableItemOptions = class(TcxCustomGridTableItemCustomOptions)
- private
- FEditing: Boolean;
- FFiltering: Boolean;
- FFilteringMRUItemsList: Boolean;
- FFocusing: Boolean;
- FGrouping: Boolean;
- FIncSearch: Boolean;
- FMoving: Boolean;
- FShowEditButtons: TcxGridItemShowEditButtons;
- FSortByDisplayText: TcxGridItemSortByDisplayText;
- FSorting: Boolean;
- procedure SetEditing(Value: Boolean);
- procedure SetFiltering(Value: Boolean);
- procedure SetFilteringMRUItemsList(Value: Boolean);
- procedure SetFocusing(Value: Boolean);
- procedure SetGrouping(Value: Boolean);
- procedure SetIncSearch(Value: Boolean);
- procedure SetMoving(Value: Boolean);
- procedure SetShowEditButtons(Value: TcxGridItemShowEditButtons);
- procedure SetSortByDisplayText(Value: TcxGridItemSortByDisplayText);
- procedure SetSorting(Value: Boolean);
- protected
- property Grouping: Boolean read FGrouping write SetGrouping default True;
- property Moving: Boolean read FMoving write SetMoving default True;
- property SortByDisplayText: TcxGridItemSortByDisplayText read FSortByDisplayText
- write SetSortByDisplayText default isbtDefault;
- property Sorting: Boolean read FSorting write SetSorting default True;
- public
- constructor Create(AItem: TcxCustomGridTableItem); override;
- procedure Assign(Source: TPersistent); override;
- published
- property Editing: Boolean read FEditing write SetEditing default True;
- property Filtering: Boolean read FFiltering write SetFiltering default True;
- property FilteringMRUItemsList: Boolean read FFilteringMRUItemsList
- write SetFilteringMRUItemsList default True;
- property Focusing: Boolean read FFocusing write SetFocusing default True;
- property IncSearch: Boolean read FIncSearch write SetIncSearch default True;
- property ShowEditButtons: TcxGridItemShowEditButtons read FShowEditButtons
- write SetShowEditButtons default isebDefault;
- end;
- TcxGridGetCellStyleEvent = procedure(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord;
- AItem: TcxCustomGridTableItem; {$IFDEF BCB}var{$ELSE}out{$ENDIF} AStyle: TcxStyle) of object;
- TcxGridGetRecordStyleEvent = procedure(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord;
- {$IFDEF BCB}var{$ELSE}out{$ENDIF} AStyle: TcxStyle) of object;
- TcxCustomGridTableItemStylesClass = class of TcxCustomGridTableItemStyles;
- TcxCustomGridTableItemStyles = class(TcxCustomGridStyles)
- private
- FOnGetContentStyle: TcxGridGetCellStyleEvent;
- function GetGridViewValue: TcxCustomGridTableView;
- function GetItem: TcxCustomGridTableItem;
- procedure SetOnGetContentStyle(Value: TcxGridGetCellStyleEvent);
- protected
- procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override;
- function GetGridView: TcxCustomGridView; override;
- public
- procedure Assign(Source: TPersistent); override;
- procedure GetContentParams(ARecord: TcxCustomGridRecord; out AParams: TcxViewParams); virtual;
- property GridView: TcxCustomGridTableView read GetGridViewValue;
- property Item: TcxCustomGridTableItem read GetItem;
- published
- property Content: TcxStyle index isContent read GetValue write SetValue;
- property OnGetContentStyle: TcxGridGetCellStyleEvent read FOnGetContentStyle write SetOnGetContentStyle;
- end;
- TcxGridSortOrder = TcxDataSortOrder;
- TcxGridTableDataCellCustomDrawEvent = procedure(Sender: TcxCustomGridTableView;
- ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean) of object;
- TcxGridGetDataTextEvent = procedure(Sender: TcxCustomGridTableItem;
- ARecordIndex: Integer; var AText: string) of object;
- TcxGridGetDisplayTextEvent = procedure(Sender: TcxCustomGridTableItem;
- ARecord: TcxCustomGridRecord; var AText: string) of object;
- TcxGridGetFilterDisplayTextEvent = procedure(Sender: TcxCustomGridTableItem;
- const AValue: Variant; var ADisplayText: string) of object;
- TcxGridGetFilterValuesEvent = procedure(Sender: TcxCustomGridTableItem;
- AValueList: TcxDataFilterValueList) of object;
- TcxGridGetPropertiesEvent = procedure(Sender: TcxCustomGridTableItem;
- ARecord: TcxCustomGridRecord; var AProperties: TcxCustomEditProperties) of object;
- TcxGridTableItemGetStoredPropertiesEvent = procedure(Sender: TcxCustomGridTableItem;
- AProperties: TStrings) of object;
- TcxGridTableItemGetStoredPropertyValueEvent = procedure(Sender: TcxCustomGridTableItem;
- const AName: string; var AValue: Variant) of object;
- TcxGridTableItemSetStoredPropertyValueEvent = procedure(Sender: TcxCustomGridTableItem;
- const AName: string; const AValue: Variant) of object;
- TcxGridUserFilteringEvent = procedure(Sender: TcxCustomGridTableItem;
- const AValue: Variant; const ADisplayText: string) of object;
- TcxCustomGridTableItemClass = class of TcxCustomGridTableItem;
- TcxCustomGridTableItem = class(TcxComponent, IcxEditRepositoryItemListener, IcxStoredObject)
- private
- FBestFitMaxWidth: Integer;
- FCaption: string;
- FCells: TList;
- FCellStyle: TcxEditStyle;
- FCellStyleUseCounter: Integer;
- FDataBinding: TcxGridItemDataBinding;
- FEditData: TcxCustomEditData;
- FEditViewData: TcxCustomEditViewData;
- FGridView: TcxCustomGridTableView;
- FHeaderAlignmentHorz: TAlignment;
- FHeaderAlignmentVert: TcxAlignmentVert;
- FHidden: Boolean;
- FID: Integer;
- FIgnoreLoadingStatus: Boolean;
- FIndex: Integer;
- FIsCaptionAssigned: Boolean;
- FIsHeaderAlignmentHorzAssigned: Boolean;
- FIsHeaderAlignmentVertAssigned: Boolean;
- FIsWidthAssigned: Boolean;
- FLastUsedDefaultRepositoryItem: TcxEditRepositoryItem;
- FMinWidth: Integer;
- FOptions: TcxCustomGridTableItemOptions;
- FProperties: TcxCustomEditProperties;
- FPropertiesClass: TcxCustomEditPropertiesClass;
- FPropertiesValue: TcxCustomEditProperties;
- FRepositoryItem: TcxEditRepositoryItem;
- FStyles: TcxCustomGridTableItemStyles;
- FVisible: Boolean;
- FVisibleIndex: Integer;
- FWasVisibleBeforeGrouping: Boolean;
- FWidth: Integer;
- FOnCustomDrawCell: TcxGridTableDataCellCustomDrawEvent;
- FOnGetDataText: TcxGridGetDataTextEvent;
- FOnGetDisplayText: TcxGridGetDisplayTextEvent;
- FOnGetFilterDisplayText: TcxGridGetFilterDisplayTextEvent;
- FOnGetFilterValues: TcxGridGetFilterValuesEvent;
- FOnGetProperties: TcxGridGetPropertiesEvent;
- FOnGetStoredProperties: TcxGridTableItemGetStoredPropertiesEvent;
- FOnGetStoredPropertyValue: TcxGridTableItemGetStoredPropertyValueEvent;
- FOnSetStoredPropertyValue: TcxGridTableItemSetStoredPropertyValueEvent;
- FOnUserFiltering: TcxGridUserFilteringEvent;
- FSubClassEvents: TNotifyEvent;
- function GetActualMinWidth: Integer;
- function GetCaption: string;
- function GetCell(Index: Integer): TcxGridTableDataCellViewInfo;
- function GetCellCount: Integer;
- function GetController: TcxCustomGridTableController;
- function GetDataController: TcxCustomDataController;
- function GetEditing: Boolean;
- function GetEditingProperties: TcxCustomEditProperties;
- function GetFilterCaption: string;
- function GetFiltered: Boolean;
- function GetFocused: Boolean;
- function GetGroupIndex: Integer;
- function GetHeaderAlignmentHorz: TAlignment;
- function GetHeaderAlignmentVert: TcxAlignmentVert;
- function GetIsLoading: Boolean;
- function GetIncSearching: Boolean;
- function GetIsDestroying: Boolean;
- function GetIsFirst: Boolean;
- function GetIsLast: Boolean;
- function GetIsReading: Boolean;
- function GetIsUpdating: Boolean;
- function GetMinWidth: Integer;
- function GetPropertiesClassName: string;
- function GetSortIndex: Integer;
- function GetSortOrder: TcxGridSortOrder;
- function GetTag: TTag;
- function GetViewData: TcxCustomGridTableViewData;
- function GetWidth: Integer;
- procedure SetBestFitMaxWidth(Value: Integer);
- procedure SetCaption(const Value: string);
- procedure SetDataBinding(Value: TcxGridItemDataBinding);
- procedure SetEditing(Value: Boolean);
- procedure SetFiltered(Value: Boolean);
- procedure SetFocused(Value: Boolean);
- procedure SetGroupIndex(Value: Integer);
- procedure SetHeaderAlignmentHorz(Value: TAlignment);
- procedure SetHeaderAlignmentVert(Value: TcxAlignmentVert);
- procedure SetHidden(Value: Boolean);
- procedure SetIndex(Value: Integer);
- procedure SetMinWidth(Value: Integer);
- procedure SetOnCustomDrawCell(Value: TcxGridTableDataCellCustomDrawEvent);
- procedure SetOnGetDataText(Value: TcxGridGetDataTextEvent);
- procedure SetOnGetDisplayText(Value: TcxGridGetDisplayTextEvent);
- procedure SetOnGetFilterDisplayText(Value: TcxGridGetFilterDisplayTextEvent);
- procedure SetOnGetFilterValues(Value: TcxGridGetFilterValuesEvent);
- procedure SetOnGetProperties(Value: TcxGridGetPropertiesEvent);
- procedure SetOnGetStoredProperties(Value: TcxGridTableItemGetStoredPropertiesEvent);
- procedure SetOnGetStoredPropertyValue(Value: TcxGridTableItemGetStoredPropertyValueEvent);
- procedure SetOnSetStoredPropertyValue(Value: TcxGridTableItemSetStoredPropertyValueEvent);
- procedure SetOnUserFiltering(Value: TcxGridUserFilteringEvent);
- procedure SetOptions(Value: TcxCustomGridTableItemOptions);
- procedure SetProperties(Value: TcxCustomEditProperties);
- procedure SetPropertiesClass(Value: TcxCustomEditPropertiesClass);
- procedure SetPropertiesClassName(const Value: string);
- procedure SetRepositoryItem(Value: TcxEditRepositoryItem);
- procedure SetSortIndex(Value: Integer);
- procedure SetSortOrder(Value: TcxGridSortOrder);
- procedure SetStyles(Value: TcxCustomGridTableItemStyles);
- procedure SetTag(Value: TTag);
- procedure SetVisible(Value: Boolean);
- procedure SetVisibleIndex(Value: Integer);
- procedure SetWidth(Value: Integer);
- procedure ReadIsCaptionAssigned(Reader: TReader);
- procedure WriteIsCaptionAssigned(Writer: TWriter);
- function IsCaptionStored: Boolean;
- function IsSortOrderStored: Boolean;
- function IsTagStored: Boolean;
- function IsWidthStored: Boolean;
- function GetDataBindingClass: TcxGridItemDataBindingClass;
- procedure CreateProperties;
- procedure DestroyProperties;
- procedure RecreateProperties;
- protected
- procedure DefineProperties(Filer: TFiler); override;
- procedure SetParentComponent(AParent: TComponent); override;
- // IcxEditRepositoryItemListener
- procedure ItemRemoved(Sender: TcxEditRepositoryItem);
- procedure IcxEditRepositoryItemListener.PropertiesChanged = RepositoryItemPropertiesChanged;
- procedure RepositoryItemPropertiesChanged(Sender: TcxEditRepositoryItem); virtual;
- // IcxStoredObject
- function GetObjectName: string; virtual;
- function IcxStoredObject.GetProperties = GetStoredProperties;
- function GetStoredProperties(AProperties: TStrings): Boolean; virtual;
- procedure GetPropertyValue(const AName: string; var AValue: Variant); virtual;
- procedure SetPropertyValue(const AName: string; const AValue: Variant); virtual;
- procedure CreateDataBinding; virtual;
- procedure DestroyDataBinding; virtual;
- procedure CreateSubClasses; virtual;
- procedure DestroySubClasses; virtual;
- function IsHeaderAlignmentHorzStored: Boolean;
- function IsHeaderAlignmentVertStored: Boolean;
- function CalculateBestFitWidth: Integer; virtual;
- function CanAutoHeight: Boolean; virtual;
- function CanEdit: Boolean; virtual;
- function CanFilter(ACheckGridViewOptions: Boolean): Boolean; virtual;
- function CanFilterMRUValueItems: Boolean; virtual;
- function CanFocus(ARecord: TcxCustomGridRecord): Boolean; virtual;
- function CanGroup: Boolean; virtual;
- function CanHide: Boolean; virtual;
- function CanHorzSize: Boolean; virtual;
- function CanIncSearch: Boolean; virtual;
- function CanInitEditing: Boolean; virtual;
- function CanMove: Boolean; virtual;
- function CanScroll: Boolean; virtual;
- function CanSort: Boolean; virtual;
- procedure CaptionChanged; virtual;
- procedure Changed(AChange: TcxGridTableItemChange); virtual;
- procedure ChangeGroupIndex(Value: Integer);
- procedure ChangeSortIndex(Value: Integer);
- procedure CheckWidthValue(var Value: Integer);
- procedure DataChanged; virtual;
- procedure ForceWidth(Value: Integer); virtual;
- function GetActuallyVisible: Boolean; virtual;
- function GetBestFitWidth: Integer; virtual;
- function GetEditPartVisible: Boolean; virtual;
- function GetEditValue: Variant; virtual;
- function GetFilterable: Boolean; virtual;
- procedure GetFilterDisplayText(const AValue: Variant; var ADisplayText: string); virtual;
- function GetFixed: Boolean; virtual;
- function GetFocusedCellViewInfo: TcxGridTableDataCellViewInfo; virtual;
- function GetHidden: Boolean; virtual;
- function GetMultiLine: Boolean; virtual;
- function GetPropertiesValue: TcxCustomEditProperties;
- function GetVisible: Boolean; virtual;
- function GetVisibleCaption: string; virtual;
- function GetVisibleIndex: Integer;
- function GetVisibleInQuickCustomizationPopup: Boolean; virtual;
- function HasCustomDrawCell: Boolean;
- function HasFixedWidth: Boolean; virtual;
- procedure HiddenChanged; virtual;
- procedure InitProperties(AProperties: TcxCustomEditProperties); virtual;
- function IsHiddenStored: Boolean; virtual;
- function IsSortingByDisplayText(ASortByDisplayText: Boolean): Boolean;
- function IsVisibleStored: Boolean; virtual;
- procedure PropertiesChanged; virtual;
- procedure PropertiesChangedHandler(Sender: TObject); virtual;
- procedure PropertiesValueChanged;
- procedure RecalculateDefaultWidth;
- procedure SetEditValue(const Value: Variant); virtual;
- procedure SetGridView(Value: TcxCustomGridTableView); virtual;
- function ShowButtons(AFocused: Boolean): Boolean; virtual;
- function ShowOnUngrouping: Boolean; virtual;
- function UseOwnProperties: Boolean;
- procedure ValueTypeClassChanged; virtual;
- function GetOptionsClass: TcxCustomGridTableItemOptionsClass; virtual;
- function GetStylesClass: TcxCustomGridTableItemStylesClass; virtual;
- function DefaultCaption: string; virtual;
- function DefaultHeaderAlignmentHorz: TAlignment;
- function DefaultHeaderAlignmentVert: TcxAlignmentVert;
- function DefaultRepositoryItem: TcxEditRepositoryItem;
- function DefaultWidth: Integer; virtual;
- function GetCellStyle: TcxEditStyle;
- procedure InitStyle(AStyle: TcxCustomEditStyle; const AParams: TcxViewParams;
- AFocused: Boolean); virtual;
- procedure ReleaseCellStyle;
- procedure AddCell(ACell: TcxGridTableDataCellViewInfo);
- procedure RemoveCell(ACell: TcxGridTableDataCellViewInfo);
- property CellCount: Integer read GetCellCount;
- property Cells[Index: Integer]: TcxGridTableDataCellViewInfo read GetCell;
- function CreateEditViewData(AProperties: TcxCustomEditProperties): TcxCustomEditViewData;
- procedure DestroyEditViewData(var AEditViewData: TcxCustomEditViewData);
- procedure DoCreateEditViewData;
- procedure DoDestroyEditViewData;
- procedure EditViewDataGetDisplayTextHandler(Sender: TcxCustomEditViewData; var AText: string);
- function GetEditViewData(AProperties: TcxCustomEditProperties;
- out AIsLocalCopy: Boolean): TcxCustomEditViewData;
- procedure ReleaseEditViewData(var AEditViewData: TcxCustomEditViewData; AIsLocalCopy: Boolean);
- property EditViewData: TcxCustomEditViewData read FEditViewData;
- procedure DoCustomDrawCell(ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
- var ADone: Boolean); virtual;
- procedure DoGetDataText(ARecordIndex: Integer; var AText: string); virtual;
- procedure DoGetDisplayText(ARecord: TcxCustomGridRecord; var AText: string); virtual;
- procedure DoGetFilterValues(AValueList: TcxDataFilterValueList); virtual;
- function DoGetProperties(ARecord: TcxCustomGridRecord): TcxCustomEditProperties; virtual;
- procedure DoUserFiltering(const AValue: Variant; const ADisplayText: string); virtual;
- function HasDataTextHandler: Boolean;
- function HasCustomPropertiesHandler: Boolean;
- property IsDestroying: Boolean read GetIsDestroying;
- property IsLoading: Boolean read GetIsLoading;
- property IsReading: Boolean read GetIsReading;
- property IsUpdating: Boolean read GetIsUpdating;
- property ActualMinWidth: Integer read GetActualMinWidth;
- property Controller: TcxCustomGridTableController read GetController;
- property DataController: TcxCustomDataController read GetDataController;
- property EditingProperties: TcxCustomEditProperties read GetEditingProperties;
- property EditPartVisible: Boolean read GetEditPartVisible;
- property Filterable: Boolean read GetFilterable;
- property FilterCaption: string read GetFilterCaption;
- property Filtered: Boolean read GetFiltered write SetFiltered;
- property Fixed: Boolean read GetFixed;
- property GroupIndex: Integer read GetGroupIndex write SetGroupIndex default -1;
- property HeaderAlignmentHorz: TAlignment read GetHeaderAlignmentHorz write SetHeaderAlignmentHorz
- stored IsHeaderAlignmentHorzStored;
- property HeaderAlignmentVert: TcxAlignmentVert read GetHeaderAlignmentVert
- write SetHeaderAlignmentVert stored IsHeaderAlignmentVertStored;
- property Hidden: Boolean read GetHidden write SetHidden stored IsHiddenStored;
- property IgnoreLoadingStatus: Boolean read FIgnoreLoadingStatus write FIgnoreLoadingStatus;
- property InternalVisible: Boolean read FVisible;
- property MinWidth: Integer read GetMinWidth write SetMinWidth
- default cxGridItemDefaultMinWidth;
- property MultiLine: Boolean read GetMultiLine;
- property ViewData: TcxCustomGridTableViewData read GetViewData;
- property VisibleInQuickCustomizationPopup: Boolean read GetVisibleInQuickCustomizationPopup;
- property WasVisibleBeforeGrouping: Boolean read FWasVisibleBeforeGrouping;
- property Width: Integer read GetWidth write SetWidth stored IsWidthStored;
- property OnGetFilterDisplayText: TcxGridGetFilterDisplayTextEvent read FOnGetFilterDisplayText
- write SetOnGetFilterDisplayText;
- property OnGetFilterValues: TcxGridGetFilterValuesEvent read FOnGetFilterValues write SetOnGetFilterValues;
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Assign(Source: TPersistent); override;
- function GetParentComponent: TComponent; override;
- function HasParent: Boolean; override;
- procedure ApplyBestFit; virtual;
- function CalculateDefaultCellHeight(ACanvas: TcxCanvas; AFont: TFont): Integer; virtual;
- function CreateEditStyle: TcxEditStyle; virtual;
- procedure FocusWithSelection; virtual;
- function GetDefaultValuesProvider(AProperties: TcxCustomEditProperties = nil): IcxEditDefaultValuesProvider;
- function GetProperties: TcxCustomEditProperties; overload;
- function GetProperties(ARecord: TcxCustomGridRecord): TcxCustomEditProperties; overload;
- function GetRepositoryItem: TcxEditRepositoryItem;
- procedure RestoreDefaults; virtual;
- property ActuallyVisible: Boolean read GetActuallyVisible;
- property BestFitMaxWidth: Integer read FBestFitMaxWidth write SetBestFitMaxWidth default 0;
- property Editing: Boolean read GetEditing write SetEditing;
- property EditValue: Variant read GetEditValue write SetEditValue;
- property Focused: Boolean read GetFocused write SetFocused;
- property FocusedCellViewInfo: TcxGridTableDataCellViewInfo read GetFocusedCellViewInfo;
- property GridView: TcxCustomGridTableView read FGridView;
- property Hideable: Boolean read CanHide;
- property ID: Integer read FID;
- property IncSearching: Boolean read GetIncSearching;
- property Index: Integer read FIndex write SetIndex;
- property IsFirst: Boolean read GetIsFirst;
- property IsLast: Boolean read GetIsLast;
- property Options: TcxCustomGridTableItemOptions read FOptions write SetOptions;
- property PropertiesClass: TcxCustomEditPropertiesClass read FPropertiesClass write SetPropertiesClass;
- property SortIndex: Integer read GetSortIndex write SetSortIndex default -1;
- property SortOrder: TcxGridSortOrder read GetSortOrder write SetSortOrder stored IsSortOrderStored;
- property Styles: TcxCustomGridTableItemStyles read FStyles write SetStyles;
- property VisibleCaption: string read GetVisibleCaption;
- property VisibleIndex: Integer read FVisibleIndex write SetVisibleIndex;
- published
- property Caption: string read GetCaption write SetCaption stored IsCaptionStored;
- property DataBinding: TcxGridItemDataBinding read FDataBinding write SetDataBinding;
- property PropertiesClassName: string read GetPropertiesClassName write SetPropertiesClassName;
- property Properties: TcxCustomEditProperties read FProperties write SetProperties;
- property RepositoryItem: TcxEditRepositoryItem read FRepositoryItem write SetRepositoryItem;
- property Visible: Boolean read GetVisible write SetVisible stored IsVisibleStored default True;
- property PropertiesEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents;
- property StylesEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents;
- property Tag: TTag read GetTag write SetTag stored IsTagStored;
- property OnCustomDrawCell: TcxGridTableDataCellCustomDrawEvent read FOnCustomDrawCell write SetOnCustomDrawCell;
- property OnGetDataText: TcxGridGetDataTextEvent read FOnGetDataText write SetOnGetDataText;
- property OnGetDisplayText: TcxGridGetDisplayTextEvent read FOnGetDisplayText write SetOnGetDisplayText;
- property OnGetProperties: TcxGridGetPropertiesEvent read FOnGetProperties write SetOnGetProperties;
- property OnGetStoredProperties: TcxGridTableItemGetStoredPropertiesEvent
- read FOnGetStoredProperties write SetOnGetStoredProperties;
- property OnGetStoredPropertyValue: TcxGridTableItemGetStoredPropertyValueEvent
- read FOnGetStoredPropertyValue write SetOnGetStoredPropertyValue;
- property OnSetStoredPropertyValue: TcxGridTableItemSetStoredPropertyValueEvent
- read FOnSetStoredPropertyValue write SetOnSetStoredPropertyValue;
- property OnUserFiltering: TcxGridUserFilteringEvent read FOnUserFiltering write SetOnUserFiltering;
- end;
- // grid view options
- TcxCustomGridTableBackgroundBitmaps = class(TcxCustomGridBackgroundBitmaps)
- protected
- function GetBitmapStyleIndex(Index: Integer): Integer; override;
- public
- procedure Assign(Source: TPersistent); override;
- published
- property Content: TBitmap index bbContent read GetValue write SetValue;
- property FilterBox: TBitmap index bbFilterBox read GetValue write SetValue;
- end;
- TcxGridFilterMRUItem = class(TcxMRUItem)
- private
- function GetCaption: string;
- protected
- function StreamEquals(AStream: TMemoryStream): Boolean;
- public
- Filter: TcxDataFilterCriteria;
- constructor Create(AFilter: TcxDataFilterCriteria);
- destructor Destroy; override;
- procedure AssignTo(AFilter: TcxDataFilterCriteria);
- function Equals(AItem: TcxMRUItem): Boolean; override;
- function FilterEquals(AFilter: TcxDataFilterCriteria): Boolean;
- function GetStream: TMemoryStream;
- property Caption: string read GetCaption;
- end;
- TcxGridFilterMRUItemsClass = class of TcxGridFilterMRUItems;
- TcxGridFilterMRUItems = class(TcxMRUItems)
- private
- FFiltering: TcxCustomGridTableFiltering;
- FVisibleItems: TList;
- function GetItem(Index: Integer): TcxGridFilterMRUItem;
- function GetVisibleCount: Integer;
- function GetVisibleItem(Index: Integer): TcxGridFilterMRUItem;
- protected
- procedure DeleteEmptyItems;
- procedure FilterChanged;
- procedure RefreshVisibleItemsList;
- public
- constructor Create(AFiltering: TcxCustomGridTableFiltering); reintroduce; virtual;
- destructor Destroy; override;
- procedure Add(AFilter: TcxDataFilterCriteria);
- property Filtering: TcxCustomGridTableFiltering read FFiltering;
- property Items[Index: Integer]: TcxGridFilterMRUItem read GetItem; default;
- property VisibleCount: Integer read GetVisibleCount;
- property VisibleItems[Index: Integer]: TcxGridFilterMRUItem read GetVisibleItem;
- end;
- TcxGridFilterPosition = (fpTop, fpBottom);
- TcxGridFilterVisible = (fvNever, fvNonEmpty, fvAlways);
- TcxCustomGridTableFilteringClass = class of TcxCustomGridTableFiltering;
- TcxCustomGridTableFiltering = class(TcxCustomGridOptions)
- private
- FCustomizeDialog: Boolean;
- FDropDownWidth: Integer;
- FItemMRUItemsList: Boolean;
- FItemMRUItemsListCount: Integer;
- FMaxDropDownCount: Integer;
- FMRUItems: TcxGridFilterMRUItems;
- FMRUItemsList: Boolean;
- FMRUItemsListCount: Integer;
- FMRUItemsListDropDownCount: Integer;
- FPosition: TcxGridFilterPosition;
- FVisible: TcxGridFilterVisible;
- function GetGridView: TcxCustomGridTableView;
- procedure SetCustomizeDialog(Value: Boolean);
- procedure SetDropDownWidth(Value: Integer);
- procedure SetItemMRUItemsList(Value: Boolean);
- procedure SetItemMRUItemsListCount(Value: Integer);
- procedure SetMaxDropDownCount(Value: Integer);
- procedure SetMRUItemsList(Value: Boolean);
- procedure SetMRUItemsListCount(Value: Integer);
- procedure SetMRUItemsListDropDownCount(Value: Integer);
- procedure SetPosition(Value: TcxGridFilterPosition);
- procedure SetVisible(Value: TcxGridFilterVisible);
- procedure FilterControlDialogApply(Sender: TObject);
- protected
- procedure FilterChanged; virtual;
- function GetMRUItemsClass: TcxGridFilterMRUItemsClass; virtual;
- function IsMRUItemsListAvailable: Boolean; virtual;
- procedure MRUItemsVisibleCountChanged(AOldCount, ANewCount: Integer); virtual;
- property CustomizeDialog: Boolean read FCustomizeDialog write SetCustomizeDialog default True;
- property DropDownWidth: Integer read FDropDownWidth write SetDropDownWidth default 0;
- property ItemMRUItemsList: Boolean read FItemMRUItemsList write SetItemMRUItemsList default True;
- property ItemMRUItemsListCount: Integer read FItemMRUItemsListCount write SetItemMRUItemsListCount
- default cxGridFilterDefaultItemMRUItemsListCount;
- property MaxDropDownCount: Integer read FMaxDropDownCount write SetMaxDropDownCount
- default cxGridFilterDefaultMaxDropDownCount;
- property MRUItemsList: Boolean read FMRUItemsList write SetMRUItemsList default True;
- property MRUItemsListCount: Integer read FMRUItemsListCount write SetMRUItemsListCount
- default cxGridFilterDefaultMRUItemsListCount;
- property MRUItemsListDropDownCount: Integer read FMRUItemsListDropDownCount
- write SetMRUItemsListDropDownCount default 0;
- property Position: TcxGridFilterPosition read FPosition write SetPosition default fpBottom;
- property Visible: TcxGridFilterVisible read FVisible write SetVisible default fvNonEmpty;
- public
- constructor Create(AGridView: TcxCustomGridView); override;
- destructor Destroy; override;
- procedure AddFilterToMRUItems(AFilter: TcxDataFilterCriteria = nil);
- procedure Assign(Source: TPersistent); override;
- function GetDropDownCount(AItemCount: Integer): Integer;
- procedure RunCustomizeDialog(AItem: TcxCustomGridTableItem = nil);
- property GridView: TcxCustomGridTableView read GetGridView;
- property MRUItems: TcxGridFilterMRUItems read FMRUItems;
- end;
- TcxGridDragFocusing = (dfNone, dfDragOver, dfDragDrop);
- TcxCustomGridTableOptionsBehavior = class(TcxCustomGridOptionsBehavior)
- private
- FAlwaysShowEditor: Boolean;
- FBestFitMaxRecordCount: Integer;
- FCellHints: Boolean;
- FCopyCaptionsToClipboard: Boolean;
- FDragDropText: Boolean;
- FDragFocusing: TcxGridDragFocusing;
- FDragHighlighting: Boolean;
- FDragOpening: Boolean;
- FDragScrolling: Boolean;
- FFocusCellOnCycle: Boolean;
- FFocusCellOnTab: Boolean;
- FFocusFirstCellOnNewRecord: Boolean;
- FGoToNextCellOnEnter: Boolean;
- FImmediateEditor: Boolean;
- FIncSearch: Boolean;
- FIncSearchItem: TcxCustomGridTableItem;
- FNavigatorHints: Boolean;
- FPullFocusing: Boolean;
- function GetGridView: TcxCustomGridTableView;
- procedure SetAlwaysShowEditor(Value: Boolean);
- procedure SetBestFitMaxRecordCount(Value: Integer);
- procedure SetCellHints(Value: Boolean);
- procedure SetCopyCaptionsToClipboard(Value: Boolean);
- procedure SetDragDropText(Value: Boolean);
- procedure SetDragFocusing(Value: TcxGridDragFocusing);
- procedure SetDragHighlighting(Value: Boolean);
- procedure SetDragOpening(Value: Boolean);
- procedure SetDragScrolling(Value: Boolean);
- procedure SetFocusCellOnCycle(Value: Boolean);
- procedure SetFocusCellOnTab(Value: Boolean);
- procedure SetFocusFirstCellOnNewRecord(Value: Boolean);
- procedure SetGoToNextCellOnEnter(Value: Boolean);
- procedure SetImmediateEditor(Value: Boolean);
- procedure SetIncSearch(Value: Boolean);
- procedure SetIncSearchItem(Value: TcxCustomGridTableItem);
- procedure SetNavigatorHints(Value: Boolean);
- procedure SetPullFocusing(Value: Boolean);
- protected
- property FocusCellOnCycle: Boolean read FFocusCellOnCycle write SetFocusCellOnCycle default False;
- property PullFocusing: Boolean read FPullFocusing write SetPullFocusing default False;
- public
- constructor Create(AGridView: TcxCustomGridView); override;
- procedure Assign(Source: TPersistent); override;
- property BestFitMaxRecordCount: Integer read FBestFitMaxRecordCount write SetBestFitMaxRecordCount default 0;
- property GridView: TcxCustomGridTableView read GetGridView;
- published
- property AlwaysShowEditor: Boolean read FAlwaysShowEditor write SetAlwaysShowEditor default False;
- property CellHints: Boolean read FCellHints write SetCellHints default False;
- property CopyCaptionsToClipboard: Boolean read FCopyCaptionsToClipboard write SetCopyCaptionsToClipboard default True;
- property DragDropText: Boolean read FDragDropText write SetDragDropText default False;
- property DragFocusing: TcxGridDragFocusing read FDragFocusing write SetDragFocusing default dfNone;
- property DragHighlighting: Boolean read FDragHighlighting write SetDragHighlighting default True;
- property DragOpening: Boolean read FDragOpening write SetDragOpening default True;
- property DragScrolling: Boolean read FDragScrolling write SetDragScrolling default True;
- property FocusCellOnTab: Boolean read FFocusCellOnTab write SetFocusCellOnTab default False;
- property FocusFirstCellOnNewRecord: Boolean read FFocusFirstCellOnNewRecord
- write SetFocusFirstCellOnNewRecord default False;
- property GoToNextCellOnEnter: Boolean read FGoToNextCellOnEnter write SetGoToNextCellOnEnter default False;
- property ImmediateEditor: Boolean read FImmediateEditor write SetImmediateEditor default True;
- property IncSearch: Boolean read FIncSearch write SetIncSearch default False;
- property IncSearchItem: TcxCustomGridTableItem read FIncSearchItem write SetIncSearchItem;
- property NavigatorHints: Boolean read FNavigatorHints write SetNavigatorHints default False;
- end;
- TcxCustomGridTableOptionsCustomizeClass = class of TcxCustomGridTableOptionsCustomize;
- TcxCustomGridTableOptionsCustomize = class(TcxCustomGridOptions)
- private
- FItemFiltering: Boolean;
- FItemGrouping: Boolean;
- FItemHiding: Boolean;
- FItemMoving: Boolean;
- FItemSorting: Boolean;
- FItemsQuickCustomization: Boolean;
- FItemsQuickCustomizationMaxDropDownCount: Integer;
- procedure SetItemFiltering(Value: Boolean);
- procedure SetItemGrouping(Value: Boolean);
- procedure SetItemHiding(Value: Boolean);
- procedure SetItemMoving(Value: Boolean);
- procedure SetItemSorting(Value: Boolean);
- procedure SetItemsQuickCustomization(Value: Boolean);
- procedure SetItemsQuickCustomizationMaxDropDownCount(Value: Integer);
- protected
- property ItemFiltering: Boolean read FItemFiltering write SetItemFiltering default True;
- property ItemGrouping: Boolean read FItemGrouping write SetItemGrouping default True;
- property ItemHiding: Boolean read FItemHiding write SetItemHiding default False; {2m}
- property ItemMoving: Boolean read FItemMoving write SetItemMoving default True;
- property ItemSorting: Boolean read FItemSorting write SetItemSorting default True;
- property ItemsQuickCustomization: Boolean read FItemsQuickCustomization
- write SetItemsQuickCustomization default False; {3}
- property ItemsQuickCustomizationMaxDropDownCount: Integer read FItemsQuickCustomizationMaxDropDownCount
- write SetItemsQuickCustomizationMaxDropDownCount default 0; {3}
- public
- constructor Create(AGridView: TcxCustomGridView); override;
- procedure Assign(Source: TPersistent); override;
- end;
- TcxCustomGridTableOptionsData = class(TcxCustomGridOptionsData)
- private
- FAppending: Boolean;
- FCancelOnExit: Boolean;
- FDeleting: Boolean;
- FDeletingConfirmation: Boolean;
- FEditing: Boolean;
- FInserting: Boolean;
- function GetGridView: TcxCustomGridTableView;
- procedure SetAppending(Value: Boolean);
- procedure SetCancelOnExit(Value: Boolean);
- procedure SetDeleting(Value: Boolean);
- procedure SetDeletingConfirmation(Value: Boolean);
- procedure SetEditing(Value: Boolean);
- procedure SetInserting(Value: Boolean);
- public
- constructor Create(AGridView: TcxCustomGridView); override;
- procedure Assign(Source: TPersistent); override;
- property GridView: TcxCustomGridTableView read GetGridView;
- published
- property Appending: Boolean read FAppending write SetAppending default False;
- property CancelOnExit: Boolean read FCancelOnExit write SetCancelOnExit default True;
- property Deleting: Boolean read FDeleting write SetDeleting default True;
- property DeletingConfirmation: Boolean read FDeletingConfirmation
- write SetDeletingConfirmation default True;
- property Editing: Boolean read FEditing write SetEditing default True;
- property Inserting: Boolean read FInserting write SetInserting default True;
- end;
- TcxCustomGridTableOptionsSelection = class(TcxCustomGridOptionsSelection)
- private
- FCellSelect: Boolean;
- FHideFocusRectOnExit: Boolean;
- FHideSelection: Boolean;
- FInvertSelect: Boolean;
- FUnselectFocusedRecordOnExit: Boolean;
- function GetGridView: TcxCustomGridTableView;
- function GetMultiSelect: Boolean;
- procedure SetHideFocusRectOnExit(Value: Boolean);
- procedure SetHideSelection(Value: Boolean);
- procedure SetUnselectFocusedRecordOnExit(Value: Boolean);
- protected
- function IsInvertSelectStored: Boolean; virtual;
- function IsMultiSelectStored: Boolean; virtual;
- procedure SetCellSelect(Value: Boolean); virtual;
- procedure SetInvertSelect(Value: Boolean); virtual;
- procedure SetMultiSelect(Value: Boolean); virtual;
- property GridView: TcxCustomGridTableView read GetGridView;
- public
- constructor Create(AGridView: TcxCustomGridView); override;
- procedure Assign(Source: TPersistent); override;
- published
- property CellSelect: Boolean read FCellSelect write SetCellSelect default True;
- property HideFocusRect: Boolean read FHideFocusRectOnExit write SetHideFocusRectOnExit stored False; // for compatibility
- property HideFocusRectOnExit: Boolean read FHideFocusRectOnExit write SetHideFocusRectOnExit default True;
- property HideSelection: Boolean read FHideSelection write SetHideSelection default False;
- property InvertSelect: Boolean read FInvertSelect write SetInvertSelect stored IsInvertSelectStored;
- property MultiSelect: Boolean read GetMultiSelect write SetMultiSelect stored IsMultiSelectStored;
- property UnselectFocusedRecordOnExit: Boolean read FUnselectFocusedRecordOnExit
- write SetUnselectFocusedRecordOnExit default True;
- end;
- TcxGridShowEditButtons = (gsebNever, gsebForFocusedRecord, gsebAlways);
- TcxCustomGridTableOptionsView = class(TcxCustomGridOptionsView)
- private
- FCellAutoHeight: Boolean;
- FCellEndEllipsis: Boolean;
- FCellTextMaxLineCount: Integer;
- FFocusRect: Boolean;
- FItemCaptionAutoHeight: Boolean;
- FItemCaptionEndEllipsis: Boolean;
- FNavigator: Boolean;
- FNavigatorOffset: Integer;
- FShowEditButtons: TcxGridShowEditButtons;
- function GetGridView: TcxCustomGridTableView;
- procedure SetCellAutoHeight(Value: Boolean);
- procedure SetCellEndEllipsis(Value: Boolean);
- procedure SetCellTextMaxLineCount(Value: Integer);
- procedure SetFocusRect(Value: Boolean);
- procedure SetItemCaptionAutoHeight(Value: Boolean);
- procedure SetItemCaptionEndEllipsis(Value: Boolean);
- procedure SetNavigator(Value: Boolean);
- procedure SetNavigatorOffset(Value: Integer);
- procedure SetShowEditButtons(Value: TcxGridShowEditButtons);
- protected
- procedure ItemCaptionAutoHeightChanged; dynamic;
- property CellAutoHeight: Boolean read FCellAutoHeight write SetCellAutoHeight default False;
- property CellTextMaxLineCount: Integer read FCellTextMaxLineCount write SetCellTextMaxLineCount default 0;
- property ItemCaptionAutoHeight: Boolean read FItemCaptionAutoHeight
- write SetItemCaptionAutoHeight default False;
- property ItemCaptionEndEllipsis: Boolean read FItemCaptionEndEllipsis
- write SetItemCaptionEndEllipsis default False;
- public
- constructor Create(AGridView: TcxCustomGridView); override;
- procedure Assign(Source: TPersistent); override;
- property GridView: TcxCustomGridTableView read GetGridView;
- published
- property CellEndEllipsis: Boolean read FCellEndEllipsis write SetCellEndEllipsis
- default False;
- property FocusRect: Boolean read FFocusRect write SetFocusRect default True;
- property Navigator: Boolean read FNavigator write SetNavigator default False;
- property NavigatorOffset: Integer read FNavigatorOffset write SetNavigatorOffset default cxGridNavigatorDefaultOffset;
- property ShowEditButtons: TcxGridShowEditButtons read FShowEditButtons
- write SetShowEditButtons default gsebNever;
- end;
- TcxGridDataCellPos = class
- GridRecord: TcxCustomGridRecord;
- Item: TcxCustomGridTableItem;
- end;
- TcxCustomGridTableViewStyles = class(TcxCustomGridViewStyles)
- private
- FOnGetContentStyle: TcxGridGetCellStyleEvent;
- function GetGridViewValue: TcxCustomGridTableView;
- procedure SetOnGetContentStyle(Value: TcxGridGetCellStyleEvent);
- protected
- procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override;
- public
- procedure Assign(Source: TPersistent); override;
- procedure GetContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
- out AParams: TcxViewParams); virtual;
- procedure GetDataCellContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
- out AParams: TcxViewParams); virtual;
- procedure GetDataCellParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
- out AParams: TcxViewParams; AUseViewInfo: Boolean = False; ACellViewInfo: TcxGridTableCellViewInfo = nil); virtual;
- procedure GetRecordContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
- out AParams: TcxViewParams); virtual;
- property GridView: TcxCustomGridTableView read GetGridViewValue;
- published
- property Content: TcxStyle index vsContent read GetValue write SetValue;
- property ContentEven: TcxStyle index vsContentEven read GetValue write SetValue;
- property ContentOdd: TcxStyle index vsContentOdd read GetValue write SetValue;
- property FilterBox: TcxStyle index vsFilterBox read GetValue write SetValue;
- property Inactive: TcxStyle index vsInactive read GetValue write SetValue;
- property IncSearch: TcxStyle index vsIncSearch read GetValue write SetValue;
- property Selection: TcxStyle index vsSelection read GetValue write SetValue;
- property OnGetContentStyle: TcxGridGetCellStyleEvent read FOnGetContentStyle write SetOnGetContentStyle;
- end;
- // grid view
- TcxGridOpenTableItemList = class(TList)
- private
- function GetItem(Index: Integer): TcxCustomGridTableItem;
- procedure SetItem(Index: Integer; Value: TcxCustomGridTableItem);
- public
- property Items[Index: Integer]: TcxCustomGridTableItem read GetItem write SetItem; default;
- end;
- TcxGridTableCellCustomDrawEvent = procedure(Sender: TcxCustomGridTableView;
- ACanvas: TcxCanvas; AViewInfo: TcxGridTableCellViewInfo; var ADone: Boolean) of object;
- TcxGridAllowRecordOperationEvent = procedure(Sender: TcxCustomGridTableView;
- ARecord: TcxCustomGridRecord; var AAllow: Boolean) of object;
- TcxGridCellClickEvent = procedure(Sender: TcxCustomGridTableView;
- ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
- AShift: TShiftState; var AHandled: Boolean) of object;
- TcxGridCustomTableViewEvent = procedure(Sender: TcxCustomGridTableView) of object;
- TcxGridEditingEvent = procedure(Sender: TcxCustomGridTableView;
- AItem: TcxCustomGridTableItem; var AAllow: Boolean) of object;
- TcxGridEditKeyEvent = procedure(Sender: TcxCustomGridTableView; AItem: TcxCustomGridTableItem;
- AEdit: TcxCustomEdit; var Key: Word; Shift: TShiftState) of object;
- TcxGridEditKeyPressEvent = procedure(Sender: TcxCustomGridTableView;
- AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit; var Key: Char) of object;
- TcxGridCustomTableItemEvent = procedure(Sender: TcxCustomGridTableView;
- AItem: TcxCustomGridTableItem) of object;
- TcxGridFilterCustomizationEvent = procedure(Sender: TcxCustomGridTableView;
- var ADone: Boolean) of object;
- TcxGridFilterDialogShowEvent = procedure(Sender: TcxCustomGridTableView;
- AItem: TcxCustomGridTableItem; var ADone: Boolean) of object;
- TcxGridFocusedItemChangedEvent = procedure(Sender: TcxCustomGridTableView;
- APrevFocusedItem, AFocusedItem: TcxCustomGridTableItem) of object;
- TcxGridFocusedRecordChangedEvent = procedure(Sender: TcxCustomGridTableView;
- APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean) of object;
- TcxGridGetCellHeightEvent = procedure(Sender: TcxCustomGridTableView;
- ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
- ACellViewInfo: TcxGridTableDataCellViewInfo; var AHeight: Integer) of object;
- TcxGridGetDragDropTextEvent = procedure(Sender: TcxCustomGridTableView;
- ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; var AText: string) of object;
- TcxGridInitEditEvent = procedure(Sender: TcxCustomGridTableView;
- AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit) of object;
- TcxGridInitStoredObjectEvent = procedure(Sender: TcxCustomGridTableView; AObject: TObject) of object;
- TcxGridPartCustomDrawBackgroundEvent = procedure(Sender: TcxCustomGridTableView;
- ACanvas: TcxCanvas; AViewInfo: TcxCustomGridCellViewInfo; var ADone: Boolean) of object;
- TcxGridRecordEvent = procedure(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord) of object;
- TcxGridDataControllerChange = (dccItemAdded, dccItemRemoved, dccIndexesChanged);
- TcxCustomGridTableView = class(TcxCustomGridView, IcxFilterControl, IcxNavigator)
- private
- FAssigningGroupedItems: TcxGridOpenTableItemList;
- FAssigningSortedItems: TcxGridOpenTableItemList;
- FCopyToClipboardItems: TList;
- FCopyToClipboardStr: string;
- FDontMakeMasterRecordVisible: Boolean;
- FFilterableItems: TList;
- FFiltering: TcxCustomGridTableFiltering;
- FIsAfterAssigningItems: Boolean;
- FIsAssigningItems: Boolean;
- FItems: TList;
- FNavigatorButtons: TcxNavigatorControlButtons;
- FNavigatorNotifier: TcxNavigatorControlNotifier;
- FNextID: Integer;
- FOptionsCustomize: TcxCustomGridTableOptionsCustomize;
- FRestoringItems: TcxGridOpenTableItemList;
- FVisibleItems: TList;
- FOnCanFocusRecord: TcxGridAllowRecordOperationEvent;
- FOnCanSelectRecord: TcxGridAllowRecordOperationEvent;
- FOnCellClick: TcxGridCellClickEvent;
- FOnCellDblClick: TcxGridCellClickEvent;
- FOnCustomDrawCell: TcxGridTableDataCellCustomDrawEvent;
- FOnCustomDrawPartBackground: TcxGridPartCustomDrawBackgroundEvent;
- FOnCustomization: TNotifyEvent;
- FOnEditing: TcxGridEditingEvent;
- FOnEditChanged: TcxGridCustomTableItemEvent;
- FOnEditKeyDown: TcxGridEditKeyEvent;
- FOnEditKeyPress: TcxGridEditKeyPressEvent;
- FOnEditKeyUp: TcxGridEditKeyEvent;
- FOnEditValueChanged: TcxGridCustomTableItemEvent;
- FOnFilterControlDialogShow: TNotifyEvent;
- FOnFilterCustomization: TcxGridFilterCustomizationEvent;
- FOnFilterDialogShow: TcxGridFilterDialogShowEvent;
- FOnFocusedItemChanged: TcxGridFocusedItemChangedEvent;
- FOnFocusedRecordChanged: TcxGridFocusedRecordChangedEvent;
- FOnGetCellHeight: TcxGridGetCellHeightEvent;
- FOnGetDragDropText: TcxGridGetDragDropTextEvent;
- FOnInitEdit: TcxGridInitEditEvent;
- FOnInitStoredObject: TcxGridInitStoredObjectEvent;
- //FOnRecordCreated: TcxGridRecordEvent;
- //FOnRecordDestroying: TcxGridRecordEvent;
- FOnSelectionChanged: TcxGridCustomTableViewEvent;
- FOnTopRecordIndexChanged: TNotifyEvent;
- function GetBackgroundBitmaps: TcxCustomGridTableBackgroundBitmaps;
- function GetController: TcxCustomGridTableController;
- function GetFilterableItem(Index: Integer): TcxCustomGridTableItem;
- function GetFilterableItemCount: Integer;
- function GetGroupedItem(Index: Integer): TcxCustomGridTableItem;
- function GetGroupedItemCount: Integer;
- function GetItem(Index: Integer): TcxCustomGridTableItem;
- function GetItemCount: Integer;
- function GetMasterGridRecord: TcxCustomGridRecord;
- function GetOptionsBehavior: TcxCustomGridTableOptionsBehavior;
- function GetOptionsData: TcxCustomGridTableOptionsData;
- function GetOptionsSelection: TcxCustomGridTableOptionsSelection;
- function GetOptionsView: TcxCustomGridTableOptionsView;
- function GetPainter: TcxCustomGridTablePainter;
- function GetNavigatorButtonsControl: IcxNavigator;
- function GetSortedItem(Index: Integer): TcxCustomGridTableItem;
- function GetSortedItemCount: Integer;
- function GetStyles: TcxCustomGridTableViewStyles;
- function GetViewData: TcxCustomGridTableViewData;
- function GetViewInfo: TcxCustomGridTableViewInfo;
- function GetVisibleItem(Index: Integer): TcxCustomGridTableItem;
- function GetVisibleItemCount: Integer;
- procedure SetBackgroundBitmaps(Value: TcxCustomGridTableBackgroundBitmaps);
- procedure SetFiltering(Value: TcxCustomGridTableFiltering);
- procedure SetItem(Index: Integer; Value: TcxCustomGridTableItem);
- procedure SetNavigatorButtons(Value: TcxNavigatorControlButtons);
- procedure SetOnCanFocusRecord(Value: TcxGridAllowRecordOperationEvent);
- procedure SetOnCanSelectRecord(Value: TcxGridAllowRecordOperationEvent);
- procedure SetOnCellClick(Value: TcxGridCellClickEvent);
- procedure SetOnCellDblClick(Value: TcxGridCellClickEvent);
- procedure SetOnCustomDrawCell(Value: TcxGridTableDataCellCustomDrawEvent);
- procedure SetOnCustomDrawPartBackground(Value: TcxGridPartCustomDrawBackgroundEvent);
- procedure SetOnCustomization(Value: TNotifyEvent);
- procedure SetOnEditChanged(Value: TcxGridCustomTableItemEvent);
- procedure SetOnEditing(Value: TcxGridEditingEvent);
- procedure SetOnEditKeyDown(Value: TcxGridEditKeyEvent);
- procedure SetOnEditKeyPress(Value: TcxGridEditKeyPressEvent);
- procedure SetOnEditKeyUp(Value: TcxGridEditKeyEvent);
- procedure SetOnEditValueChanged(Value: TcxGridCustomTableItemEvent);
- procedure SetOnFilterControlDialogShow(Value: TNotifyEvent);
- procedure SetOnFilterCustomization(Value: TcxGridFilterCustomizationEvent);
- procedure SetOnFilterDialogShow(Value: TcxGridFilterDialogShowEvent);
- procedure SetOnFocusedItemChanged(Value: TcxGridFocusedItemChangedEvent);
- procedure SetOnFocusedRecordChanged(Value: TcxGridFocusedRecordChangedEvent);
- procedure SetOnGetCellHeight(Value: TcxGridGetCellHeightEvent);
- procedure SetOnGetDragDropText(Value: TcxGridGetDragDropTextEvent);
- procedure SetOnInitEdit(Value: TcxGridInitEditEvent);
- procedure SetOnInitStoredObject(Value: TcxGridInitStoredObjectEvent);
- procedure SetOnSelectionChanged(Value: TcxGridCustomTableViewEvent);
- procedure SetOnTopRecordIndexChanged(Value: TNotifyEvent);
- procedure SetOptionsBehavior(Value: TcxCustomGridTableOptionsBehavior);
- procedure SetOptionsCustomize(Value: TcxCustomGridTableOptionsCustomize);
- procedure SetOptionsData(Value: TcxCustomGridTableOptionsData);
- procedure SetOptionsSelection(Value: TcxCustomGridTableOptionsSelection);
- procedure SetOptionsView(Value: TcxCustomGridTableOptionsView);
- procedure SetStyles(Value: TcxCustomGridTableViewStyles);
- procedure CopyForEachRowProc(ARowIndex: Integer; ARowInfo: TcxRowInfo);
- procedure RefreshItemIndexes;
- protected
- // IcxFilterControl
- function IcxFilterControl.GetCaption = GetFilterCaption;
- function IcxFilterControl.GetCount = GetFilterCount;
- function IcxFilterControl.GetCriteria = GetFilterCriteria;
- function IcxFilterControl.GetFieldName = GetFilterFieldName;
- function IcxFilterControl.GetItemLink = GetFilterItemLink;
- function IcxFilterControl.GetProperties = GetFilterProperties;
- function IcxFilterControl.GetValueType = GetFilterValueType;
- function GetFilterCaption(Index: Integer): string;
- function GetFilterCount: Integer;
- function GetFilterCriteria: TcxFilterCriteria;
- function GetFilterFieldName(Index: Integer): string;
- function GetFilterItemLink(Index: Integer): TObject;
- function GetFilterProperties(Index: Integer): TcxCustomEditProperties;
- function GetFilterValueType(Index: Integer): cxDataStorage.TcxValueTypeClass;
- // IcxNavigator
- function IcxNavigator.IsActive = NavigatorIsActive;
- function IcxNavigator.IsBof = NavigatorIsBof;
- function IcxNavigator.IsEof = NavigatorIsEof;
- function IcxNavigator.CanEdit = NavigatorCanEdit;
- function IcxNavigator.CanDelete = NavigatorCanDelete;
- function IcxNavigator.CanInsert = NavigatorCanInsert;
- function IcxNavigator.IsEditing = NavigatorIsEditing;
- procedure IcxNavigator.ClearBookmark = NavigatorClearBookmark;
- function IcxNavigator.IsBookmarkAvailable = NavigatorIsBookmarkAvailable;
- procedure IcxNavigator.DoAction = NavigatorDoAction;
- function IcxNavigator.GetNotifier = NavigatorGetNotifier;
- function IcxNavigator.IsActionSupported = NavigatorIsActionSupported;
- function NavigatorIsActive: Boolean;
- function NavigatorIsBof: Boolean;
- function NavigatorIsEof: Boolean;
- function NavigatorCanEdit: Boolean;
- function NavigatorCanDelete: Boolean;
- function NavigatorCanInsert: Boolean;
- function NavigatorIsEditing: Boolean;
- procedure NavigatorClearBookmark;
- function NavigatorIsBookmarkAvailable: Boolean;
- procedure NavigatorDoAction(AButtonIndex: Integer);
- function NavigatorGetNotifier: TcxNavigatorControlNotifier;
- function NavigatorIsActionSupported(AButtonIndex: Integer): Boolean;
- // IcxStoredObject
- function GetProperties(AProperties: TStrings): Boolean; override;
- procedure GetPropertyValue(const AName: string; var AValue: Variant); override;
- procedure SetPropertyValue(const AName: string; const AValue: Variant); override;
- // IcxStoredParent
- function CreateChild(const AObjectName, AClassName: string): TObject; override;
- procedure GetStoredChildren(AChildren: TStringList); override;
- // IcxGridViewLayoutEditorSupport - for design-time layout editor
- procedure AssignLayout(ALayoutView: TcxCustomGridView); override;
- procedure BeforeEditLayout(ALayoutView: TcxCustomGridView); override;
- function HasLayoutCustomizationForm: Boolean; override;
- procedure RunLayoutCustomizationForm; override;
- procedure BeforeRestoring; override;
- procedure AfterRestoring; override;
- procedure ReadState(Reader: TReader); override;
- property RestoringItems: TcxGridOpenTableItemList read FRestoringItems;
- procedure BeginAssignItems;
- procedure DoBeforeAssignItems; virtual;
- procedure DoItemsAssigned; virtual;
- procedure EndAssignItems;
- property AssigningGroupedItems: TcxGridOpenTableItemList read FAssigningGroupedItems;
- property AssigningSortedItems: TcxGridOpenTableItemList read FAssigningSortedItems;
- property IsAssigningItems: Boolean read FIsAssigningItems;
- property IsAfterAssigningItems: Boolean read FIsAfterAssigningItems;
- function CanOffset(ARecordCountDelta: Integer): Boolean; virtual;
- function CanSelectRecord(ARecordIndex: Integer): Boolean; virtual;
- function CanTabStop: Boolean; override;
- procedure DetailVisibleChanged(ADetailLevel: TComponent;
- APrevVisibleDetailCount, AVisibleDetailCount: Integer); override;
- procedure DoAssign(ASource: TcxCustomGridView); override;
- function FindItemByObjectName(const AObjectName: string): TcxCustomGridTableItem;
- procedure FocusEdit(AItemIndex: Integer; var ADone: Boolean); virtual;
- procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
- function GetDefaultActiveDetailIndex: Integer; virtual;
- function GetDisplayText(ARecordIndex, AItemIndex: Integer; out AText: string): Boolean;
- procedure GetFakeComponentLinks(AList: TList); override;
- function GetIsControlFocused: Boolean; override;
- procedure GetItemsListForClipboard(AItems: TList; ACopyAll: Boolean); virtual;
- function GetItemSortByDisplayText(AItemIndex: Integer; ASortByDisplayText: Boolean): Boolean;
- function GetItemValueSource(AItemIndex: Integer): TcxDataEditValueSource;
- procedure GetVisibleItemsList(AItems: TList); virtual;
- function HasCustomDrawCell: Boolean;
- function HasCustomDrawPartBackground: Boolean;
- procedure Init; override;
- function IsDetailVisible(AGridView: TcxCustomGridView): Boolean; override;
- function IsEqualHeightRecords: Boolean; virtual;
- procedure LoadingComplete; override;
- procedure Offset(ARecordCountDelta, DX, DY: Integer); virtual;
- procedure SetChildOrder(Child: TComponent; Order: Integer); override;
- procedure SetName(const NewName: TComponentName); override;
- procedure UpdateControl(AInfo: TcxUpdateControlInfo); override;
- procedure UpdateDataController(AChange: TcxGridDataControllerChange;
- AItem: TcxCustomGridTableItem = nil);
- procedure UpdateRecord; virtual;
- procedure CreateHandlers; override;
- procedure DestroyHandlers; override;
- procedure CreateOptions; override;
- procedure DestroyOptions; override;
- procedure AddItem(AItem: TcxCustomGridTableItem); virtual;
- procedure RemoveItem(AItem: TcxCustomGridTableItem); virtual;
- procedure AssignVisibleItemsIndexes;
- procedure ChangeItemIndex(AItem: TcxCustomGridTableItem; Value: Integer); virtual;
- procedure ItemVisibilityChanged(AItem: TcxCustomGridTableItem; Value: Boolean); virtual;
- procedure RefreshVisibleItemsList; virtual;
- function GetItemClass: TcxCustomGridTableItemClass; virtual; abstract;
- function GetItemDataBindingClass: TcxGridItemDataBindingClass; virtual;
- function GetNextID: Integer;
- procedure ReleaseID(AID: Integer);
- procedure DataChanged; virtual;
- procedure DataLayoutChanged; virtual;
- function DoCellClick(ACellViewInfo: TcxGridTableDataCellViewInfo;
- AButton: TMouseButton; AShift: TShiftState): Boolean; virtual;
- function DoCellDblClick(ACellViewInfo: TcxGridTableDataCellViewInfo;
- AButton: TMouseButton; AShift: TShiftState): Boolean; virtual;
- function DoEditing(AItem: TcxCustomGridTableItem): Boolean; virtual;
- procedure DoTopRecordIndexChanged; virtual;
- procedure FilterChanged; virtual;
- procedure FocusedItemChanged(APrevFocusedItem, AFocusedItem: TcxCustomGridTableItem); virtual;
- procedure FocusedRecordChanged(APrevFocusedRecordIndex, AFocusedRecordIndex: Integer;
- ANewItemRecordFocusingChanged: Boolean); virtual;
- procedure ItemValueTypeClassChanged(AItemIndex: Integer); virtual;
- procedure RecalculateDefaultWidths;
- procedure RecordChanged(ARecordIndex: Integer); virtual;
- procedure RecordCountChanged; virtual;
- procedure RefreshFilterableItemsList;
- procedure RefreshNavigators;
- procedure SearchChanged; virtual;
- procedure SelectionChanged(AInfo: TcxSelectionChangedInfo); virtual;
- function CalculateDataCellSelected(ARecord: TcxCustomGridRecord;
- AItem: TcxCustomGridTableItem; AUseViewInfo: Boolean;
- ACellViewInfo: TcxGridTableCellViewInfo): Boolean; virtual;
- function DrawDataCellSelected(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
- AUseViewInfo: Boolean = False; ACellViewInfo: TcxGridTableCellViewInfo = nil): Boolean; virtual;
- function DrawRecordActive(ARecord: TcxCustomGridRecord): Boolean; virtual;
- function DrawRecordFocused(ARecord: TcxCustomGridRecord): Boolean; virtual;
- function DrawRecordSelected(ARecord: TcxCustomGridRecord): Boolean; virtual;
- function DoCanFocusRecord(ARecord: TcxCustomGridRecord): Boolean; virtual;
- procedure DoCustomDrawCell(ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
- var ADone: Boolean); virtual;
- procedure DoCustomDrawPartBackground(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridCellViewInfo;
- var ADone: Boolean); virtual;
- procedure DoCustomization; virtual;
- procedure DoEditChanged(AItem: TcxCustomGridTableItem); virtual;
- procedure DoEditKeyDown(AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit;
- var Key: Word; Shift: TShiftState); virtual;
- procedure DoEditKeyPress(AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit;
- var Key: Char); virtual;
- procedure DoEditKeyUp(AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit;
- var Key: Word; Shift: TShiftState); virtual;
- procedure DoEditValueChanged(AItem: TcxCustomGridTableItem); virtual;
- function DoFilterCustomization: Boolean; virtual;
- function DoFilterDialogShow(AItem: TcxCustomGridTableItem): Boolean; virtual;
- procedure DoGetCellHeight(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
- ACellViewInfo: TcxGridTableDataCellViewInfo; var AHeight: Integer); virtual;
- function DoGetDragDropText(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem): string; virtual;
- procedure DoInitEdit(AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit); virtual;
- //procedure DoRecordCreated(ARecord: TcxCustomGridRecord); virtual;
- //procedure DoRecordDestroying(ARecord: TcxCustomGridRecord); virtual;
- procedure DoSelectionChanged; virtual;
- function IsGetCellHeightAssigned: Boolean;
- procedure RefreshCustomizationForm;
- function GetControllerClass: TcxCustomGridControllerClass; override;
- function GetPainterClass: TcxCustomGridPainterClass; override;
- function GetViewDataClass: TcxCustomGridViewDataClass; override;
- function GetViewInfoCacheClass: TcxCustomGridViewInfoCacheClass; override;
- function GetViewInfoClass: TcxCustomGridViewInfoClass; override;
- function GetBackgroundBitmapsClass: TcxCustomGridBackgroundBitmapsClass; override;
- function GetFilteringClass: TcxCustomGridTableFilteringClass; virtual;
- function GetNavigatorButtonsClass: TcxNavigatorControlButtonsClass; virtual;
- function GetOptionsBehaviorClass: TcxCustomGridOptionsBehaviorClass; override;
- function GetOptionsCustomizeClass: TcxCustomGridTableOptionsCustomizeClass; virtual;
- function GetOptionsDataClass: TcxCustomGridOptionsDataClass; override;
- function GetOptionsSelectionClass: TcxCustomGridOptionsSelectionClass; override;
- function GetOptionsViewClass: TcxCustomGridOptionsViewClass; override;
- function GetStylesClass: TcxCustomGridViewStylesClass; override;
- function GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; virtual;
- function GetSummaryItemClass: TcxDataSummaryItemClass; virtual;
- property BackgroundBitmaps: TcxCustomGridTableBackgroundBitmaps read GetBackgroundBitmaps
- write SetBackgroundBitmaps;
- property DontMakeMasterRecordVisible: Boolean read FDontMakeMasterRecordVisible
- write FDontMakeMasterRecordVisible;
- property FilterableItemCount: Integer read GetFilterableItemCount;
- property FilterableItems[Index: Integer]: TcxCustomGridTableItem read GetFilterableItem;
- property NavigatorNotifier: TcxNavigatorControlNotifier read FNavigatorNotifier;
- property NextID: Integer read FNextID;
- property VisibleItemsList: TList read FVisibleItems;
- property OnCustomization: TNotifyEvent read FOnCustomization write SetOnCustomization; {2m}
- property OnFilterControlDialogShow: TNotifyEvent read FOnFilterControlDialogShow
- write SetOnFilterControlDialogShow;
- property OnFilterCustomization: TcxGridFilterCustomizationEvent read FOnFilterCustomization