blob: 086440c0091a3955c98af0a18cc2d883b1385754 (
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
35
|
#include "cru/platform/gui/UiApplication.h"
#include "cru/base/Base.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<std::string> IUiApplication::ShowSaveDialog(
SaveDialogOptions options) {
NotImplemented();
}
std::optional<std::vector<std::string>> IUiApplication::ShowOpenDialog(
OpenDialogOptions options) {
NotImplemented();
}
} // namespace cru::platform::gui
|