[−][src]Struct pushrod_widgets::system_widgets::menu_item_widget::MenuItemWidget
Base Widget.
Trait Implementations
impl Default for MenuItemWidget
[src]
fn default() -> MenuItemWidget
[src]
impl Widget for MenuItemWidget
[src]
Implementation for drawing a MenuItemWidget
, with the Widget
trait objects applied.
fn properties(&mut self) -> &mut WidgetProperties
[src]
fn widget_name(&self) -> String
[src]
fn draw(
&mut self,
c: &mut Canvas<Window>,
t: &mut TextureCache
) -> Option<&Texture>
[src]
&mut self,
c: &mut Canvas<Window>,
t: &mut TextureCache
) -> Option<&Texture>
This is a ButtonWidget
that is used as a standard blank Widget
.
- PROPERTY_MAIN_COLOR: the
Color
of the body of theWidget
- PROPERTY_FONT_COLOR: the color of the font
- PROPERTY_FONT_NAME: full or relative path to the font file to use to render the text
- PROPERTY_FONT_SIZE: the size in points of the font
- PROPERTY_FONT_STYLE: the
FontStyle
to apply to the font - PROPERTY_TEXT:
String
containing the text to display - PROPERTY_DISABLED: sets the object disabled, displaying the text, but with an alpha of 128.
While the button is selected, the color of the background will be Color::BLACK
, and the
text will turn Color::WHITE
. If the button is not selected, it will revert back to the
colors that you set for the text color and background colors of the button.
fn handle_event(&mut self, event: PushrodEvent) -> Option<PushrodEvent>
[src]
Overrides the handle_event
function, which handles the mouse button, widget entering and
exiting events.
fn build_layout(&mut self) -> Vec<Box<dyn Widget>>
[src]
fn constructed_layout_ids(&mut self, _ids: Vec<u32>)
[src]
fn invalidate(&mut self)
[src]
fn invalidated(&mut self) -> bool
[src]
fn hide(&mut self)
[src]
fn show(&mut self)
[src]
Auto Trait Implementations
impl RefUnwindSafe for MenuItemWidget
impl !Send for MenuItemWidget
impl !Sync for MenuItemWidget
impl Unpin for MenuItemWidget
impl UnwindSafe for MenuItemWidget
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, 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>,