The scrolling container of Lumen (lumen_scroll), behind the scroll element. A DScrollPanel whose canvas lays the children out as a flex container of unconstrained height, so that it grows with its content and the scrollbar appears when the content is taller than the panel. set_scrollbar_visible(false) hides the bar while keeping the wheel working. Derives from DScrollPanel.

Summary

Methods

Init()client
Lets the canvas be laid out by the scroll panel alone.
Measures the size the content needs, for a scroll panel whose size is auto.
Draws the background and the border of the style.
Lays the children out in the canvas, sizes the canvas to them and sets the scrollbar up.
Shows or hides the scrollbar.

Methods

Lets the canvas be laid out by the scroll panel alone.

PANEL:lumen_measure(max_w, _max_h)

client packages/lumen/views/cl_scroll.lua:76

Measures the size the content needs, for a scroll panel whose size is auto.

Parameters

  • max_w Number width available, nil if unconstrained
  • _max_h Number height available, nil if unconstrained

Returns

  • Number width
  • Number height

PANEL:Paint(w, h)

client packages/lumen/views/cl_scroll.lua:85

Draws the background and the border of the style.

Parameters

  • w Number panel width
  • h Number panel height

PANEL:PerformLayout(w, h)

client packages/lumen/views/cl_scroll.lua:50

Lays the children out in the canvas, sizes the canvas to them and sets the scrollbar up. The content is measured first, so that the children are laid out beside the scrollbar when it is going to show.

Parameters

  • w Number panel width
  • h Number panel height

PANEL:set_scrollbar_visible(visible)

client packages/lumen/views/cl_scroll.lua:19

Shows or hides the scrollbar.

Parameters

  • visible Boolean

Defined in