[−][src]Struct fltk::menu::MenuItem
Creates a menu item
Implementations
impl MenuItem
[src]
pub fn new(choices: Vec<&str>) -> MenuItem
[src]
Initializes a new window, useful for popup menus
pub fn popup(&mut self, x: i32, y: i32) -> Option<MenuItem>
[src]
Creates a popup menu at the specified coordinates and returns its choice
pub fn label(&self) -> String
[src]
Returns the label of the menu item
pub fn set_label(&mut self, txt: &str)
[src]
Sets the label of the menu item
pub fn label_type<T: WidgetType>(&self) -> T
[src]
Returns the label type of the menu item
pub fn set_label_type<T: WidgetType>(&mut self, typ: T)
[src]
Sets the label type of the menu item
pub fn label_color(&self) -> Color
[src]
Returns the label color of the menu item
pub fn set_label_color(&mut self, color: Color)
[src]
Sets the label color of the menu item
pub fn label_font(&self) -> Font
[src]
Returns the label font of the menu item
pub fn set_label_font(&mut self, font: Font)
[src]
Sets the label font of the menu item
pub fn label_size(&self) -> u32
[src]
Returns the label size of the menu item
pub fn set_label_size(&mut self, sz: u32)
[src]
Sets the label size of the menu item
pub fn value(&self) -> bool
[src]
Returns the value of the menu item
pub fn set(&mut self)
[src]
Sets the menu item
pub fn clear(&mut self)
[src]
Clears the menu item
pub fn visible(&self) -> bool
[src]
Returns whether the menu item is visible or not
pub fn active(&mut self) -> bool
[src]
Returns whether the menu item is active
pub fn activate(&mut self)
[src]
Activates the menu item
pub fn deactivate(&mut self)
[src]
Deactivates the menu item
pub fn show(&mut self)
[src]
Shows the menu item
pub fn hide(&mut self)
[src]
Hides the menu item
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MenuItem
impl !Send for MenuItem
impl !Sync for MenuItem
impl Unpin for MenuItem
impl UnwindSafe for MenuItem
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,