Realm

oa::viewer::SharedItem

Rc<RefCell<T>> adapter: registers shared item state — the ownership pattern the Python bindings use for FigureView — as a workspace item. id/title/closable are snapshotted at construction because RefCell borrows cannot escape the trait’s &self signatures; pane identity is treated as stable for the workspace’s lifetime.

StRust public API

Declaration

pub struct SharedItem<T: WorkspaceItem> { /* private fields */ }
Public Rust declaration.

Public Methods

fn id(&self) -> &str
fn title(&self) -> &str
fn closable(&self) -> bool
fn update(&mut self, delta_ms: f32) -> Result<()>
fn render(&mut self, ui: &mut Ui<'_>, rect: PixelRect) -> Result<()>
fn on_event(&mut self, event: &InputEvent) -> Result<()>

Associated Functions

pub fn new(inner: Rc<RefCell<T>>) -> Self

Public Method Documentation

fn id( &self ) -> &str
No public source comment is attached to this declaration.
fn title( &self ) -> &str
No public source comment is attached to this declaration.
fn closable( &self ) -> bool
No public source comment is attached to this declaration.
fn update(&mut self, delta_ms: f32) -> Result<()>
No public source comment is attached to this declaration.
fn render(&mut self, ui: &mut Ui<'_>, rect: PixelRect) -> Result<()>
No public source comment is attached to this declaration.
fn on_event(&mut self, event: &InputEvent) -> Result<()>
No public source comment is attached to this declaration.
pub fn new( inner: Rc<RefCell<T>> ) -> Self
No public source comment is attached to this declaration.