[][src]Trait gui::Cap

pub trait Cap: Debug {
    fn children(&self, widget: Id) -> Iter<'widget, Id>;
fn root_id(&self) -> Id;
fn parent_id(&self, widget: Id) -> Option<Id>;
fn is_visible(&self, widget: Id) -> bool;
fn is_displayed(&self, widget: Id) -> bool;
fn focused(&self) -> Option<Id>;
fn is_focused(&self, widget: Id) -> bool; }

A capability allowing for various widget related operations.

Required methods

fn children(&self, widget: Id) -> Iter<'widget, Id>

Retrieve an iterator over the children. Iteration happens in z-order, from highest to lowest.

fn root_id(&self) -> Id

Retrieve the Id of the root widget.

fn parent_id(&self, widget: Id) -> Option<Id>

Retrieve the parent of the given widget.

fn is_visible(&self, widget: Id) -> bool

Check whether a widget has its visibility flag set.

Note that a return value of true does not necessary mean that the widget is actually visible. A widget is only visible if all its parents have the visibility flag set, too. The is_displayed method can be used to check for actual visibility.

fn is_displayed(&self, widget: Id) -> bool

Check whether a widget is actually being displayed.

This method checks whether the referenced widget is actually being displayed, that is, whether its own as well as its parents' visibility flags are all set.

fn focused(&self) -> Option<Id>

Retrieve the currently focused widget.

fn is_focused(&self, widget: Id) -> bool

Check whether the widget with the given Id is focused.

Loading content...

Implementors

impl<E> Cap for Ui<E> where
    E: 'static + Debug
[src]

fn children(&self, widget: Id) -> Iter<'widget, Id>[src]

Retrieve an iterator over the children. Iteration happens in z-order, from highest to lowest.

fn root_id(&self) -> Id[src]

Retrieve the Id of the root widget.

fn parent_id(&self, widget: Id) -> Option<Id>[src]

Retrieve the parent of the given widget.

fn is_visible(&self, widget: Id) -> bool[src]

Check whether a widget has its visibility flag set.

fn is_displayed(&self, widget: Id) -> bool[src]

Check whether a widget is actually being displayed.

fn focused(&self) -> Option<Id>[src]

Retrieve the currently focused widget.

fn is_focused(&self, widget: Id) -> bool[src]

Check whether the given widget is focused.

Loading content...