pub enum Event {
Click(MouseButton, MouseButtonState, Point),
MouseMotion(Point),
PositionChange(ComponentPosition),
}Expand description
Event which can be transmitted to the components.
This event needs to be created from the frontend and can then be sent to the bar using
the Bar::notify method. Every component has the choice to use an event or ignore it.
Variants§
Click(MouseButton, MouseButtonState, Point)
Mouse button action anywhere on the screen.
This event notifies all components that the user has clicked anywhere on the screen.
It is required that the component knows about its position to act upon this event.
To let a component know about its current position, the PositionChange event
can be used.
MouseMotion(Point)
Update mouse position.
This event notifies all components about the current position of the mouse on the screen.
It is required that the component knows about its position to act upon this event.
To let a component know about its current position, the PositionChange event
can be used.
PositionChange(ComponentPosition)
Update the position of a component.
This event is used to make a component aware of its position on the screen. This is required to react upon other events which are position dependent.
Trait Implementations§
Source§impl Ord for Event
impl Ord for Event
Source§impl PartialOrd for Event
impl PartialOrd for Event
impl Copy for Event
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.