pub struct SqllyDataTable {
pub state: Entity<GridState>,
/* private fields */
}Expand description
Top-level GPUI widget.
Fields§
§state: Entity<GridState>Implementations§
Source§impl SqllyDataTable
impl SqllyDataTable
Sourcepub fn builder(data: GridData) -> SqllyDataTableBuilder
pub fn builder(data: GridData) -> SqllyDataTableBuilder
Construct from GridData using the default GridConfig.
Sourcepub fn pivot_state(&self) -> Option<&Entity<PivotState>>
pub fn pivot_state(&self) -> Option<&Entity<PivotState>>
The pivot state entity, when the pivot tab is enabled. Read it for the
current PivotConfig, row height, or column width; update it to
reconfigure the pivot programmatically.
Sourcepub fn active_tab(&self) -> GridTab
pub fn active_tab(&self) -> GridTab
The currently active tab.
Sourcepub fn pivot_locked(&self) -> bool
pub fn pivot_locked(&self) -> bool
Whether the visible pivot tab currently rejects activation.
Side of the pivot grid where the control panel is rendered.
Move the pivot control panel to the left or right of the pivot grid.
Whether the pivot control panel is collapsed into its divider.
Collapse or expand the pivot control panel.
Current width of the expanded pivot control panel, in pixels.
Resize the pivot control panel, clamped to its supported range.
Sourcepub fn set_pivot_locked(&mut self, locked: bool, status: Option<String>)
pub fn set_pivot_locked(&mut self, locked: bool, status: Option<String>)
Lock or unlock the pivot tab while keeping it visible. status is
rendered beside the Pivot title while locked, for example Loading.
Locking an active pivot returns immediately to the flat grid so a host
can continue streaming rows without recomputing the pivot snapshot.
Sourcepub fn set_active_tab(&mut self, tab: GridTab, cx: &mut App)
pub fn set_active_tab(&mut self, tab: GridTab, cx: &mut App)
Switch between the flat grid and the pivot view. Switching to the
pivot re-syncs its source snapshot if the grid’s data changed (e.g.
rows were appended). No-op when the pivot tab is not enabled and
Pivot is requested.
Sourcepub fn enable_pivot(&mut self, config: PivotConfig, cx: &mut App)
pub fn enable_pivot(&mut self, config: PivotConfig, cx: &mut App)
Enable the pivot tab at runtime with the given configuration. If already enabled, the existing pivot state is reconfigured instead (collapse/sort/filter state is preserved).
Sourcepub fn disable_pivot(&mut self)
pub fn disable_pivot(&mut self)
Remove the pivot tab and return to the flat grid.
Register (or replace) the pivot’s right-click menu provider at
runtime. No-op when the pivot tab is not enabled — enable it first
(or register via
SqllyDataTableBuilder::pivot_context_menu_provider).
Trait Implementations§
Source§impl Focusable for SqllyDataTable
impl Focusable for SqllyDataTable
Source§fn focus_handle(&self, cx: &App) -> FocusHandle
fn focus_handle(&self, cx: &App) -> FocusHandle
Source§impl Render for SqllyDataTable
impl Render for SqllyDataTable
Auto Trait Implementations§
impl !RefUnwindSafe for SqllyDataTable
impl !Send for SqllyDataTable
impl !Sync for SqllyDataTable
impl !UnwindSafe for SqllyDataTable
impl Freeze for SqllyDataTable
impl Unpin for SqllyDataTable
impl UnsafeUnpin for SqllyDataTable
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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