Struct sixtyfps_corelib::window::Window [−][src]
pub struct Window { pub meta_properties_tracker: Pin<Rc<PropertyTracker>>, // some fields omitted }
Expand description
Structure that represent a Window in the runtime
Fields
meta_properties_tracker: Pin<Rc<PropertyTracker>>
Gets dirty when the layout restrictions, or some other property of the windows change FIXME: should only be exposed to the backend
Implementations
Create a new instance of the window, given the platform_window factory fn
Associates this window with the specified component. Further event handling and rendering, etc. will be done with that component.
return the component. Panics if it wasn’t set.
returns the component or None if it isn’t set.
Receive a mouse event and pass it to the items of the component to change their state.
Arguments:
pos
: The position of the mouse event in window physical coordinates.what
: The type of mouse event.component
: The SixtyFPS compiled component that provides the tree of items.
Receive a key event and pass it to the items of the component to change their state.
Arguments:
event
: The key event received by the windowing system.component
: The SixtyFPS compiled component that provides the tree of items.
Installs a binding on the specified property that’s toggled whenever the text cursor is supposed to be visible or not.
Sets the focus to the item pointed to by item_ptr. This will remove the focus from any currently focused item.
Sets the focus on the window to true or false, depending on the have_focus argument. This results in WindowFocusReceived and WindowFocusLost events.
If the component’s root item is a Window element, then this function synchronizes its properties, such as the title for example, with the properties known to the windowing system.
Calls draw_fn using a crate::properties::PropertyTracker
, which is set up to issue a call to PlatformWindow::request_redraw
when any properties accessed during drawing change.
Registers the window with the windowing system, in order to render the component’s items and react to input events once the event loop spins.
Trait Implementations
type Target = dyn PlatformWindow
type Target = dyn PlatformWindow
The resulting type after dereferencing.