[−][src]Struct clock_cli::tui::TimerView
Implementations
impl TimerView
[src]
pub fn new(h: u8, m: u8, s: u8) -> Self
[src]
pub fn start(&mut self)
[src]
pub fn set_on_finish<F, R>(&mut self, cb: F) where
F: 'static + Fn(&mut Cursive, TimerData) -> R,
[src]
F: 'static + Fn(&mut Cursive, TimerData) -> R,
Sets a callback to be used when <Enter>
is pressed or counting to 00:00:00
The elapsed time will be given to the callback.
See also cursive::views::select_view::SelectView::set_on_submit
pub fn on_finish<F, R>(self, cb: F) -> Self where
F: 'static + Fn(&mut Cursive, TimerData) -> R,
[src]
F: 'static + Fn(&mut Cursive, TimerData) -> R,
Trait Implementations
impl View for TimerView
[src]
fn draw(&self, printer: &Printer<'_, '_>)
[src]
fn required_size(&mut self, _constraint: Vec2) -> Vec2
[src]
fn on_event(&mut self, event: Event) -> EventResult
[src]
fn layout(&mut self, XY<usize>)
fn needs_relayout(&self) -> bool
fn call_on_any(
&mut self,
&Selector<'_>,
&'a mut (dyn FnMut(&mut (dyn View + 'static)) + 'a)
)
&mut self,
&Selector<'_>,
&'a mut (dyn FnMut(&mut (dyn View + 'static)) + 'a)
)
fn focus_view(&mut self, &Selector<'_>) -> Result<(), ()>
fn take_focus(&mut self, source: Direction) -> bool
fn important_area(&self, view_size: XY<usize>) -> Rect
fn type_name(&self) -> &'static str
Auto Trait Implementations
impl !RefUnwindSafe for TimerView
impl !Send for TimerView
impl !Sync for TimerView
impl Unpin for TimerView
impl !UnwindSafe for TimerView
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AnyView for T where
T: View,
T: View,
fn as_any(&self) -> &(dyn Any + 'static)
Downcast self to a Any
.
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Downcast self to a mutable Any
.
fn as_boxed_any(self: Box<T>) -> Box<dyn Any + 'static>
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> Finder for T where
T: View,
T: View,
fn call_on<V, F, R>(&mut self, sel: &Selector<'_>, callback: F) -> Option<R> where
F: FnOnce(&mut V) -> R,
V: View,
F: FnOnce(&mut V) -> R,
V: View,
fn call_on_name<V, F, R>(&mut self, name: &str, callback: F) -> Option<R> where
F: FnOnce(&mut V) -> R,
V: View,
F: FnOnce(&mut V) -> R,
V: View,
fn call_on_id<V, F, R>(&mut self, id: &str, callback: F) -> Option<R> where
F: FnOnce(&mut V) -> R,
V: View,
F: FnOnce(&mut V) -> R,
V: View,
fn find_name<V>(
&mut self,
name: &str
) -> Option<OwningHandle<OwningRef<Rc<RefCell<V>>, RefCell<V>>, RefMut<'static, V>>> where
V: View,
&mut self,
name: &str
) -> Option<OwningHandle<OwningRef<Rc<RefCell<V>>, RefCell<V>>, RefMut<'static, V>>> where
V: View,
fn find_id<V>(
&mut self,
id: &str
) -> Option<OwningHandle<OwningRef<Rc<RefCell<V>>, RefCell<V>>, RefMut<'static, V>>> where
V: View,
&mut self,
id: &str
) -> Option<OwningHandle<OwningRef<Rc<RefCell<V>>, RefCell<V>>, RefMut<'static, V>>> where
V: View,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoBoxedView for T where
T: View,
T: View,
fn as_boxed_view(self) -> Box<dyn View + 'static>
impl<T> Nameable for T where
T: View,
T: View,
fn with_name<S>(self, name: S) -> NamedView<Self> where
S: Into<String>,
S: Into<String>,
fn with_id<S>(self, id: S) -> NamedView<Self> where
S: Into<String>,
S: Into<String>,
impl<T> Resizable for T where
T: View,
T: View,
fn boxed(
self,
width: SizeConstraint,
height: SizeConstraint
) -> ResizedView<Self>
self,
width: SizeConstraint,
height: SizeConstraint
) -> ResizedView<Self>
fn resized(
self,
width: SizeConstraint,
height: SizeConstraint
) -> ResizedView<Self>
self,
width: SizeConstraint,
height: SizeConstraint
) -> ResizedView<Self>
fn fixed_size<S>(self, size: S) -> ResizedView<Self> where
S: Into<XY<usize>>,
S: Into<XY<usize>>,
fn fixed_width(self, width: usize) -> ResizedView<Self>
fn fixed_height(self, height: usize) -> ResizedView<Self>
fn full_screen(self) -> ResizedView<Self>
fn full_width(self) -> ResizedView<Self>
fn full_height(self) -> ResizedView<Self>
fn max_size<S>(self, size: S) -> ResizedView<Self> where
S: Into<XY<usize>>,
S: Into<XY<usize>>,
fn max_width(self, max_width: usize) -> ResizedView<Self>
fn max_height(self, max_height: usize) -> ResizedView<Self>
fn min_size<S>(self, size: S) -> ResizedView<Self> where
S: Into<XY<usize>>,
S: Into<XY<usize>>,
fn min_width(self, min_width: usize) -> ResizedView<Self>
fn min_height(self, min_height: usize) -> ResizedView<Self>
impl<T> Scrollable for T where
T: View,
T: View,
fn scrollable(self) -> ScrollView<Self>
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> View for T where
T: ViewWrapper,
T: ViewWrapper,
fn draw(&self, printer: &Printer<'_, '_>)
fn required_size(&mut self, req: XY<usize>) -> XY<usize>
fn on_event(&mut self, ch: Event) -> EventResult
fn layout(&mut self, size: XY<usize>)
fn take_focus(&mut self, source: Direction) -> bool
fn call_on_any(
&mut self,
selector: &Selector<'_>,
callback: &'a mut (dyn FnMut(&mut (dyn View + 'static)) + 'a)
)
&mut self,
selector: &Selector<'_>,
callback: &'a mut (dyn FnMut(&mut (dyn View + 'static)) + 'a)
)