mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 01:18:07 +02:00
Gtk3: implemented TGtk3ListBox.GetScrollWidth(), TGtk3WSCustomListBox.GetScrollWidth()
This commit is contained in:
parent
b0a562be0d
commit
966b895003
@ -555,6 +555,7 @@ type
|
||||
function GetItemRect(const AIndex: integer): TRect;
|
||||
function GetIndexAtXY(const X, Y: integer): integer;
|
||||
function GetItemSelected(const AIndex: Integer): Boolean;
|
||||
function GetScrollWidth: integer;
|
||||
procedure SelectItem(const AIndex: Integer; ASelected: Boolean);
|
||||
procedure SetTopIndex(const AIndex: Integer);
|
||||
property ItemIndex: Integer read GetItemIndex write SetItemIndex;
|
||||
@ -5642,7 +5643,6 @@ begin
|
||||
AModel := PGtkTreeView(getContainerWidget)^.model;
|
||||
if AModel = nil then
|
||||
exit;
|
||||
|
||||
if AModel^.iter_nth_child(@Iter, nil, AIndex) then
|
||||
begin
|
||||
ACol := gtk_tree_view_get_column(PGtkTreeView(getContainerWidget), 0)^;
|
||||
@ -5694,6 +5694,11 @@ begin
|
||||
Result := ASelection^.iter_is_selected(@Item);
|
||||
end;
|
||||
|
||||
function TGtk3ListBox.GetScrollWidth: integer;
|
||||
begin
|
||||
Result := Round(getHorizontalScrollbar^.get_adjustment^.get_upper);
|
||||
end;
|
||||
|
||||
procedure TGtk3ListBox.SelectItem(const AIndex: Integer; ASelected: Boolean);
|
||||
var
|
||||
ASelection: PGtkTreeSelection;
|
||||
|
@ -434,6 +434,9 @@ class function TGtk3WSCustomListBox.GetScrollWidth(
|
||||
const ACustomListBox: TCustomListBox): Integer;
|
||||
begin
|
||||
Result := 0;
|
||||
if not WSCheckHandleAllocated(ACustomListBox, 'GetScrollWidth') then
|
||||
Exit;
|
||||
Result := TGtk3ListBox(ACustomListBox.Handle).GetScrollWidth;
|
||||
end;
|
||||
|
||||
class function TGtk3WSCustomListBox.GetSelCount(const ACustomListBox: TCustomListBox): integer;
|
||||
|
Loading…
Reference in New Issue
Block a user