pub struct Histogram<'a> { /* private fields */ }Expand description
The histogram widget.
Need (image): a histogram.
Implementations§
Source§impl<'a> Histogram<'a>
impl<'a> Histogram<'a>
pub fn new(channels: impl IntoIterator<Item = Channel<'a>>) -> Histogram<'a>
Sourcepub fn log(self, log: bool) -> Histogram<'a>
pub fn log(self, log: bool) -> Histogram<'a>
Heights on a logarithmic scale (small counts stay visible).
Sourcepub fn size(self, size: Vec2) -> Histogram<'a>
pub fn size(self, size: Vec2) -> Histogram<'a>
The size in points (default: the available width, a third as high).
Sourcepub fn label(self, label: impl Into<String>) -> Histogram<'a>
pub fn label(self, label: impl Into<String>) -> Histogram<'a>
The accessible name (default “Histogram”).
Sourcepub fn clipping(self, clipping: Clipping) -> Histogram<'a>
pub fn clipping(self, clipping: Clipping) -> Histogram<'a>
Lights the clipping markers: shadows in the bottom-left corner, highlights in the bottom-right one, when their fraction is above zero.
Sourcepub fn draggable(self, on: bool) -> Histogram<'a>
pub fn draggable(self, on: bool) -> Histogram<'a>
Makes the histogram a control whose drag is handed back to the
application (HistogramOutput::changes).
Sourcepub fn edits(
self,
control: impl Into<String>,
value: impl Into<String>,
) -> Histogram<'a>
pub fn edits( self, control: impl Into<String>, value: impl Into<String>, ) -> Histogram<'a>
Names what the drag writes, for the area registry
(egui_pop_core::areas): the control (“Exposure”) and its value
now (“+0.30 EV”), which its hover card shows. Without it the card
names the histogram alone.
An empty value leaves it out.
Sourcepub fn step(self, step: f32) -> Histogram<'a>
pub fn step(self, step: f32) -> Histogram<'a>
How far an arrow key moves, in widths (a hundredth by default; Ctrl finer, Shift coarser).
Sourcepub fn on_change(
self,
hook: impl FnMut(&Change<Drag>) -> Verdict<Drag> + 'a,
) -> Histogram<'a>
pub fn on_change( self, hook: impl FnMut(&Change<Drag>) -> Verdict<Drag> + 'a, ) -> Histogram<'a>
Sees each change of the drag before it is written: allow, veto (at the end: the gesture is given back) or redirect (another distance). Makes the histogram draggable.
Sourcepub fn show(self, ui: &mut Ui) -> HistogramOutput
pub fn show(self, ui: &mut Ui) -> HistogramOutput
Draws the histogram; says how the drag moved.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Histogram<'a>
impl<'a> !RefUnwindSafe for Histogram<'a>
impl<'a> !Send for Histogram<'a>
impl<'a> !Sync for Histogram<'a>
impl<'a> Unpin for Histogram<'a>
impl<'a> UnsafeUnpin for Histogram<'a>
impl<'a> !UnwindSafe for Histogram<'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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.