pub struct ColorBarAxisElement;Expand description
The colourbar axis line plus its major/minor tick band.
Like ColorBarElement, this carries no mirrored Side; orientation is
always read from Config.colorbar at the point of use.
Trait Implementations§
Source§impl Clone for ColorBarAxisElement
impl Clone for ColorBarAxisElement
Source§impl Debug for ColorBarAxisElement
impl Debug for ColorBarAxisElement
Source§impl Draggable for ColorBarAxisElement
impl Draggable for ColorBarAxisElement
Source§fn nudge_element(&self) -> Element
fn nudge_element(&self) -> Element
The nudge-path element this drag target moves. This mapping is the
only thing an implementation defines; movement itself happens in
Self::drag_by.Source§fn drag_by(&self, cfg: &mut C, dx: f32, dy: f32) -> NudgeResult
fn drag_by(&self, cfg: &mut C, dx: f32, dy: f32) -> NudgeResult
Default drag pipeline: apply the pointer delta through
Config::nudge. Returns NudgeResult::Rejected (and leaves cfg
untouched) when the move would leave the chart area. Read moreSource§impl PartialEq for ColorBarAxisElement
impl PartialEq for ColorBarAxisElement
Source§impl Selectable for ColorBarAxisElement
impl Selectable for ColorBarAxisElement
Source§fn element_id(&self) -> String
fn element_id(&self) -> String
Stable element name for hosts that key on identity rather than
HitId (e.g. a wasm host exposing hit-testing as strings):
"data_area", "axis_bottom", "tick_labels_left",
"axis_title_left", "legend", "chart_title",
"colorbar_axis", "colorbar_tick_labels", "colorbar_title".
Custom host elements keep the default.Source§fn bounds(&self, cfg: &Config, _measure: &dyn MeasureText) -> Option<RectF>
fn bounds(&self, cfg: &Config, _measure: &dyn MeasureText) -> Option<RectF>
Interaction bounds of this element under
cfg, or None when the
element is hidden, empty, or the layout is infeasible. Text-bearing
elements use measure; tick-label elements remain representative
strips rather than exact rendered-label unions.Source§fn as_draggable(&self) -> Option<&dyn Draggable>
fn as_draggable(&self) -> Option<&dyn Draggable>
Source§fn selection_box(
&self,
cfg: &C,
measure: &dyn MeasureText,
) -> Option<SelectionBox>
fn selection_box( &self, cfg: &C, measure: &dyn MeasureText, ) -> Option<SelectionBox>
Default selection policy: a blue box
SELECTION_PADDING px outside
the bounds, stroked SELECTION_STROKE_WIDTH px in
SELECTION_COLOR. Resizable elements additionally carry the eight
resize handle squares.Source§fn contains(&self, cfg: &C, measure: &dyn MeasureText, x: f32, y: f32) -> bool
fn contains(&self, cfg: &C, measure: &dyn MeasureText, x: f32, y: f32) -> bool
Default hit test: point-in-bounds.
impl StructuralPartialEq for ColorBarAxisElement
Auto Trait Implementations§
impl Freeze for ColorBarAxisElement
impl RefUnwindSafe for ColorBarAxisElement
impl Send for ColorBarAxisElement
impl Sync for ColorBarAxisElement
impl Unpin for ColorBarAxisElement
impl UnsafeUnpin for ColorBarAxisElement
impl UnwindSafe for ColorBarAxisElement
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
Mutably borrows from an owned value. Read more