Struct panoramix::RootWidget [−][src]
Implements druid::Widget
from a component
You should probably use RootHandler
directly instead.
Fields
root_element: RootElem
root_state: RootElem::AggregateChildrenState
vdom: Option<RootElem::BuildOutput>
default_widget: WidgetPod<DruidAppData, Flex<DruidAppData>>
widget: Option<WidgetPod<DruidAppData, FlexWidget<<<RootElem as Element<NoEvent, ()>>::BuildOutput as VirtualDom<NoEvent, ()>>::TargetWidgetSeq>>>
Implementations
impl<Comp: Component<Props = ()>> RootWidget<ComponentHolder<Comp, NoEvent, ()>>
[src]
pub fn new(_root_component: Comp) -> Self
[src]
pub fn with_initial_state(self, comp_local_state: Comp::LocalState) -> Self
[src]
Set the local state of the root component to a value other than default
impl<RootElem: Element<NoEvent, ()> + Clone + 'static> RootWidget<RootElem>
[src]
pub fn init(&mut self, ctx: &mut EventCtx<'_, '_>)
[src]
pub fn run(
&mut self,
ctx: &mut EventCtx<'_, '_>,
data: &mut DruidAppData,
env: &Env
)
[src]
&mut self,
ctx: &mut EventCtx<'_, '_>,
data: &mut DruidAppData,
env: &Env
)
Trait Implementations
impl<RootElem: Element<NoEvent, ()> + Clone + 'static> Widget<DruidAppData> for RootWidget<RootElem>
[src]
fn event(
&mut self,
ctx: &mut EventCtx<'_, '_>,
event: &Event,
data: &mut DruidAppData,
env: &Env
)
[src]
&mut self,
ctx: &mut EventCtx<'_, '_>,
event: &Event,
data: &mut DruidAppData,
env: &Env
)
fn lifecycle(
&mut self,
ctx: &mut LifeCycleCtx<'_, '_>,
event: &LifeCycle,
data: &DruidAppData,
env: &Env
)
[src]
&mut self,
ctx: &mut LifeCycleCtx<'_, '_>,
event: &LifeCycle,
data: &DruidAppData,
env: &Env
)
fn update(
&mut self,
ctx: &mut UpdateCtx<'_, '_>,
_old_data: &DruidAppData,
data: &DruidAppData,
env: &Env
)
[src]
&mut self,
ctx: &mut UpdateCtx<'_, '_>,
_old_data: &DruidAppData,
data: &DruidAppData,
env: &Env
)
fn layout(
&mut self,
ctx: &mut LayoutCtx<'_, '_>,
bc: &BoxConstraints,
data: &DruidAppData,
env: &Env
) -> Size
[src]
&mut self,
ctx: &mut LayoutCtx<'_, '_>,
bc: &BoxConstraints,
data: &DruidAppData,
env: &Env
) -> Size
fn paint(
&mut self,
ctx: &mut PaintCtx<'_, '_, '_>,
data: &DruidAppData,
env: &Env
)
[src]
&mut self,
ctx: &mut PaintCtx<'_, '_, '_>,
data: &DruidAppData,
env: &Env
)
Auto Trait Implementations
impl<RootElem> !RefUnwindSafe for RootWidget<RootElem>
impl<RootElem> !Send for RootWidget<RootElem>
impl<RootElem> !Sync for RootWidget<RootElem>
impl<RootElem> Unpin for RootWidget<RootElem> where
RootElem: Unpin,
<RootElem as Element<NoEvent, ()>>::AggregateChildrenState: Unpin,
<RootElem as Element<NoEvent, ()>>::BuildOutput: Unpin,
<<RootElem as Element<NoEvent, ()>>::BuildOutput as VirtualDom<NoEvent, ()>>::TargetWidgetSeq: Unpin,
RootElem: Unpin,
<RootElem as Element<NoEvent, ()>>::AggregateChildrenState: Unpin,
<RootElem as Element<NoEvent, ()>>::BuildOutput: Unpin,
<<RootElem as Element<NoEvent, ()>>::BuildOutput as VirtualDom<NoEvent, ()>>::TargetWidgetSeq: Unpin,
impl<RootElem> !UnwindSafe for RootWidget<RootElem>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RoundFrom<T> for T
pub fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
pub fn round_into(self) -> U
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, W> WidgetExt<T> for W where
T: Data,
W: 'static + Widget<T>,
[src]
T: Data,
W: 'static + Widget<T>,
pub fn padding(self, insets: impl Into<Insets>) -> Padding<T>
[src]
pub fn center(self) -> Align<T>
[src]
pub fn align_left(self) -> Align<T>
[src]
pub fn align_right(self) -> Align<T>
[src]
pub fn align_vertical(self, align: UnitPoint) -> Align<T>
[src]
pub fn align_horizontal(self, align: UnitPoint) -> Align<T>
[src]
pub fn fix_width(self, width: f64) -> SizedBox<T>
[src]
pub fn fix_height(self, height: f64) -> SizedBox<T>
[src]
pub fn fix_size(self, width: f64, height: f64) -> SizedBox<T>
[src]
pub fn expand(self) -> SizedBox<T>
[src]
pub fn expand_width(self) -> SizedBox<T>
[src]
pub fn expand_height(self) -> SizedBox<T>
[src]
pub fn background(self, brush: impl Into<BackgroundBrush<T>>) -> Container<T>
[src]
pub fn border(
self,
color: impl Into<KeyOrValue<Color>>,
width: impl Into<KeyOrValue<f64>>
) -> Container<T>
[src]
self,
color: impl Into<KeyOrValue<Color>>,
width: impl Into<KeyOrValue<f64>>
) -> Container<T>
pub fn env_scope(self, f: impl Fn(&mut Env, &T) + 'static) -> EnvScope<T, Self>
[src]
pub fn controller<C>(self, controller: C) -> ControllerHost<Self, C> where
C: Controller<T, Self>,
[src]
C: Controller<T, Self>,
pub fn on_click(
self,
f: impl Fn(&mut EventCtx<'_, '_>, &mut T, &Env) + 'static
) -> ControllerHost<Self, Click<T>>
[src]
self,
f: impl Fn(&mut EventCtx<'_, '_>, &mut T, &Env) + 'static
) -> ControllerHost<Self, Click<T>>
pub fn debug_paint_layout(self) -> EnvScope<T, Self>
[src]
pub fn debug_widget_id(self) -> EnvScope<T, Self>
[src]
pub fn debug_invalidation(self) -> DebugInvalidation<T, Self>
[src]
pub fn debug_widget(self) -> EnvScope<T, Self>
[src]
pub fn lens<S, L>(self, lens: L) -> LensWrap<S, T, L, Self> where
S: Data,
L: Lens<S, T>,
[src]
S: Data,
L: Lens<S, T>,
pub fn parse(self) -> Parse<Self> where
Self: Widget<String>,
[src]
Self: Widget<String>,