Skip to main content

IPresentationSource

Trait IPresentationSource 

Source
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§

Source

fn root_visual(&self) -> Option<Ref<Visual>>

The root visual of the tree.

Source

fn render_scaling(&self) -> f64

The scaling factor to use in rendering.

Source

fn renderer(&self) -> Rc<dyn IRenderer>

The renderer of the tree.

Source

fn layout_root(&self) -> Rc<dyn ILayoutRoot>

The layout root of the tree.

Source

fn client_size(&self) -> Size

The size of the client area, in device-independent pixels.

Source

fn hit_tester(&self) -> Rc<dyn IHitTester>

The hit tester of the tree.

Source

fn input_root(&self) -> Rc<dyn IInputRoot>

The input root of the tree.

Provided Methods§

Source

fn platform_settings(&self) -> Option<Rc<dyn IPlatformSettings>>

The platform settings of the host, if it has any.

Source

fn point_to_screen(&self, _point: Point) -> Option<PixelPoint>

Converts a point from client to screen coordinates, if the host is on a screen.

Source

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".

Implementors§