Skip to main content

PanelEvent

Enum PanelEvent 

Source
#[non_exhaustive]
pub enum PanelEvent {
Show 24 variants Number { id: String, value: f64, }, Choice { id: String, index: usize, }, Toggle { id: String, on: bool, }, Text { id: String, value: String, }, Button { id: String, }, Pick { id: String, }, Select { id: String, index: usize, }, Cell { id: String, row: usize, column: usize, value: String, }, CellText { id: String, row: usize, column: usize, value: String, }, CellCheck { id: String, row: usize, column: usize, on: bool, }, DiagramPress { id: String, x: f32, y: f32, dragging: bool, released: bool, }, Hover { id: String, index: Option<usize>, }, Activate { id: String, index: usize, }, ContextMenu { id: String, index: usize, action: String, }, Tag { id: String, index: usize, tag: usize, }, Selection { id: String, indices: Vec<usize>, }, Filter { id: String, text: String, kind: usize, }, Clear { id: String, }, Badge { id: String, index: usize, badge: usize, }, HoverPart { id: String, index: Option<usize>, tag: Option<usize>, badge: Option<usize>, }, ItemText { id: String, index: usize, value: String, done: bool, }, Color { id: String, color: [f32; 3], }, TextLeft { id: String, value: String, escaped: bool, }, CardClose { id: String, accept: bool, },
}
Expand description

What the user did to a panel widget, by the widget’s id.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Number

Fields

§value: f64
§

Choice

Fields

§index: usize
§

Toggle

Fields

§on: bool
§

Text

Fields

§value: String
§

Button

Fields

§

Pick

Fields

§

Select

Fields

§index: usize
§

Cell

A cell of a table’s editable column, typed in: its text as left.

Fields

§row: usize
§column: usize
§value: String
§

CellText

A sheet’s editable cell, once typing ended.

Fields

§row: usize
§column: usize
§value: String
§

CellCheck

A sheet’s box ticked or cleared.

Fields

§row: usize
§column: usize
§on: bool
§

DiagramPress

A diagram pressed at x, y in its own coordinates; dragging for each move of the pointer held down after the press, and released once, where the drag ended.

Fields

§dragging: bool
§released: bool
§

Hover

The pointer came onto an item (index in its list, 0 for an item alone), or left the list (None).

Fields

§index: Option<usize>
§

Activate

An item double clicked.

Fields

§index: usize
§

ContextMenu

An entry of an item’s menu chosen: the entry’s id in action.

Fields

§index: usize
§action: String
§

Tag

A tag of an item clicked: tag is its place among the item’s.

Fields

§index: usize
§tag: usize
§

Selection

A multiple list’s selection, whole, as the user left it.

Fields

§indices: Vec<usize>
§

Filter

A filter the bench applies, typed in or its kind chosen.

Fields

§text: String
§kind: usize
§

Clear

A picked chip cleared.

Fields

§

Badge

A badge of an item clicked: badge is its place among the item’s.

Fields

§index: usize
§badge: usize
§

HoverPart

What the pointer is on in a list changed: the item (None off the list), and the tag or badge of it under the pointer.

Fields

§index: Option<usize>
§badge: Option<usize>
§

ItemText

An item’s name typed in while it is editing: at each change, and with done as the field is left.

Fields

§index: usize
§value: String
§done: bool
§

Color

A colour field’s colour changed: red, green and blue from 0 to 1.

Fields

§color: [f32; 3]
§

TextLeft

A live Entry’s field left, its text as it stands: by Escape when escaped, which drops what was typed.

Fields

§value: String
§escaped: bool
§

CardClose

The floating card id closed: by OK (or Enter, or a click elsewhere in the view) when accept, else by Cancel or Escape.

Fields

§accept: bool

Implementations§

Source§

impl PanelEvent

Source

pub fn id(&self) -> &str

Trait Implementations§

Source§

impl Clone for PanelEvent

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PanelEvent

Source§

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

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

impl<'de> Deserialize<'de> for PanelEvent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for PanelEvent

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for PanelEvent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PanelEvent

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.