Skip to main content

euv_core/scene/selection/
struct.rs

1use super::*;
2
3/// Active character-range text selection targeting a live selectable `NodeKind::Text` node.
4#[derive(Clone, Copy, Data, Debug, Eq, New, PartialEq)]
5pub struct SelectionState {
6    /// Scene node owning the selected text run.
7    #[get(type(copy))]
8    pub(crate) node_id: NodeId,
9    /// Inclusive character index where selection started.
10    #[get(type(copy))]
11    pub(crate) anchor_char: usize,
12    /// Active character index where selection currently ends.
13    #[get(type(copy))]
14    pub(crate) focus_char: usize,
15}