pub trait IPresentationSource {
// Required methods
fn root_visual(&self) -> Option<Ref<Visual>>;
fn render_scaling(&self) -> f64;
fn renderer(&self) -> Rc<dyn IRenderer>;
fn layout_root(&self) -> Rc<dyn ILayoutRoot>;
fn client_size(&self) -> Size;
fn hit_tester(&self) -> Rc<dyn IHitTester>;
fn input_root(&self) -> Rc<dyn IInputRoot>;
// Provided methods
fn platform_settings(&self) -> Option<Rc<dyn IPlatformSettings>> { ... }
fn point_to_screen(&self, _point: Point) -> Option<PixelPoint> { ... }
fn point_to_client(&self, _point: PixelPoint) -> Option<Point> { ... }
}Expand description
The host of a visual tree: connects the tree to its renderer, layout root and input root.
Required Methods§
Sourcefn root_visual(&self) -> Option<Ref<Visual>>
fn root_visual(&self) -> Option<Ref<Visual>>
The root visual of the tree.
Sourcefn render_scaling(&self) -> f64
fn render_scaling(&self) -> f64
The scaling factor to use in rendering.
Sourcefn layout_root(&self) -> Rc<dyn ILayoutRoot>
fn layout_root(&self) -> Rc<dyn ILayoutRoot>
The layout root of the tree.
Sourcefn client_size(&self) -> Size
fn client_size(&self) -> Size
The size of the client area, in device-independent pixels.
Sourcefn hit_tester(&self) -> Rc<dyn IHitTester>
fn hit_tester(&self) -> Rc<dyn IHitTester>
The hit tester of the tree.
Sourcefn input_root(&self) -> Rc<dyn IInputRoot>
fn input_root(&self) -> Rc<dyn IInputRoot>
The input root of the tree.
Provided Methods§
Sourcefn platform_settings(&self) -> Option<Rc<dyn IPlatformSettings>>
fn platform_settings(&self) -> Option<Rc<dyn IPlatformSettings>>
The platform settings of the host, if it has any.
Sourcefn point_to_screen(&self, _point: Point) -> Option<PixelPoint>
fn point_to_screen(&self, _point: Point) -> Option<PixelPoint>
Converts a point from client to screen coordinates, if the host is on a screen.
Sourcefn point_to_client(&self, _point: PixelPoint) -> Option<Point>
fn point_to_client(&self, _point: PixelPoint) -> Option<Point>
Converts a point from screen to client coordinates, if the host is on a screen.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".