extras; samples: Fixed warnings
[sdk] / extras / gui / LicensesDialog.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 = { "Verdana", 10 };
11    EditBox editBox
12    {
13       this,
14       multiLine = true;
15       hasHorzScroll = true;
16       hasVertScroll = true;
17       borderStyle = none;
18       anchor = { 4, 4, 4, 4 };
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 LicensesDialog : Window
37 {
38    text = "License Agreements";
39    background = formColor;
40    hasClose = true;
41    borderStyle = sizable;
42    size = { 800, 400 };
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 { tabControl = tabControl, text = "Ecere SDK", sourceFile = ":licenses/ecere.LICENSE" };
62    LicenseTab pngTab { tabControl = tabControl, text = "libpng", sourceFile = ":licenses/png.LICENSE" };
63    LicenseTab jpgTab { tabControl = tabControl, text = "libjpg", sourceFile = ":licenses/jpg.LICENSE" };
64    LicenseTab giflibTab { tabControl = tabControl, text = "ungif", sourceFile = ":licenses/ungif.LICENSE" };
65    LicenseTab freetypeTab { tabControl = tabControl, text = "FreeType", sourceFile = ":licenses/freetype.LICENSE" };
66    LicenseTab harfbuzzTab { tabControl = tabControl, text = "HarfBuzz", sourceFile = ":licenses/harfbuzz.LICENSE" };
67    LicenseTab zlibTab { tabControl = tabControl, text = "zlib", sourceFile = ":licenses/zlib.README" };
68    LicenseTab tango { tabControl = tabControl, text = "TangoIcons", sourceFile = ":licenses/tango.COPYING" };
69 #if defined(__WIN32__)
70    LicenseTab mingwW64 { tabControl = tabControl, text = "MinGW-w64", sourceFile = ":licenses/MinGW-w64.LICENSE" };
71 #endif
72    Button ok
73    {
74       this;
75       text = "OK";
76       anchor = { bottom = 10 };
77       size = { 80, 22 };
78       isDefault = true;
79       NotifyClicked = ButtonCloseDialog;
80    };
81 }