pub trait Tab {
fn ui(&mut self, ui: &mut Ui);
fn title(&mut self) -> WidgetText;
fn context_menu(&mut self, _ui: &mut Ui) { ... }
fn on_close(&mut self) -> bool { ... }
fn force_close(&mut self) -> bool { ... }
fn inner_margin(&self) -> Margin { ... }
fn clear_background(&self) -> bool { ... }
}
👎Deprecated
Expand description
Dockable tab that can be used in crate::Tree
s.
Required Methods§
Provided Methods§
👎Deprecated
Content inside context_menu.
sourcefn on_close(&mut self) -> bool
fn on_close(&mut self) -> bool
👎Deprecated
This is called when the tabs close button is pressed.
Returns true
if the tab should close immediately, false
otherwise.
NOTE if returning false ui
will still be called once more if this tab is active.
sourcefn force_close(&mut self) -> bool
fn force_close(&mut self) -> bool
👎Deprecated
This is called every frame after ui
is called (if the tab is active).
Returns true
if the tab should be forced to close, false
otherwise.
In the event this function returns true the tab will be removed without calling on_close
.
sourcefn inner_margin(&self) -> Margin
fn inner_margin(&self) -> Margin
👎Deprecated
Sets the margins between tab’s borders and its contents.
sourcefn clear_background(&self) -> bool
fn clear_background(&self) -> bool
👎Deprecated
Whether the tab will be cleared with the color specified in Style::tab_background_color