-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapp.d
More file actions
57 lines (51 loc) · 1.25 KB
/
app.d
File metadata and controls
57 lines (51 loc) · 1.25 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
module app;
import guiapplication;
/** TODO:
*
* zOrder show be derived by children widgets
*
* Animating properties does not propagate changes to constraints
*
* Shortcut chain ie. app, window, widget in that order
* Let component register shortcuts in one of the three categories
* and for the last category some constraints on the widget types
* it will act on. (need some kind of tagging of widgets?)
*/
int main(string args[])
{
import core.attr;
version (unittest)
{
import test;
printStats(true);
}
// else
{
GUIApplication app;
try
{
app = GUIApplication.create();
// Create a text buffer and add show it in the mainWidget
//auto fileName = "testmath.d";
//app.mainWidget.content = std.file.readText(fileName);
app.run();
}
catch (Exception e)
{
std.stdio.writeln("Caught Exception: ", e);
version (Windows)
{
import std.string;
import core.sys.windows.windows;
string s = e.toString();
s ~= "\n" ~ "Help improve the editor by uploading this backtrace?";
int res = MessageBoxA(null, e.toString().toStringz(), "Caught Exception", MB_ICONERROR | MB_YESNO | MB_TASKMODAL);
if (res)
{
app.analyticException(e.toString()[0..700], true);
}
}
}
}
return 0;
}