trait DrawsScrollbars

Methods

array|Collection
scrollbar(array|Collection $visible, int $firstVisible, int $height, int $total, int $width, string $color = 'cyan')

Render a scrollbar beside the visible items.

int
scrollPosition(int $firstVisible, int $height, int $total)

Return the position where the scrollbar "handle" should be rendered.

Details

at line 19
protected array|Collection scrollbar(array|Collection $visible, int $firstVisible, int $height, int $total, int $width, string $color = 'cyan')

Render a scrollbar beside the visible items.

Parameters

array|Collection $visible
int $firstVisible
int $height
int $total
int $width
string $color

Return Value

array|Collection

at line 40
protected int scrollPosition(int $firstVisible, int $height, int $total)

Return the position where the scrollbar "handle" should be rendered.

Parameters

int $firstVisible
int $height
int $total

Return Value

int