pub struct TableViewColumn<T> { /* private fields */ }Expand description
XAML TableViewColumn: one column of a TableView over items of type T.
Implementations§
Source§impl<T: 'static> TableViewColumn<T>
impl<T: 'static> TableViewColumn<T>
Sourcepub fn text(
app: &mut App,
header: impl Into<String>,
binding: impl Fn(&T) -> String + 'static,
) -> Ref<Self>
pub fn text( app: &mut App, header: impl Into<String>, binding: impl Fn(&T) -> String + 'static, ) -> Ref<Self>
XAML TableViewTextColumn with its Header and Binding: each cell shows the text binding gives for the row’s item, and the column sorts by that text unless given a key of its own.
Sourcepub fn template(
app: &mut App,
header: impl Into<String>,
cell_template: impl Fn(&mut App, BuildContext, &T) -> WidgetRef + 'static,
) -> Ref<Self>
pub fn template( app: &mut App, header: impl Into<String>, cell_template: impl Fn(&mut App, BuildContext, &T) -> WidgetRef + 'static, ) -> Ref<Self>
XAML TableViewTemplateColumn with its Header and CellTemplate: each cell is what cell_template builds for the row’s item. It sorts only by a key or comparer it is given.
Sourcepub fn dispose(self: Handle<Self>, app: &mut App)
pub fn dispose(self: Handle<Self>, app: &mut App)
Releases the listeners; the column is not used after.
Sourcepub fn header_tool_tip(self: Handle<Self>, app: &App) -> Option<&str>
pub fn header_tool_tip(self: Handle<Self>, app: &App) -> Option<&str>
HeaderToolTip: the header’s tooltip; None or empty shows none.
Sourcepub fn set_header_tool_tip(
self: Handle<Self>,
app: &mut App,
value: Option<String>,
)
pub fn set_header_tool_tip( self: Handle<Self>, app: &mut App, value: Option<String>, )
Sets HeaderToolTip.
Sourcepub fn width(self: Handle<Self>, app: &App) -> GridLength
pub fn width(self: Handle<Self>, app: &App) -> GridLength
Width: pixels, Auto (the widest realized cell) or a star share of the space the fixed columns leave.
Sourcepub fn set_width(self: Handle<Self>, app: &mut App, value: GridLength)
pub fn set_width(self: Handle<Self>, app: &mut App, value: GridLength)
Sets Width.
Sourcepub fn set_min_width(self: Handle<Self>, app: &mut App, value: f64)
pub fn set_min_width(self: Handle<Self>, app: &mut App, value: f64)
Sets MinWidth.
Sourcepub fn set_max_width(self: Handle<Self>, app: &mut App, value: f64)
pub fn set_max_width(self: Handle<Self>, app: &mut App, value: f64)
Sets MaxWidth.
Sourcepub fn can_resize(self: Handle<Self>, app: &App) -> bool
pub fn can_resize(self: Handle<Self>, app: &App) -> bool
CanResize: whether this column shows a gripper; the table’s can_user_resize_columns gates them all.
Sourcepub fn set_can_resize(self: Handle<Self>, app: &mut App, value: bool)
pub fn set_can_resize(self: Handle<Self>, app: &mut App, value: bool)
Sets CanResize.
Sourcepub fn actual_width(self: Handle<Self>, app: &App) -> f64
pub fn actual_width(self: Handle<Self>, app: &App) -> f64
ActualWidth: the width the table last resolved, clamped to MinWidth and MaxWidth. Read-only.
Sourcepub fn frozen_edge(self: Handle<Self>, app: &App) -> TableViewFrozenEdge
pub fn frozen_edge(self: Handle<Self>, app: &App) -> TableViewFrozenEdge
FrozenEdge.
Sourcepub fn set_frozen_edge(
self: Handle<Self>,
app: &mut App,
value: TableViewFrozenEdge,
)
pub fn set_frozen_edge( self: Handle<Self>, app: &mut App, value: TableViewFrozenEdge, )
Sets FrozenEdge.
Sourcepub fn visible(self: Handle<Self>, app: &App) -> bool
pub fn visible(self: Handle<Self>, app: &App) -> bool
Visibility: whether the column and its cells are shown.
Sourcepub fn set_visible(self: Handle<Self>, app: &mut App, value: bool)
pub fn set_visible(self: Handle<Self>, app: &mut App, value: bool)
Sets Visibility.
Sourcepub fn can_sort(self: Handle<Self>, app: &App) -> bool
pub fn can_sort(self: Handle<Self>, app: &App) -> bool
CanSort: whether a header click sorts this column; sorting from code still works.
Sourcepub fn set_can_sort(self: Handle<Self>, app: &mut App, value: bool)
pub fn set_can_sort(self: Handle<Self>, app: &mut App, value: bool)
Sets CanSort.
Sourcepub fn sort_cycle(self: Handle<Self>, app: &App) -> TableViewSortCycle
pub fn sort_cycle(self: Handle<Self>, app: &App) -> TableViewSortCycle
SortCycle, read when the header is clicked.
Sourcepub fn set_sort_cycle(
self: Handle<Self>,
app: &mut App,
value: TableViewSortCycle,
)
pub fn set_sort_cycle( self: Handle<Self>, app: &mut App, value: TableViewSortCycle, )
Sets SortCycle.
Sourcepub fn set_sort_key<K: Ord>(
self: Handle<Self>,
app: &mut App,
key: impl Fn(&T) -> K + 'static,
)
pub fn set_sort_key<K: Ord>( self: Handle<Self>, app: &mut App, key: impl Fn(&T) -> K + 'static, )
Sets SortMemberPath, as the key it names: the column sorts its rows by key. A text column without one sorts by its cells’ text.
Sourcepub fn set_custom_sort_comparer(
self: Handle<Self>,
app: &mut App,
comparer: impl Fn(&T, &T) -> Ordering + 'static,
)
pub fn set_custom_sort_comparer( self: Handle<Self>, app: &mut App, comparer: impl Fn(&T, &T) -> Ordering + 'static, )
Sets CustomSortComparer, which takes precedence over the sort key. A column sorted at the time is sorted again with it.
Sourcepub fn sort_direction(self: Handle<Self>, app: &App) -> SortDirection
pub fn sort_direction(self: Handle<Self>, app: &App) -> SortDirection
SortDirection: None unless the column is part of the active sort. Written by the owning table; read-only.
Trait Implementations§
Source§impl<T: 'static> ChangeNotifier for TableViewColumn<T>
impl<T: 'static> ChangeNotifier for TableViewColumn<T>
fn change_notifier_data(&self) -> &ChangeNotifierData
fn change_notifier_data_mut(&mut self) -> &mut ChangeNotifierData
Source§fn will_add_listener(self: Handle<Self>, app: &mut App)
fn will_add_listener(self: Handle<Self>, app: &mut App)
addListener that
work before super.addListener go here.Source§fn did_remove_listener(self: Handle<Self>, app: &mut App)
fn did_remove_listener(self: Handle<Self>, app: &mut App)
removeListener that
work after super.removeListener go here.