pub struct SortHeader<'a> {
pub title: &'a str,
pub name: &'a str,
pub descending: Option<bool>,
pub sortable: bool,
}Expand description
A column’s header: its box is the kit’s table-header-cell component,
selected while the rows are sorted by it, the direction the kit’s
sort-ascending or sort-descending glyph after the title. A button for
assistive technology, a label when it does not sort. The data table’s and
the file picker’s.
Need (data): a sortable column header.
Fields§
§title: &'a strWhat it shows.
name: &'a strIts name for assistive technology, which says the direction.
descending: Option<bool>Whether the rows are sorted by it, and whether downwards.
sortable: boolWhether a click sorts.
Implementations§
Source§impl SortHeader<'_>
impl SortHeader<'_>
Sourcepub fn show(self, ui: &Ui, kit: &Kit, rect: Rect, id: Id) -> Response
pub fn show(self, ui: &Ui, kit: &Kit, rect: Rect, id: Id) -> Response
Draws it over rect. The caller decides what a click does.
Sourcepub fn show_icon(
self,
ui: &Ui,
kit: &Kit,
rect: Rect,
id: Id,
icon: Icon,
) -> Response
pub fn show_icon( self, ui: &Ui, kit: &Kit, rect: Rect, id: Id, icon: Icon, ) -> Response
Draws it over rect with icon in its title’s place (a narrow
column’s header): the title is no longer shown but stays its name
for assistive technology, and the sort glyph follows the icon. The
caller gives the icon’s tooltip (Response::on_hover_text).
Need (data): a narrow column’s header shown as an icon.
Trait Implementations§
Source§impl<'a> Clone for SortHeader<'a>
impl<'a> Clone for SortHeader<'a>
Source§fn clone(&self) -> SortHeader<'a>
fn clone(&self) -> SortHeader<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for SortHeader<'a>
impl<'a> Debug for SortHeader<'a>
impl<'a> Copy for SortHeader<'a>
Auto Trait Implementations§
impl<'a> Freeze for SortHeader<'a>
impl<'a> RefUnwindSafe for SortHeader<'a>
impl<'a> Send for SortHeader<'a>
impl<'a> Sync for SortHeader<'a>
impl<'a> Unpin for SortHeader<'a>
impl<'a> UnsafeUnpin for SortHeader<'a>
impl<'a> UnwindSafe for SortHeader<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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