pub struct PanelCx<'a, S: Spec> {
pub window: WindowId,
pub leaf: LeafId,
pub panel: &'a S::Panel,
pub index: usize,
pub rect: Rect,
pub dpr: f64,
pub tokens: &'a Tokens,
pub render: &'a mut dyn RenderContext,
pub widgets: Widgets<'a>,
pub view: &'a VisualView<S>,
pub time: FrameTime,
pub out: &'a mut HookOps<S>,
}Expand description
One dock leaf’s content hook context (design §6.3).
Fields§
§window: WindowIdThe window being composed.
leaf: LeafIdThe leaf being drawn.
panel: &'a S::PanelThe app’s own panel value (the active tab of the leaf).
index: usizeThe panel’s tab index inside the leaf.
rect: RectContent rect, window-local logical pixels (inside the leaf frame and its tab strip).
dpr: f64Device pixel ratio of the window.
tokens: &'a TokensActive theme tokens.
render: &'a mut dyn RenderContextThe paint target.
widgets: Widgets<'a>Widget registration face.
view: &'a VisualView<S>This frame’s input truth of the window.
time: FrameTimeFrame clock.
out: &'a mut HookOps<S>Declared effects out.
Trait Implementations§
Source§impl<'a, S: Spec> ContentCx<'a> for PanelCx<'a, S>
impl<'a, S: Spec> ContentCx<'a> for PanelCx<'a, S>
Source§fn ime_area(&mut self, rect: Rect)
fn ime_area(&mut self, rect: Rect)
Report the focused field’s caret rect so the OS IME window opens there.
Source§fn with_paint<R>(
&mut self,
f: impl FnOnce(&mut dyn RenderContext, &mut Widgets<'a>, &VisualView<S>, &Tokens) -> R,
) -> R
fn with_paint<R>( &mut self, f: impl FnOnce(&mut dyn RenderContext, &mut Widgets<'a>, &VisualView<S>, &Tokens) -> R, ) -> R
Run
f against this frame’s paint target and registration face.Auto Trait Implementations§
impl<'a, S> !RefUnwindSafe for PanelCx<'a, S>
impl<'a, S> !Send for PanelCx<'a, S>
impl<'a, S> !Sync for PanelCx<'a, S>
impl<'a, S> !UnwindSafe for PanelCx<'a, S>
impl<'a, S> Freeze for PanelCx<'a, S>
impl<'a, S> Unpin for PanelCx<'a, S>
impl<'a, S> UnsafeUnpin for PanelCx<'a, S>where
&'a <S as Spec>::Panel: UnsafeUnpin,
&'a VisualView<S>: UnsafeUnpin,
&'a mut HookOps<S>: UnsafeUnpin,
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