[−][src]Struct sixtyfps_corelib::eventloop::ComponentWindow
The ComponentWindow is the (rust) facing public type that can render the items of components to the screen.
Implementations
impl ComponentWindow[src]
pub fn new(window_impl: Rc<dyn GenericWindow>) -> Self[src]
Creates a new instance of a CompomentWindow based on the given window implementation. Only used internally.
pub fn run(
&self,
component: Pin<VRef<'_, ComponentVTable>>,
root_item: Pin<ItemRef<'_>>
)[src]
&self,
component: Pin<VRef<'_, ComponentVTable>>,
root_item: Pin<ItemRef<'_>>
)
Spins an event loop and renders the items of the provided component in this window.
pub fn scale_factor(&self) -> f32[src]
Returns the scale factor set on the window.
pub fn set_scale_factor(&self, factor: f32)[src]
Sets an overriding scale factor for the window. This is typically only used for testing.
pub fn free_graphics_resources(&self, component: Pin<ComponentRef<'_>>)[src]
This function is called by the generated code when a component and therefore its tree of items are destroyed. The implementation typically uses this to free the underlying graphics resources cached via RenderingCache.
pub fn set_focus_item(
&self,
component: Pin<ComponentRef<'_>>,
item: Pin<VRef<'_, ItemVTable>>
)[src]
&self,
component: Pin<ComponentRef<'_>>,
item: Pin<VRef<'_, ItemVTable>>
)
Clears the focus on any previously focused item and makes the provided item the focus item, in order to receive future key events.
Trait Implementations
impl Clone for ComponentWindow[src]
fn clone(&self) -> ComponentWindow[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for ComponentWindow
impl !Send for ComponentWindow
impl !Sync for ComponentWindow
impl Unpin for ComponentWindow
impl !UnwindSafe for ComponentWindow
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,
pub 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> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
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.
pub 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>,