Presents native open/save dialogs and tracks directory/recents state.
More...
#include "donner/editor/NativeDialogCoordinator.h"
|
|
bool | available () const |
| | Whether native dialogs are available on this platform. When false, callers should fall back to the in-editor ImGui modal.
|
| std::optional< std::string > | openFile (GLFWwindow *window, const std::optional< std::string > ¤tFilePath) |
| | Present a native "Open SVG" dialog.
|
| std::optional< std::string > | saveFile (GLFWwindow *window, const std::optional< std::string > &suggestedPath) |
| | Present a native "Save SVG" dialog.
|
|
const std::vector< std::string > & | recentFiles () const |
| | In-process recent-files list, newest first.
|
Presents native open/save dialogs and tracks directory/recents state.
◆ openFile()
| std::optional< std::string > donner::editor::NativeDialogCoordinator::openFile |
( |
GLFWwindow * | window, |
|
|
const std::optional< std::string > & | currentFilePath ) |
|
nodiscard |
Present a native "Open SVG" dialog.
- Parameters
-
| window | Owning editor window. |
| currentFilePath | Path of the open document, used to seed the start directory when nothing better is remembered. |
- Returns
- Chosen absolute path (already recorded into directory memory and recents), or std::nullopt if cancelled/unavailable.
◆ saveFile()
| std::optional< std::string > donner::editor::NativeDialogCoordinator::saveFile |
( |
GLFWwindow * | window, |
|
|
const std::optional< std::string > & | suggestedPath ) |
|
nodiscard |
Present a native "Save SVG" dialog.
- Parameters
-
| window | Owning editor window. |
| suggestedPath | Path or name to pre-fill; its directory seeds the start directory and its filename seeds the name field. When empty, defaults to "untitled.svg". |
- Returns
- Chosen absolute path (already recorded), or std::nullopt if cancelled/unavailable.
The documentation for this class was generated from the following file: