blob: 7bc27847441f995ea2704d7caae0b628390da1fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#include "cru/platform/gui/UiApplication.h"
#include "cru/base/Exception.h"
namespace cru::platform::gui {
namespace {
IUiApplication* instance = nullptr;
}
IUiApplication* IUiApplication::GetInstance() { return instance; }
IUiApplication::IUiApplication() {
if (instance) {
throw std::runtime_error("An ui application has already been created.");
}
instance = this;
}
IUiApplication::~IUiApplication() { instance = nullptr; }
IMenu* IUiApplication::GetApplicationMenu() { return nullptr; }
std::optional<String> IUiApplication::ShowSaveDialog(
SaveDialogOptions options) {
throw Exception(u"Not implemented.");
}
std::optional<std::vector<String>> IUiApplication::ShowOpenDialog(
OpenDialogOptions options) {
throw Exception(u"Not implemented.");
}
} // namespace cru::platform::gui
|