pub struct FigureView { /* private fields */ }Expand description
Interactive Figure presentation through Viewer live mode.
Attach with Viewer::set_live_source, which switches the viewer to live
mode; the figure keeps its recorded theme and artists while the view owns
only per-axes limit overrides.
Implementations§
Source§impl FigureView
impl FigureView
Sourcepub fn figure_mut(&mut self) -> &mut Figure
pub fn figure_mut(&mut self) -> &mut Figure
Mutable figure access for streaming series updates between frames.
Recorded limits only take effect while the axes has no active view
override; R restores the limits present at attach time.
Sourcepub fn crosshair(&mut self, visible: bool)
pub fn crosshair(&mut self, visible: bool)
Toggle the pointer crosshair and data-coordinate readout (default on).
Sourcepub fn set_name(&mut self, name: impl Into<String>)
pub fn set_name(&mut self, name: impl Into<String>)
Set the pane identity shown when the view is hosted as a
WorkspaceItem (tab id and label).
Sourcepub fn render_at(&mut self, ui: &mut Ui<'_>, rect: PixelRect) -> Result<()>
pub fn render_at(&mut self, ui: &mut Ui<'_>, rect: PixelRect) -> Result<()>
Render the figure into rect of the current Ui frame instead of
filling the window — the WorkspaceItem pane path.
Sourcepub fn reset_view(&mut self)
pub fn reset_view(&mut self)
Restore every axes to the limits recorded at attach time.
Sourcepub fn state(&self) -> FigureViewState
pub fn state(&self) -> FigureViewState
Snapshot the active view overrides for later restore.
Sourcepub fn restore(&mut self, state: &FigureViewState)
pub fn restore(&mut self, state: &FigureViewState)
Restore a snapshot taken by state, dropping in-flight transitions.
Trait Implementations§
Source§impl ViewerLiveSource for FigureView
impl ViewerLiveSource for FigureView
fn capabilities(&self) -> ViewerLiveCapabilities
Source§fn open(&mut self, _runtime: &Runtime) -> Result<()>
fn open(&mut self, _runtime: &Runtime) -> Result<()>
Runtime.Source§fn update(&mut self, delta_ms: f32) -> Result<()>
fn update(&mut self, delta_ms: f32) -> Result<()>
delta_ms is the frame time in milliseconds.Source§fn on_event(&mut self, event: &InputEvent) -> Result<()>
fn on_event(&mut self, event: &InputEvent) -> Result<()>
receives_events is true).Source§fn render(&mut self, ui: &mut Ui<'_>, width: u32, height: u32) -> Result<()>
fn render(&mut self, ui: &mut Ui<'_>, width: u32, height: u32) -> Result<()>
ui. Called every frame.Source§fn canvas_texture(&self) -> Option<&Texture>
fn canvas_texture(&self) -> Option<&Texture>
render draws only the source’s overlays when this is provided.Source§impl WorkspaceItem for FigureView
impl WorkspaceItem for FigureView
Source§fn update(&mut self, delta_ms: f32) -> Result<()>
fn update(&mut self, delta_ms: f32) -> Result<()>
delta_ms is the frame time in milliseconds.Source§fn render(&mut self, ui: &mut Ui<'_>, rect: PixelRect) -> Result<()>
fn render(&mut self, ui: &mut Ui<'_>, rect: PixelRect) -> Result<()>
rect, clipped to the pane’s panel scope.