Independent one-axis projection of an owning controller, without a content offset. Initialization chooses a sole standalone metrics writer or an area-owned read projection. Before initialization paint is empty and checked commands fail with INVALID_ARGUMENT. No timers, virtual-view adapters, tree ownership or observer runtime are retained.
More...
#include <scroll_controls.hpp >
portals::ScrollBar portals::ScrollBar
ScrollBar (std::shared_ptr< ScrollController > controller={}, ScrollAxis axis=ScrollAxis::VERTICAL , WidthPolicy width={}, ScrollBarOptions options={}, ControlStyle style={})
ScrollBar (std::shared_ptr< ScrollController > controller, ScrollAxis axis, WidthPolicy width, ScrollBarOptions options, ControlStyle style, SizePolicy policy)
Use an explicit policy without applying orientation-dependent defaults.
~ScrollBar () override
Release owning values without user callbacks or terminal operations.
void unmount () override
Release this node's lease and pointer token.
std::expected< CellSize , TreeError > measure (CellSize available) override
std::expected< void, TreeError > arrange (CellRect local) override
std::expected< void, TreeError > paint (PaintContext &context) override
ComputedStyle styleDefaults () const override
SizedWidget (SizePolicy policy={})
Own the supplied policies; checked by layout.
SizePolicy sizePolicy () const override
Copy current policy without borrowing storage.
virtual ~Widget ()=default
Destroy on UI after the last active tree borrow.
virtual void mount ()
Called exactly once after attachment; exceptions are reported.
virtual bool styleReadOnly () const noexcept
Read actual view-only state during style staging; false by default.
const std::shared_ptr< const StyleSnapshot > & computedStyle () const noexcept
Inspect the last atomically installed theme inside tree.read/frame.
std::uint64_t styleRevision () const noexcept
virtual ~LayoutItem ()=default
Destroy with the implementing widget.
struct detail::ScrollWidgetAccess
Independent one-axis projection of an owning controller, without a content offset. Initialization chooses a sole standalone metrics writer or an area-owned read projection. Before initialization paint is empty and checked commands fail with INVALID_ARGUMENT. No timers, virtual-view adapters, tree ownership or observer runtime are retained.
◆ ScrollBar() [1/2]
Parameters
controller Shared values; empty creates a default controller on this UI thread.
axis HORIZONTAL or VERTICAL; invalid values fail initialization/measurement.
width Complete owning glyph policy.
options Owning input/paint settings.
style Construction-only defaults beneath theme declarations.
Exceptions
std::bad_alloc On allocation; tree emplacement translates internal exceptions.
◆ ScrollBar() [2/2]
Use an explicit policy without applying orientation-dependent defaults.
Parameters
controller Shared values; empty creates a default controller on this UI thread.
axis HORIZONTAL or VERTICAL; invalid values fail initialization/measurement.
width Complete owning glyph policy.
options Owning input/paint settings.
style Construction-only defaults beneath theme declarations.
policy Owning layout constraints, including an explicit automatic policy.
Exceptions
std::bad_alloc On allocation; tree emplacement translates internal exceptions.
◆ arrange()
Parameters
local Parent-local allocation; caches zero-origin track geometry and owning values.
Returns Success or checked settings/controller/geometry error.
Reimplemented from portals::Widget .
◆ measure()
Parameters
available Offered extent; the intrinsic bar occupies one cell across its axis.
Returns One-cell intrinsic size or invalid settings/controller error.
Reimplemented from portals::Widget .
◆ paint()
Parameters
context Synchronous sink borrowing widget-owned glyphs through the frame.
Returns Success, WOULD_BLOCK above budget before submission, or sink error.
Reimplemented from portals::Widget .
◆ styleDefaults()
Returns Owning defaults beneath theme declarations.
Reimplemented from portals::Widget .
◆ unmount()
void portals::ScrollBar::unmount
(
)
override virtual
Release this node's lease and pointer token.
Reimplemented from portals::Widget .
The documentation for this class was generated from the following file: