Struct ButtonBar

Source
pub struct ButtonBar { /* private fields */ }
Expand description

Creates a row of buttons.

Implementations§

Source§

impl ButtonBar

Source

pub fn new(buttons: &[&str]) -> ButtonBar

Create a new grid containing a row of buttons. The buttons will be labeled with the strings provided in buttons.

  • buttons - A list of strings to use as button labels.
Source

pub fn buttons(&self) -> &[Button]

Returns the array of buttons contained by the grid.

Trait Implementations§

Source§

impl Component for ButtonBar

Source§

fn co(&self) -> newtComponent

Return newtComponent pointer.
Source§

impl Drop for ButtonBar

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl GridFns for ButtonBar

Source§

fn add_to_form<'a>(&'a self, form: &mut Form<'a>) -> Result<(), &'static str>

Add Grid to a Form. Read more
Source§

fn get_size(&self) -> (i32, i32)

Get the size of the Grid. Read more
Source§

fn place(&self, left: i32, top: i32)

Move the Grid to a specified location. Read more
Source§

impl Parent for ButtonBar

Source§

fn children(&self) -> Vec<&dyn Component>

Get all child components from Grid and sub-Grids.
Source§

impl Grid for ButtonBar

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WidgetFns for T
where T: Grid,

Source§

fn takes_focus(&self, _value: bool)

Allow the widget to be focused when its parent Form is run.
Source§

fn get_position(&self) -> (i32, i32)

Get the position of the widget’s top left corner. Read more
Source§

fn get_size(&self) -> (i32, i32)

Get the widget’s width and height. Read more