pub trait StyleData {
// Provided methods
fn grid_metrics(&self, _ui: &Ui) -> (i32, i32, i32) { ... }
fn grid_header_bg(&self, ui: &mut Ui, sp: &Sp<'_>) { ... }
fn grid_header(&self, ui: &mut Ui, sp: &Sp<'_>) { ... }
fn grid_row(&self, ui: &mut Ui, sp: &Sp<'_>) { ... }
fn tree_twisty(&self, ui: &mut Ui, sp: &Sp<'_>) { ... }
fn badge_size(&self, ui: &mut Ui, sp: &mut Sp<'_>) -> (i32, i32) { ... }
fn badge(&self, ui: &mut Ui, sp: &Sp<'_>) { ... }
fn status_dot(&self, ui: &mut Ui, sp: &Sp<'_>) { ... }
fn meter(&self, ui: &mut Ui, sp: &Sp<'_>) { ... }
fn chart_palette(&self, ui: &Ui) -> [u32; 8] { ... }
}Expand description
data views: grid header / rows, tree rows, badges, status dots, meters, charts (data.rs, chart.rs). Every method has a token-based default (stock.rs); a style overrides what it wants to look different.
Provided Methods§
Sourcefn grid_metrics(&self, _ui: &Ui) -> (i32, i32, i32)
fn grid_metrics(&self, _ui: &Ui) -> (i32, i32, i32)
(header strip height, row height, cell padding) in DIP
Sourcefn grid_header_bg(&self, ui: &mut Ui, sp: &Sp<'_>)
fn grid_header_bg(&self, ui: &mut Ui, sp: &Sp<'_>)
the header strip behind the header cells (rect = the strip)
Sourcefn grid_header(&self, ui: &mut Ui, sp: &Sp<'_>)
fn grid_header(&self, ui: &mut Ui, sp: &Sp<'_>)
header cell: label, ev, flags GH_*; s[0] = the label inset (px)
Sourcefn grid_row(&self, ui: &mut Ui, sp: &Sp<'_>)
fn grid_row(&self, ui: &mut Ui, sp: &Sp<'_>)
row background: ev, value 1 = selected, value2 = row index, flags GR_*
Sourcefn tree_twisty(&self, ui: &mut Ui, sp: &Sp<'_>)
fn tree_twisty(&self, ui: &mut Ui, sp: &Sp<'_>)
tree expander glyph: value 1 = expanded, ev
Sourcefn badge_size(&self, ui: &mut Ui, sp: &mut Sp<'_>) -> (i32, i32)
fn badge_size(&self, ui: &mut Ui, sp: &mut Sp<'_>) -> (i32, i32)
badge: flags BADGE_*, label; size -> (w, h)
fn badge(&self, ui: &mut Ui, sp: &Sp<'_>)
Sourcefn status_dot(&self, ui: &mut Ui, sp: &Sp<'_>)
fn status_dot(&self, ui: &mut Ui, sp: &Sp<'_>)
status dot: flags BADGE_*
Sourcefn meter(&self, ui: &mut Ui, sp: &Sp<'_>)
fn meter(&self, ui: &mut Ui, sp: &Sp<'_>)
meter (capacity bar): value, value2 maximum, flags BADGE_* of the fill
Sourcefn chart_palette(&self, ui: &Ui) -> [u32; 8]
fn chart_palette(&self, ui: &Ui) -> [u32; 8]
the categorical colours of charts (series 0 .. 7, 0xAARRGGBB)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".