8 newWindow, goBack, goForward, goUp, goHome,
10 panelTree, panelSearch,
13 viewList, viewDetails, viewIcons, viewCards, viewShowcase, viewCustom,
17 class ExplorerWindow : Window
19 text = "Ecere Explorer";
20 background = activeBorder;
21 borderStyle = sizable;
26 minClientSize = { 600, 300 };
27 nativeDecorations = true;
29 IconBag<ExplorerToolId> iconBag
31 //window = guiApp.desktop;
36 "<:ecere>emblems/unreadable.png", /* none */
38 "<:ecere>actions/windowNew.png", /* newWindow */
39 "<:ecere>actions/goPrevious.png", /* goBack */
40 "<:ecere>actions/goNext.png", /* goForward */
41 "<:ecere>actions/goUp.png", /* goUp */
42 "<:ecere>actions/goHome.png", /* goHome */
44 ":browse.png", /* browse */
46 ":panel-tree.png", /* panelTree */
47 "<:ecere>actions/editFind.png", /* panelSearch */
49 "<:ecere>emblems/unreadable.png", /* addressBar */
51 "<:ecere>actions/viewRefresh.png", /* refresh */
53 ":view-list.png", /* viewList */
54 ":view-details.png", /* viewDetails */
55 ":view-icons.png", /* viewIcons */
56 ":view-cards.png", /* viewCards */
57 ":view-showcase-right.png", /* viewShowcase */
58 ":view-custom.png", /* viewCustom */
60 "<:ecere>mimeTypes/image.png" /* previewPictures */
69 background = activeBorder;
72 anchor = { left = 0, top = 0, right = 0, bottom = 0 };
76 ToolBar/*<ExplorerToolId>*/ toolBar
83 void NotifyToolClick(ToolButton button)
85 ExplorerToolId id = (ExplorerToolId)button.id;
91 ExplorerWindow { }.Create();
98 char * path = view.path;
99 char * newPath = new char[strlen(path)];
100 StripLastDirectory(path, newPath);
106 // TODO TOFIX : need to fix Stacker for this to work
107 tree.visible = button.checked;
108 //search.visible = !button.checked;
109 panels.size = { panels.size.w, panels.size.h }; // TOFIX : another Stacker fix needed
112 // TODO TOFIX : need to fix Stacker for this to work
113 //search.visible = button.checked;
114 tree.visible = !button.checked;
115 panels.size = { panels.size.w, panels.size.h }; // TOFIX : another Stacker fix needed
122 case previewPictures:
123 view.previewPictures = button.checked;
131 //SwitchViews(toolId);
137 Window s1 { toolBar, size = { w = 8 } };
138 ToolButton goBack { toolBar, this, id = ExplorerToolId::goBack };
139 Window s2 { toolBar, size = { w = 2 } };
140 ToolButton goForward { toolBar, this, id = ExplorerToolId::goForward };
141 Window s3 { toolBar, size = { w = 2 } };
142 ToolButton refresh { toolBar, this, id = ExplorerToolId::refresh };
143 Window s4 { toolBar, size = { w = 2 } };
144 ToolButton goHome { toolBar, this, id = ExplorerToolId::goHome };
145 Window s5 { toolBar, size = { w = 8 } };
149 size = { 300, 23 }, id = ExplorerToolId::addressBar;
150 typeExpected = directory;
152 bool OnKeyDown(Key key, unichar ch)
154 if((SmartKey)key == enter)
156 // how to make enter effect a modification
157 // how to implement in PathBox
162 bool NotifyModified(PathBox pathBox)
164 view.path = pathBox.path;
168 FlipStacker { toolBar, spring = previous };
169 Window s6 { toolBar, size = { w = 8 } };
170 ToolButton goUp { toolBar, this, id = ExplorerToolId::goUp };
171 Window s7 { toolBar, size = { w = 8 } };
172 GroupToggleToolButton selectedPanel;
173 GroupToggleToolButton panelTree { toolBar, this, id = ExplorerToolId::panelTree, selected = &selectedPanel, checked = true };
174 GroupToggleToolButton panelSearch { toolBar, this, id = ExplorerToolId::panelSearch, selected = &selectedPanel };
175 selectedPanel = panelTree;
176 Window s8 { toolBar, size = { w = 8 } };
177 OptionToolButton selectedView;
178 OptionToolButton viewList { toolBar, this, id = ExplorerToolId::viewList, selected = &selectedView, checked = true };
179 OptionToolButton viewDetails { toolBar, this, id = ExplorerToolId::viewDetails, selected = &selectedView };
180 OptionToolButton viewIcons { toolBar, this, id = ExplorerToolId::viewIcons, selected = &selectedView };
181 OptionToolButton viewTiles { toolBar, this, id = ExplorerToolId::viewCards, selected = &selectedView };
182 OptionToolButton viewShowcase { toolBar, this, id = ExplorerToolId::viewShowcase, selected = &selectedView };
183 selectedView = viewList;
184 Window s9 { toolBar, size = { w = 8 } };
185 ToggleToolButton previewPictures { toolBar, this, id = ExplorerToolId::previewPictures };
187 Window s10 { toolBar, size = { w = 8 } };
188 ToolButton newWindow { toolBar, this, id = ExplorerToolId::newWindow };
189 Window s11 { toolBar, size = { w = 8 } };
193 iconBag.window = null;
197 bool OnLoadGraphics()
203 void OnUnloadGraphics()
212 direction = horizontal;
213 background = yellow;//activeBorder;
221 //FlipStacker flipStack { stack, spring = previous };
223 /*SearchPanel searchPanel
228 /*Tree*/FileSystemBox tree
234 navigateFolders = true;
247 locationBox = addressBar;
248 navigateFolders = true;
252 // Preview / Showcase
253 /*PreviewArea previewArea
258 //FlipStacker flipPanels { panels, spring = previous };
262 addressBar.path = view.path;
267 //class TreeFileSystemBox : FileSystemBox { }