Skip to main content

FigureView

Struct FigureView 

Source
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

Source

pub fn new(figure: Figure) -> Self

Wrap figure for interactive presentation.

Source

pub fn figure(&self) -> &Figure

The wrapped figure.

Source

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.

Source

pub fn crosshair(&mut self, visible: bool)

Toggle the pointer crosshair and data-coordinate readout (default on).

Source

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).

Source

pub fn name(&self) -> &str

The pane identity assigned by set_name (empty until set).

Source

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.

Source

pub fn reset_view(&mut self)

Restore every axes to the limits recorded at attach time.

Source

pub fn state(&self) -> FigureViewState

Snapshot the active view overrides for later restore.

Source

pub fn restore(&mut self, state: &FigureViewState)

Restore a snapshot taken by state, dropping in-flight transitions.

Trait Implementations§

Source§

impl ViewerLiveSource for FigureView

Source§

fn capabilities(&self) -> ViewerLiveCapabilities

Source§

fn open(&mut self, _runtime: &Runtime) -> Result<()>

Called once when the Viewer obtains an Runtime.
Source§

fn update(&mut self, delta_ms: f32) -> Result<()>

Per-frame update. delta_ms is the frame time in milliseconds.
Source§

fn on_event(&mut self, event: &InputEvent) -> Result<()>

Raw platform event (only called when receives_events is true).
Source§

fn render(&mut self, ui: &mut Ui<'_>, width: u32, height: u32) -> Result<()>

Render domain-specific UI overlays into ui. Called every frame.
Source§

fn close(&mut self) -> Result<()>

Called once when the Viewer is closing.
Source§

fn canvas_texture(&self) -> Option<&Texture>

Optional camera/image surface presented by the Viewer’s shared GPU 2D canvas. The Viewer owns navigation, fit, zoom, pan and channel selection; render draws only the source’s overlays when this is provided.
Source§

fn canvas_controls_rect( &self, _width: u32, _height: u32, _scale: f32, ) -> Option<PixelRect>

Source controls that own pointer gesture starts over the canvas. Motion and release from an existing canvas drag still reach Navigation.
Source§

impl WorkspaceItem for FigureView

Source§

fn id(&self) -> &str

Stable identifier referenced by WorkspaceNode::Tabs::tabs.
Source§

fn title(&self) -> &str

Visible tab label.
Source§

fn update(&mut self, delta_ms: f32) -> Result<()>

Per-frame update. delta_ms is the frame time in milliseconds.
Source§

fn render(&mut self, ui: &mut Ui<'_>, rect: PixelRect) -> Result<()>

Render the item inside rect, clipped to the pane’s panel scope.
Source§

fn on_event(&mut self, event: &InputEvent) -> Result<()>

Pointer events are routed to the leaf under the cursor; key and text events are routed to the focused leaf (the last pane clicked).
Source§

fn closable(&self) -> bool

Whether the pane’s tab shows a close button.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.