Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
Loading...
Searching...
No Matches
aria::adapters::appkit::ObservableTableSource< T > Class Template Reference

#include <AppKitTableSource.hpp>

Public Types

using ViewForRowFn
 Render callback: given the row's shared_ptr<T>, the table view and the column being asked about, return the NSView* (typically an NSTableCellView) to display.

Instance Methods

(requires ::aria::ListSourceOf< L, T >) - ObservableTableSource
 Construct a binding between an aria list source and an NSTableView.
() - ~ObservableTableSource
() - ObservableTableSource
(ObservableTableSource &) - operator=
(std::size_t) - row_count
 Read the bridge's current row count (mainly for tests).
(std::shared_ptr< T >) - at
 Return the bridge's local snapshot at row i (or nullptr).

Member Typedef Documentation

◆ ViewForRowFn

- (using) adapters:
Initial value:
std::function<NSView*(NSTableView*,
NSTableColumn*,
std::shared_ptr<T>,
NSInteger )>

Render callback: given the row's shared_ptr<T>, the table view and the column being asked about, return the NSView* (typically an NSTableCellView) to display.

Use [tableView makeViewWithIdentifier:owner:] for cell reuse.

Constructor & Destructor Documentation

◆ ObservableTableSource [1/2]

- (requires) aria: (NSTableView *) tableView
(L &) source
(ViewForRowFn) view_for_row 

Construct a binding between an aria list source and an NSTableView.

Source writes must be serialized with construction so snapshot capture and observer registration see one coherent state.

◆ ~ObservableTableSource

- adapters:

◆ ObservableTableSource [2/2]

- adapters: (const ObservableTableSource< T > &)

Method Documentation

◆ operator=

- (ObservableTableSource &) adapters: (const ObservableTableSource< T > &)

◆ row_count

- (size_t) aria: const

Read the bridge's current row count (mainly for tests).

◆ at

- (shared_ptr< T >) aria: (std::size_t) i const

Return the bridge's local snapshot at row i (or nullptr).


The documentation for this class was generated from the following file: