Win32: started TListView.Exchange() TListView.Move() for win32 ws.Added todo.

git-svn-id: trunk@31360 -
This commit is contained in:
zeljko 2011-06-24 16:46:55 +00:00
parent edac0eec23
commit 48712541fc
2 changed files with 22 additions and 0 deletions

View File

@ -101,6 +101,8 @@ type
// items
class procedure ItemDelete(const ALV: TCustomListView; const AIndex: Integer); override;
class function ItemDisplayRect(const ALV: TCustomListView; const AIndex, ASubItem: Integer; ACode: TDisplayCode): TRect; override;
class procedure ItemExchange(const ALV: TCustomListView; AItem: TListItem; const AIndex1, AIndex2: Integer); override;
class procedure ItemMove(const ALV: TCustomListView; AItem: TListItem; const AFromIndex, AToIndex: Integer); override;
class function ItemGetChecked(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem): Boolean; override;
class function ItemGetPosition(const ALV: TCustomListView; const AIndex: Integer): TPoint; override;
class function ItemGetState(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const AState: TListItemState; out AIsSet: Boolean): Boolean; override; // returns True if supported

View File

@ -529,6 +529,26 @@ begin
SendMessage(ALV.Handle, mes, AIndex, lparam(@Result));
end;
class procedure TWin32WSCustomListView.ItemExchange(const ALV: TCustomListView;
AItem: TListItem; const AIndex1, AIndex2: Integer);
begin
if not WSCheckHandleAllocated(ALV, 'ItemExchange') then
exit;
//TODO: there's no way to exchange items with Windows listview macros
//so we have to reassign TLvItem to AIndex1 and AIndex2
//or use RecreateWnd() which is very expensive
end;
class procedure TWin32WSCustomListView.ItemMove(const ALV: TCustomListView;
AItem: TListItem; const AFromIndex, AToIndex: Integer);
begin
if not WSCheckHandleAllocated(ALV, 'ItemMove') then
exit;
//TODO: there's no way to exchange items with Windows listview macros
//so we have to reassign TLvItem to AIndex1 and AIndex2
//or use RecreateWnd() which is very expensive
end;
class function TWin32WSCustomListView.ItemGetChecked(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem): Boolean;
begin
Result := False;