introducing test app for the FileSystemBox class of libede
[ede] / explorer / src / ExplorerWindow.ec
1 public import "ecere"
2
3 private:
4 define guiApp = ((GuiApplication)__thisModule);
5 define selectionColor = guiApp.currentSkin.selectionColor; //Color { 10, 36, 106 };
6
7 static char * iconNames[] = 
8 {
9    "<:ecere>tango/16x16/mimetypes/file-x-generic.png",         /*none*/
10
11    "<:ecere>tango/16x16/mimetypes/file-x-generic.png",         /*normalFile*/
12    "<:ecere>tango/16x16/mimetypes/text-ews-work.png",          /*ewsFile*/
13    "<:ecere>tango/16x16/mimetypes/text-epj-assembly.png",      /*epjFile*/
14    "<:ecere>tango/16x16/mimetypes/text-ec-source.png",         /*ecFile*/
15    "<:ecere>tango/16x16/mimetypes/text-eh-header.png",         /*ehFile*/
16    "<:ecere>tango/16x16/mimetypes/text-c-source.png",          /*cFile*/
17    "<:ecere>tango/16x16/mimetypes/text-h-header.png",          /*hFile*/
18    "<:ecere>tango/16x16/mimetypes/text-cpp-source.png",        /*cppFile*/
19    "<:ecere>tango/16x16/mimetypes/text-hpp-header.png",        /*hppFile*/
20    "<:ecere>tango/16x16/mimetypes/text-x-generic.png",         /*textFile*/
21    "<:ecere>tango/16x16/mimetypes/text-html.png",              /*webFile*/
22    "<:ecere>tango/16x16/mimetypes/image-x-generic.png",        /*pictureFile*/
23    "<:ecere>tango/16x16/status/audio-volume-high.png",         /*soundFile*/
24    "<:ecere>tango/16x16/mimetypes/package-x-generic.png",      /*archiveFile*/
25    "<:ecere>tango/16x16/mimetypes/package-x-software.png",     /*packageFile*/
26    "<:ecere>tango/16x16/mimetypes/package-x-optical-disc.png", /*opticalMediaImageFile*/
27
28    "<:ecere>tango/16x16/places/folder.png",
29    "<:ecere>tango/16x16/status/folder-open.png",
30    "<:ecere>tango/16x16/devices/computer.png",
31    "<:ecere>tango/16x16/devices/drive-harddisk.png",
32    "<:ecere>tango/16x16/places/folder-remote.png",
33    "<:ecere>tango/16x16/devices/media-optical.png",
34    "<:ecere>tango/16x16/devices/drive-removable-media.png",
35    "<:ecere>tango/16x16/devices/media-floppy.png",
36    "<:ecere>tango/16x16/places/network-workgroup.png",
37    "<:ecere>tango/16x16/places/network-server.png",
38    "<:ecere>tango/16x16/places/folder-remote.png",
39
40    "<:ecere>tango/16x16/mimetypes/package-x-generic.png",      /*treeLoader*/
41    "<:ecere>tango/16x16/places/start-here.png"                 /*lineNumbers*/
42 };
43
44 public class FileSystemToolWindow : public Window
45 {
46    BitmapResource icons[FileItemType];
47
48    FileSystemToolWindow()
49    {
50       FileItemType c;
51       for(c = 0; c < FileItemType::enumSize; c++)
52       {
53          icons[c] = BitmapResource { iconNames[c], alphaBlend = true };
54          AddResource(icons[c]);
55       }
56    }
57 }
58