pub struct UiCursor {
pub kind: CursorKind,
pub ctype: CursorType,
pub color: AppColor,
pub fg: AppColor,
pub position: usize,
pub text_length: usize,
pub blink_visible: bool,
/* private fields */
}Expand description
✅ ZENTRALE CURSOR-IMPLEMENTIERUNG Funktioniert für beide: Input & Output
Fields§
§kind: CursorKind§ctype: CursorType§color: AppColor§fg: AppColor§position: usize§text_length: usize§blink_visible: boolImplementations§
Source§impl UiCursor
impl UiCursor
Sourcepub fn from_config(config: &Config, kind: CursorKind) -> Self
pub fn from_config(config: &Config, kind: CursorKind) -> Self
✅ ZENTRALE FACTORY-METHODE - Erstellt Cursor basierend auf Config
Sourcepub fn for_typewriter() -> Self
pub fn for_typewriter() -> Self
✅ TYPEWRITER-FACTORY (Legacy-Support)
Sourcepub fn update_from_config(&mut self, config: &Config)
pub fn update_from_config(&mut self, config: &Config)
✅ ZENTRALE CONFIG-UPDATE-METHODE
Sourcepub fn update_from_config_explicit(&mut self, config: &Config, kind: CursorKind)
pub fn update_from_config_explicit(&mut self, config: &Config, kind: CursorKind)
✅ NEUE METHODE: Update mit explizitem CursorKind (für Klarheit)
pub fn update_blink(&mut self)
pub fn show_cursor(&mut self)
pub fn is_visible(&self) -> bool
pub fn move_left(&mut self)
pub fn move_right(&mut self)
pub fn move_to_start(&mut self)
pub fn move_to_end(&mut self)
pub fn get_position(&self) -> usize
pub fn get_current_position(&self) -> usize
pub fn update_text_length(&mut self, text: &str)
pub fn reset_for_empty_text(&mut self)
pub fn get_byte_position(&self, text: &str) -> usize
pub fn get_prev_byte_position(&self, text: &str) -> usize
pub fn get_next_byte_position(&self, text: &str) -> usize
Sourcepub fn as_span(&self, text: &str, blink: bool) -> Span<'static>
pub fn as_span(&self, text: &str, blink: bool) -> Span<'static>
✅ BLOCK-CURSOR: Zeichen unter Cursor invertieren
Sourcepub fn create_cursor_span(&self, config: &Config) -> Span<'static>
pub fn create_cursor_span(&self, config: &Config) -> Span<'static>
✅ CURSOR-SYMBOL-ERSTELLUNG für PIPE und UNDERSCORE
pub fn get_symbol(&self) -> &'static str
pub fn debug_info(&self) -> String
pub fn full_debug(&self) -> String
pub fn detailed_debug(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UiCursor
impl RefUnwindSafe for UiCursor
impl Send for UiCursor
impl Sync for UiCursor
impl Unpin for UiCursor
impl UnwindSafe for UiCursor
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more