Trait tuifw_window::Widget

source ·
pub trait Widget: DynClone + SupportsInterfaces {
    // Required methods
    fn new(&self) -> Box<dyn WidgetData>;
    fn clone_data(
        &self,
        tree: &mut WindowTree<'_>,
        source: Window,
        dest: Window,
        clone_window: Box<dyn Fn(&WindowTree<'_>, Window) -> Window>
    );
    fn render(
        &self,
        tree: &WindowTree<'_>,
        window: Window,
        rp: &mut RenderPort,
        app: &mut dyn App
    );
    fn measure(
        &self,
        tree: &mut WindowTree<'_>,
        window: Window,
        available_width: Option<i16>,
        available_height: Option<i16>,
        app: &mut dyn App
    ) -> Vector;
    fn arrange(
        &self,
        tree: &mut WindowTree<'_>,
        window: Window,
        final_inner_bounds: Rect,
        app: &mut dyn App
    ) -> Vector;
    fn update(
        &self,
        tree: &mut WindowTree<'_>,
        window: Window,
        event: Event,
        event_source: Window,
        app: &mut dyn App
    ) -> bool;

    // Provided methods
    fn secondary_focusable(&self) -> bool { ... }
    fn pre_process(&self) -> bool { ... }
    fn post_process(&self) -> bool { ... }
    fn bring_into_view(
        &self,
        _tree: &mut WindowTree<'_>,
        _window: Window,
        _rect: Rect
    ) -> bool { ... }
}

Required Methods§

source

fn new(&self) -> Box<dyn WidgetData>

source

fn clone_data( &self, tree: &mut WindowTree<'_>, source: Window, dest: Window, clone_window: Box<dyn Fn(&WindowTree<'_>, Window) -> Window> )

source

fn render( &self, tree: &WindowTree<'_>, window: Window, rp: &mut RenderPort, app: &mut dyn App )

source

fn measure( &self, tree: &mut WindowTree<'_>, window: Window, available_width: Option<i16>, available_height: Option<i16>, app: &mut dyn App ) -> Vector

source

fn arrange( &self, tree: &mut WindowTree<'_>, window: Window, final_inner_bounds: Rect, app: &mut dyn App ) -> Vector

source

fn update( &self, tree: &mut WindowTree<'_>, window: Window, event: Event, event_source: Window, app: &mut dyn App ) -> bool

Provided Methods§

source

fn secondary_focusable(&self) -> bool

source

fn pre_process(&self) -> bool

source

fn post_process(&self) -> bool

source

fn bring_into_view( &self, _tree: &mut WindowTree<'_>, _window: Window, _rect: Rect ) -> bool

Implementors§