Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
donner::editor::DialogPresenter Class Reference

Owns the editor's popup/modal state and renders the corresponding ImGui dialogs. More...

#include "donner/editor/DialogPresenter.h"

Public Member Functions

 DialogPresenter (std::string editorNoticeText)
void requestOpenFile (const std::optional< std::string > &currentFilePath)
void requestSaveFile (const std::optional< std::string > &currentFilePath, std::string error=std::string())
void requestAbout ()
void render (const std::function< bool(std::string_view, std::string *)> &tryOpenFile, const std::function< bool(std::string_view, std::string *)> &trySaveFile)
void setOpenFileError (std::string error)
void clearOpenFileError ()
void setSaveFileError (std::string error)
void clearSaveFileError ()
bool openFileModalRequested () const
 Whether an Open SVG modal has been requested but not yet opened by render().
bool saveFileModalRequested () const
 Whether a Save SVG modal has been requested but not yet opened by render().
void consumeOpenFileModalRequest ()
 Consume a pending Open SVG request without showing the ImGui modal. Used when a native OS dialog handles the interaction instead.
void consumeSaveFileModalRequest ()
 Consume a pending Save SVG request without showing the ImGui modal. Used when a native OS dialog handles the interaction instead.
std::string pendingSaveFilePath () const
 The path pre-filled into the pending Save SVG request (the current file path, or the suggested export/save-as name). Empty when none was set.
bool aboutPopupRequested () const
 Whether the About modal has been requested but not yet opened by render().

Detailed Description

Owns the editor's popup/modal state and renders the corresponding ImGui dialogs.


The documentation for this class was generated from the following file: