[][src]Struct widgetry::widgets::table::Table

pub struct Table<A, T, F> {
    data: Vec<T>,
    label_per_row: Box<dyn Fn(&T) -> String>,
    columns: Vec<Column<A, T>>,
    filter: Filter<A, T, F>,
    sort_by: String,
    descending: bool,
    skip: usize,
}

Fields

data: Vec<T>label_per_row: Box<dyn Fn(&T) -> String>columns: Vec<Column<A, T>>filter: Filter<A, T, F>sort_by: Stringdescending: boolskip: usize

Implementations

impl<A, T, F> Table<A, T, F>[src]

pub fn new(
    data: Vec<T>,
    label_per_row: Box<dyn Fn(&T) -> String>,
    default_sort_by: &str,
    filter: Filter<A, T, F>
) -> Table<A, T, F>
[src]

pub fn column(
    &mut self,
    name: &str,
    render: Box<dyn Fn(&EventCtx<'_>, &A, &T) -> GeomBatch>,
    col: Col<T>
)
[src]

pub fn render(&self, ctx: &mut EventCtx<'_>, app: &A) -> Widget[src]

pub fn clicked(&mut self, action: &str) -> bool[src]

pub fn panel_changed(&mut self, panel: &Panel)[src]

impl<A, T: 'static, F> Table<A, T, F>[src]

pub fn static_col(&mut self, name: &str, to_str: Box<dyn Fn(&T) -> String>)[src]

Auto Trait Implementations

impl<A, T, F> !RefUnwindSafe for Table<A, T, F>[src]

impl<A, T, F> !Send for Table<A, T, F>[src]

impl<A, T, F> !Sync for Table<A, T, F>[src]

impl<A, T, F> Unpin for Table<A, T, F> where
    F: Unpin,
    T: Unpin
[src]

impl<A, T, F> !UnwindSafe for Table<A, T, F>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.