Skip to main content

Tree

Struct Tree 

Source
pub struct Tree<B: Toolkit> {
    pub toolkit: B,
    /* private fields */
}

Fields§

§toolkit: B

Implementations§

Source§

impl<B: Toolkit> Tree<B>

Source

pub fn new(toolkit: B, root_handle: B::Handle, window_size: Size) -> Self

Source

pub fn root(&self) -> RNode

Trait Implementations§

Source§

impl<B: Toolkit> TreeOps for Tree<B>

Source§

fn set_presented(&mut self, node: RNode, visible: bool)

Source§

fn attach_refresh(&mut self, node: RNode, host: NodeId)

Attach pull recognition to a mounted scroll view.
Source§

fn capability(&self, cap: Cap) -> Support

Toolkit capability probe (pieces pick presentation with it, e.g. Cap::NavSplit).
Source§

fn supports_lifecycle(&self, phase: Lifecycle) -> bool

Does the running backend deliver this lifecycle phase (docs/lifecycle.md)?
Source§

fn present(&mut self, req: u64, spec: &PresentSpec)

Present a native modal for request req (docs/dialogs.md).
Source§

fn dismiss(&mut self, req: u64)

Dismiss the modal for req (programmatic resolve while it is still up).
Source§

fn open_url(&mut self, url: &str)

Open url in the platform’s default handler (what the link piece calls).
Source§

fn share_support(&self) -> Support

Source§

fn share_url(&mut self, url: &str, title: &str) -> bool

Source§

fn application_handlers( &mut self, query: &HandlerQuery, ) -> Result<ApplicationHandlers, ApplicationError>

Source§

fn open_url_with_application( &mut self, url: &str, application: &str, completion: OpenApplicationCompletion, )

Source§

fn set_appearance(&mut self, dark: Option<bool>)

Apply an app-level appearance override (see Toolkit::set_appearance).
Source§

fn set_app_badge(&mut self, badge: &AppBadge)

Put a badge on the app icon (see Toolkit::set_app_badge, docs/badge.md).
Source§

fn defer_system_gestures(&mut self, edges: Edges)

Re-send the union of every mounted defers_system_gestures request (docs/cover.md).
Source§

fn set_status_bar_hidden(&mut self, hidden: bool)

Re-send whether any mounted status_bar_hidden request asks to hide the status bar (docs/cover.md).
Source§

fn create_node( &mut self, kind: PieceKind, props: &dyn Any, layout: Rc<dyn Layout>, flex: Flex, native: bool, is_boundary: bool, scope: Scope, ) -> RNode

Source§

fn attach(&mut self, parent: RNode, child: RNode)

Source§

fn native_window_tabs(&self) -> bool

Source§

fn native_document_tabs(&self) -> bool

Source§

fn group_windows(&mut self, roots: &[RNode])

Source§

fn window_tab_order(&self, root: RNode) -> Vec<NodeId>

Source§

fn reparent(&mut self, child: RNode, parent: RNode) -> bool

Move an existing subtree without disposing its scope or native handles.
Source§

fn attach_at(&mut self, parent: RNode, child: RNode, index: usize)

Source§

fn reorder_children(&mut self, parent: RNode, order: Vec<RNode>)

Source§

fn remove_subtree(&mut self, node: RNode)

Source§

fn on_event(&mut self, node: RNode, h: EventHandler)

Source§

fn handlers_for(&self, node: RNode) -> Vec<EventHandler> ⓘ

Source§

fn native_view_of(&self, node: RNode) -> Option<RNode>

The node itself if it has a native view, else the one a chain of single-child layout-only wrappers leads down to: the descent enable_gesture and set_focusable make, for a modifier that has to reach the view (Decorate::on_key’s key mark).
Source§

fn gesture_target(&self, node: RNode, kind: GestureKind) -> Option<RNode>

The node a kind gesture addressed to node is delivered to: node itself when it enabled that gesture, else the nearest node above it, within the same element, that did (where a .padding(..).on_tap(..) registered its handler), else None. The element’s nodes are those its modifiers wrapped it in (set_element_outer), native containers such as .background(..) included, plus any layout-only wrappers directly above. What makes a dayscript step by id reach the handler the way a native gesture on the inner view reaches the recognizer on its superview.
Source§

fn set_element_outer(&mut self, inner: RNode, outer: RNode)

Record that a decorated piece’s own node inner sits inside wrappers up to outer: the span one element’s modifiers built, which gesture_target climbs. A no-op when the two are the same node.
Source§

fn wrappers_above(&self, node: RNode) -> Vec<RNode>

The layout-only wrappers directly above node (single child, no native view), nearest first: the same element as node, where an id or a modifier often sits.
Source§

fn node_exists(&self, node: RNode) -> bool

Whether node still exists (diagnostics: stale-id probes).
Source§

fn dark_mode(&mut self) -> bool

Whether the platform renders in dark appearance (see Toolkit::dark_mode).
Source§

fn reduce_motion(&mut self) -> bool

Whether the user asked for less motion (see Toolkit::reduce_motion).
Source§

fn mounted_id_families(&self) -> Vec<String>

Families attached at least once, including subsequently disposed/recycled nodes.
Source§

fn set_id(&mut self, node: RNode, id: String)

Source§

fn forward_whole_row(&mut self, wrapper: RNode, inner: RNode)

Give a wrapper that takes its size from inner (an overlay host) the inner node’s Flex::whole_row, so a decorated platform row still reads as one to its list cell.
Source§

fn set_grid_facts(&mut self, node: RNode, facts: GridFacts)

Merge non-default grid cell facts onto a node’s Flex: what the .grid_span/ .grid_align modifiers call (docs/grid.md). Called at build time, before the first layout.
Source§

fn announce(&mut self, text: &str, urgent: bool)

Speak text through the screen reader (Toolkit::announce, docs/accessibility.md).
Source§

fn set_a11y(&mut self, node: RNode, a11y: A11yProps)

Source§

fn enable_gesture(&mut self, node: RNode, kind: GestureKind)

Attach a native gesture recognizer to node (docs/shapes.md): the backend then emits Event::Tap/LongPress/Drag for it. The node must have a native handle.
Source§

fn focus_node(&mut self, node: RNode, focused: bool)

Move native keyboard focus to (or away from) node (docs/focus.md).
Source§

fn set_focusable(&mut self, node: RNode, focusable: bool)

Opt a container into the platform’s focus system (docs/focus.md); what Decorate::focusable calls. The node must have a native view somewhere under it.
Source§

fn set_probe_focused(&mut self, node: RNode, focused: bool)

Mirror a FocusChanged event into the node’s dayscript probe (pump-only).
Source§

fn set_probe_selected(&mut self, node: RNode, selected: Option<usize>)

Record which row of a nav host is current, on the kinds::NAV host that .id() tags (docs/navigation.md). The host’s NavPatch::Select carries a resident-page index (visit order, which only coincides with row order when every page is built up front), so the nav host reports the row index here instead. None = nothing selected (-1).
Source§

fn set_probe_value(&mut self, node: RNode, value: f64, text: String)

Record an external piece’s current value in the node’s dayscript probe, both the numeric form (assert_value) and its display text (assert_text). The core patch inspection only knows the builtin patch types, so a satellite piece (a stepper, a rating) reports its own state through this instead (docs/extending.md).
Source§

fn set_app_menu(&mut self, items: Vec<MenuItem>)

Source§

fn edit_window_toolbar(&mut self, root: RNode, ops: Vec<ToolbarOp>) -> bool

Edit root’s window toolbar (docs/toolbars.md). root is a window root: the primary root or one returned by open_window_root. false when the toolkit did not apply it (the root has no native handle yet, or the toolkit has no bar for it).
Source§

fn patch_window_toolbar(&mut self, root: RNode, patch: ToolbarPatch) -> bool

Apply a targeted change to one item of root’s toolbar; false as above.
Source§

fn set_context_menu(&mut self, node: RNode, items: Vec<MenuItem>)

Source§

fn scroll_to_target( &mut self, node: RNode, target: &ScrollTarget, animated: bool, ) -> bool

Programmatic scroll (§7.6, docs/scroll.md): resolve target against a scroll node’s content/viewport and drive Toolkit::scroll_to. Returns false when node isn’t a realized scroll (the caller reports the miss; dayscript retries).
Source§

fn scroll_reveal(&mut self, node: RNode, animated: bool) -> bool

Scroll the nearest enclosing scroll ancestor so node’s frame is visible (minimal scroll, scrollRectToVisible semantics). False when no scroll ancestor exists.
Source§

fn patch(&mut self, node: RNode, patch: Box<dyn Any>, affects_size: bool)

Source§

fn set_implicit_anim(&mut self, node: RNode, anim: Option<AnimSpec>)

Set (or clear) a node’s implicit .animation (§8.4): subsequent property patches and frame changes on this node (or its descendants) animate with anim even outside a with_animation.
Source§

fn set_node_opacity(&mut self, node: RNode, opacity: f64)

Apply an animatable opacity (0..1) to node’s native handle (§8.4), animating if an animation is in scope. No-op if the node has no handle.
Source§

fn set_node_transform(&mut self, node: RNode, t: Transform)

Apply an animatable Transform to node’s native handle (§8.4): the cheap movement/ scaling channel that never relayouts. No-op if the node has no handle.
Source§

fn set_node_selectable(&mut self, node: RNode, selectable: bool)

Make node’s text user-selectable (the .selectable() modifier). One-shot and unmanaged; No-op if the node has no handle.
Source§

fn set_node_input_traits(&mut self, node: RNode, traits: &InputTraits)

Apply a text field’s InputTraits (docs/textfield.md). Idempotent; called again with the whole set when a reactive member changes. No-op if the node has no handle.
Source§

fn set_node_cursor(&mut self, node: RNode, cursor: Cursor)

Shape the pointer over node (the .cursor() modifier, docs/cursor.md). Idempotent; called again when a reactive cursor changes. No-op if the node has no handle.
Source§

fn set_node_drag_region(&mut self, node: RNode, drag: bool)

Make node move its window when dragged, like a title bar (.window_drag_region(), docs/window-chrome.md).
Source§

fn note_node_tweaked(&mut self, node: RNode)

Record that a .tweak closure ran against node’s current handle (docs/tweaks.md), so a later backing swap (set_node_selectable on a toolkit that rebuilds the widget) can warn about the discarded work instead of losing it silently.
Source§

fn request_frame(&mut self, root: RNode, cb: FrameCallback) -> CancelFrame

Source§

fn replay(&mut self, node: RNode, ops: Vec<DrawOp>)

Source§

fn mark_needs_measure(&mut self, node: RNode)

Source§

fn mark_layout_dirty(&mut self)

Source§

fn invalidate_all_measurements(&mut self)

Forget every measurement Day holds and re-lay every bound list and tree row: the system text size changed (crate::note_text_size_changed), so every text measurement is stale, and a cached one would keep each label at its old size.
Source§

fn layout_if_needed(&mut self)

Source§

fn set_route(&mut self, route: &str)

Report the app’s current route to the backend (Toolkit::set_route); web-dom mirrors it into the URL hash (docs/navigation.md). Called by the turn-end route sync when the route actually changed.
Source§

fn set_window_size(&mut self, s: Size)

Source§

fn child_count(&self, node: RNode) -> usize

Source§

fn first_child(&self, node: RNode) -> Option<RNode>

Source§

fn parent_of(&self, node: RNode) -> Option<RNode>

node’s parent, None at a root: the window root, or a list cell’s anchor, whose parent is the native cell rather than a Day node.
Source§

fn node_kind(&self, node: RNode) -> Option<PieceKind>

Source§

fn node_id(&self, node: RNode) -> Option<String>

The app-authored .id() string on node (find_by_id’s inverse), or None for an id-less or disposed node. Backs the free id_of, the recorder’s NodeId → id lookup (§14.6).
Source§

fn node_handle_any(&self, node: RNode) -> Option<Box<dyn Any>>

A clone of the node’s native handle boxed as Any (None for layout-only or disposed nodes). TreeOps is object-safe, so the generic Toolkit::Handle can’t appear here; toolkit ext modules downcast to their concrete Handle type. This is the tweaks door (docs/tweaks.md): cloning is cheap on every backend (a retain / gobject ref / GlobalRef clone / Copy pointer) and the clone never outlives the native widget’s own refcounting.
Source§

fn node_frame(&self, node: RNode) -> Option<Rect>

Source§

fn node_probe(&self, node: RNode) -> Option<NodeProbe>

Source§

fn node_a11y(&self, node: RNode) -> Option<A11yProps>

The node’s accumulated accessibility annotations (§13): a11y_audit’s expectation.
Source§

fn read_native(&self, node: RNode) -> Option<NativeSnapshot>

The node’s actual native state (a11y_audit diffs it against node_a11y, and assert_native against the probe).
Source§

fn a11y_nodes(&self) -> Vec<(String, PieceKind, A11yProps, NativeSnapshot)>

For every node with an .id() and a native handle: (id, kind, expected, actual), the raw material for the a11y_audit step (§14.2). Comparison/policy lives in day-script.
Source§

fn find_by_id(&self, id: &str) -> Option<RNode>

Source§

fn toggle_sidebar(&mut self, host: RNode) -> bool

Show/hide the sidebar pane of the navigation host host: what the sidebar affordance a nav(Sidebar) contributes for itself drives. false when the toolkit has no pane to toggle there (or no sidebar concept at all). Per host, so a second window’s button collapses its own sidebar (docs/toolbars.md, docs/navigation.md).
Source§

fn native_back(&mut self) -> bool

Press the platform’s back affordance (Toolkit::native_back): the native path a real tap takes, which nav_back() (Day’s rail) never runs. false when nothing is popped by it.
Source§

fn prepare_snapshot( &mut self, root: Option<RNode>, revision: u32, ) -> Result<Readiness, String>

Source§

fn snapshot(&mut self) -> Result<Vec<u8>, String>

Source§

fn snapshot_origin(&mut self) -> Option<Point>

Where the primary window’s root sits in Self::snapshot’s image, in points (see Toolkit::snapshot_origin); None when the toolkit does not say.
Source§

fn snapshot_chrome(&mut self) -> Result<Vec<u8>, String>

The same capture with the window’s own chrome (see Toolkit::snapshot_window_chrome).
Source§

fn decode_image(&mut self, req: u64, id: BitmapId, bytes: &[u8])

Decode encoded bytes into a native image under id (see Toolkit::decode_image).
Source§

fn image_info(&mut self, id: BitmapId) -> Option<BitmapInfo>

What a decoded image is (see Toolkit::image_info).
Source§

fn image_properties(&mut self, id: BitmapId) -> Option<ImageProperties>

An image’s metadata beyond its pixels (see Toolkit::image_properties).
Source§

fn encode_image(&mut self, req: u64, id: BitmapId, spec: &EncodeSpec)

Encode a decoded image back to bytes (see Toolkit::encode_image).
Source§

fn image_encode_formats(&mut self) -> Vec<ImageFormat>

Which formats this toolkit encodes (see Toolkit::encode_formats).
Source§

fn release_image(&mut self, id: BitmapId)

Release a decoded image (see Toolkit::release_image).
Source§

fn render_bitmap( &mut self, req: u64, id: BitmapId, ops: &[DrawOp], size: Size, scale: f64, )

Render a canvas drawing into a bitmap under id (see Toolkit::render_bitmap); the answer arrives as Event::BitmapRendered.
Source§

fn render_pdf(&mut self, req: u64, pages: &[PdfPage], info: &PdfInfo)

Render canvas drawings into a PDF (see Toolkit::render_pdf); the answer arrives as Event::PdfRendered.
Source§

fn window_image_support(&mut self) -> Support

Whether the toolkit can rasterize its own window at all (Cap::Snapshot).
Source§

fn font_families(&mut self) -> Vec<FontFamilyInfo>

The platform’s font families (see Toolkit::font_families); cached by day-core.
Source§

fn measure_text( &mut self, text: &str, size: f64, font: &CanvasFont, ) -> Option<TextMetrics>

Measure one line of canvas text (see Toolkit::measure_text).
Source§

fn ui_idle(&mut self) -> bool

Whether native transitions have settled (see Toolkit::ui_idle).
Source§

fn root_node(&self) -> RNode

Source§

fn open_window_root( &mut self, options: &WindowOptions, kind: WindowKind, ) -> WindowRootReply

Open a native window and adopt its content container as an additional boundary root. Inserts the root record, asks Toolkit::open_window, and answers per the toolkit’s reply: Open(root) = live now (handle installed, window entry pushed), Pending(root) = native creation is in flight (the record is parked without a handle until Self::adopt_window_root), Unsupported = the placeholder was removed again; present the content as a cover instead.
Source§

fn adopt_window_root(&mut self, root: RNode, raw: RawHandle, size: Size) -> bool

Complete a Pending open: adopt raw as the window’s content container, install it on the parked root, and start laying out at size. false = the root is gone (closed before completion); the caller should drop the native window again.
Source§

fn remove_window_root(&mut self, root: RNode)

Remove an (already childless) window root: bookkeeping + handle release + window entry removal. Never the primary. Idempotent; also valid for a parked Pending root.
Source§

fn set_root_size(&mut self, root: RNode, s: Size)

A secondary window’s content size changed (its WindowResized handler).
Source§

fn fit_window(&mut self, root: RNode, size: Size)

Ask the toolkit to size the window whose content root is root to size (WindowOptions::size_to_fit). Also updates Day’s own layout size for that root, so the content is re-laid at the size the window actually became.
Source§

fn add_extra_layout_root(&mut self, node: RNode, size: Size)

Register an extra layout root: a node that stays attached in the tree (native re-homing needs the parent link) but lays out independently at its own reported size: the cover-fallback surface (docs/windows.md). The primary root’s PassThrough layout only descends into its first child, so a second top-level surface must drive its own layout entry. set_root_size resizes it; drop it before subtree removal.
Source§

fn drop_extra_layout_root(&mut self, node: RNode)

Unregister an extra layout root (the entry only; the node itself is removed by the ordinary remove_subtree).
Source§

fn close_native_window(&mut self, root: RNode)

Ask the platform to close the window whose root is root (async; the platform confirms with Event::WindowClosed).
Source§

fn quit_app(&mut self)

End the app: the last primary window has closed (docs/windows.md close policy).
Source§

fn focus_native_window(&mut self, root: RNode)

Bring the window whose root is root to front and make it key.
Source§

fn set_native_window_title(&mut self, root: RNode, title: &str)

Retitle the window whose root is root.
Source§

fn apply_window(&mut self, root: RNode, change: &WindowChange)

Apply a property change to the window whose root is root (docs/windows.md “Window properties”). Ignored for a root with no native handle yet.
Source§

fn set_dock_menu(&mut self, items: &[MenuItem])

Install the app’s Dock menu (docs/menus.md).
Source§

fn set_status_items(&mut self, items: &[StatusItemSpec])

Show the app’s status items (docs/status-item.md).
Source§

fn set_app_progress(&mut self, progress: AppProgress)

Show progress on the app’s Dock or taskbar icon.
Source§

fn set_dock_visible(&mut self, visible: bool)

Show or hide the macOS Dock icon.
Source§

fn set_keep_running(&mut self, keep: bool)

Keep the process running when its last window closes (day-core decides when to quit).
Source§

fn native_window_frame(&self, root: RNode) -> Option<Rect>

The outer frame of the window whose root is root (docs/windows.md).
Source§

fn monitors(&self) -> Vec<Monitor>

The attached displays.
Source§

fn set_launcher_shortcuts(&mut self, shortcuts: &[LauncherShortcut])

Replace the app’s run-time launcher shortcuts.
Source§

fn snapshot_of(&mut self, root: RNode) -> Result<Vec<u8>, String>

Snapshot the window whose root is root (the primary answers snapshot).
Source§

fn install_list(&mut self, node: RNode, driver: ListDriver)

Source§

fn list_prepare_cell( &mut self, node: RNode, key: usize, cell: RawHandle, header: bool, ) -> CellStep

Decide whether row key’s cell must be built (returns a fresh anchor) or rebound. header: the row about to bind is a section header (docs/list.md “Sections”); a cell that held the other kind is rebuilt.
Source§

fn list_store_cell( &mut self, node: RNode, key: usize, anchor: RNode, built: BuiltRow, header: bool, )

Record a freshly built row (or section header) for a cell.
Source§

fn list_layout_cell(&mut self, node: RNode, key: usize)

Lay the row out inside its cell bounds (row content width × the RowHeight).
Source§

fn list_layout_cell_width(&mut self, node: RNode, key: usize, width: f64)

Re-lay the row at the cell’s actual width (the list’s width is only the first approximation: a native row’s chrome, GtkListView’s themed row node, makes the cell narrower, and a row laid at the list’s width holds the whole list wider than its frame).
Source§

fn list_cell_height(&self, node: RNode, key: usize) -> f64

The height the cell’s row was last laid at (ListSource::cell_height); 0 before its first layout.
Source§

fn list_cell_keys(&self, node: RNode) -> Vec<usize>

The physical-cell keys of every bound cell of the list at node (for a bulk re-layout after the list’s own width changed). Active cells eligible for width-change layout; excludes cells parked by recycle.
Source§

fn list_reload(&mut self, node: RNode)

Apply a data change: the native host re-queries the source.
Source§

fn list_splice(&mut self, node: RNode, deltas: Vec<RowDelta>)

Source§

fn set_undo_state(&mut self, state: &UndoState)

Source§

fn set_edit_state(&mut self, state: &EditState)

Source§

fn modifiers(&mut self) -> Modifiers

Source§

fn list_scroll_to_end(&mut self, node: RNode)

Imperatively scroll the native list so its last row is fully visible (no-op if empty).
Source§

fn list_scroll_to_row(&mut self, node: RNode, row: usize)

Imperatively scroll the native list so row row is visible (clamped; no-op if empty).
Source§

fn list_set_editing(&mut self, node: RNode, on: bool)

Enter or leave the list’s native editing mode (ListPatch::Editing); a toolkit without one ignores it.
Source§

fn list_set_selected(&mut self, node: RNode, rows: Vec<usize>)

Programmatically sync the list’s selected rows (empty = clear). The toolkit applies without re-emitting a selection event.
Source§

fn list_driver(&mut self, node: RNode) -> Option<Rc<ListDriver>>

The list’s driver, for the guard → commit path list_try_reorder runs outside the borrow (None when node hosts no list).
Source§

fn install_tree(&mut self, node: RNode, driver: TreeDriver)

Source§

fn tree_prepare_cell( &mut self, node: RNode, key: usize, cell: RawHandle, ) -> TreeCellStep

Decide whether the cell for key must be built (fresh anchor) or rebound.
Source§

fn tree_store_cell( &mut self, node: RNode, key: usize, anchor: RNode, built: TreeBuiltRow, )

Record a freshly built row for a cell.
Source§

fn tree_layout_cell(&mut self, node: RNode, key: usize)

Lay the row out inside its cell bounds (row content width × the RowHeight).
Source§

fn tree_layout_cell_width(&mut self, node: RNode, key: usize, width: f64)

Re-lay the row at the cell’s actual width (indentation makes tree cells per-row wide).
Source§

fn tree_cell_height(&self, node: RNode, key: usize) -> f64

The height the cell’s row was last laid at (TreeSource::cell_height); 0 before its first layout.
Source§

fn tree_layout_cell_size(&mut self, node: RNode, key: usize, size: Size)

Source§

fn tree_recycle_cell(&mut self, node: RNode, key: usize)

The cell went back to the host’s reuse pool: clear the row subtree’s element ids, so a collapsed-away row stops answering find_by_id (dayscript assert_missing) and a stale id can never hijack a lookup. The next bind re-sets the live row’s id.
Source§

fn list_recycle_cell(&mut self, node: RNode, key: usize)

A pooled cell left the visible row set (an emulated backend hides rows past a shrunk source instead of destroying them): clear the cell subtree’s element ids so stale rows stop answering dayscript lookups. The cell itself stays pooled; the next bind re-ids it.
Source§

fn list_release_cell(&mut self, node: RNode, key: usize)

The host discarded cell key of list node for good: dispose the row built in it.
Source§

fn list_pin_cell(&mut self, node: RNode, key: usize)

Cell key is the host’s pinned header copy (ListSource::bind_pinned): park its ids, now and on every rebind, so lookups find the header row in the list.
Source§

fn tree_reload(&mut self, node: RNode)

Apply a data change: the native host re-queries the source (expansion and selection survive by token).
Source§

fn tree_set_expanded(&mut self, node: RNode, token: u64, expanded: bool)

Programmatically disclose/collapse one row (no TreeExpanded echo).
Source§

fn tree_set_selected(&mut self, node: RNode, tokens: Vec<u64>)

Programmatically sync the tree’s selected rows (no selection-event echo).
Source§

fn tree_reveal(&mut self, node: RNode, token: u64)

Scroll this row into view, realizing it if needed (ancestors already expanded).
Source§

fn tree_driver(&mut self, node: RNode) -> Option<Rc<TreeDriver>>

The tree’s driver, for the guard → commit path tree_try_move runs outside the borrow (None when node hosts no tree).
Source§

fn set_drag_source(&mut self, node: RNode, source: Source)

Install native transfer behavior on a realized host.
Source§

fn set_drop_target(&mut self, node: RNode, target: Target)

Source§

fn set_context_menu_fn(&mut self, node: RNode, f: ContextMenuFn)

Install a summon-time context-menu provider on node (docs/menus.md).
Source§

fn context_menu_of(&mut self, node: RNode) -> Option<ContextMenuFn>

The context menu the app gave node (or its nearest ancestor that has one), as a provider; what the dayscript context_menu step chooses from. Returned rather than called, because a provider is app code: it may select what it summons over and flush, which re-enters the tree, so the caller asks it once the tree borrow has ended.

Auto Trait Implementations§

§

impl<B> !RefUnwindSafe for Tree<B>

§

impl<B> !Send for Tree<B>

§

impl<B> !Sync for Tree<B>

§

impl<B> !UnwindSafe for Tree<B>

§

impl<B> Freeze for Tree<B>
where B: Freeze, SlotMap<RNode, NodeData<<B as Toolkit>::Handle>>: Freeze, Vec<(&'static str, <B as Toolkit>::Handle)>: Freeze,

§

impl<B> Unpin for Tree<B>
where B: Unpin, SlotMap<RNode, NodeData<<B as Toolkit>::Handle>>: Unpin, Vec<(&'static str, <B as Toolkit>::Handle)>: Unpin,

§

impl<B> UnsafeUnpin for Tree<B>
where B: UnsafeUnpin, SlotMap<RNode, NodeData<<B as Toolkit>::Handle>>: UnsafeUnpin, Vec<(&'static str, <B as Toolkit>::Handle)>: UnsafeUnpin,

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<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.