[][src]Struct pushrod::render::widget_cache::WidgetContainer

pub struct WidgetContainer {
    pub widget: RefCell<Box<dyn Widget>>,
    pub origin: Vec<i32>,
    // some fields omitted
}

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>

Methods

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>,
    widget_id: i32,
    parent_id: i32
) -> Self
[src]

Creates a new WidgetContainer storage object.

pub fn get_widget_name(&self) -> String[src]

Retrieves the name of this Widget.

pub fn get_widget_id(&self) -> i32[src]

Retrieves the numeric ID 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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.