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);
111 // TODO TOFIX : need to fix Stacker for this to work
112 tree.visible = button.checked;
113 //search.visible = !button.checked;
114 panels.size = { panels.size.w, panels.size.h }; // TOFIX : another Stacker fix needed
117 // TODO TOFIX : need to fix Stacker for this to work
118 //search.visible = button.checked;
119 tree.visible = !button.checked;
120 panels.size = { panels.size.w, panels.size.h }; // TOFIX : another Stacker fix needed
127 case previewPictures:
128 view.previewPictures = button.checked;
136 //SwitchViews(toolId);
142 Window s1 { toolBar, size = { w = 8 } };
143 ToolButton goBack { toolBar, this, id = ExplorerToolId::goBack };
144 Window s2 { toolBar, size = { w = 2 } };
145 ToolButton goForward { toolBar, this, id = ExplorerToolId::goForward };
146 Window s3 { toolBar, size = { w = 2 } };
147 ToolButton refresh { toolBar, this, id = ExplorerToolId::refresh };
148 Window s4 { toolBar, size = { w = 2 } };
149 ToolButton goHome { toolBar, this, id = ExplorerToolId::goHome };
150 Window s5 { toolBar, size = { w = 8 } };
154 size = { 300, 23 }, id = ExplorerToolId::addressBar;
155 typeExpected = directory;
157 bool OnKeyDown(Key key, unichar ch)
159 if((SmartKey)key == enter)
161 // how to make enter effect a modification
162 // how to implement in PathBox
167 bool NotifyModified(PathBox pathBox)
169 view.path = pathBox.path;
173 FlipStacker { toolBar, spring = previous };
174 Window s6 { toolBar, size = { w = 8 } };
175 ToolButton goUp { toolBar, this, id = ExplorerToolId::goUp };
176 Window s7 { toolBar, size = { w = 8 } };
177 GroupToggleToolButton selectedPanel;
178 GroupToggleToolButton panelTree { toolBar, this, id = ExplorerToolId::panelTree, selected = &selectedPanel, checked = true };
179 GroupToggleToolButton panelSearch { toolBar, this, id = ExplorerToolId::panelSearch, selected = &selectedPanel };
180 selectedPanel = panelTree;
181 Window s8 { toolBar, size = { w = 8 } };
182 OptionToolButton selectedView;
183 OptionToolButton viewList { toolBar, this, id = ExplorerToolId::viewList, selected = &selectedView, checked = true };
184 OptionToolButton viewDetails { toolBar, this, id = ExplorerToolId::viewDetails, selected = &selectedView };
185 OptionToolButton viewIcons { toolBar, this, id = ExplorerToolId::viewIcons, selected = &selectedView };
186 OptionToolButton viewTiles { toolBar, this, id = ExplorerToolId::viewCards, selected = &selectedView };
187 OptionToolButton viewShowcase { toolBar, this, id = ExplorerToolId::viewShowcase, selected = &selectedView };
188 selectedView = viewList;
189 Window s9 { toolBar, size = { w = 8 } };
190 ToggleToolButton previewPictures { toolBar, this, id = ExplorerToolId::previewPictures };
192 Window s10 { toolBar, size = { w = 8 } };
193 ToolButton newWindow { toolBar, this, id = ExplorerToolId::newWindow };
194 Window s11 { toolBar, size = { w = 8 } };
198 iconBag.window = null;
202 bool OnLoadGraphics()
208 void OnUnloadGraphics()
217 direction = horizontal;
218 background = yellow;//activeBorder;
226 //FlipStacker flipStack { stack, spring = previous };
228 /*SearchPanel searchPanel
233 /*Tree*/FileSystemBox tree
239 navigateFolders = true;
252 locationBox = addressBar;
253 navigateFolders = true;
257 // Preview / Showcase
258 /*PreviewArea previewArea
263 //FlipStacker flipPanels { panels, spring = previous };
267 addressBar.path = view.path;
272 //class TreeFileSystemBox : FileSystemBox { }