Common/UserInterface/DTO/
InputBoxOptionsDTO.rs

1//! # InputBoxOptionsDTO
2//!
3//! Defines the Data Transfer Object for the options of a user input box.
4
5use serde::{Deserialize, Serialize};
6
7/// A serializable struct that holds all configuration options for a user input
8/// box.
9#[derive(Serialize, Deserialize, Debug, Clone, Default)]
10#[serde(rename_all = "PascalCase")]
11pub struct InputBoxOptionsDTO {
12	/// An optional title for the input box window.
13	#[serde(skip_serializing_if = "Option::is_none")]
14	pub Title:Option<String>,
15
16	/// Placeholder text to show in the input field when it is empty.
17	#[serde(skip_serializing_if = "Option::is_none")]
18	pub PlaceHolder:Option<String>,
19
20	/// An initial value to populate in the input field.
21	#[serde(skip_serializing_if = "Option::is_none")]
22	pub Value:Option<String>,
23
24	/// A descriptive prompt message shown to the user.
25	#[serde(skip_serializing_if = "Option::is_none")]
26	pub Prompt:Option<String>,
27
28	/// If `true`, the input will be masked (e.g., for passwords).
29	#[serde(skip_serializing_if = "Option::is_none")]
30	pub IsPassword:Option<bool>,
31
32	/// If `true`, the input box will not close when it loses focus.
33	#[serde(skip_serializing_if = "Option::is_none")]
34	pub IgnoreFocusOut:Option<bool>,
35}