Trait FileRow
pub trait FileRow: 'static {
// Required methods
fn path(&self) -> &Path;
fn name(&self) -> &str;
fn is_dir(&self) -> bool;
fn size_text(&self) -> String;
fn modified(&self) -> Option<DateTime<Local>>;
// Provided methods
fn kind(&self) -> Option<String> { ... }
fn paint_name(
&self,
scene: &mut Scene,
transform: Affine,
theme: &Theme,
text_renderer: &mut TextRenderer,
cell: Rect,
metrics: &FileTableMetrics,
) { ... }
}Expand description
One row of a file list: a file or a folder.
Required Methods§
fn is_dir(&self) -> bool
Provided Methods§
fn kind(&self) -> Option<String>
fn kind(&self) -> Option<String>
What kind of thing the entry is, for a list of things that are not
files (an app: Flatpak, AppImage, …). A list any of whose rows has a
kind shows a Kind column where it would show when each changed.
fn paint_name(
&self,
scene: &mut Scene,
transform: Affine,
theme: &Theme,
text_renderer: &mut TextRenderer,
cell: Rect,
metrics: &FileTableMetrics,
)
fn paint_name( &self, scene: &mut Scene, transform: Affine, theme: &Theme, text_renderer: &mut TextRenderer, cell: Rect, metrics: &FileTableMetrics, )
Paint the name cell. The default is the file’s icon and its name, which is all a list without previews needs.