pub struct TableBuilder<'ui> { /* private fields */ }Expand description
Builder for ImGui tables with columns + headers + sizing/freeze options.
Implementations§
Source§impl<'ui> TableBuilder<'ui>
impl<'ui> TableBuilder<'ui>
Sourcepub fn new(ui: &'ui Ui, str_id: impl AsRef<str>) -> Self
pub fn new(ui: &'ui Ui, str_id: impl AsRef<str>) -> Self
Create a new TableBuilder. Prefer using Ui::table("id").
Sourcepub fn flags(self, flags: TableFlags) -> Self
pub fn flags(self, flags: TableFlags) -> Self
Set table flags
Sourcepub fn outer_size(self, size: [f32; 2]) -> Self
pub fn outer_size(self, size: [f32; 2]) -> Self
Set outer size (width, height). Default [0,0]
Sourcepub fn inner_width(self, width: f32) -> Self
pub fn inner_width(self, width: f32) -> Self
Set inner width. Default 0.0
Sourcepub fn freeze(self, frozen_cols: i32, frozen_rows: i32) -> Self
pub fn freeze(self, frozen_cols: i32, frozen_rows: i32) -> Self
Freeze columns/rows so they stay visible when scrolling
Sourcepub fn column(self, name: impl AsRef<str>) -> ColumnBuilder<'ui>
pub fn column(self, name: impl AsRef<str>) -> ColumnBuilder<'ui>
Begin defining a column using a chainable ColumnBuilder.
Call .done() to return to the TableBuilder.
Sourcepub fn columns<Name: AsRef<str>>(
self,
cols: impl IntoIterator<Item = TableColumnSetup<Name>>,
) -> Self
pub fn columns<Name: AsRef<str>>( self, cols: impl IntoIterator<Item = TableColumnSetup<Name>>, ) -> Self
Replace columns with provided list
Sourcepub fn add_column<Name: AsRef<str>>(self, col: TableColumnSetup<Name>) -> Self
pub fn add_column<Name: AsRef<str>>(self, col: TableColumnSetup<Name>) -> Self
Add a single column setup
Trait Implementations§
Auto Trait Implementations§
impl<'ui> Freeze for TableBuilder<'ui>
impl<'ui> !RefUnwindSafe for TableBuilder<'ui>
impl<'ui> !Send for TableBuilder<'ui>
impl<'ui> !Sync for TableBuilder<'ui>
impl<'ui> Unpin for TableBuilder<'ui>
impl<'ui> !UnwindSafe for TableBuilder<'ui>
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