RoleCx

Trait RoleCx 

Source
pub trait RoleCx {
    // Required methods
    fn set_label_impl(&mut self, label: TextOrSource<'_>);
    fn set_scroll_offset(
        &mut self,
        scroll_offset: Offset,
        max_scroll_offset: Offset,
    );
}
Expand description

Context through which additional role properties may be specified

Unlike other widget method contexts, this is a trait; the caller provides an implementation.

Required Methods§

Source

fn set_label_impl(&mut self, label: TextOrSource<'_>)

Attach a label

Do not use this for Role::Label and similar items where the label is the widget’s primary value. Do use this where a label exists which is not the primary value, for example an image’s alternate text or a label next to a control.

Source

fn set_scroll_offset( &mut self, scroll_offset: Offset, max_scroll_offset: Offset, )

Set scroll offset

This sets the current scroll_offset and the max_scroll_offset. The minimum offset is assumed to be zero. It is expected that this supports setting the scroll offset and Event::Scroll.

Implementors§