pub struct SubMenuButton<'a> {
pub button: Button<'a>,
pub sub_menu: SubMenu,
}Fields§
Implementations§
Source§impl<'a> SubMenuButton<'a>
impl<'a> SubMenuButton<'a>
Sourcepub fn arrow_shape(rect: Rect, color: impl Into<Color32>) -> Shape
pub fn arrow_shape(rect: Rect, color: impl Into<Color32>) -> Shape
The submenu arrow triangle shape.
Sourcepub fn arrow_atom(color: Option<Color32>) -> Atom<'static>
pub fn arrow_atom(color: Option<Color32>) -> Atom<'static>
An Atom painting the Self::arrow_shape.
With None the arrow follows the buttons text color, Some(color) overrides it.
pub fn new(atoms: impl IntoAtoms<'a>) -> SubMenuButton<'a>
Create a new submenu button from a Button.
Use Button::right_text and SubMenuButton::arrow_atom to add the default right
arrow.
Sourcepub fn config(self, config: MenuConfig) -> SubMenuButton<'a>
pub fn config(self, config: MenuConfig) -> SubMenuButton<'a>
Set the config for the submenu.
The close behavior will not affect the current button, but the buttons in the submenu.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SubMenuButton<'a>
impl<'a> !Send for SubMenuButton<'a>
impl<'a> !Sync for SubMenuButton<'a>
impl<'a> !UnwindSafe for SubMenuButton<'a>
impl<'a> Forget for SubMenuButton<'a>
impl<'a> Freeze for SubMenuButton<'a>
impl<'a> Move for SubMenuButton<'a>
impl<'a> Unpin for SubMenuButton<'a>
impl<'a> UnsafeUnpin for SubMenuButton<'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> 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