Common/UserInterface/DTO/
DialogOptionsDTO.rs

1//! # DialogOptionsDTO
2//!
3//! Defines the Data Transfer Object for shared options across different types
4//! of file dialogs.
5
6use serde::{Deserialize, Serialize};
7
8use super::FileFilterDTO::FileFilterDTO;
9
10/// A serializable struct that holds common configuration options for native
11/// file dialogs, such as `ShowOpenDialog` and `ShowSaveDialog`.
12#[derive(Serialize, Deserialize, Debug, Clone, Default)]
13#[serde(rename_all = "PascalCase")]
14pub struct DialogOptionsDTO {
15	/// The title of the dialog window.
16	#[serde(skip_serializing_if = "Option::is_none")]
17	pub Title:Option<String>,
18
19	/// The default path that the dialog should open to.
20	#[serde(skip_serializing_if = "Option::is_none")]
21	pub DefaultPath:Option<String>,
22
23	/// A list of file filters that the user can select from.
24	#[serde(skip_serializing_if = "Option::is_none")]
25	pub FilterList:Option<Vec<FileFilterDTO>>,
26}