pub struct ChartCanvas { /* private fields */ }Implementations§
Source§impl ChartCanvas
impl ChartCanvas
pub fn new(spec: ChartSpec) -> Result<Self, ModelError>
Creates a ChartCanvas that renders a shared ChartEngine.
This is primarily intended for diagnostics harnesses and multi-surface adapters that need to hold an engine handle outside the widget tree.
pub fn new_grid_view(engine: Rc<RefCell<ChartEngine>>, grid: GridId) -> Self
pub fn new_overlay(engine: Rc<RefCell<ChartEngine>>) -> Self
pub fn set_text_cache_prune_tuning(&mut self, tuning: ChartTextCachePruneTuning)
pub fn engine(&self) -> &ChartEngine
pub fn engine_mut(&mut self) -> &mut ChartEngine
pub fn set_style(&mut self, style: ChartStyle)
pub fn set_style_source(&mut self, source: ChartStyleSource)
pub fn set_tooltip_formatter(&mut self, formatter: Box<dyn TooltipFormatter>)
pub fn set_input_map(&mut self, map: ChartInputMap)
pub fn set_accessibility_layer(&mut self, enabled: bool)
pub fn test_id(self, id: impl Into<String>) -> Self
pub fn linked_brush(self, brush: Model<Option<BrushSelectionLink2D>>) -> Self
pub fn linked_axis_pointer( self, axis_pointer: Model<Option<AxisPointerLinkAnchor>>, ) -> Self
pub fn linked_domain_windows( self, windows: Model<BTreeMap<LinkAxisKey, Option<DataWindow>>>, ) -> Self
pub fn link_axis_map(self, map: BTreeMap<AxisId, LinkAxisKey>) -> Self
pub fn output_model(self, output: Model<ChartCanvasOutput>) -> Self
pub fn create_node<H: UiHost>(ui: &mut UiTree<H>, canvas: Self) -> NodeId
Trait Implementations§
Source§impl<H: UiHost> Widget<H> for ChartCanvas
impl<H: UiHost> Widget<H> for ChartCanvas
fn semantics(&mut self, cx: &mut SemanticsCx<'_, H>)
Source§fn render_transform(&self, _bounds: Rect) -> Option<Transform2D>
fn render_transform(&self, _bounds: Rect) -> Option<Transform2D>
Optional affine transform applied to both paint and input for the subtree rooted at this node. Read more
Source§fn hit_test(&self, _bounds: Rect, position: Point) -> bool
fn hit_test(&self, _bounds: Rect, position: Point) -> bool
Hit-test predicate for pointer input targeting. Read more
fn event(&mut self, cx: &mut EventCx<'_, H>, event: &Event)
fn layout(&mut self, cx: &mut LayoutCx<'_, H>) -> Size
Source§fn prepaint(&mut self, cx: &mut PrepaintCx<'_, H>)
fn prepaint(&mut self, cx: &mut PrepaintCx<'_, H>)
Prepaint hook invoked after layout, before paint. Read more
fn paint(&mut self, cx: &mut PaintCx<'_, H>)
fn cleanup_resources(&mut self, services: &mut dyn UiServices)
Source§fn event_capture(&mut self, _cx: &mut EventCx<'_, H>, _event: &Event)
fn event_capture(&mut self, _cx: &mut EventCx<'_, H>, _event: &Event)
Capture-phase event dispatch (root → target). Read more
Source§fn event_observer(&mut self, _cx: &mut ObserverCx<'_, H>, _event: &Event)
fn event_observer(&mut self, _cx: &mut ObserverCx<'_, H>, _event: &Event)
Observer-phase event dispatch (
InputDispatchPhase::Preview). Read morefn debug_type_name(&self) -> &'static str
fn command(&mut self, _cx: &mut CommandCx<'_, H>, _command: &CommandId) -> bool
Source§fn command_availability(
&self,
_cx: &mut CommandAvailabilityCx<'_, H>,
_command: &CommandId,
) -> CommandAvailability
fn command_availability( &self, _cx: &mut CommandAvailabilityCx<'_, H>, _command: &CommandId, ) -> CommandAvailability
Pure query: does this node participate in availability for
command?Source§fn children_render_transform(&self, _bounds: Rect) -> Option<Transform2D>
fn children_render_transform(&self, _bounds: Rect) -> Option<Transform2D>
Optional affine transform applied to children only (not to this node’s own bounds). Read more
Source§fn cursor_icon_at(
&self,
_bounds: Rect,
_position: Point,
_input_ctx: &InputContext,
) -> Option<CursorIcon>
fn cursor_icon_at( &self, _bounds: Rect, _position: Point, _input_ctx: &InputContext, ) -> Option<CursorIcon>
Optional cursor icon request for a pointer position. Read more
Source§fn clips_hit_test(&self, _bounds: Rect) -> bool
fn clips_hit_test(&self, _bounds: Rect) -> bool
Whether hit-testing should be clipped to
bounds. Read moreSource§fn clip_hit_test_corner_radii(&self, _bounds: Rect) -> Option<Corners>
fn clip_hit_test_corner_radii(&self, _bounds: Rect) -> Option<Corners>
Optional rounded-rectangle clip shape for hit-testing. Read more
Source§fn hit_test_children(&self, _bounds: Rect, _position: Point) -> bool
fn hit_test_children(&self, _bounds: Rect, _position: Point) -> bool
Whether the node’s children participate in hit-testing. Read more
Source§fn semantics_present(&self) -> bool
fn semantics_present(&self) -> bool
Whether this node should be included in the semantics snapshot. Read more
Source§fn semantics_children(&self) -> bool
fn semantics_children(&self) -> bool
Whether semantics snapshot traversal should recurse into this node’s children. Read more
Source§fn sync_interactivity_gate(&mut self, _present: bool, _interactive: bool)
fn sync_interactivity_gate(&mut self, _present: bool, _interactive: bool)
Optional synchronization hook for declarative
InteractivityGate nodes. Read moreSource§fn sync_hit_test_gate(&mut self, _hit_test: bool)
fn sync_hit_test_gate(&mut self, _hit_test: bool)
Optional synchronization hook for declarative
HitTestGate nodes. Read moreSource§fn sync_focus_traversal_gate(&mut self, _traverse: bool)
fn sync_focus_traversal_gate(&mut self, _traverse: bool)
Optional synchronization hook for declarative
FocusTraversalGate nodes. Read moreSource§fn focus_traversal_children(&self) -> bool
fn focus_traversal_children(&self) -> bool
Whether focus traversal should recurse into this node’s children. Read more
fn is_focusable(&self) -> bool
fn is_text_input(&self) -> bool
Source§fn platform_text_input_snapshot(&self) -> Option<WindowTextInputSnapshot>
fn platform_text_input_snapshot(&self) -> Option<WindowTextInputSnapshot>
Optional platform-facing text input snapshot for the focused widget. Read more
Source§fn platform_text_input_selected_range_utf16(&self) -> Option<Utf16Range>
fn platform_text_input_selected_range_utf16(&self) -> Option<Utf16Range>
Returns the focused selection range (UTF-16 code units over the composed view).
Source§fn platform_text_input_marked_range_utf16(&self) -> Option<Utf16Range>
fn platform_text_input_marked_range_utf16(&self) -> Option<Utf16Range>
Returns the marked (preedit) range (UTF-16 code units over the composed view).
fn platform_text_input_text_for_range_utf16( &self, _range: Utf16Range, ) -> Option<String>
fn platform_text_input_bounds_for_range_utf16( &mut self, _cx: &mut PlatformTextInputCx<'_, H>, _range: Utf16Range, ) -> Option<Rect>
fn platform_text_input_character_index_for_point_utf16( &mut self, _cx: &mut PlatformTextInputCx<'_, H>, _point: Point, ) -> Option<u32>
fn platform_text_input_replace_text_in_range_utf16( &mut self, _cx: &mut PlatformTextInputCx<'_, H>, _range: Utf16Range, _text: &str, ) -> bool
fn platform_text_input_replace_and_mark_text_in_range_utf16( &mut self, _cx: &mut PlatformTextInputCx<'_, H>, _range: Utf16Range, _text: &str, _marked: Option<Utf16Range>, _selected: Option<Utf16Range>, ) -> bool
Source§fn can_scroll_by(&self) -> bool
fn can_scroll_by(&self) -> bool
Whether this node supports direct “scroll-by” requests (typically for accessibility).
fn scroll_by( &mut self, _cx: &mut ScrollByCx<'_, H>, _delta: Point, ) -> ScrollByResult
Source§fn can_scroll_descendant_into_view(&self) -> bool
fn can_scroll_descendant_into_view(&self) -> bool
Whether this node can scroll a focused descendant into view. Read more
fn scroll_descendant_into_view( &mut self, _cx: &mut ScrollIntoViewCx<'_, H>, _descendant_bounds: Rect, ) -> ScrollIntoViewResult
fn measure(&mut self, _cx: &mut MeasureCx<'_, H>) -> Size
Auto Trait Implementations§
impl Freeze for ChartCanvas
impl !RefUnwindSafe for ChartCanvas
impl !Send for ChartCanvas
impl !Sync for ChartCanvas
impl Unpin for ChartCanvas
impl UnsafeUnpin for ChartCanvas
impl !UnwindSafe for ChartCanvas
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more