Struct lazybar_core::actions::Actions
source · pub struct Actions {
pub left: Option<String>,
pub right: Option<String>,
pub middle: Option<String>,
pub up: Option<String>,
pub down: Option<String>,
}
Expand description
A map from mouse buttons to panel events
Fields§
§left: Option<String>
The event that should be run when the panel is left-clicked
right: Option<String>
The event that should be run when the panel is right-clicked
middle: Option<String>
The event that should be run when the panel is middle-clicked
up: Option<String>
The event that should be run when the panel is scrolled up
down: Option<String>
The event that should be run when the panel is scrolled down
Implementations§
source§impl Actions
impl Actions
sourcepub fn parse<S: BuildHasher>(
table: &mut HashMap<String, Value, S>,
) -> Result<Self>
pub fn parse<S: BuildHasher>( table: &mut HashMap<String, Value, S>, ) -> Result<Self>
Attempts to parse an instance of this type from a subset of tthe global
Config
.
Configuration options:
click_left
: The name of the event to run when the panel is left-clicked.click_right
: The name of the event to run when the panel is right-clicked.click_middle
: The name of the event to run when the panel is middle-clicked.scroll_up
: The name of the event to run when the panel is scrolled up.scroll_down
: The name of the event to run when the panel is scrolled down.
sourcepub fn get_cursor(&self) -> Cursor
pub fn get_cursor(&self) -> Cursor
Chooses a reasonable cursor based on the possible actions.
- If the panel is scrollable, a cursor indicating that will be chosen.
- Otherwise, if the panel is clickable, a cursor indicating that will be chosen.
- Otherwise, the cursor will be set to the system default.
Trait Implementations§
source§impl Ord for Actions
impl Ord for Actions
source§impl PartialOrd for Actions
impl PartialOrd for Actions
impl Eq for Actions
impl StructuralPartialEq for Actions
Auto Trait Implementations§
impl Freeze for Actions
impl RefUnwindSafe for Actions
impl Send for Actions
impl Sync for Actions
impl Unpin for Actions
impl UnwindSafe for Actions
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key
and return true
if they are equal.