mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: simplify OnDrawCell related in FileView
This commit is contained in:
parent
50f1403445
commit
9fac3ef5e8
2 changed files with 0 additions and 37 deletions
|
|
@ -47,9 +47,6 @@ type
|
|||
{ TBriefFileView }
|
||||
|
||||
TBriefFileView = class (TFileViewWithGrid)
|
||||
protected
|
||||
function GetOnDrawCell: TFileViewOnDrawCell;
|
||||
procedure SetOnDrawCell( OnDrawCell: TFileViewOnDrawCell );
|
||||
protected
|
||||
procedure CreateDefault(AOwner: TWinControl); override;
|
||||
function GetFileViewGridClass: TFileViewGridClass; override;
|
||||
|
|
@ -62,9 +59,7 @@ type
|
|||
procedure DoFileUpdated(AFile: TDisplayFile; UpdatedProperties: TFilePropertiesTypes = []); override;
|
||||
public
|
||||
function Clone(NewParent: TWinControl): TBriefFileView; override;
|
||||
procedure CloneTo(FileView: TFileView); override;
|
||||
procedure SaveConfiguration(AConfig: TXmlConfig; ANode: TXmlNode; ASaveHistory:boolean); override;
|
||||
property OnDrawCell: TFileViewOnDrawCell read GetOnDrawCell write SetOnDrawCell;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
|
@ -602,16 +597,6 @@ end;
|
|||
|
||||
{ TBriefFileView }
|
||||
|
||||
function TBriefFileView.GetOnDrawCell: TFileViewOnDrawCell;
|
||||
begin
|
||||
Result:= TBriefDrawGrid(dgPanel).OnDrawCell;
|
||||
end;
|
||||
|
||||
procedure TBriefFileView.SetOnDrawCell(OnDrawCell: TFileViewOnDrawCell);
|
||||
begin
|
||||
TBriefDrawGrid(dgPanel).OnDrawCell:= OnDrawCell;
|
||||
end;
|
||||
|
||||
procedure TBriefFileView.CreateDefault(AOwner: TWinControl);
|
||||
begin
|
||||
inherited CreateDefault(AOwner);
|
||||
|
|
@ -725,13 +710,6 @@ begin
|
|||
Result := TBriefFileView.Create(NewParent, Self);
|
||||
end;
|
||||
|
||||
procedure TBriefFileView.CloneTo(FileView: TFileView);
|
||||
begin
|
||||
inherited CloneTo(FileView);
|
||||
if FileView is TBriefFileView then
|
||||
TBriefFileView(FileView).OnDrawCell:= self.OnDrawCell;
|
||||
end;
|
||||
|
||||
procedure TBriefFileView.SaveConfiguration(AConfig: TXmlConfig; ANode: TXmlNode; ASaveHistory:boolean);
|
||||
begin
|
||||
inherited SaveConfiguration(AConfig, ANode, ASaveHistory);
|
||||
|
|
|
|||
|
|
@ -111,9 +111,6 @@ type
|
|||
dgPanel: TDrawGridEx;
|
||||
FOnColumnResized: TColumnResized;
|
||||
|
||||
function GetOnDrawCell: TFileViewOnDrawCell;
|
||||
procedure SetOnDrawCell( OnDrawCell: TFileViewOnDrawCell );
|
||||
|
||||
function GetColumnsClass: TPanelColumnsClass;
|
||||
|
||||
procedure SetRowCount(Count: Integer);
|
||||
|
|
@ -217,7 +214,6 @@ type
|
|||
procedure SetGridFunctionDim(ExternalDimFunction:TFunctionDime);
|
||||
|
||||
property OnColumnResized: TColumnResized read FOnColumnResized write FOnColumnResized;
|
||||
property OnDrawCell: TFileViewOnDrawCell read GetOnDrawCell write SetOnDrawCell;
|
||||
published
|
||||
procedure cm_SaveFileDetailsToFile(const Params: array of string);
|
||||
procedure cm_CopyFileDetailsToClip(const Params: array of string);
|
||||
|
|
@ -968,7 +964,6 @@ begin
|
|||
with TColumnsFileView(FileView) do
|
||||
begin
|
||||
FColumnsSortDirections := Self.FColumnsSortDirections;
|
||||
OnDrawCell := Self.OnDrawCell;
|
||||
|
||||
ActiveColm := Self.ActiveColm;
|
||||
ActiveColmSlave := nil;
|
||||
|
|
@ -1127,16 +1122,6 @@ begin
|
|||
Dec(Result.Last, dgPanel.FixedRows);
|
||||
end;
|
||||
|
||||
function TColumnsFileView.GetOnDrawCell: TFileViewOnDrawCell;
|
||||
begin
|
||||
Result:= dgPanel.OnDrawCell;
|
||||
end;
|
||||
|
||||
procedure TColumnsFileView.SetOnDrawCell(OnDrawCell: TFileViewOnDrawCell);
|
||||
begin
|
||||
dgPanel.OnDrawCell:= OnDrawCell;
|
||||
end;
|
||||
|
||||
function TColumnsFileView.GetColumnsClass: TPanelColumnsClass;
|
||||
begin
|
||||
if isSlave then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue