freya_core/style/
cursor.rs1#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3pub enum CursorStyle {
4 Line = 0,
5 Block = 1,
6 Underline = 2,
7}
8
9impl Default for CursorStyle {
10 fn default() -> Self {
11 Self::Line
12 }
13}
14
15impl CursorStyle {
16 pub fn pretty(&self) -> String {
17 match self {
18 Self::Line => "line".to_string(),
19 Self::Block => "block".to_string(),
20 Self::Underline => "underline".to_string(),
21 }
22 }
23}