Class TFireGridModelController

Unit

Declaration

type TFireGridModelController = class(TObject)

Description

Hierarchy

Overview

Nested Types

Published TChangeFlag = (...);
Public TChangeFlags = set of TChangeFlag;

Methods

Public constructor Create(ViewHost: TFireGridViewInterface);
Public destructor Destroy; override;
Public procedure SetModel(Model: TFireModelAbstract; Parent: TModelIndex);
Public function GetParentIndex: TModelIndex;
Public procedure SetSortOrder(dataBinding: TFireGridModelDataBinding; sortIndex: Integer; order: TFireGridSortOrder; caseSensitivity: Boolean = false; localeAware: Boolean = false);
Public function GetSortOrder(dataBinding: TFireGridModelDataBinding): TFireGridSortOrder;
Public procedure SetGroupOrder(DataBinding: TFireGridModelDataBinding; GroupIndex: Integer; Order: TFireGridSortOrder; CaseSensitivity: Boolean = false; LocaleAware: Boolean = false);
Public function GetGroupOrder(DataBinding: TFireGridModelDataBinding): TFireGridSortOrder;
Public procedure ClearSorting;
Public procedure ClearGrouping;
Public function IsGrouping: Boolean;
Public function GetGroupingDepth: Integer;
Public function GetModelColumnCount: Integer;
Public function GetGridRowCount: Integer;
Public function GetGridRow(Index: Integer): PFireGridRow;
Public function GetGridRowByModelRow(ModelRow: Integer): PFireGridRow;
Public function GetFrozenTopGridRowCount: Integer;
Public function GetFrozenBottomGridRowCount: Integer;
Public function ModelGroupCount: Integer;
Public function ModelGroup(Index: Integer): PFireGridModelGroup;
Public function GetGroups: TFireGridModelGroupArray;
Public procedure ExpandAllGroup;
Public procedure CollapseAllGroup;
Public function ExpandGroup(Group: PFireGridModelGroup; DisableChanged: Boolean = false): Boolean;
Public function CollapseGroup(Group: PFireGridModelGroup; DisableChanged: Boolean = false): Boolean;
Public procedure Refresh;
Public function GetSummary: TFireGridSummary;
Public function GetFilter: TFireGridFilter;
Public function GetModelFilter: TFireGridFilter;
Public function GetFrozenRowsFilter: TFireGridFilter;
Public function GetModelValue(Column: Integer; ModelRow: Integer; Role: TModelItemDataRole; var Value: Variant): Boolean;
Public function SetModelValue(Column: Integer; ModelRow: Integer; Role: TModelItemDataRole; const Value: Variant): Boolean;
Public function EnsureVisible(modelRow: Integer): Integer;
Public procedure EnsureFocus;
Public function GetFocusedRowIndex: Integer;
Public function GetFocusedColumnIndex: Integer;
Public function GetFocusedRow: PFireGridRow;
Public function GetOldFocusedRowIndex: Integer;
Public function GetOldFocusedColumnIndex: Integer;
Public function IsRowFocused(Row: PFireGridRow): Boolean;
Public function IsCellFocused(Row: PFireGridRow; ColumnIndex: Integer): Boolean;
Public function SetCellFocus(Row: PFireGridRow; ColumnIndex: Integer): Boolean;
Public function GetSelection: TFireGridSelection;
Public procedure BeginUpdate;
Public procedure EndUpdate;
Public function IsDataUpdating: Boolean;
Public function InsertModelRow(ModelRow: Integer): Boolean;
Public function RemoveModelRow(ModelRow: Integer): Boolean;
Public procedure BeginAddRow(ModelRowIndex: Integer);
Public procedure EndAddRow;
Public function IsNewRowMode: Boolean;
Public function GetAddingModelRowIndex: Integer;
Public function GetDefaultValue(ModelColumn: Integer; Role: TModelItemDataRole; var Value: Variant): Boolean;
Public procedure SetDefaultValue(ModelColumn: Integer; const Value: Variant; Role: TModelItemDataRole);
Public procedure RemoveDefaultValue(ModelColumn: Integer; Role: TModelItemDataRole);
Public procedure RemoveDefaultValues(ModelColumn: Integer);
Public function ShowWaitCursor: Boolean;
Public procedure SetShowWaitCursor(Show: Boolean);
Public function GetEditStrategy: TFireGridEditStrategy;
Public procedure SetEditStrategy(Strategy: TFireGridEditStrategy);
Public function GetFrozenPlace: TFireGridRowFrozenPlace;
Public procedure SetFrozenPlace(Place: TFireGridRowFrozenPlace);
Public procedure AddModelRowToFrozenFilter(ModelRowIndex: Integer; Place: TFireGridRowFrozenPlace);
Public procedure RemoveModelRowFromFrozenFilter(ModelRowIndex: Integer);
Public procedure ClearSelect;
Public procedure SelectRanges(const Ranges: TFireGridSelectionRanges; Operation: TFireGridSelectionOperation = [sopSelect]);
Public function IsRowSelected(const Row: PFireGridRow): Boolean;
Public function IsCellSelected(const Cell: TFireGridCell): Boolean;
Public function IsAllSelected: Boolean;
Public function GetRowIndexByPersistentRow(const PersistentRow: TFireGridPersistentRow): Integer;
Public function GetPureRowCount: Integer;
Public function GetRecordCount: Integer;
Public function GetModelRowIndexByRecord(RecordVal: Integer): Integer;
Public function SubmitData: Boolean;
Protected function SetFocusInternal(Row: PFireGridRow; ColumnIndex: Integer): Boolean;
Protected procedure CommitCurrentSelect;
Protected procedure DoControllerChanged;
Protected procedure ClearModelGroups;
Protected procedure ClearPersistRows;
Protected procedure CreateModelGroups;
Protected procedure ResizeModelRows(Size: Integer);
Protected function AppendModelGroup: PFireGridModelGroup;
Protected function AddModelRowToMap(ModelRow: Integer): Boolean;
Protected procedure FillRecords;
Protected procedure CreateGridRows;
Protected function DoFindGroup(RowIndex: Integer; var GroupIndex: Integer): PFireGridModelGroup;
Protected function DoFindRowIndexByRecord(RecordVal: Integer): Integer;
Protected function DoFindRecordByModelRow(ModelRow: Integer): Integer;
Protected procedure SaveGroupingState;
Protected procedure RestoreSelectState;
Protected procedure ClearGroupingState;
Protected procedure ApplyChanges;
Protected procedure ModelColumnsInserted(const Parent: TModelIndex; StartRow: Integer; EndRow: Integer);
Protected procedure ModelColumnsRemoved(const Parent: TModelIndex; StartRow: Integer; EndRow: Integer);
Protected procedure ModelLayoutChanged(Sender: TObject);
Protected procedure ModelDataChanged(Sender: TObject; const Index: TModelIndex);
Protected procedure ModelRowsAboutToBeInserted(const parent: TModelIndex; startRow: Integer; endRow: Integer);
Protected procedure ModelRowsAboutToBeRemoved(const parent: TModelIndex; startRow: Integer; endRow: Integer);
Protected procedure ModelRowsInserted(Sender: TObject; const Parent: TModelIndex; Row: Integer);
Protected procedure ModelRowsRemoved(Sender: TObject; const Parent: TModelIndex; StartRow: Integer; EndRow: Integer);
Protected procedure ModelAboutToBeReset(Sender: TObject);
Protected procedure ModelReset(Sender: TObject);
Protected procedure ModelDestroyed;

Properties

Public property Model: TFireModelAbstract read FModel;
Public property OnChange: TNotifyEvent read FOnChange write FOnChange;
Public property OnSelectedChange: TNotifyEvent read FOnSelectedChange write FOnSelectedChange;
Public property OnDataChange: TNotifyEvent read FOnDataChange write FOnDataChange;
Public property OnLayoutChange: TNotifyEvent read FOnLayoutChange write FOnLayoutChange;

Description

Nested Types

Published TChangeFlag = (...);
 
Values
  • ccfSortingChanged
  • ccfGroupingChanged
  • ccfRowsChanged
  • ccfDataChanged
  • ccfLayoutChanged
  • ccfFocusChanged
  • ccfSelectionChanged
  • ccfModelRowsChanged
Public TChangeFlags = set of TChangeFlag;
 

Methods

Public constructor Create(ViewHost: TFireGridViewInterface);
 
Public destructor Destroy; override;
 
Public procedure SetModel(Model: TFireModelAbstract; Parent: TModelIndex);
 
Public function GetParentIndex: TModelIndex;
 
Public procedure SetSortOrder(dataBinding: TFireGridModelDataBinding; sortIndex: Integer; order: TFireGridSortOrder; caseSensitivity: Boolean = false; localeAware: Boolean = false);
 
Public function GetSortOrder(dataBinding: TFireGridModelDataBinding): TFireGridSortOrder;
 
Public procedure SetGroupOrder(DataBinding: TFireGridModelDataBinding; GroupIndex: Integer; Order: TFireGridSortOrder; CaseSensitivity: Boolean = false; LocaleAware: Boolean = false);
 
Public function GetGroupOrder(DataBinding: TFireGridModelDataBinding): TFireGridSortOrder;
 
Public procedure ClearSorting;
 
Public procedure ClearGrouping;
 
Public function IsGrouping: Boolean;
 
Public function GetGroupingDepth: Integer;
 
Public function GetModelColumnCount: Integer;
 
Public function GetGridRowCount: Integer;
 
Public function GetGridRow(Index: Integer): PFireGridRow;
 
Public function GetGridRowByModelRow(ModelRow: Integer): PFireGridRow;
 
Public function GetFrozenTopGridRowCount: Integer;
 
Public function GetFrozenBottomGridRowCount: Integer;
 
Public function ModelGroupCount: Integer;
 
Public function ModelGroup(Index: Integer): PFireGridModelGroup;
 
Public function GetGroups: TFireGridModelGroupArray;
 
Public procedure ExpandAllGroup;
 
Public procedure CollapseAllGroup;
 
Public function ExpandGroup(Group: PFireGridModelGroup; DisableChanged: Boolean = false): Boolean;
 
Public function CollapseGroup(Group: PFireGridModelGroup; DisableChanged: Boolean = false): Boolean;
 
Public procedure Refresh;
 
Public function GetSummary: TFireGridSummary;
 
Public function GetFilter: TFireGridFilter;
 
Public function GetModelFilter: TFireGridFilter;
 
Public function GetFrozenRowsFilter: TFireGridFilter;
 
Public function GetModelValue(Column: Integer; ModelRow: Integer; Role: TModelItemDataRole; var Value: Variant): Boolean;
 
Public function SetModelValue(Column: Integer; ModelRow: Integer; Role: TModelItemDataRole; const Value: Variant): Boolean;
 
Public function EnsureVisible(modelRow: Integer): Integer;
 
Public procedure EnsureFocus;
 
Public function GetFocusedRowIndex: Integer;
 
Public function GetFocusedColumnIndex: Integer;
 
Public function GetFocusedRow: PFireGridRow;
 
Public function GetOldFocusedRowIndex: Integer;
 
Public function GetOldFocusedColumnIndex: Integer;
 
Public function IsRowFocused(Row: PFireGridRow): Boolean;
 
Public function IsCellFocused(Row: PFireGridRow; ColumnIndex: Integer): Boolean;
 
Public function SetCellFocus(Row: PFireGridRow; ColumnIndex: Integer): Boolean;
 
Public function GetSelection: TFireGridSelection;
 
Public procedure BeginUpdate;
 
Public procedure EndUpdate;
 
Public function IsDataUpdating: Boolean;
 
Public function InsertModelRow(ModelRow: Integer): Boolean;
 
Public function RemoveModelRow(ModelRow: Integer): Boolean;
 
Public procedure BeginAddRow(ModelRowIndex: Integer);
 
Public procedure EndAddRow;
 
Public function IsNewRowMode: Boolean;
 
Public function GetAddingModelRowIndex: Integer;
 
Public function GetDefaultValue(ModelColumn: Integer; Role: TModelItemDataRole; var Value: Variant): Boolean;
 
Public procedure SetDefaultValue(ModelColumn: Integer; const Value: Variant; Role: TModelItemDataRole);
 
Public procedure RemoveDefaultValue(ModelColumn: Integer; Role: TModelItemDataRole);
 
Public procedure RemoveDefaultValues(ModelColumn: Integer);
 
Public function ShowWaitCursor: Boolean;
 
Public procedure SetShowWaitCursor(Show: Boolean);
 
Public function GetEditStrategy: TFireGridEditStrategy;
 
Public procedure SetEditStrategy(Strategy: TFireGridEditStrategy);
 
Public function GetFrozenPlace: TFireGridRowFrozenPlace;
 
Public procedure SetFrozenPlace(Place: TFireGridRowFrozenPlace);
 
Public procedure AddModelRowToFrozenFilter(ModelRowIndex: Integer; Place: TFireGridRowFrozenPlace);
 
Public procedure RemoveModelRowFromFrozenFilter(ModelRowIndex: Integer);
 
Public procedure ClearSelect;
 
Public procedure SelectRanges(const Ranges: TFireGridSelectionRanges; Operation: TFireGridSelectionOperation = [sopSelect]);
 
Public function IsRowSelected(const Row: PFireGridRow): Boolean;
 
Public function IsCellSelected(const Cell: TFireGridCell): Boolean;
 
Public function IsAllSelected: Boolean;
 
Public function GetRowIndexByPersistentRow(const PersistentRow: TFireGridPersistentRow): Integer;
 
Public function GetPureRowCount: Integer;
 
Public function GetRecordCount: Integer;
 
Public function GetModelRowIndexByRecord(RecordVal: Integer): Integer;
 
Public function SubmitData: Boolean;
 
Protected function SetFocusInternal(Row: PFireGridRow; ColumnIndex: Integer): Boolean;
 
Protected procedure CommitCurrentSelect;
 
Protected procedure DoControllerChanged;
 
Protected procedure ClearModelGroups;
 
Protected procedure ClearPersistRows;
 
Protected procedure CreateModelGroups;
 
Protected procedure ResizeModelRows(Size: Integer);
 
Protected function AppendModelGroup: PFireGridModelGroup;
 
Protected function AddModelRowToMap(ModelRow: Integer): Boolean;
 
Protected procedure FillRecords;
 
Protected procedure CreateGridRows;
 
Protected function DoFindGroup(RowIndex: Integer; var GroupIndex: Integer): PFireGridModelGroup;
 
Protected function DoFindRowIndexByRecord(RecordVal: Integer): Integer;
 
Protected function DoFindRecordByModelRow(ModelRow: Integer): Integer;
 
Protected procedure SaveGroupingState;
 
Protected procedure RestoreSelectState;
 
Protected procedure ClearGroupingState;
 
Protected procedure ApplyChanges;
 
Protected procedure ModelColumnsInserted(const Parent: TModelIndex; StartRow: Integer; EndRow: Integer);
 
Protected procedure ModelColumnsRemoved(const Parent: TModelIndex; StartRow: Integer; EndRow: Integer);
 
Protected procedure ModelLayoutChanged(Sender: TObject);
 
Protected procedure ModelDataChanged(Sender: TObject; const Index: TModelIndex);
 
Protected procedure ModelRowsAboutToBeInserted(const parent: TModelIndex; startRow: Integer; endRow: Integer);
 
Protected procedure ModelRowsAboutToBeRemoved(const parent: TModelIndex; startRow: Integer; endRow: Integer);
 
Protected procedure ModelRowsInserted(Sender: TObject; const Parent: TModelIndex; Row: Integer);
 
Protected procedure ModelRowsRemoved(Sender: TObject; const Parent: TModelIndex; StartRow: Integer; EndRow: Integer);
 
Protected procedure ModelAboutToBeReset(Sender: TObject);
 
Protected procedure ModelReset(Sender: TObject);
 
Protected procedure ModelDestroyed;
 

Properties

Public property Model: TFireModelAbstract read FModel;
 
Public property OnChange: TNotifyEvent read FOnChange write FOnChange;
 
Public property OnSelectedChange: TNotifyEvent read FOnSelectedChange write FOnSelectedChange;
 
Public property OnDataChange: TNotifyEvent read FOnDataChange write FOnDataChange;
 
Public property OnLayoutChange: TNotifyEvent read FOnLayoutChange write FOnLayoutChange;
 

Generated by PasDoc 0.15.0.