#if defined(Hiro_BrowserDialog) struct BrowserDialogWindow; struct BrowserDialog { using type = BrowserDialog; BrowserDialog(); auto openFile() -> string; //one existing file auto openFiles() -> vector; //any existing files auto openFolder() -> string; //one existing folder auto openObject() -> string; //one existing file or folder auto option() -> string; auto saveFile() -> string; //one file auto selected() -> vector; auto selectFolder() -> string; //one existing folder auto setAlignment(Alignment = Alignment::Center) -> type&; auto setAlignment(sWindow relativeTo, Alignment = Alignment::Center) -> type&; auto setFilters(const vector& filters = {}) -> type&; auto setName(const string& name = "") -> type&; auto setOptions(const vector& options = {}) -> type&; auto setPath(const string& path = "") -> type&; auto setTitle(const string& title = "") -> type&; private: struct State { string action; Alignment alignment = Alignment::Center; vector filters = {"*"}; string name; vector options; string path; sWindow relativeTo; string title; } state; struct Response { string option; vector selected; } response; auto _run() -> vector; friend class BrowserDialogWindow; }; #endif