[−][src]Struct pushrod_widgets::system_widgets::image_widget::ImageWidget
This is the storage object for the ImageWidget
. It stores the config, properties, callback registry,
the image name, and a scale flag.
Trait Implementations
impl Default for ImageWidget
[src]
fn default() -> ImageWidget
[src]
impl Widget for ImageWidget
[src]
Creates a new ImageWidget
, which draws an image in a supported image format for SDL2 at a specific
location on the screen. Requires the name of the image (the full path to the file), the position
within the widget (defined as ImagePosition
), the xywh bounds, and whether or not the image is
scaled within the bounds of the Widget
.
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 the drawing implementation of the ImageWidget
. The following are the properties that can
be applied:
- PROPERTY_MAIN_COLOR: the
Color
of the body of theWidget
- PROPERTY_BORDER_WIDTH: the width of the border to draw
- PROPERTY_BORDER_COLOR: the
Color
of the border. - PROPERTY_IMAGE_POSITION: position of the image within the
ImageWidget
- PROPERTY_IMAGE_FILENAME: the filename of the image to display
- PROPERTY_IMAGE_SCALED: boolean flag indicating whether or not to scale the image to the bounds of the
ImageWidget
fn handle_event(&mut self, _e: PushrodEvent) -> Option<PushrodEvent>
[src]
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 ImageWidget
impl !Send for ImageWidget
impl !Sync for ImageWidget
impl Unpin for ImageWidget
impl UnwindSafe for ImageWidget
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>,