ide/licensing; documentor/SettingsDialog: clientSize fixes
[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    caption = "License Agreements";
39    background = formColor;
40    borderStyle = sizable;
41    hasClose = true;
42    clientSize = { 818, 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 tango
109    {
110       caption = "Tango Icons";
111       sourceFile = ":licenses/tango.COPYING";
112       tabControl = tabControl;
113    };
114    LicenseTab upxTab
115    {
116       caption = "UPX";
117       sourceFile = ":licenses/upx.LICENSE";
118       tabControl = tabControl;
119    };
120    LicenseTab gplTab
121    {
122       caption = "GCC, GDB";
123       sourceFile = ":licenses/gpl.LICENSE";
124       tabControl = tabControl;
125    };
126 /*   Button ok
127    {
128       this;
129       caption = "OK";
130       anchor = { bottom = 10 };
131       size = { 80, 22 };
132       isDefault = true;
133       NotifyClicked = ButtonCloseDialog;
134    };
135 */
136    Button dontAgreeButton
137    {
138       this;
139       caption = $"I don't agree";
140       size = { 100, 22 };
141       anchor = { bottom = 10, right = 14 };
142
143       bool NotifyClicked(Button button, int x, int y, Modifiers mods)
144       {
145          ((GuiApplication)__thisModule).desktop.Destroy(0);
146          return true;
147       }
148    };
149    Button agreeButton
150    {
151       this;
152       caption = $"I agree";
153       font = { "Verdana", 10, bold = true };
154       isDefault = true;
155       size = { 80, 23 };
156       anchor = { bottom = 10 };
157       NotifyClicked = ButtonCloseDialog;
158    };
159 }