pub struct RadioBox { /* private fields */ }
Expand description

A bare radio box (no label)

See also RadioButton which includes a label.

Implementations

Construct a radio box

All instances of RadioBox and RadioButton constructed over the same group will be considered part of a single group.

Set event handler f

When the radio box is selected, the closure f is called.

No handler is called on deselection.

Construct a radio box with given group and event handler f

All instances of RadioBox and RadioButton constructed over the same group will be considered part of a single group.

When the radio box is selected, the closure f is called.

No handler is called on deselection.

Set the initial state of the radio box.

Select this radio box from the group

This radio box will be set true while all others from the group will be set false. Returns true if newly selected, false if already selected.

This does not call the event handler set by Self::on_select or Self::new_on.

Unset all radio boxes in the group

Note: state will not update until the next draw.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Get the widget’s state

Set the widget’s state

Get size rules for the given axis Read more

Set size and position Read more

Draw a widget and its children Read more

Translate a coordinate to a WidgetId Read more

Handle an event sent to this widget Read more

Pre-configuration Read more

Is this widget navigable via Tab key? Read more

Configure widget Read more

Get translation of children relative to this widget Read more

Navigation in spatial order Read more

Potentially steal an event before it reaches a child Read more

Handle an event sent to child index but left unhandled Read more

Handler for messages from children/descendants Read more

Handler for scrolling Read more

Get the number of child widgets Read more

Get a reference to a child widget by index, or None if the index is out of bounds. Read more

Mutable variant of get Read more

Find the child which is an ancestor of this id, if any Read more

Make an identifier for a child Read more

Get the widget’s identifier Read more

Get the widget’s region, relative to its parent.

Get the name of the widget struct

Erase type

Erase type

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Cast from Self to T Read more

Try converting from Self to T Read more

Try approximate conversion from Self to T Read more

Cast approximately from Self to T Read more

Cast to integer, truncating Read more

Cast to the nearest integer Read more

Cast the floor to an integer Read more

Cast the ceiling to an integer Read more

Try converting to integer with truncation Read more

Try converting to the nearest integer Read more

Try converting the floor to an integer Read more

Try convert the ceiling to an integer Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Get the widget’s identifier Read more

Test widget identifier for equality Read more

Display as “StructName#WidgetId”

Check whether id is self or a descendant Read more

Check whether id is not self and is a descendant Read more

Find the descendant with this id, if any

Find the descendant with this id, if any