[][src]Struct game::sandbox::dashboards::table::Table

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

Fields

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

Implementations

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

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

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

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

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

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

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

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

Auto Trait Implementations

impl<T, F> !RefUnwindSafe for Table<T, F>

impl<T, F> !Send for Table<T, F>

impl<T, F> !Sync for Table<T, F>

impl<T, F> Unpin for Table<T, F> where
    F: Unpin,
    T: Unpin

impl<T, F> !UnwindSafe for Table<T, F>

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> Instrument for T[src]

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

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,