pub struct TopBottomPanel { /* private fields */ }Expand description
A panel that covers the entire top or bottom of a Ui or screen.
The order in which you add panels matter! The first panel you add will always be the outermost, and the last you add will always be the innermost.
See the module level docs for more details.
egui::TopBottomPanel::top("my_panel").show(ctx, |ui| {
ui.label("Hello World!");
});See also SidePanel.
Implementations§
Source§impl TopBottomPanel
impl TopBottomPanel
Sourcepub fn top(id_source: impl Hash) -> TopBottomPanel
pub fn top(id_source: impl Hash) -> TopBottomPanel
id_source: Something unique, e.g. "my_top_panel".
Sourcepub fn bottom(id_source: impl Hash) -> TopBottomPanel
pub fn bottom(id_source: impl Hash) -> TopBottomPanel
id_source: Something unique, e.g. "my_bottom_panel".
Sourcepub fn resizable(self, resizable: bool) -> TopBottomPanel
pub fn resizable(self, resizable: bool) -> TopBottomPanel
Switch resizable on/off.
Default is false.
Sourcepub fn default_height(self, default_height: f32) -> TopBottomPanel
pub fn default_height(self, default_height: f32) -> TopBottomPanel
The initial height of the SidePanel.
Defaults to style::Spacing::interact_size.y.
pub fn min_height(self, min_height: f32) -> TopBottomPanel
pub fn max_height(self, max_height: f32) -> TopBottomPanel
Sourcepub fn height_range(self, height_range: RangeInclusive<f32>) -> TopBottomPanel
pub fn height_range(self, height_range: RangeInclusive<f32>) -> TopBottomPanel
The allowable height range for resizable panels.
Sourcepub fn frame(self, frame: Frame) -> TopBottomPanel
pub fn frame(self, frame: Frame) -> TopBottomPanel
Change the background color, margins, etc.
Source§impl TopBottomPanel
impl TopBottomPanel
Sourcepub fn show_inside<R>(
self,
ui: &mut Ui,
add_contents: impl FnOnce(&mut Ui) -> R,
) -> InnerResponse<R>
pub fn show_inside<R>( self, ui: &mut Ui, add_contents: impl FnOnce(&mut Ui) -> R, ) -> InnerResponse<R>
Show the panel inside a Ui.
Auto Trait Implementations§
impl Freeze for TopBottomPanel
impl RefUnwindSafe for TopBottomPanel
impl Send for TopBottomPanel
impl Sync for TopBottomPanel
impl Unpin for TopBottomPanel
impl UnwindSafe for TopBottomPanel
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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