mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 00:19:15 +02:00
parent
86f8e3af32
commit
466edbbd14
@ -850,13 +850,13 @@ type
|
|||||||
FSortColumn: Integer;
|
FSortColumn: Integer;
|
||||||
FImageChangeLink : TChangeLink;
|
FImageChangeLink : TChangeLink;
|
||||||
FScrollBars: TScrollStyle;
|
FScrollBars: TScrollStyle;
|
||||||
FScrolledLeft: integer; // horizontal scrolled pixels (hidden pixels at top)
|
FViewOriginCache: TPoint; // scrolled originwhile handle is not created
|
||||||
FScrolledTop: integer; // vertical scrolled pixels (hidden pixels at top)
|
FSelected: TListItem; // temp copy of the selected item
|
||||||
FSelected: TListItem; // temp copy of the selected item
|
FFocused: TListItem; // temp copy of the focused item
|
||||||
FFocused: TListItem; // temp copy of the focused item
|
FHoverTime: Integer; // temp copy of the hover time (the time a mouse must be over a item to auto select)
|
||||||
FHoverTime: Integer; // temp copy of the hover time (the time a mouse must be over a item to auto select)
|
// MWE: not used: see updateScrollbars
|
||||||
FLastHorzScrollInfo: TScrollInfo;
|
// FLastHorzScrollInfo: TScrollInfo;
|
||||||
FLastVertScrollInfo: TScrollInfo;
|
// FLastVertScrollInfo: TScrollInfo;
|
||||||
FUpdateCount: integer;
|
FUpdateCount: integer;
|
||||||
FOnChange: TLVChangeEvent;
|
FOnChange: TLVChangeEvent;
|
||||||
FOnColumnClick: TLVColumnClickEvent;
|
FOnColumnClick: TLVColumnClickEvent;
|
||||||
@ -897,11 +897,10 @@ type
|
|||||||
procedure SetOwnerData(const AValue: Boolean);
|
procedure SetOwnerData(const AValue: Boolean);
|
||||||
procedure SetProperty(const ALvpOrd: Integer; const AIsSet: Boolean);
|
procedure SetProperty(const ALvpOrd: Integer; const AIsSet: Boolean);
|
||||||
procedure SetScrollBars(const AValue: TScrollStyle);
|
procedure SetScrollBars(const AValue: TScrollStyle);
|
||||||
procedure SetScrolledLeft(AValue: Integer);
|
|
||||||
procedure SetScrolledTop(AValue: Integer);
|
|
||||||
procedure SetSelection(const AValue: TListItem);
|
procedure SetSelection(const AValue: TListItem);
|
||||||
procedure SetSortColumn(const AValue: Integer);
|
procedure SetSortColumn(const AValue: Integer);
|
||||||
procedure SetSortType(const AValue: TSortType);
|
procedure SetSortType(const AValue: TSortType);
|
||||||
|
procedure SetViewOrigin(AValue: TPoint);
|
||||||
procedure SetViewStyle(const Avalue: TViewStyle);
|
procedure SetViewStyle(const Avalue: TViewStyle);
|
||||||
procedure Sort;
|
procedure Sort;
|
||||||
procedure UpdateScrollbars;
|
procedure UpdateScrollbars;
|
||||||
@ -914,6 +913,8 @@ type
|
|||||||
|
|
||||||
protected
|
protected
|
||||||
procedure InitializeWnd; override;
|
procedure InitializeWnd; override;
|
||||||
|
procedure FinalizeWnd; override;
|
||||||
|
|
||||||
procedure DestroyWnd; override;
|
procedure DestroyWnd; override;
|
||||||
procedure Change(AItem: TListItem; AChange: Integer); dynamic;
|
procedure Change(AItem: TListItem; AChange: Integer); dynamic;
|
||||||
procedure ColClick(AColumn: TListColumn); dynamic;
|
procedure ColClick(AColumn: TListColumn); dynamic;
|
||||||
@ -923,8 +924,6 @@ type
|
|||||||
procedure DoInsert(AItem: TListItem); dynamic;
|
procedure DoInsert(AItem: TListItem); dynamic;
|
||||||
procedure DoSelectItem(AItem: TListItem; ASelected: Boolean); dynamic;
|
procedure DoSelectItem(AItem: TListItem; ASelected: Boolean); dynamic;
|
||||||
procedure InsertItem(Item : TListItem);
|
procedure InsertItem(Item : TListItem);
|
||||||
function GetMaxScrolledLeft : Integer;
|
|
||||||
function GetMaxScrolledTop : Integer;
|
|
||||||
procedure ImageChanged(Sender : TObject);
|
procedure ImageChanged(Sender : TObject);
|
||||||
procedure Loaded; override;
|
procedure Loaded; override;
|
||||||
|
|
||||||
@ -933,9 +932,6 @@ type
|
|||||||
function CustomDrawItem(AItem: TListItem; AState: TCustomDrawState; AStage: TCustomDrawStage): Boolean; virtual; //
|
function CustomDrawItem(AItem: TListItem; AState: TCustomDrawState; AStage: TCustomDrawStage): Boolean; virtual; //
|
||||||
function CustomDrawSubItem(AItem: TListItem; ASubItem: Integer; AState: TCustomDrawState; AStage: TCustomDrawStage): Boolean; virtual; //
|
function CustomDrawSubItem(AItem: TListItem; ASubItem: Integer; AState: TCustomDrawState; AStage: TCustomDrawStage): Boolean; virtual; //
|
||||||
function IntfCustomDraw(ATarget: TCustomDrawTarget; AStage: TCustomDrawStage; AItem, ASubItem: Integer; AState: TCustomDrawState; const ARect: PRect): TCustomDrawResult;
|
function IntfCustomDraw(ATarget: TCustomDrawTarget; AStage: TCustomDrawStage; AItem, ASubItem: Integer; AState: TCustomDrawState; const ARect: PRect): TCustomDrawResult;
|
||||||
|
|
||||||
procedure WMHScroll(var Msg: TLMScroll); message LM_HSCROLL;
|
|
||||||
procedure WMVScroll(var Msg: TLMScroll); message LM_VSCROLL;
|
|
||||||
protected
|
protected
|
||||||
property AllocBy: Integer read FAllocBy write SetAllocBy default 0;
|
property AllocBy: Integer read FAllocBy write SetAllocBy default 0;
|
||||||
property BorderStyle default bsSingle;
|
property BorderStyle default bsSingle;
|
||||||
@ -950,8 +946,6 @@ type
|
|||||||
property OwnerData: Boolean read FOwnerData write SetOwnerData default False;
|
property OwnerData: Boolean read FOwnerData write SetOwnerData default False;
|
||||||
property OwnerDraw: Boolean index Ord(lvpOwnerDraw) read GetProperty write SetProperty default False;
|
property OwnerDraw: Boolean index Ord(lvpOwnerDraw) read GetProperty write SetProperty default False;
|
||||||
property ReadOnly: Boolean index Ord(lvpReadOnly) read GetProperty write SetProperty default False;
|
property ReadOnly: Boolean index Ord(lvpReadOnly) read GetProperty write SetProperty default False;
|
||||||
property ScrolledLeft: integer read FScrolledLeft write SetScrolledLeft;
|
|
||||||
property ScrolledTop: integer read FScrolledTop write SetScrolledTop;
|
|
||||||
property ScrollBars: TScrollStyle read FScrollBars write SetScrollBars default ssBoth;
|
property ScrollBars: TScrollStyle read FScrollBars write SetScrollBars default ssBoth;
|
||||||
property ShowColumnHeaders: Boolean index Ord(lvpShowColumnHeaders) read GetProperty write SetProperty default True;
|
property ShowColumnHeaders: Boolean index Ord(lvpShowColumnHeaders) read GetProperty write SetProperty default True;
|
||||||
property ShowWorkAreas: Boolean index Ord(lvpShowWorkAreas) read GetProperty write SetProperty default False;
|
property ShowWorkAreas: Boolean index Ord(lvpShowWorkAreas) read GetProperty write SetProperty default False;
|
||||||
@ -996,7 +990,7 @@ type
|
|||||||
property Selected: TListItem read GetSelection write SetSelection;
|
property Selected: TListItem read GetSelection write SetSelection;
|
||||||
property TabStop default true;
|
property TabStop default true;
|
||||||
property TopItem: TListItem read GetTopItem;
|
property TopItem: TListItem read GetTopItem;
|
||||||
property ViewOrigin: TPoint read GetViewOrigin;
|
property ViewOrigin: TPoint read GetViewOrigin write SetViewOrigin;
|
||||||
property VisibleRowCount: Integer read GetVisibleRowCount;
|
property VisibleRowCount: Integer read GetVisibleRowCount;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -28,21 +28,6 @@ begin
|
|||||||
FViewStyle := vsList;
|
FViewStyle := vsList;
|
||||||
FSortType := stNone;
|
FSortType := stNone;
|
||||||
|
|
||||||
// MWE:
|
|
||||||
// A class is initalized to 0 when created
|
|
||||||
// so no need to initialize these here again
|
|
||||||
(*
|
|
||||||
FSortColumn := 0;
|
|
||||||
FOnCompare := nil;
|
|
||||||
FOnCustomDraw := nil;
|
|
||||||
FOnCustomDrawItem := nil;
|
|
||||||
FOnCustomDrawSubItem := nil;
|
|
||||||
FOnAdvancedCustomDraw := nil;
|
|
||||||
FOnAdvancedCustomDrawItem := nil;
|
|
||||||
FOnAdvancedCustomDrawSubItem := nil;
|
|
||||||
FSelected := nil;
|
|
||||||
FFocused := nil;
|
|
||||||
*)
|
|
||||||
FImageChangeLink := TChangeLink.Create;
|
FImageChangeLink := TChangeLink.Create;
|
||||||
FImageChangeLink.OnChange := @ImageChanged;
|
FImageChangeLink.OnChange := @ImageChanged;
|
||||||
FHoverTime := -1;
|
FHoverTime := -1;
|
||||||
@ -287,8 +272,7 @@ begin
|
|||||||
then LVC.SetImageList(Self, lvil, FImages[lvil]);
|
then LVC.SetImageList(Self, lvil, FImages[lvil]);
|
||||||
end;
|
end;
|
||||||
LVC.SetScrollBars(Self, FScrollBars);
|
LVC.SetScrollBars(Self, FScrollBars);
|
||||||
LVC.SetScrolledLeft(Self, FScrolledLeft);
|
LVC.SetViewOrigin(Self, FViewOriginCache) ;
|
||||||
LVC.SetScrolledTop(Self, FScrolledTop);
|
|
||||||
LVC.SetSort(Self, FSortType, FSortColumn);
|
LVC.SetSort(Self, FSortType, FSortColumn);
|
||||||
|
|
||||||
// add items
|
// add items
|
||||||
@ -453,6 +437,23 @@ begin
|
|||||||
OwnerFormDesignerModified(Self);
|
OwnerFormDesignerModified(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{------------------------------------------------------------------------------}
|
||||||
|
{ TCustomListView SetViewOrigin }
|
||||||
|
{------------------------------------------------------------------------------}
|
||||||
|
procedure TCustomListView.SetViewOrigin(AValue: TPoint);
|
||||||
|
begin
|
||||||
|
if AValue.X < 0 then AValue.X := 0;
|
||||||
|
if AValue.Y < 0 then AValue.Y := 0;
|
||||||
|
if HandleAllocated
|
||||||
|
then begin
|
||||||
|
TWSCustomListViewClass(WidgetSetClass).SetViewOrigin(Self, AValue);
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
FViewOriginCache := AValue;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
{ TCustomListView SetViewStyle }
|
{ TCustomListView SetViewStyle }
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
@ -464,7 +465,6 @@ begin
|
|||||||
TWSCustomListViewClass(WidgetSetClass).SetViewStyle(Self, AValue);
|
TWSCustomListViewClass(WidgetSetClass).SetViewStyle(Self, AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
{ TCustomListView SetSortType }
|
{ TCustomListView SetSortType }
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
@ -587,6 +587,16 @@ begin
|
|||||||
then TWSCustomListViewClass(WidgetSetClass).EndUpdate(Self);
|
then TWSCustomListViewClass(WidgetSetClass).EndUpdate(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomListView.FinalizeWnd;
|
||||||
|
var
|
||||||
|
LVC: TWSCustomListViewClass;
|
||||||
|
begin
|
||||||
|
LVC := TWSCustomListViewClass(WidgetSetClass);
|
||||||
|
// store origin
|
||||||
|
FViewOriginCache := LVC.GetViewOrigin(Self);
|
||||||
|
inherited FinalizeWnd;
|
||||||
|
end;
|
||||||
|
|
||||||
function TCustomListView.FindCaption(StartIndex: Integer; Value: string;
|
function TCustomListView.FindCaption(StartIndex: Integer; Value: string;
|
||||||
Partial, Inclusive, Wrap: Boolean; PartStart: Boolean = True): TListItem;
|
Partial, Inclusive, Wrap: Boolean; PartStart: Boolean = True): TListItem;
|
||||||
begin
|
begin
|
||||||
@ -692,11 +702,21 @@ begin
|
|||||||
else Result := FListItems[idx];
|
else Result := FListItems[idx];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{------------------------------------------------------------------------------}
|
||||||
|
{ TCustomListView GetViewOrigin }
|
||||||
|
{------------------------------------------------------------------------------}
|
||||||
function TCustomListView.GetViewOrigin: TPoint;
|
function TCustomListView.GetViewOrigin: TPoint;
|
||||||
begin
|
begin
|
||||||
Result := Point(FScrolledLeft, FScrolledTop);
|
if HandleAllocated
|
||||||
|
then begin
|
||||||
|
Result := TWSCustomListViewClass(WidgetSetClass).GetViewOrigin(Self);
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
Result := FViewOriginCache;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TCustomListView.GetVisibleRowCount: Integer;
|
function TCustomListView.GetVisibleRowCount: Integer;
|
||||||
begin
|
begin
|
||||||
if ViewStyle in [vsReport, vsList]
|
if ViewStyle in [vsReport, vsList]
|
||||||
@ -839,51 +859,31 @@ begin
|
|||||||
UpdateScrollBars;
|
UpdateScrollBars;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomListView.SetScrolledLeft(AValue: integer);
|
|
||||||
begin
|
|
||||||
if AValue<0 then AValue:=0;
|
|
||||||
if AValue=FScrolledLeft then exit;
|
|
||||||
// if AValue>GetMaxScrolledLeft then AValue:=GetMaxScrolledLeft;
|
|
||||||
// if AValue=FScrolledLeft then exit;
|
|
||||||
FScrolledLeft:=AValue;
|
|
||||||
if not HandleAllocated then Exit;
|
|
||||||
TWSCustomListViewClass(WidgetSetClass).SetScrolledLeft(Self, AValue);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCustomListView.SetScrolledTop(AValue: integer);
|
|
||||||
begin
|
|
||||||
if AValue<0 then AValue:=0;
|
|
||||||
if FScrolledTop=AValue then Exit;
|
|
||||||
// if AValue>GetMaxScrolledTop then AValue:=GetMaxScrolledTop;
|
|
||||||
// if AValue=FScrolledTop then Exit;
|
|
||||||
FScrolledTop:=AValue;
|
|
||||||
if not HandleAllocated then Exit;
|
|
||||||
TWSCustomListViewClass(WidgetSetClass).SetScrolledTop(Self, AValue);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCustomListView.UpdateScrollbars;
|
procedure TCustomListView.UpdateScrollbars;
|
||||||
var
|
var
|
||||||
ScrollInfo: TScrollInfo;
|
ScrollInfo: TScrollInfo;
|
||||||
begin
|
begin
|
||||||
|
// this needs to be done in the widgetset
|
||||||
DebugLn('TODO: TCustomListView.UpdateScrollbars');
|
DebugLn('TODO: TCustomListView.UpdateScrollbars');
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
if not HandleAllocated then exit
|
if not HandleAllocated then exit;
|
||||||
else
|
{
|
||||||
begin
|
|
||||||
// Exclude(FStates,tvsScrollbarChanged);
|
// Exclude(FStates,tvsScrollbarChanged);
|
||||||
if fScrollBars <> ssNone then begin
|
if fScrollBars = ssNone then Exit;
|
||||||
ScrollInfo.cbSize := SizeOf(ScrollInfo);
|
|
||||||
ScrollInfo.fMask := SIF_ALL or SIF_DISABLENOSCROLL;
|
ScrollInfo.cbSize := SizeOf(ScrollInfo);
|
||||||
ScrollInfo.nTrackPos := 0;
|
ScrollInfo.fMask := SIF_ALL or SIF_DISABLENOSCROLL;
|
||||||
if fScrollBars in [ssBoth, ssHorizontal] then begin
|
ScrollInfo.nTrackPos := 0;
|
||||||
// horizontal scrollbar
|
if fScrollBars in [ssBoth, ssHorizontal]
|
||||||
ScrollInfo.nMin := 0;
|
then begin
|
||||||
ScrollInfo.nPage := (ClientWidth-ScrollBarWidth)-2*BorderWidth;
|
// horizontal scrollbar
|
||||||
if ScrollInfo.nPage<1 then ScrollInfo.nPage:=1;
|
ScrollInfo.nMin := 0;
|
||||||
ScrollInfo.nMax := {GetMaxScrollLeft+}ScrollInfo.nPage;
|
ScrollInfo.nPage := (ClientWidth-ScrollBarWidth)-2*BorderWidth;
|
||||||
if ScrollInfo.nMax<1 then ScrollInfo.nMax:=1;
|
if ScrollInfo.nPage<1 then ScrollInfo.nPage:=1;
|
||||||
ScrollInfo.nPos := FScrolledLeft;
|
ScrollInfo.nMax := {GetMaxScrollLeft+}ScrollInfo.nPage;
|
||||||
|
if ScrollInfo.nMax<1 then ScrollInfo.nMax:=1;
|
||||||
|
ScrollInfo.nPos := FScrolledLeft;
|
||||||
if not CompareMem(@ScrollInfo,@FLastHorzScrollInfo,SizeOf(TScrollInfo))
|
if not CompareMem(@ScrollInfo,@FLastHorzScrollInfo,SizeOf(TScrollInfo))
|
||||||
then begin
|
then begin
|
||||||
FLastHorzScrollInfo:=ScrollInfo;
|
FLastHorzScrollInfo:=ScrollInfo;
|
||||||
@ -909,63 +909,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomListView.WMHScroll(var Msg: TLMScroll);
|
|
||||||
begin
|
|
||||||
case Msg.ScrollCode of
|
|
||||||
// Scrolls to start / end of the text
|
|
||||||
SB_LEFT: ScrolledLeft := 0;
|
|
||||||
SB_RIGHT: ScrolledLeft := width{GetMaxScrollLeft};
|
|
||||||
// Scrolls one line left / right
|
|
||||||
SB_LINERIGHT: ScrolledLeft := ScrolledLeft + FDefaultItemHeight div 2;
|
|
||||||
SB_LINELEFT: ScrolledLeft := ScrolledLeft - FDefaultItemHeight div 2;
|
|
||||||
// Scrolls one page of lines left / right
|
|
||||||
SB_PAGERIGHT: ScrolledLeft := ScrolledLeft + (ClientHeight-ScrollBarWidth)
|
|
||||||
- FDefaultItemHeight;
|
|
||||||
SB_PAGELEFT: ScrolledLeft := ScrolledLeft - (ClientHeight-ScrollBarWidth)
|
|
||||||
+ FDefaultItemHeight;
|
|
||||||
// Scrolls to the current scroll bar position
|
|
||||||
SB_THUMBPOSITION,
|
|
||||||
SB_THUMBTRACK: ScrolledLeft := Msg.Pos;
|
|
||||||
// Ends scrolling
|
|
||||||
SB_ENDSCROLL: ;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCustomListView.WMVScroll(var Msg: TLMScroll);
|
|
||||||
begin
|
|
||||||
case Msg.ScrollCode of
|
|
||||||
// Scrolls to start / end of the text
|
|
||||||
SB_TOP: ScrolledTop := 0;
|
|
||||||
SB_BOTTOM: ScrolledTop := Height{GetMaxScrollTop};
|
|
||||||
// Scrolls one line up / down
|
|
||||||
SB_LINEDOWN: ScrolledTop := ScrolledTop + FDefaultItemHeight div 2;
|
|
||||||
SB_LINEUP: ScrolledTop := ScrolledTop - FDefaultItemHeight div 2;
|
|
||||||
// Scrolls one page of lines up / down
|
|
||||||
SB_PAGEDOWN: ScrolledTop := ScrolledTop + (ClientHeight-ScrollBarWidth)
|
|
||||||
- FDefaultItemHeight;
|
|
||||||
SB_PAGEUP: ScrolledTop := ScrolledTop - (ClientHeight-ScrollBarWidth)
|
|
||||||
+ FDefaultItemHeight;
|
|
||||||
// Scrolls to the current scroll bar position
|
|
||||||
SB_THUMBPOSITION,
|
|
||||||
SB_THUMBTRACK: ScrolledTop := Msg.Pos;
|
|
||||||
// Ends scrolling
|
|
||||||
SB_ENDSCROLL: ;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
Function TCustomListView.GetMaxScrolledLeft : Integer;
|
|
||||||
begin
|
|
||||||
Result := 0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
Function TCustomListView.GetMaxScrolledTop : Integer;
|
|
||||||
begin
|
|
||||||
Result := 0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// included by comctrls.pp
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,6 +117,7 @@ type
|
|||||||
class function GetSelCount(const ALV: TCustomListView): Integer; override;
|
class function GetSelCount(const ALV: TCustomListView): Integer; override;
|
||||||
class function GetSelection(const ALV: TCustomListView): Integer; override;
|
class function GetSelection(const ALV: TCustomListView): Integer; override;
|
||||||
class function GetTopItem(const ALV: TCustomListView): Integer; override;
|
class function GetTopItem(const ALV: TCustomListView): Integer; override;
|
||||||
|
class function GetViewOrigin(const ALV: TCustomListView): TPoint; override;
|
||||||
class function GetVisibleRowCount(const ALV: TCustomListView): Integer; override;
|
class function GetVisibleRowCount(const ALV: TCustomListView): Integer; override;
|
||||||
|
|
||||||
class procedure SetAllocBy(const ALV: TCustomListView; const AValue: Integer); override;
|
class procedure SetAllocBy(const ALV: TCustomListView; const AValue: Integer); override;
|
||||||
@ -128,9 +129,8 @@ type
|
|||||||
class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); override;
|
class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); override;
|
||||||
class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override;
|
class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override;
|
||||||
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override;
|
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override;
|
||||||
class procedure SetScrolledLeft(const ALV: TCustomListView; const AValue: Integer); override;
|
|
||||||
class procedure SetScrolledTop(const ALV: TCustomListView; const AValue: Integer); override;
|
|
||||||
class procedure SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer); override;
|
class procedure SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer); override;
|
||||||
|
class procedure SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint); override;
|
||||||
class procedure SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle); override;
|
class procedure SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle); override;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
@ -1068,6 +1068,22 @@ begin
|
|||||||
Result := -CListWidget^.voffset div (CListWidget^.row_height + 1);
|
Result := -CListWidget^.voffset div (CListWidget^.row_height + 1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class function TGtkWSCustomListView.GetViewOrigin(const ALV: TCustomListView): TPoint;
|
||||||
|
var
|
||||||
|
WidgetInfo: PWidgetInfo;
|
||||||
|
CListWidget: PGtkCList;
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ALV, 'GetViewOrigin')
|
||||||
|
then Exit;
|
||||||
|
|
||||||
|
WidgetInfo := GetWidgetInfo(Pointer(ALV.Handle));
|
||||||
|
CListWidget := PGtkCList(WidgetInfo^.CoreWidget);
|
||||||
|
if CListWidget=nil then exit;
|
||||||
|
|
||||||
|
Result.X := Round(CListWidget^.hAdjustment^.value);
|
||||||
|
Result.Y := Round(CListWidget^.vAdjustment^.value);
|
||||||
|
end;
|
||||||
|
|
||||||
class function TGtkWSCustomListView.GetVisibleRowCount(const ALV: TCustomListView): Integer;
|
class function TGtkWSCustomListView.GetVisibleRowCount(const ALV: TCustomListView): Integer;
|
||||||
var
|
var
|
||||||
WidgetInfo: PWidgetInfo;
|
WidgetInfo: PWidgetInfo;
|
||||||
@ -1292,35 +1308,6 @@ begin
|
|||||||
gtk_scrolled_window_set_policy(ScrollWidget, hPolicy, vPolicy);
|
gtk_scrolled_window_set_policy(ScrollWidget, hPolicy, vPolicy);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TGtkWSCustomListView.SetScrolledLeft(const ALV: TCustomListView; const AValue: Integer);
|
|
||||||
var
|
|
||||||
WidgetInfo: PWidgetInfo;
|
|
||||||
CListWidget: PGtkCList;
|
|
||||||
begin
|
|
||||||
if not WSCheckHandleAllocated(ALV, 'SetScrolledLeft')
|
|
||||||
then Exit;
|
|
||||||
|
|
||||||
WidgetInfo := GetWidgetInfo(Pointer(ALV.Handle));
|
|
||||||
CListWidget := PGtkCList(WidgetInfo^.CoreWidget);
|
|
||||||
|
|
||||||
gtk_adjustment_set_value(CListWidget^.hAdjustment, AValue);
|
|
||||||
end;
|
|
||||||
|
|
||||||
class procedure TGtkWSCustomListView.SetScrolledTop(const ALV: TCustomListView; const AValue: Integer);
|
|
||||||
var
|
|
||||||
WidgetInfo: PWidgetInfo;
|
|
||||||
CListWidget: PGtkCList;
|
|
||||||
begin
|
|
||||||
if not WSCheckHandleAllocated(ALV, 'SetScrolledTop')
|
|
||||||
then Exit;
|
|
||||||
|
|
||||||
WidgetInfo := GetWidgetInfo(Pointer(ALV.Handle));
|
|
||||||
CListWidget := PGtkCList(WidgetInfo^.CoreWidget);
|
|
||||||
if CListWidget=nil then exit;
|
|
||||||
|
|
||||||
gtk_adjustment_set_value(CListWidget^.vAdjustment, AValue);
|
|
||||||
end;
|
|
||||||
|
|
||||||
class procedure TGtkWSCustomListView.SetSort(const ALV: TCustomListView;
|
class procedure TGtkWSCustomListView.SetSort(const ALV: TCustomListView;
|
||||||
const AType: TSortType; const AColumn: Integer);
|
const AType: TSortType; const AColumn: Integer);
|
||||||
var
|
var
|
||||||
@ -1337,6 +1324,22 @@ begin
|
|||||||
// TODO implement
|
// TODO implement
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TGtkWSCustomListView.SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint);
|
||||||
|
var
|
||||||
|
WidgetInfo: PWidgetInfo;
|
||||||
|
CListWidget: PGtkCList;
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ALV, 'SetViewOrigin')
|
||||||
|
then Exit;
|
||||||
|
|
||||||
|
WidgetInfo := GetWidgetInfo(Pointer(ALV.Handle));
|
||||||
|
CListWidget := PGtkCList(WidgetInfo^.CoreWidget);
|
||||||
|
if CListWidget=nil then exit;
|
||||||
|
|
||||||
|
gtk_adjustment_set_value(CListWidget^.hAdjustment, AValue.X);
|
||||||
|
gtk_adjustment_set_value(CListWidget^.vAdjustment, AValue.Y);
|
||||||
|
end;
|
||||||
|
|
||||||
class procedure TGtkWSCustomListView.SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle);
|
class procedure TGtkWSCustomListView.SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle);
|
||||||
var
|
var
|
||||||
WidgetInfo: PWidgetInfo;
|
WidgetInfo: PWidgetInfo;
|
||||||
|
@ -129,6 +129,7 @@ type
|
|||||||
class function GetSelCount(const ALV: TCustomListView): Integer; override;
|
class function GetSelCount(const ALV: TCustomListView): Integer; override;
|
||||||
class function GetSelection(const ALV: TCustomListView): Integer; override;
|
class function GetSelection(const ALV: TCustomListView): Integer; override;
|
||||||
class function GetTopItem(const ALV: TCustomListView): Integer; override;
|
class function GetTopItem(const ALV: TCustomListView): Integer; override;
|
||||||
|
class function GetViewOrigin(const ALV: TCustomListView): TPoint; override;
|
||||||
class function GetVisibleRowCount(const ALV: TCustomListView): Integer; override;
|
class function GetVisibleRowCount(const ALV: TCustomListView): Integer; override;
|
||||||
|
|
||||||
class procedure SetAllocBy(const ALV: TCustomListView; const AValue: Integer); override;
|
class procedure SetAllocBy(const ALV: TCustomListView; const AValue: Integer); override;
|
||||||
@ -140,9 +141,8 @@ type
|
|||||||
class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); override;
|
class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); override;
|
||||||
class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override;
|
class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override;
|
||||||
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override;
|
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override;
|
||||||
class procedure SetScrolledLeft(const ALV: TCustomListView; const AValue: Integer); override;
|
|
||||||
class procedure SetScrolledTop(const ALV: TCustomListView; const AValue: Integer); override;
|
|
||||||
class procedure SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer); override;
|
class procedure SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer); override;
|
||||||
|
class procedure SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint); override;
|
||||||
class procedure SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle); override;
|
class procedure SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -1071,6 +1071,22 @@ begin
|
|||||||
then Exit;
|
then Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class function TGtk2WSCustomListView.GetViewOrigin(const ALV: TCustomListView): TPoint;
|
||||||
|
var
|
||||||
|
Widgets: PTVWidgets;
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ALV, 'GetViewOrigin')
|
||||||
|
then begin
|
||||||
|
Result := Point(0, 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
GetCommonTreeViewWidgets(PGtkWidget(ALV.Handle), Widgets);
|
||||||
|
|
||||||
|
// not really needed to retrieve the adjustments, since the TVWidgets has this info also based on events
|
||||||
|
Result := Point(Widgets^.ScrollingData.HValue, Widgets^.ScrollingData.VValue);
|
||||||
|
end;
|
||||||
|
|
||||||
class function TGtk2WSCustomListView.GetVisibleRowCount(const ALV: TCustomListView
|
class function TGtk2WSCustomListView.GetVisibleRowCount(const ALV: TCustomListView
|
||||||
): Integer;
|
): Integer;
|
||||||
begin
|
begin
|
||||||
@ -1171,36 +1187,6 @@ begin
|
|||||||
gtk_scrolled_window_set_policy(ScrollWidget, hPolicy, vPolicy);
|
gtk_scrolled_window_set_policy(ScrollWidget, hPolicy, vPolicy);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TGtk2WSCustomListView.SetScrolledLeft(const ALV: TCustomListView;
|
|
||||||
const AValue: Integer);
|
|
||||||
var
|
|
||||||
Widgets: PTVWidgets;
|
|
||||||
begin
|
|
||||||
if not WSCheckHandleAllocated(ALV, 'SetScrolledLeft')
|
|
||||||
then Exit;
|
|
||||||
|
|
||||||
GetCommonTreeViewWidgets(PGtkWidget(ALV.Handle), Widgets);
|
|
||||||
|
|
||||||
with Widgets^ do begin
|
|
||||||
gtk_tree_view_scroll_to_point(PGtkTreeView(MainView), AValue, -1);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
class procedure TGtk2WSCustomListView.SetScrolledTop(const ALV: TCustomListView;
|
|
||||||
const AValue: Integer);
|
|
||||||
var
|
|
||||||
Widgets: PTVWidgets;
|
|
||||||
begin
|
|
||||||
if not WSCheckHandleAllocated(ALV, 'SetScrolledTop')
|
|
||||||
then Exit;
|
|
||||||
|
|
||||||
GetCommonTreeViewWidgets(PGtkWidget(ALV.Handle), Widgets);
|
|
||||||
|
|
||||||
with Widgets^ do begin
|
|
||||||
gtk_tree_view_scroll_to_point(PGtkTreeView(MainView), -1, AValue);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
class procedure TGtk2WSCustomListView.SetSort(const ALV: TCustomListView;
|
class procedure TGtk2WSCustomListView.SetSort(const ALV: TCustomListView;
|
||||||
const AType: TSortType; const AColumn: Integer);
|
const AType: TSortType; const AColumn: Integer);
|
||||||
begin
|
begin
|
||||||
@ -1209,6 +1195,17 @@ begin
|
|||||||
// inherited SetSort(ALV, AType, AColumn);
|
// inherited SetSort(ALV, AType, AColumn);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TGtk2WSCustomListView.SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint);
|
||||||
|
var
|
||||||
|
Widgets: PTVWidgets;
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ALV, 'SetViewOrigin')
|
||||||
|
then Exit;
|
||||||
|
|
||||||
|
GetCommonTreeViewWidgets(PGtkWidget(ALV.Handle), Widgets);
|
||||||
|
gtk_tree_view_scroll_to_point(PGtkTreeView(Widgets^.MainView), AValue.X, AValue.Y);
|
||||||
|
end;
|
||||||
|
|
||||||
class procedure TGtk2WSCustomListView.SetViewStyle(const ALV: TCustomListView;
|
class procedure TGtk2WSCustomListView.SetViewStyle(const ALV: TCustomListView;
|
||||||
const Avalue: TViewStyle);
|
const Avalue: TViewStyle);
|
||||||
|
|
||||||
|
@ -125,6 +125,7 @@ type
|
|||||||
class function GetSelCount(const ALV: TCustomListView): Integer; override;
|
class function GetSelCount(const ALV: TCustomListView): Integer; override;
|
||||||
class function GetSelection(const ALV: TCustomListView): Integer; override;
|
class function GetSelection(const ALV: TCustomListView): Integer; override;
|
||||||
class function GetTopItem(const ALV: TCustomListView): Integer; override;
|
class function GetTopItem(const ALV: TCustomListView): Integer; override;
|
||||||
|
class function GetViewOrigin(const ALV: TCustomListView): TPoint; override;
|
||||||
class function GetVisibleRowCount(const ALV: TCustomListView): Integer; override;
|
class function GetVisibleRowCount(const ALV: TCustomListView): Integer; override;
|
||||||
|
|
||||||
class procedure SetAllocBy(const ALV: TCustomListView; const AValue: Integer); override;
|
class procedure SetAllocBy(const ALV: TCustomListView; const AValue: Integer); override;
|
||||||
@ -136,9 +137,8 @@ type
|
|||||||
class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); override;
|
class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); override;
|
||||||
class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override;
|
class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override;
|
||||||
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override;
|
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override;
|
||||||
class procedure SetScrolledLeft(const ALV: TCustomListView; const AValue: Integer); override;
|
|
||||||
class procedure SetScrolledTop(const ALV: TCustomListView; const AValue: Integer); override;
|
|
||||||
class procedure SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer); override;
|
class procedure SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer); override;
|
||||||
|
class procedure SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint); override;
|
||||||
class procedure SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle); override;
|
class procedure SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -520,6 +520,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class function TWin32WSCustomListView.GetViewOrigin(const ALV: TCustomListView): TPoint;
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ALV, 'GetViewOrigin')
|
||||||
|
then begin
|
||||||
|
Result := Point(0, 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ListView_GetOrigin(ALV.Handle, Result);
|
||||||
|
end;
|
||||||
|
|
||||||
class function TWin32WSCustomListView.GetVisibleRowCount(const ALV: TCustomListView): Integer;
|
class function TWin32WSCustomListView.GetVisibleRowCount(const ALV: TCustomListView): Integer;
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
@ -715,22 +726,6 @@ begin
|
|||||||
else UpdateStyle(ALV.Handle, LVS_NOSCROLL, 0);
|
else UpdateStyle(ALV.Handle, LVS_NOSCROLL, 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TWin32WSCustomListView.SetScrolledLeft(const ALV: TCustomListView; const AValue: Integer);
|
|
||||||
begin
|
|
||||||
if not WSCheckHandleAllocated(ALV, 'SetScrolledLeft')
|
|
||||||
then Exit;
|
|
||||||
|
|
||||||
ListView_Scroll(ALV.Handle, AValue, 0);
|
|
||||||
end;
|
|
||||||
|
|
||||||
class procedure TWin32WSCustomListView.SetScrolledTop(const ALV: TCustomListView; const AValue: Integer);
|
|
||||||
begin
|
|
||||||
if not WSCheckHandleAllocated(ALV, 'SetScrolledTop')
|
|
||||||
then Exit;
|
|
||||||
|
|
||||||
ListView_Scroll(ALV.Handle, 0, AValue);
|
|
||||||
end;
|
|
||||||
|
|
||||||
class procedure TWin32WSCustomListView.SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer);
|
class procedure TWin32WSCustomListView.SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer);
|
||||||
begin
|
begin
|
||||||
if not WSCheckHandleAllocated(ALV, 'SetSort')
|
if not WSCheckHandleAllocated(ALV, 'SetSort')
|
||||||
@ -739,6 +734,22 @@ begin
|
|||||||
// TODO: implement
|
// TODO: implement
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TWin32WSCustomListView.SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint);
|
||||||
|
var
|
||||||
|
dx, dy: Integer;
|
||||||
|
Origin: TPoint;
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ALV, 'SetViewOrigin')
|
||||||
|
then Exit;
|
||||||
|
|
||||||
|
ListView_GetOrigin(ALV.Handle, Origin);
|
||||||
|
|
||||||
|
dx := AValue.X - Origin.X;
|
||||||
|
dy := AValue.Y - Origin.Y;
|
||||||
|
if (dx <> 0) or (dy <> 0)
|
||||||
|
then ListView_Scroll(ALV.Handle, dx, dy);
|
||||||
|
end;
|
||||||
|
|
||||||
class procedure TWin32WSCustomListView.SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle);
|
class procedure TWin32WSCustomListView.SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle);
|
||||||
const
|
const
|
||||||
//vsIcon, vsSmallIcon, vsList, vsReport
|
//vsIcon, vsSmallIcon, vsList, vsReport
|
||||||
|
@ -119,6 +119,7 @@ type
|
|||||||
class function GetSelCount(const ALV: TCustomListView): Integer; override;
|
class function GetSelCount(const ALV: TCustomListView): Integer; override;
|
||||||
class function GetSelection(const ALV: TCustomListView): Integer; override;
|
class function GetSelection(const ALV: TCustomListView): Integer; override;
|
||||||
class function GetTopItem(const ALV: TCustomListView): Integer; override;
|
class function GetTopItem(const ALV: TCustomListView): Integer; override;
|
||||||
|
class function GetViewOrigin(const ALV: TCustomListView): TPoint; override;
|
||||||
class function GetVisibleRowCount(const ALV: TCustomListView): Integer; override;
|
class function GetVisibleRowCount(const ALV: TCustomListView): Integer; override;
|
||||||
|
|
||||||
class procedure SetAllocBy(const ALV: TCustomListView; const AValue: Integer); override;
|
class procedure SetAllocBy(const ALV: TCustomListView; const AValue: Integer); override;
|
||||||
@ -130,9 +131,8 @@ type
|
|||||||
class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); override;
|
class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); override;
|
||||||
class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override;
|
class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override;
|
||||||
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override;
|
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override;
|
||||||
class procedure SetScrolledLeft(const ALV: TCustomListView; const AValue: Integer); override;
|
|
||||||
class procedure SetScrolledTop(const ALV: TCustomListView; const AValue: Integer); override;
|
|
||||||
class procedure SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer); override;
|
class procedure SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer); override;
|
||||||
|
class procedure SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint); override;
|
||||||
class procedure SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle); override;
|
class procedure SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -463,6 +463,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class function TWinCEWSCustomListView.GetViewOrigin(const ALV: TCustomListView): TPoint;
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ALV, 'GetViewOrigin')
|
||||||
|
then begin
|
||||||
|
Result := Point(0, 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ListView_GetOrigin(ALV.Handle, Result);
|
||||||
|
end;
|
||||||
|
|
||||||
class function TWinCEWSCustomListView.GetVisibleRowCount(const ALV: TCustomListView): Integer;
|
class function TWinCEWSCustomListView.GetVisibleRowCount(const ALV: TCustomListView): Integer;
|
||||||
begin
|
begin
|
||||||
if not WSCheckHandleAllocated(ALV, 'GetVisibleRowCount')
|
if not WSCheckHandleAllocated(ALV, 'GetVisibleRowCount')
|
||||||
@ -660,22 +671,6 @@ begin
|
|||||||
else UpdateStyle(ALV.Handle, LVS_NOSCROLL, 0);
|
else UpdateStyle(ALV.Handle, LVS_NOSCROLL, 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TWinCEWSCustomListView.SetScrolledLeft(const ALV: TCustomListView; const AValue: Integer);
|
|
||||||
begin
|
|
||||||
if not WSCheckHandleAllocated(ALV, 'SetScrolledLeft')
|
|
||||||
then Exit;
|
|
||||||
|
|
||||||
ListView_Scroll(ALV.Handle, AValue, 0);
|
|
||||||
end;
|
|
||||||
|
|
||||||
class procedure TWinCEWSCustomListView.SetScrolledTop(const ALV: TCustomListView; const AValue: Integer);
|
|
||||||
begin
|
|
||||||
if not WSCheckHandleAllocated(ALV, 'SetScrolledTop')
|
|
||||||
then Exit;
|
|
||||||
|
|
||||||
ListView_Scroll(ALV.Handle, 0, AValue);
|
|
||||||
end;
|
|
||||||
|
|
||||||
class procedure TWinCEWSCustomListView.SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer);
|
class procedure TWinCEWSCustomListView.SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer);
|
||||||
begin
|
begin
|
||||||
if not WSCheckHandleAllocated(ALV, 'SetSort')
|
if not WSCheckHandleAllocated(ALV, 'SetSort')
|
||||||
@ -684,6 +679,22 @@ begin
|
|||||||
// TODO: implement
|
// TODO: implement
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TWinCEWSCustomListView.SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint);
|
||||||
|
var
|
||||||
|
dx, dy: Integer;
|
||||||
|
Origin: TPoint;
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ALV, 'SetViewOrigin')
|
||||||
|
then Exit;
|
||||||
|
|
||||||
|
ListView_GetOrigin(ALV.Handle, Origin);
|
||||||
|
|
||||||
|
dx := AValue.X - Origin.X;
|
||||||
|
dy := AValue.Y - Origin.Y;
|
||||||
|
if (dx <> 0) or (dy <> 0)
|
||||||
|
then ListView_Scroll(ALV.Handle, dx, dy);
|
||||||
|
end;
|
||||||
|
|
||||||
class procedure TWinCEWSCustomListView.SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle);
|
class procedure TWinCEWSCustomListView.SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle);
|
||||||
const
|
const
|
||||||
//vsIcon, vsSmallIcon, vsList, vsReport
|
//vsIcon, vsSmallIcon, vsList, vsReport
|
||||||
|
@ -114,6 +114,7 @@ type
|
|||||||
class function GetSelCount(const ALV: TCustomListView): Integer; virtual;
|
class function GetSelCount(const ALV: TCustomListView): Integer; virtual;
|
||||||
class function GetSelection(const ALV: TCustomListView): Integer; virtual;
|
class function GetSelection(const ALV: TCustomListView): Integer; virtual;
|
||||||
class function GetTopItem(const ALV: TCustomListView): Integer; virtual;
|
class function GetTopItem(const ALV: TCustomListView): Integer; virtual;
|
||||||
|
class function GetViewOrigin(const ALV: TCustomListView): TPoint; virtual;
|
||||||
class function GetVisibleRowCount(const ALV: TCustomListView): Integer; virtual;
|
class function GetVisibleRowCount(const ALV: TCustomListView): Integer; virtual;
|
||||||
|
|
||||||
class procedure SetAllocBy(const ALV: TCustomListView; const AValue: Integer); virtual;
|
class procedure SetAllocBy(const ALV: TCustomListView; const AValue: Integer); virtual;
|
||||||
@ -125,9 +126,8 @@ type
|
|||||||
class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); virtual;
|
class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); virtual;
|
||||||
class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); virtual;
|
class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); virtual;
|
||||||
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); virtual;
|
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); virtual;
|
||||||
class procedure SetScrolledLeft(const ALV: TCustomListView; const AValue: Integer); virtual;
|
|
||||||
class procedure SetScrolledTop(const ALV: TCustomListView; const AValue: Integer); virtual;
|
|
||||||
class procedure SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer); virtual;
|
class procedure SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer); virtual;
|
||||||
|
class procedure SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint); virtual;
|
||||||
class procedure SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle); virtual;
|
class procedure SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle); virtual;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -375,6 +375,11 @@ begin
|
|||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class function TWSCustomListView.GetViewOrigin(const ALV: TCustomListView): TPoint;
|
||||||
|
begin
|
||||||
|
Result := Point(0, 0);
|
||||||
|
end;
|
||||||
|
|
||||||
class function TWSCustomListView.GetVisibleRowCount(const ALV: TCustomListView): Integer;
|
class function TWSCustomListView.GetVisibleRowCount(const ALV: TCustomListView): Integer;
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
@ -412,18 +417,14 @@ class procedure TWSCustomListView.SetScrollBars(const ALV: TCustomListView; cons
|
|||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TWSCustomListView.SetScrolledLeft(const ALV: TCustomListView; const AValue: Integer);
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
class procedure TWSCustomListView.SetScrolledTop(const ALV: TCustomListView; const AValue: Integer);
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
class procedure TWSCustomListView.SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer);
|
class procedure TWSCustomListView.SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer);
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TWSCustomListView.SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint);
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
class procedure TWSCustomListView.SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle);
|
class procedure TWSCustomListView.SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle);
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user