pub trait EntryDrawer {
// Required methods
fn row_size(&self, ui: &Ui, width: f32) -> Vec2;
fn row(&mut self, ui: &mut Ui, n: usize, size: Vec2) -> Response;
fn cell_size(&self, ui: &Ui, side: f32) -> Vec2;
fn cell(
&mut self,
ui: &mut Ui,
n: usize,
size: Vec2,
thumbnail: ThumbState,
) -> Response;
// Provided methods
fn headers(&mut self, _ui: &mut Ui, _width: f32) { ... }
fn empty(&mut self, _ui: &mut Ui) { ... }
}Expand description
Draws the entries a mode lays out, one at a time: the layer that knows
its host. A mode owns the layout (the virtualised rows or cells, the
scrolling, the keys’ moves, the thumbnails’ order); the drawer owns what
an entry looks like and does. The browser’s own is PlainDrawer; the
in-app picker gives its rows with their columns, its groups’ badges, the
highlight its field drives and its own clicks.
Required Methods§
Sourcefn cell_size(&self, ui: &Ui, side: f32) -> Vec2
fn cell_size(&self, ui: &Ui, side: f32) -> Vec2
A cell’s size for a thumbnail side points wide.
Sourcefn cell(
&mut self,
ui: &mut Ui,
n: usize,
size: Vec2,
thumbnail: ThumbState,
) -> Response
fn cell( &mut self, ui: &mut Ui, n: usize, size: Vec2, thumbnail: ThumbState, ) -> Response
Draws cell n; thumbnail is what the provider answered for it.