tests:libede:fileSystemBox: esthetics. shorter paths.
[ede] / tests / libede / fileSystemBox / fileSystemBox.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    JustFilesTab justFilesTab { tabControl };
18    FolderListTab folderListTab { tabControl };
19    FileTreeTab fileTreeTab { tabControl };
20    FolderTreeTab folderTreeTab { tabControl };
21    FileDetails fileDetails { tabControl };
22    FilteredList filteredList { tabControl };
23    FilteredTree filteredTree { tabControl };
24    RootList rootList { tabControl };
25    RootTree rootTree { tabControl };
26 }
27
28 FileSystemBoxTestWindow testWindow { };
29
30 class TestTab : Tab
31 {
32    background = activeBorder;
33 }
34
35 class FileListTab : TestTab
36 {
37    text = "FileList";
38
39    FileSystemBox box
40    {
41       this;
42       navigateFolders = true;
43       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
44    };
45 }
46
47 class JustFilesTab : TestTab
48 {
49    text = "JustFiles";
50
51    FileSystemBox box
52    {
53       this;
54       filesOnly = true;
55       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
56    };
57 }
58
59 class FolderListTab : TestTab
60 {
61    text = "FolderList";
62
63    FileSystemBox box
64    {
65       this;
66       foldersOnly = true;
67       navigateFolders = true;
68       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
69    };
70 }
71
72 class FileTreeTab : TestTab
73 {
74    text = "FileTree";
75
76    FileSystemBox box
77    {
78       this;
79       treeBranches = true;
80       navigateFolders = true;
81       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
82    };
83 }
84
85 class FolderTreeTab : TestTab
86 {
87    text = "FolderTree";
88
89    FileSystemBox box
90    {
91       this;
92       treeBranches = true;
93       foldersOnly = true;
94       navigateFolders = true;
95       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
96    };
97 }
98
99 class FileDetails : TestTab
100 {
101    text = "FileDetails";
102
103    FileSystemBox box
104    {
105       this;
106       details = true; // TODO: figure out why commented out (see FileSystemBox) code crashes the form designer
107       navigateFolders = true;
108       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
109    };
110 }
111
112 class FilteredList : TestTab
113 {
114    text = "FilteredList";
115
116    FileSystemBox box
117    {
118       this;
119       extensions = "epj, ec";
120       navigateFolders = true;
121       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
122    };
123 }
124
125 class FilteredTree : TestTab
126 {
127    text = "FilteredTree";
128
129    FileSystemBox box
130    {
131       this;
132       extensions = "txt, text, nfo, info";
133       treeBranches = true;
134       navigateFolders = true;
135       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
136    };
137 }
138
139 class RootList : TestTab
140 {
141    text = "RootList";
142
143    FileSystemBox box
144    {
145       this;
146       path = "/";
147       navigateFolders = true;
148       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
149    };
150 }
151
152 class RootTree : TestTab
153 {
154    text = "RootTree";
155
156    FileSystemBox box
157    {
158       this;
159       path = "/";
160       treeBranches = true;
161       navigateFolders = true;
162       anchor = { left = 4, top = 4, right = 4, bottom = 4 };
163    };
164 }
165
166 class FileSystemBoxTestApp : GuiApplication
167 {
168 }