pub struct CodePointer {
pub event: PointerEvent,
pub position: Option<Position>,
}Expand description
A pointer event over a code editor, with the place in the text under the pointer.
Everything a node’s pointer event says, under the same rules: the kinds the editor
subscribes to with PointerKinds, the buttons, the modifiers, the click count, a Move
at most once a frame, and a press held by the editor until it is released. Consuming a
Down keeps the caret where it was, which is what Cmd or Ctrl and a click needs to go to
a definition without moving the reader’s caret.
Fields§
§event: PointerEvent§position: Option<Position>The character under the pointer, or None where it is over none: the gutter, past the end of a line, or below the last one.
Implementations§
Source§impl CodePointer
impl CodePointer
Sourcepub fn from_payload(payload: &EventPayload<'_>) -> Option<Self>
pub fn from_payload(payload: &EventPayload<'_>) -> Option<Self>
The event out of a CodePointer payload, or None for any other.
Trait Implementations§
Source§impl Clone for CodePointer
impl Clone for CodePointer
Auto Trait Implementations§
impl !RefUnwindSafe for CodePointer
impl !Send for CodePointer
impl !Sync for CodePointer
impl !UnwindSafe for CodePointer
impl Forget for CodePointer
impl Freeze for CodePointer
impl Move for CodePointer
impl Unpin for CodePointer
impl UnsafeUnpin for CodePointer
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