Skip to main content

RangeInputCpt

Struct RangeInputCpt 

Source
pub struct RangeInputCpt<FID>
where FID: EzCptIds,
{ /* private fields */ }
Expand description

A component drawing a FormField of type FormFieldType::Range.

Trait Implementations§

Source§

impl<FID, CID, CA, CS, CM> Component<CID, CA, CS, CM> for RangeInputCpt<FID>
where FID: EzCptIds, CID: EzCptIds, CA: EzArgs, CS: EzState, CM: EzMsg,

Source§

fn on_event( &mut self, event: EzEvent<CID, CM>, _state: &mut State<CS>, ) -> Vec<EzEvent<CID, CM>>

Method to implement to handle events. The component will receive any event if it is focused; but only events it is subscribed to otherwise.
Source§

fn focusable(&self) -> bool

Whether the component is focusable or not.
Source§

fn init(&mut self, state: &mut State<CS>) -> Vec<EzEvent<CID, CM>>

Method called on first tick only.
Source§

fn tick(&mut self, state: &mut State<CS>) -> Vec<EzEvent<CID, CM>>

Method called on every tick. You should implement it only if you need to save a reference to the state or if your business logic needs to execute some code on a regular basis.
Source§

fn legend(&self) -> Option<Legend>

Get the component’s hotkeys legend.
Source§

fn capture_focus(&mut self, forward: bool) -> bool

Returns true if the focus is handled internally. Let’s say this component has two inner focusable area: Read more
Source§

impl<FID> Debug for RangeInputCpt<FID>
where FID: EzCptIds + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<FID, CID, CA, CS, CM> InputCpt<CID, CA, CS, CM> for RangeInputCpt<FID>
where FID: EzCptIds, CID: EzCptIds, CA: EzArgs, CS: EzState, CM: EzMsg,

Source§

fn get_value(&self) -> FormFieldValue

Get the current value of the input field.
Source§

fn capture_validation(&mut self) -> bool

Whether this input component should be forwarded the form validation so it can act on it and return if it has been handled internally.
Source§

impl<FID> MockComponent for RangeInputCpt<FID>
where FID: EzCptIds,

Source§

fn draw(&mut self, area: Rect, buf: &mut Buffer, theme: &Theme)

Draw the component in the given area of the given buffer.
Source§

impl<FID> MockProps for RangeInputCpt<FID>
where FID: EzCptIds,

Source§

fn props(&self) -> Option<&Props>

Get a reference to the component’s attribute
Source§

fn props_mut(&mut self) -> Option<&mut Props>

Get a mutable reference to the component’s attribute

Auto Trait Implementations§

§

impl<FID> Freeze for RangeInputCpt<FID>
where FormField<FID>: Freeze,

§

impl<FID> RefUnwindSafe for RangeInputCpt<FID>

§

impl<FID> Send for RangeInputCpt<FID>
where FormField<FID>: Send,

§

impl<FID> Sync for RangeInputCpt<FID>
where FormField<FID>: Sync,

§

impl<FID> Unpin for RangeInputCpt<FID>
where FormField<FID>: Unpin,

§

impl<FID> UnsafeUnpin for RangeInputCpt<FID>
where FormField<FID>: UnsafeUnpin,

§

impl<FID> UnwindSafe for RangeInputCpt<FID>
where FormField<FID>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more