pub struct PanelHeader<'a> { /* private fields */ }Expand description
Panel header with title and optional right-aligned actions.
The title is in the theme’s title size and strong text colour; actions sit 4 px apart.
Implementations§
Source§impl<'a> PanelHeader<'a>
impl<'a> PanelHeader<'a>
Sourcepub fn new(title: &'a str) -> Self
pub fn new(title: &'a str) -> Self
Create a panel header with the given title and a separator below.
Sourcepub fn strong(self) -> Self
pub fn strong(self) -> Self
Has no effect: every header uses the same title style. Kept for source compatibility.
Sourcepub fn no_separator(self) -> Self
pub fn no_separator(self) -> Self
Disable the separator below the header.
Sourcepub fn show(self, ui: &mut Ui, actions: impl FnOnce(&mut Ui)) -> Response
pub fn show(self, ui: &mut Ui, actions: impl FnOnce(&mut Ui)) -> Response
Show the panel header. The closure receives a right-to-left layout for action buttons.
Sourcepub fn show_plain(self, ui: &mut Ui) -> Response
pub fn show_plain(self, ui: &mut Ui) -> Response
Show the panel header with no action buttons.
Auto Trait Implementations§
impl<'a> Freeze for PanelHeader<'a>
impl<'a> RefUnwindSafe for PanelHeader<'a>
impl<'a> Send for PanelHeader<'a>
impl<'a> Sync for PanelHeader<'a>
impl<'a> Unpin for PanelHeader<'a>
impl<'a> UnsafeUnpin for PanelHeader<'a>
impl<'a> UnwindSafe for PanelHeader<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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