Struct egui::text_selection::cursor_range::CCursorRange
source · pub struct CCursorRange {
pub primary: CCursor,
pub secondary: CCursor,
}
Expand description
A selected text range (could be a range of length zero).
The selection is based on character count (NOT byte count!).
Fields§
§primary: CCursor
When selecting with a mouse, this is where the mouse was released. When moving with e.g. shift+arrows, this is what moves. Note that the two ends can come in any order, and also be equal (no selection).
secondary: CCursor
When selecting with a mouse, this is where the mouse was first pressed. This part of the cursor does not move when shift is down.
Implementations§
Trait Implementations§
source§impl Clone for CCursorRange
impl Clone for CCursorRange
source§fn clone(&self) -> CCursorRange
fn clone(&self) -> CCursorRange
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 Debug for CCursorRange
impl Debug for CCursorRange
source§impl Default for CCursorRange
impl Default for CCursorRange
source§fn default() -> CCursorRange
fn default() -> CCursorRange
Returns the “default value” for a type. Read more
source§impl From<CCursorRange> for TextCursorState
impl From<CCursorRange> for TextCursorState
source§fn from(ccursor_range: CCursorRange) -> Self
fn from(ccursor_range: CCursorRange) -> Self
Converts to this type from the input type.
source§impl PartialEq for CCursorRange
impl PartialEq for CCursorRange
impl Copy for CCursorRange
impl StructuralPartialEq for CCursorRange
Auto Trait Implementations§
impl Freeze for CCursorRange
impl RefUnwindSafe for CCursorRange
impl Send for CCursorRange
impl Sync for CCursorRange
impl Unpin for CCursorRange
impl UnwindSafe for CCursorRange
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
)