ecere/gui/Window: Prevent uninitialized values if base Window methods not overridden...
[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 const 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    caption = $"License Agreements";
39    background = formColor;
40    borderStyle = sizable;
41    hasClose = true;
42    minClientSize = { 940, 556 };
43
44    TabControl tabControl
45    {
46       this,
47       opacity = 0,
48       anchor = { 10, 60, 10, 40 };
49    };
50    Label label1
51    {
52       this, anchor = { top = 16 }, font = { "Tahoma", 10, true };
53       caption = $"This program is based on these free open source software components.";
54    };
55    Label label2
56    {
57       this, anchor = { top = 32 }, font = { "Tahoma", 10, true };
58       caption = $"By using it you agree to the terms and conditions of their individual licenses.";
59    };
60    LicenseTab ecereTab
61    {
62       caption = "Ecere SDK";
63       sourceFile = ":licenses/LICENSE";
64       tabControl = tabControl;
65    };
66    LicenseTab pngTab
67    {
68       caption = "libpng";
69       sourceFile = ":licenses/png.LICENSE";
70       tabControl = tabControl;
71    };
72    LicenseTab jpgTab
73    {
74       caption = "libjpg";
75       sourceFile = ":licenses/jpg.LICENSE";
76       tabControl = tabControl;
77    };
78    LicenseTab freetypeTab
79    {
80       caption = "FreeType";
81       sourceFile = ":licenses/freetype.LICENSE";
82       tabControl = tabControl;
83    };
84    LicenseTab harfbuzzTab
85    {
86       caption = "HarfBuzz";
87       sourceFile = ":licenses/harfbuzz.LICENSE";
88       tabControl = tabControl;
89    };
90    LicenseTab gifTab
91    {
92       caption = "ungif";
93       sourceFile = ":licenses/ungif.LICENSE";
94       tabControl = tabControl;
95    };
96    LicenseTab zlibTab
97    {
98       caption = "zlib";
99       sourceFile = ":licenses/zlib.README";
100       tabControl = tabControl;
101    };
102    LicenseTab sqliteTab
103    {
104       caption = "SQLite";
105       sourceFile = ":licenses/sqlite.LICENSE";
106       tabControl = tabControl;
107    };
108    LicenseTab ffiTab
109    {
110       caption = "libffi";
111       sourceFile = ":licenses/ffi.LICENSE";
112       tabControl = tabControl;
113    };
114    LicenseTab tango
115    {
116       caption = "Tango Icons";
117       sourceFile = ":licenses/tango.COPYING";
118       tabControl = tabControl;
119    };
120    LicenseTab upxTab
121    {
122       caption = "UPX";
123       sourceFile = ":licenses/upx.LICENSE";
124       tabControl = tabControl;
125    };
126 #if defined(__WIN32__)
127    LicenseTab gccTab
128    {
129       caption = "GCC, GDB";
130       sourceFile = ":licenses/tdm-gcc.LICENSE";
131       tabControl = tabControl;
132    };
133    LicenseTab w64Tab
134    {
135       caption = "MinGW-w64";
136       sourceFile = ":licenses/MinGW-w64.LICENSE";
137       tabControl = tabControl;
138    };
139 #endif
140 /*   Button ok
141    {
142       this;
143       caption = "OK";
144       anchor = { bottom = 10 };
145       size = { 80, 22 };
146       isDefault = true;
147       NotifyClicked = ButtonCloseDialog;
148    };
149 */
150    Button dontAgreeButton
151    {
152       this;
153       caption = $"I don't agree";
154       minClientSize = { 100, 20 };
155       anchor = { bottom = 10, right = 14 };
156
157       bool NotifyClicked(Button button, int x, int y, Modifiers mods)
158       {
159          ((GuiApplication)__thisModule).desktop.Destroy(0);
160          return true;
161       }
162    };
163    Button agreeButton
164    {
165       this;
166       caption = $"I agree";
167       font = { "Verdana", 10, bold = true };
168       isDefault = true;
169       minClientSize = { 80, 21 };
170       anchor = { bottom = 10 };
171       NotifyClicked = ButtonCloseDialog;
172    };
173 }