629828df0969e55279b34e2752effb75ef49c9a8
[sdk] / ide / src / licensing.ec
1 #ifdef ECERE_STATIC
2 public import static "ecere"
3 #else
4 public import "ecere"
5 #endif
6
7 class LicenseTab : Tab
8 {
9    // opacity = 0;
10    font = { "Courier New", 10 };
11    EditBox editBox
12    {
13       this,
14       multiLine = true;
15       hasHorzScroll = true;
16       hasVertScroll = true;
17       borderStyle = deep;
18       anchor = { 10, 10, 10, 10 };
19       readOnly = true;
20       noCaret = true;
21    };
22    property char * sourceFile
23    {
24       set
25       {
26          File f = FileOpen(value, read);
27          if(f)
28          {
29             editBox.Load(f);
30             delete f;
31          }
32       }
33    }
34 }
35
36 class LicensesForm : Window
37 {
38    text = "License Agreements";
39    background = formColor;
40    hasClose = true;
41    borderStyle = sizable;
42    size = { 820, 580 };
43    nativeDecorations = true;
44
45    TabControl tabControl
46    {
47       this,
48       opacity = 0,
49       anchor = { 10, 60, 10, 40 };
50    };
51    Label label1
52    {
53       this, anchor = { top = 16 }, font = { "Tahoma", 10, true };
54       text = "This program is based on these free open source software components.";
55    };
56    Label label2
57    {
58       this, anchor = { top = 32 }, font = { "Tahoma", 10, true };
59       text = "By using it you agree to the terms and conditions of their individual licenses.";
60    };
61    LicenseTab ecereTab
62    {
63       text = "Ecere SDK";
64       sourceFile = ":licenses/LICENSE";
65       tabControl = tabControl;
66    };
67    LicenseTab pngTab
68    {
69       text = "libpng";
70       sourceFile = ":licenses/png.LICENSE";
71       tabControl = tabControl;
72    };
73    LicenseTab jpgTab
74    {
75       text = "libjpg";
76       sourceFile = ":licenses/jpg.LICENSE";
77       tabControl = tabControl;
78    };
79    LicenseTab freetypeTab
80    {
81       text = "FreeType";
82       sourceFile = ":licenses/freetype.LICENSE";
83       tabControl = tabControl;
84    };
85    LicenseTab harfbuzzTab
86    {
87       text = "HarfBuzz";
88       sourceFile = ":licenses/harfbuzz.LICENSE";
89       tabControl = tabControl;
90    };
91    LicenseTab gifTab
92    {
93       text = "ungif";
94       sourceFile = ":licenses/ungif.LICENSE";
95       tabControl = tabControl;
96    };
97    LicenseTab zlibTab
98    {
99       text = "zlib";
100       sourceFile = ":licenses/zlib.README";
101       tabControl = tabControl;
102    };
103    LicenseTab sqliteTab
104    {
105       text = "SQLite";
106       sourceFile = ":licenses/sqlite.LICENSE";
107       tabControl = tabControl;
108    };
109    LicenseTab tango
110    {
111       text = "Tango Icons";
112       sourceFile = ":licenses/tango.COPYING";
113       tabControl = tabControl;
114    };
115    LicenseTab upxTab
116    {
117       text = "UPX";
118       sourceFile = ":licenses/upx.LICENSE";
119       tabControl = tabControl;
120    };
121    LicenseTab gplTab
122    {
123       text = "GCC, GDB";
124       sourceFile = ":licenses/gpl.LICENSE";
125       tabControl = tabControl;
126    };
127 /*   Button ok
128    {
129       this;
130       text = "OK";
131       anchor = { bottom = 10 };
132       size = { 80, 22 };
133       isDefault = true;
134       NotifyClicked = ButtonCloseDialog;
135    };
136 */
137    Button dontAgreeButton
138    {
139       this;
140       text = $"I don't agree";
141       size = { 100, 22 };
142       anchor = { bottom = 10, right = 14 };
143
144       bool NotifyClicked(Button button, int x, int y, Modifiers mods)
145       {
146          ((GuiApplication)__thisModule).desktop.Destroy(0);
147          return true;
148       }
149    };
150    Button agreeButton
151    {
152       this;
153       text = $"I agree";
154       font = { "Verdana", 10, bold = true };
155       isDefault = true;
156       size = { 80, 23 };
157       anchor = { bottom = 10 };
158       NotifyClicked = ButtonCloseDialog;
159    };
160 }