pub enum TreeContextMenu<T> {
Row {
row_id: T,
pointer_position: Point,
row_rect: Rect,
},
Blank {
pointer_position: Point,
},
}Expand description
Right-click context carrying pointer geometry for a row or blank area.
§Examples
use ailloli_ui_core::Point;
use ailloli_ui_widgets::controls::TreeContextMenu;
let event = TreeContextMenu::<u8>::Blank { pointer_position: Point::new(2.0, 3.0) };
assert!(matches!(event, TreeContextMenu::Blank { .. }));Variants§
Row
Enabled row context; the row is selected first when necessary.
Fields
§
row_id: TContext row ID.
§
pointer_position: PointPointer location in window coordinates.
§
row_rect: RectHit row rectangle in window coordinates.
Blank
Context request inside tree bounds but outside a row.
Fields
§
pointer_position: PointPointer location in window coordinates.
Trait Implementations§
Source§impl<T: Clone> Clone for TreeContextMenu<T>
impl<T: Clone> Clone for TreeContextMenu<T>
Source§fn clone(&self) -> TreeContextMenu<T>
fn clone(&self) -> TreeContextMenu<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for TreeContextMenu<T>
impl<T: Debug> Debug for TreeContextMenu<T>
Source§impl<T: PartialEq> PartialEq for TreeContextMenu<T>
impl<T: PartialEq> PartialEq for TreeContextMenu<T>
impl<T> StructuralPartialEq for TreeContextMenu<T>
Auto Trait Implementations§
impl<T> Freeze for TreeContextMenu<T>where
T: Freeze,
impl<T> RefUnwindSafe for TreeContextMenu<T>where
T: RefUnwindSafe,
impl<T> Send for TreeContextMenu<T>where
T: Send,
impl<T> Sync for TreeContextMenu<T>where
T: Sync,
impl<T> Unpin for TreeContextMenu<T>where
T: Unpin,
impl<T> UnwindSafe for TreeContextMenu<T>where
T: UnwindSafe,
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.