mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 08:37:58 +02:00
cocoa: implementing sortIndicator
git-svn-id: branches/listviewsortindicator@62523 -
This commit is contained in:
parent
942709571d
commit
9dbf738458
@ -158,6 +158,7 @@ type
|
||||
class procedure ColumnSetMinWidth(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AMinWidth: integer); override;
|
||||
class procedure ColumnSetWidth(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AWidth: Integer); override;
|
||||
class procedure ColumnSetVisible(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AVisible: Boolean); override;
|
||||
class procedure ColumnSetSortIndicator(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const ASortIndicator: TSortIndicator); override;
|
||||
|
||||
// Item
|
||||
class procedure ItemDelete(const ALV: TCustomListView; const AIndex: Integer); override;
|
||||
@ -1229,6 +1230,29 @@ begin
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
class procedure TCocoaWSCustomListView.ColumnSetSortIndicator(
|
||||
const ALV: TCustomListView; const AIndex: Integer;
|
||||
const AColumn: TListColumn; const ASortIndicator: TSortIndicator);
|
||||
var
|
||||
lTableLV: TCocoaTableListView;
|
||||
lNSColumn: NSTableColumn;
|
||||
begin
|
||||
if not CheckColumnParams(lTableLV, lNSColumn, ALV, AIndex) then Exit;
|
||||
|
||||
case ASortIndicator of
|
||||
siNone:
|
||||
lTableLV.setIndicatorImage_inTableColumn(nil, lNSColumn);
|
||||
siAscending:
|
||||
lTableLV.setIndicatorImage_inTableColumn(
|
||||
NSImage.imageNamed(NSSTR('NSAscendingSortIndicator')),
|
||||
lNSColumn);
|
||||
siDescending:
|
||||
lTableLV.setIndicatorImage_inTableColumn(
|
||||
NSImage.imageNamed(NSSTR('NSDescendingSortIndicator')),
|
||||
lNSColumn);
|
||||
end;
|
||||
end;
|
||||
|
||||
class procedure TCocoaWSCustomListView.ItemDelete(const ALV: TCustomListView;
|
||||
const AIndex: Integer);
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user