Skip to main content

uzor_core/widgets/
input.rs

1//! Text input widget configuration
2//!
3//! Provides input configuration and response types for headless architecture.
4
5use crate::types::{WidgetState, Rect};
6use serde::{Deserialize, Serialize};
7
8#[derive(Clone, Debug, Serialize, Deserialize)]
9#[derive(Default)]
10pub struct InputConfig {
11    pub value: String,
12    pub placeholder: String,
13    pub disabled: bool,
14}
15
16
17#[derive(Clone, Debug, Serialize, Deserialize)]
18pub struct InputResponse {
19    pub changed: bool,
20    pub new_value: String,
21    pub focused: bool,
22    pub hovered: bool,
23    pub state: WidgetState,
24    pub rect: Rect,
25}
26
27// TODO: Implement headless text input interaction detection