pub struct Calendar<'a, Message> { /* private fields */ }calendar only.Expand description
A calendar builder. Convert it into an Element to render.
Implementations§
Source§impl<'a, Message> Calendar<'a, Message>
impl<'a, Message> Calendar<'a, Message>
pub fn on_event(self, on_event: impl Fn(Event) -> Message + 'a) -> Self
pub fn width(self, width: impl Into<Length>) -> Self
Sourcepub fn height(self, height: impl Into<Length>) -> Self
pub fn height(self, height: impl Into<Length>) -> Self
The height of the whole calendar. It fills the space it is given by default, so give it a fixed height inside anything that scrolls.
Sourcepub fn header(self, header: bool) -> Self
pub fn header(self, header: bool) -> Self
Whether to show the Today button, the arrows, the title and the
menu of views. Turn it off to build your own from State::title
and the navigation Events.
Sourcepub fn header_leading(self, element: impl Into<Element<'a, Message>>) -> Self
pub fn header_leading(self, element: impl Into<Element<'a, Message>>) -> Self
Something of the app’s at the start of the header, before Today, such as a button for a new entry.
Sourcepub fn header_trailing(self, element: impl Into<Element<'a, Message>>) -> Self
pub fn header_trailing(self, element: impl Into<Element<'a, Message>>) -> Self
Something of the app’s at the end of the header, after the menu of views.
Sourcepub fn start_at_hour(self, hour: u8) -> Self
pub fn start_at_hour(self, hour: u8) -> Self
Scrolls a whole-day week or day view to hour whenever a timed
view comes on show and when Today is pressed, so the working day is
in view instead of midnight. Off by default.
Sourcepub fn hours(self, hours: Range<u8>) -> Self
pub fn hours(self, hours: Range<u8>) -> Self
The hours the week and day views show, such as 8..18 for a
working day. Defaults to the whole day, which scrolls.
Sourcepub fn hour_height(self, height: f32) -> Self
pub fn hour_height(self, height: f32) -> Self
The least height of an hour in the week and day views, which is at
least MIN_HOUR_HEIGHT so a half-hour entry still has room for
its title. Hours grow past it to fill the space when the ones on
show would leave room below, and scroll when they do not fit.
Trait Implementations§
Auto Trait Implementations§
impl<'a, Message> !RefUnwindSafe for Calendar<'a, Message>
impl<'a, Message> !Send for Calendar<'a, Message>
impl<'a, Message> !Sync for Calendar<'a, Message>
impl<'a, Message> !UnwindSafe for Calendar<'a, Message>
impl<'a, Message> Forget for Calendar<'a, Message>
impl<'a, Message> Freeze for Calendar<'a, Message>
impl<'a, Message> Move for Calendar<'a, Message>
impl<'a, Message> Unpin for Calendar<'a, Message>
impl<'a, Message> UnsafeUnpin for Calendar<'a, Message>where
&'a State: UnsafeUnpin,
*const dyn Fn(Event) -> Message + 'a is !null: UnsafeUnpin,
PhantomData<dyn Fn(Event) -> Message + 'a>: UnsafeUnpin,
*const dyn Widget<Message, Theme, ()> + 'a is !null: UnsafeUnpin,
PhantomData<dyn Widget<Message, Theme, ()> + 'a>: UnsafeUnpin,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.