| 64 | } |
| 65 | |
| 66 | IDialogPtr DialogManager::createMessageBox(const std::string& title, |
| 67 | const std::string& text, |
| 68 | IDialog::MessageType type, |
| 69 | wxWindow* parent) |
| 70 | { |
| 71 | cleanupOldDialogs(); |
| 72 | |
| 73 | // Allocate a new dialog, use the main window if no parent specified |
| 74 | auto box = std::make_shared<wxutil::Messagebox>(title, text, type, parent); |
| 75 | |
| 76 | // Store it in the local map so that references are held |
| 77 | _dialogs.push_back(box); |
| 78 | |
| 79 | return box; |
| 80 | } |
| 81 | |
| 82 | IFileChooserPtr DialogManager::createFileChooser(const std::string& title, |
| 83 | bool open, const std::string& pattern, const std::string& defaultExt) |