Trait rui::View

source · []
pub trait View: Sealed {
    fn print(&self, id: ViewID, cx: &mut Context);
    fn process(
        &self,
        event: &Event,
        id: ViewID,
        cx: &mut Context,
        vger: &mut VGER
    ); fn draw(&self, id: ViewID, cx: &mut Context, vger: &mut VGER); fn layout(
        &self,
        id: ViewID,
        sz: LocalSize,
        cx: &mut Context,
        vger: &mut VGER
    ) -> LocalSize; fn hittest(
        &self,
        id: ViewID,
        pt: LocalPoint,
        cx: &mut Context,
        vger: &mut VGER
    ) -> Option<ViewID>; fn commands(
        &self,
        id: ViewID,
        cx: &mut Context,
        cmds: &mut Vec<CommandInfo>
    ); fn gc(&self, id: ViewID, cx: &mut Context, map: &mut StateMap); fn access(
        &self,
        id: ViewID,
        cx: &mut Context,
        nodes: &mut Vec<Node>
    ) -> Option<NodeId>; }
Expand description

Trait for the unit of UI composition.

Required methods

Prints a description of the view for debugging.

Processes an event.

Draws the view using vger.

Lays out subviews and return the size of the view.

Returns the topmost view which the point intersects.

Accumulates information about menu bar commands.

Copies state currently in use to a new StateMap (the rest are dropped).

Builds an AccessKit tree. The node ID for the subtree is returned. All generated nodes are accumulated.

Implementors