2f6d75aa5bfc9b30429705cb71f84f3e6d85b1d0
[ede] / tests / libede / fileSystemBoxTestApp / FileSystemBoxTestApp.ec
1 import "ecere"
2 import "ede"
3
4 class FileSystemBoxTestWindow : Window
5 {
6    text = "FileSystemBox Test Window";
7    background = activeBorder;
8    borderStyle = sizable;
9    hasMaximize = true;
10    hasMinimize = true;
11    hasClose = true;
12    size = { 840, 480 };
13
14    TabControl tabControl { this, background = activeBorder, anchor = { left = 4, top = 4, right = 4, bottom = 4 } };
15
16    FileListTab fileListTab { tabControl };
17    FolderListTab folderListTab { tabControl };
18    FileTreeTab fileTreeTab { tabControl };
19    FolderTreeTab folderTreeTab { tabControl };
20    FileDetails fileDetails { tabControl };
21    FilteredList filteredList { tabControl };
22    FilteredTree filteredTree { tabControl };
23    RootList rootList { tabControl };
24    RootTree rootTree { tabControl };
25 }
26
27 FileSystemBoxTestWindow testWindow { };
28
29 class TestTab : Tab
30 {
31    background = activeBorder;
32 }
33
34 class FileListTab : TestTab
35 {
36    text = "FileList";
37
38    FileSystemBox box
39    {
40       this;
41       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
42    };
43 }
44
45 class FolderListTab : TestTab
46 {
47    text = "FolderList";
48
49    FileSystemBox box
50    {
51       this;
52       foldersOnly = true;
53       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
54    };
55 }
56
57 class FileTreeTab : TestTab
58 {
59    text = "FileTree";
60
61    FileSystemBox box
62    {
63       this;
64       treeBranches = true;
65       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
66    };
67 }
68
69 class FolderTreeTab : TestTab
70 {
71    text = "FolderTree";
72
73    FileSystemBox box
74    {
75       this;
76       treeBranches = true;
77       foldersOnly = true;
78       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
79    };
80 }
81
82 class FileDetails : TestTab
83 {
84    text = "FileDetails";
85
86    FileSystemBox box
87    {
88       this;
89       details = true; // TODO: figure out why commented out (see FileSystemBox) code crashes the form designer
90       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
91    };
92 }
93
94 class FilteredList : TestTab
95 {
96    text = "FilteredList";
97
98    FileSystemBox box
99    {
100       this;
101       extensions = "epj, ec";
102       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
103    };
104 }
105
106 class FilteredTree : TestTab
107 {
108    text = "FilteredTree";
109
110    FileSystemBox box
111    {
112       this;
113       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
114
115       extensions = "txt, text, nfo, info";
116       treeBranches = true;
117    };
118 }
119
120 class RootList : TestTab
121 {
122    text = "RootList";
123
124    FileSystemBox box
125    {
126       this;
127       path = "/";
128       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
129    };
130 }
131
132 class RootTree : TestTab
133 {
134    text = "RootTree";
135
136    FileSystemBox box
137    {
138       this;
139       path = "/";
140       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
141
142       treeBranches = true;
143    };
144 }
145
146 class FileSystemBoxTestApp : GuiApplication
147 {
148 }