[−][src]Struct orbtk::prelude::BuildContext
Used to create an entity for a widget with its properties as components.
Implementations
impl<'a> BuildContext<'a>
[src]
pub fn get_widget(&mut self, entity: Entity) -> WidgetContainer<'_>
[src]
Returns a specific widget.
pub fn create_entity(&mut self) -> Entity
[src]
Creates a new entity.
pub fn update_theme_by_state(&mut self, entity: Entity)
[src]
Update theme by state.
pub fn append_child(&mut self, parent: Entity, child: Entity)
[src]
Appends a child to a parent.
pub fn append_child_to_overlay(&mut self, child: Entity) -> Result<(), String>
[src]
Appends a child to overlay (on the top of the main tree). If the overlay does not exists an error will be returned.
pub fn register_property<P>(&mut self, key: &str, widget: Entity, property: P) where
P: Component,
[src]
P: Component,
Registers a property as component.
pub fn register_property_box(
&mut self,
key: &str,
widget: Entity,
property: ComponentBox
)
[src]
&mut self,
key: &str,
widget: Entity,
property: ComponentBox
)
Registers a property box as component.
pub fn register_shared_property<P>(
&mut self,
key: &str,
target: Entity,
source: Entity
) where
P: Component,
[src]
&mut self,
key: &str,
target: Entity,
source: Entity
) where
P: Component,
Registers a shared property. Uses the key as source key
pub fn register_shared_property_by_source_key<P>(
&mut self,
key: &str,
source_key: &str,
target: Entity,
source: Entity
) where
P: Component,
[src]
&mut self,
key: &str,
source_key: &str,
target: Entity,
source: Entity
) where
P: Component,
Registers a shared property.
pub fn register_property_shared_box(
&mut self,
key: &str,
widget: Entity,
property: SharedComponentBox
)
[src]
&mut self,
key: &str,
widget: Entity,
property: SharedComponentBox
)
Registers a shared component box. Uses the key as source key
pub fn register_property_shared_box_by_source_key(
&mut self,
key: &str,
source_key: &str,
widget: Entity,
property: SharedComponentBox
)
[src]
&mut self,
key: &str,
source_key: &str,
widget: Entity,
property: SharedComponentBox
)
Registers a shared component box.
pub fn register_state(
&mut self,
widget: Entity,
state: Box<dyn State + 'static>
)
[src]
&mut self,
widget: Entity,
state: Box<dyn State + 'static>
)
Registers a state with a widget.
pub fn register_render_object(
&mut self,
widget: Entity,
render_object: Box<dyn RenderObject + 'static>
)
[src]
&mut self,
widget: Entity,
render_object: Box<dyn RenderObject + 'static>
)
Registers a render object with a widget.
pub fn register_handler(
&mut self,
widget: Entity,
handler: Rc<dyn EventHandler + 'static>
)
[src]
&mut self,
widget: Entity,
handler: Rc<dyn EventHandler + 'static>
)
Registers an event handler with a widget.
pub fn register_layout(
&mut self,
widget: Entity,
layout: Box<dyn Layout + 'static>
)
[src]
&mut self,
widget: Entity,
layout: Box<dyn Layout + 'static>
)
Registers a layout object with a widget.
impl<'a> BuildContext<'a>
[src]
pub fn new(
ecm: &'a mut EntityComponentManager<Tree, StringComponentStore>,
render_objects: &'a RefCell<BTreeMap<Entity, Box<dyn RenderObject + 'static>>>,
layouts: &'a RefCell<BTreeMap<Entity, Box<dyn Layout + 'static>>>,
handlers: &'a RefCell<BTreeMap<Entity, Vec<Rc<dyn EventHandler + 'static>>>>,
states: &'a mut BTreeMap<Entity, Box<dyn State + 'static>>,
theme: &'a Theme,
event_queue: &'a Rc<RefCell<EventQueue>>
) -> BuildContext<'a>
[src]
ecm: &'a mut EntityComponentManager<Tree, StringComponentStore>,
render_objects: &'a RefCell<BTreeMap<Entity, Box<dyn RenderObject + 'static>>>,
layouts: &'a RefCell<BTreeMap<Entity, Box<dyn Layout + 'static>>>,
handlers: &'a RefCell<BTreeMap<Entity, Vec<Rc<dyn EventHandler + 'static>>>>,
states: &'a mut BTreeMap<Entity, Box<dyn State + 'static>>,
theme: &'a Theme,
event_queue: &'a Rc<RefCell<EventQueue>>
) -> BuildContext<'a>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for BuildContext<'a>
impl<'a> !Send for BuildContext<'a>
impl<'a> !Sync for BuildContext<'a>
impl<'a> Unpin for BuildContext<'a>
impl<'a> !UnwindSafe for BuildContext<'a>
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<E> Component for E where
E: Any,
[src]
E: Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,