Common/UserInterface/DTO/
OpenDialogOptionsDTO.rs

1//! # OpenDialogOptionsDTO
2//!
3//! Defines the Data Transfer Object for the options of a file open dialog.
4
5use serde::{Deserialize, Serialize};
6
7use super::DialogOptionsDTO::DialogOptionsDTO;
8
9/// A serializable struct that holds all configuration options for an "Open"
10/// file dialog. It flattens the shared `DialogOptionsDTO` and adds properties
11/// specific to opening files or folders.
12#[derive(Serialize, Deserialize, Debug, Clone, Default)]
13#[serde(rename_all = "PascalCase")]
14pub struct OpenDialogOptionsDTO {
15	/// The base options common to all file dialogs.
16	#[serde(flatten)]
17	pub Base:DialogOptionsDTO,
18
19	/// If `true`, the user can select multiple files or folders.
20	#[serde(skip_serializing_if = "Option::is_none")]
21	pub CanSelectMany:Option<bool>,
22
23	/// If `true`, the dialog allows the user to select folders instead of
24	/// files.
25	#[serde(skip_serializing_if = "Option::is_none")]
26	pub CanSelectFolders:Option<bool>,
27
28	/// If `true`, the dialog allows the user to select files.
29	#[serde(skip_serializing_if = "Option::is_none")]
30	pub CanSelectFiles:Option<bool>,
31}