Struct egui_dock::TabBuilder
source · [−]pub struct TabBuilder { /* private fields */ }
Implementations
sourceimpl TabBuilder
impl TabBuilder
sourcepub fn title(self, title: impl Into<WidgetText>) -> Self
pub fn title(self, title: impl Into<WidgetText>) -> Self
Sets the text displayed in the tab bar.
sourcepub fn inner_margin(self, margin: Margin) -> Self
pub fn inner_margin(self, margin: Margin) -> Self
Sets the margins around the tab’s content.
sourcepub fn content(self, add_content: impl FnMut(&mut Ui) + 'static) -> Self
pub fn content(self, add_content: impl FnMut(&mut Ui) + 'static) -> Self
Sets the function that adds content to the tab.
sourcepub fn on_close(self, on_close: impl FnMut() -> bool + 'static) -> Self
pub fn on_close(self, on_close: impl FnMut() -> bool + 'static) -> Self
Sets the function that is called when the close button is pressed.
The function should return true
if the tab should close immediately, false
otherwise.
If no function is set the default behavior is to always return true.
See Tab::on_close
for more detail
sourcepub fn force_close(self, force_close: impl FnMut() -> bool + 'static) -> Self
pub fn force_close(self, force_close: impl FnMut() -> bool + 'static) -> Self
Sets the function that is called every frame to determine if the tab should close.
The function should return true
if the tab should be forced to close, false
otherwise.
If no function is set the default behavior is to always return false.
See Tab::force_close
for more detail
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for TabBuilder
impl !Send for TabBuilder
impl !Sync for TabBuilder
impl Unpin for TabBuilder
impl !UnwindSafe for TabBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more