pub struct TableKitDelegate<'a> {Show 19 fields
pub provider: &'a dyn TableProvider,
pub state: &'a mut TableState,
pub org_colors: &'a [[u8; 3]],
pub user_colors: &'a [[u8; 3]],
pub collected_responses: &'a mut Vec<ColResponse>,
pub halt_error: &'a mut Option<TableError>,
pub custom_cell_ui: Option<Box<CustomCellCallback<'a>>>,
pub item_clicked: &'a mut Option<usize>,
pub secondary_clicked: &'a mut Option<usize>,
pub is_new_pass: bool,
pub cell_padding: Margin,
pub highlight_entire_row: bool,
pub hovered_row: Option<u64>,
pub header_menu_anchor: HeaderMenuAnchor,
pub row_height: f32,
pub header_bg_color: Option<Color32>,
pub striped: bool,
pub striping_color: Option<Color32>,
pub hover_color: Option<Color32>,
}Expand description
The central delegate translating kit properties to the underlying egui_table layout.
Fields§
§provider: &'a dyn TableProvider§state: &'a mut TableState§org_colors: &'a [[u8; 3]]§user_colors: &'a [[u8; 3]]§collected_responses: &'a mut Vec<ColResponse>§halt_error: &'a mut Option<TableError>§custom_cell_ui: Option<Box<CustomCellCallback<'a>>>§item_clicked: &'a mut Option<usize>§secondary_clicked: &'a mut Option<usize>§is_new_pass: bool§cell_padding: Margin§highlight_entire_row: bool§hovered_row: Option<u64>§row_height: f32§header_bg_color: Option<Color32>§striped: bool§striping_color: Option<Color32>§hover_color: Option<Color32>Implementations§
Source§impl<'a> TableKitDelegate<'a>
impl<'a> TableKitDelegate<'a>
Sourcepub fn new(
provider: &'a dyn TableProvider,
state: &'a mut TableState,
org_colors: &'a [[u8; 3]],
user_colors: &'a [[u8; 3]],
collected_responses: &'a mut Vec<ColResponse>,
halt_error: &'a mut Option<TableError>,
custom_cell_ui: Option<Box<CustomCellCallback<'a>>>,
item_clicked: &'a mut Option<usize>,
secondary_clicked: &'a mut Option<usize>,
) -> Self
pub fn new( provider: &'a dyn TableProvider, state: &'a mut TableState, org_colors: &'a [[u8; 3]], user_colors: &'a [[u8; 3]], collected_responses: &'a mut Vec<ColResponse>, halt_error: &'a mut Option<TableError>, custom_cell_ui: Option<Box<CustomCellCallback<'a>>>, item_clicked: &'a mut Option<usize>, secondary_clicked: &'a mut Option<usize>, ) -> Self
Creates a new delegate instance with robust visual defaults.
Trait Implementations§
Source§impl TableDelegate for TableKitDelegate<'_>
impl TableDelegate for TableKitDelegate<'_>
Source§fn default_row_height(&self) -> f32
fn default_row_height(&self) -> f32
Default row height. Read more
Source§fn prepare(&mut self, _info: &PrefetchInfo)
fn prepare(&mut self, _info: &PrefetchInfo)
Called before any call to
Self::cell_ui to communicate the range of visible columns and rows. Read moreSource§fn header_cell_ui(&mut self, ui: &mut Ui, cell: &HeaderCellInfo)
fn header_cell_ui(&mut self, ui: &mut Ui, cell: &HeaderCellInfo)
The contents of a header cell in the table. Read more
Source§fn cell_ui(&mut self, ui: &mut Ui, cell: &CellInfo)
fn cell_ui(&mut self, ui: &mut Ui, cell: &CellInfo)
The contents of a cell in the table. Read more
Source§fn row_top_offset(&self, _ctx: &Context, _table_id: Id, row_nr: u64) -> f32
fn row_top_offset(&self, _ctx: &Context, _table_id: Id, row_nr: u64) -> f32
Compute the offset for the top of the given row. Read more
fn uniform_row_height(&self) -> Option<f32>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for TableKitDelegate<'a>
impl<'a> !Send for TableKitDelegate<'a>
impl<'a> !Sync for TableKitDelegate<'a>
impl<'a> !UnwindSafe for TableKitDelegate<'a>
impl<'a> Freeze for TableKitDelegate<'a>
impl<'a> Unpin for TableKitDelegate<'a>
impl<'a> UnsafeUnpin for TableKitDelegate<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more