pub struct DynamicPanel<'a> { /* private fields */ }Expand description
Panel that can be displayed dynamically as a SidePanel or TopBottomPanel - e.g. if the screen size is too small.
Implementations§
Source§impl<'a> DynamicPanel<'a>
impl<'a> DynamicPanel<'a>
Sourcepub fn show_dynamic<R, F: Fn(&mut Ui) -> R>(
&self,
ctx: &'a Context,
content: F,
) -> Option<InnerResponse<R>>
pub fn show_dynamic<R, F: Fn(&mut Ui) -> R>( &self, ctx: &'a Context, content: F, ) -> Option<InnerResponse<R>>
Show the Panel dynamically, based on the choice function.
Sourcepub fn show_dynamic_inside<R, F: Fn(&mut Ui) -> R>(
&self,
ctx: &'a Context,
ui: &mut Ui,
content: F,
) -> Option<InnerResponse<R>>
pub fn show_dynamic_inside<R, F: Fn(&mut Ui) -> R>( &self, ctx: &'a Context, ui: &mut Ui, content: F, ) -> Option<InnerResponse<R>>
Show the Panel dynamically inside a Ui, based on the choice function.
Sourcepub fn show_dynamic_animated<R, F: Fn(&mut Ui) -> R>(
&self,
ctx: &'a Context,
is_expanded: bool,
content: F,
) -> Option<InnerResponse<R>>
pub fn show_dynamic_animated<R, F: Fn(&mut Ui) -> R>( &self, ctx: &'a Context, is_expanded: bool, content: F, ) -> Option<InnerResponse<R>>
Show the Panel dynamically and animated, based on the choice function.
Sourcepub fn show_dynamic_animated_inside<R, F: Fn(&mut Ui) -> R>(
&self,
ctx: &'a Context,
ui: &mut Ui,
is_expanded: bool,
content: F,
) -> Option<InnerResponse<R>>
pub fn show_dynamic_animated_inside<R, F: Fn(&mut Ui) -> R>( &self, ctx: &'a Context, ui: &mut Ui, is_expanded: bool, content: F, ) -> Option<InnerResponse<R>>
Show the Panel dynamically and animated inside a Ui, based on the choice function.
Sourcepub fn show<R, F: Fn(&mut Ui) -> R>(
&self,
ctx: &'a Context,
index: usize,
content: F,
) -> Option<InnerResponse<R>>
pub fn show<R, F: Fn(&mut Ui) -> R>( &self, ctx: &'a Context, index: usize, content: F, ) -> Option<InnerResponse<R>>
Show the Panel with the given index for its saved configuration. If you don’t need manual control, use show_dynamic instead.
Sourcepub fn show_inside<R, F: Fn(&mut Ui) -> R>(
&self,
ui: &mut Ui,
index: usize,
content: F,
) -> Option<InnerResponse<R>>
pub fn show_inside<R, F: Fn(&mut Ui) -> R>( &self, ui: &mut Ui, index: usize, content: F, ) -> Option<InnerResponse<R>>
Show the Panel inside a Ui with the given index for its saved configuration. If you don’t need manual control, use show_dynamic instead.
Sourcepub fn show_animated<R, F: Fn(&mut Ui) -> R>(
&self,
ctx: &'a Context,
index: usize,
is_expanded: bool,
content: F,
) -> Option<InnerResponse<R>>
pub fn show_animated<R, F: Fn(&mut Ui) -> R>( &self, ctx: &'a Context, index: usize, is_expanded: bool, content: F, ) -> Option<InnerResponse<R>>
Show the Panel with animation with the given index for its saved configuration. If you don’t need manual control, use show_dynamic instead.
Sourcepub fn show_animated_inside<R, F: Fn(&mut Ui) -> R>(
&self,
ui: &mut Ui,
index: usize,
is_expanded: bool,
content: F,
) -> Option<InnerResponse<R>>
pub fn show_animated_inside<R, F: Fn(&mut Ui) -> R>( &self, ui: &mut Ui, index: usize, is_expanded: bool, content: F, ) -> Option<InnerResponse<R>>
Show the Panel with animation inside a Ui with the given index for its saved configuration. If you don’t need manual control, use show_dynamic instead.
Source§impl<'a> DynamicPanel<'a>
impl<'a> DynamicPanel<'a>
Sourcepub fn dual(self, first: PanelCfg, second: PanelCfg) -> Self
pub fn dual(self, first: PanelCfg, second: PanelCfg) -> Self
Convenience function for creating a breaking panel.
Sourcepub fn with_threshold_function<F: Fn(&'a Context) -> bool + 'static>(
self,
f: F,
) -> Self
pub fn with_threshold_function<F: Fn(&'a Context) -> bool + 'static>( self, f: F, ) -> Self
Convenience function to allow a choice function between index 0 and 1. (true = 1)