|
Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
|
UI-owned retained plot of a bounded immutable model range. Accessors run only in prepareChart, never paint/measure. They must not retain row borrows, mutate the model/tree, block or perform I/O. Projected OHLC values are presentation data; provider ownership is retained and the business model is never copied by the view. More...
#include <chart.hpp>
Public Member Functions | |
| Chart (ModelConsumer< T > consumer, std::function< std::optional< Ohlc >(const T &)> accessor, ChartOptions options={}, SizePolicy policy=DEFAULT_VIEWPORT_POLICY) | |
| Own one range consumer and the typed projection. | |
| ~Chart () override | |
| Cancel outstanding work on UI without waiting. | |
| RangeState | rangeState () const noexcept |
| std::uint64_t | dataRevision () const noexcept |
| RowRange | visibleRange () const noexcept |
| 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 |
| Public Member Functions inherited from portals::SizedWidget | |
| SizedWidget (SizePolicy policy={}) | |
| Own the supplied policies; checked by layout. | |
| SizePolicy | sizePolicy () const override |
| Copy current policy without borrowing storage. | |
| Public Member Functions inherited from portals::Widget | |
| virtual | ~Widget ()=default |
| Destroy on UI after the last active tree borrow. | |
| virtual void | mount () |
| Called exactly once after attachment; exceptions are reported. | |
| virtual void | unmount () |
| Called once before destruction, children first; cleanup continues on exceptions. | |
| 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 |
| Public Member Functions inherited from portals::LayoutItem | |
| virtual | ~LayoutItem ()=default |
| Destroy with the implementing widget. | |
Friends | |
| template<class U> | |
| std::expected< std::optional< ModelRequest< U > >, TreeError > | prepareChart (WidgetTree &, Node< Chart< U > >, const ModelFrame< U > &, CellSize, std::uint64_t) |
UI-owned retained plot of a bounded immutable model range. Accessors run only in prepareChart, never paint/measure. They must not retain row borrows, mutate the model/tree, block or perform I/O. Projected OHLC values are presentation data; provider ownership is retained and the business model is never copied by the view.
| T | Immutable domain record type; the same provider may serve VirtualTable<T>. |
|
inline |
Own one range consumer and the typed projection.
| consumer | Same-model UI-owned consumer transferred into the chart. |
| accessor | Owning callable returning an OHLC value, or nullopt to break the line. |
| options | Owning mode, scale and paint settings; invalid values fail preparation. |
| policy | Owning viewport constraints; explicit policies retain their modes and bounds. |
|
inlineoverridevirtual |
| local | Parent-relative bounds, borrowed by value. |
Reimplemented from portals::Widget.
|
inlinenoexcept |
|
inlineoverridevirtual |
| available | Available cell extent; negatives normalize to zero. |
Reimplemented from portals::Widget.
|
inlineoverridevirtual |
| context | Synchronous sink; command text borrows survive through the tree frame. |
Reimplemented from portals::Widget.
|
inlinenoexcept |
|
inlineoverridevirtual |
Reimplemented from portals::Widget.
|
inlinenoexcept |