pub struct SplitButton { /* private fields */ }Expand description
Split button with icon and dropdown arrow
Used for tool categories that expand to show submenus.
§Example
use egui_charts::icons::icons;
use egui_charts::ui_kit::buttons::SplitButton;
let response = SplitButton::new(&icons::TREND_LINE)
.tooltip("Trend Lines")
.expanded(is_submenu_open)
.show(ui);
if response.clicked() {
// toggle the submenu
}Implementations§
Source§impl SplitButton
impl SplitButton
Sourcepub fn size(self, size: ButtonSize) -> Self
pub fn size(self, size: ButtonSize) -> Self
Set the button size
Auto Trait Implementations§
impl Freeze for SplitButton
impl RefUnwindSafe for SplitButton
impl Send for SplitButton
impl Sync for SplitButton
impl Unpin for SplitButton
impl UnsafeUnpin for SplitButton
impl UnwindSafe for SplitButton
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