[−][src]Struct pushrod_render::render::widget_cache::WidgetContainer
This is a container that stores information about a Widget
that will be drawn on the screen.
It stores the Widget
object, the actual point of origin inside the Window
(as a Vec<i32>
of X and Y points), the parent ID of this Widget
, if it is being added as a child.
Fields
widget: RefCell<Box<dyn Widget>>
origin: Vec<i32>
Implementations
impl WidgetContainer
[src]
This is the WidgetContainer
object that stores a Widget
and its accompanying information:
its name, point of origin, and parent ID.
pub fn new(
widget: Box<dyn Widget>,
widget_name: String,
origin: Vec<i32>,
parent_id: i32
) -> Self
[src]
widget: Box<dyn Widget>,
widget_name: String,
origin: Vec<i32>,
parent_id: i32
) -> Self
Creates a new WidgetContainer
storage object.
pub fn get_widget_name(&self) -> String
[src]
Retrieves the name of this Widget
.
pub fn get_parent_id(&self) -> i32
[src]
Retrieves the numeric ID of the parent that this Widget
refers to. A 0
indicates
no parent is assigned.
Auto Trait Implementations
impl !RefUnwindSafe for WidgetContainer
impl !Send for WidgetContainer
impl !Sync for WidgetContainer
impl Unpin for WidgetContainer
impl !UnwindSafe for WidgetContainer
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>,