Struct egui::menu::SubMenuButton
source · pub struct SubMenuButton {
text: WidgetText,
icon: WidgetText,
index: usize,
}
Fields§
§text: WidgetText
§icon: WidgetText
§index: usize
Implementations§
source§impl SubMenuButton
impl SubMenuButton
sourcefn new(
text: impl Into<WidgetText>,
icon: impl Into<WidgetText>,
index: usize,
) -> Self
fn new( text: impl Into<WidgetText>, icon: impl Into<WidgetText>, index: usize, ) -> Self
The icon
can be an emoji (e.g. ⏵
right arrow), shown right of the label
fn visuals<'a>( ui: &'a Ui, response: &Response, menu_state: &MenuState, sub_id: Id, ) -> &'a WidgetVisuals
pub fn icon(self, icon: impl Into<WidgetText>) -> Self
pub(crate) fn show( self, ui: &mut Ui, menu_state: &MenuState, sub_id: Id, ) -> Response
Auto Trait Implementations§
impl Freeze for SubMenuButton
impl RefUnwindSafe for SubMenuButton
impl Send for SubMenuButton
impl Sync for SubMenuButton
impl Unpin for SubMenuButton
impl UnwindSafe for SubMenuButton
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