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 nativeDecorations = true;
28 IconBag<ExplorerToolId> iconBag
30 //window = guiApp.desktop;
35 "<:ecere>emblems/unreadable.png", /* none */
37 "<:ecere>actions/windowNew.png", /* newWindow */
38 "<:ecere>actions/goPrevious.png", /* goBack */
39 "<:ecere>actions/goNext.png", /* goForward */
40 "<:ecere>actions/goUp.png", /* goUp */
41 "<:ecere>actions/goHome.png", /* goHome */
43 ":browse.png", /* browse */
45 ":panel-tree.png", /* panelTree */
46 "<:ecere>actions/editFind.png", /* panelSearch */
48 "<:ecere>emblems/unreadable.png", /* addressBar */
50 "<:ecere>actions/viewRefresh.png", /* refreshView */
52 ":view-list.png", /* viewList */
53 ":view-details.png", /* viewDetails */
54 ":view-icons.png", /* viewIcons */
55 ":view-cards.png", /* viewCards */
56 ":view-showcase-right.png", /* viewShowcase */
57 ":view-custom.png", /* viewCustom */
59 "<:ecere>mimeTypes/image.png" /* previewPictures */
68 background = activeBorder;
71 anchor = { left = 0, top = 0, right = 0, bottom = 0 };
75 ToolBar<ExplorerToolId> toolBar
83 Window s1 { toolBar, size = { w = 8 } };
84 ToolButton goBack { toolBar, this, id = ExplorerToolId::goBack };
85 Window s2 { toolBar, size = { w = 2 } };
86 ToolButton goForward { toolBar, this, id = ExplorerToolId::goForward };
87 Window s3 { toolBar, size = { w = 2 } };
88 ToolButton refreshView
90 toolBar, this, id = ExplorerToolId::refreshView;
92 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
98 Window s4 { toolBar, size = { w = 2 } };
99 ToolButton goHome { toolBar, this, id = ExplorerToolId::goHome };
100 Window s5 { toolBar, size = { w = 8 } };
104 size = { 300, 23 }, id = ExplorerToolId::addressBar;
105 typeExpected = directory;
107 bool OnKeyDown(Key key, unichar ch)
109 if((SmartKey)key == enter)
111 // how to make enter effect a modification
112 // how to implement in PathBox
117 bool NotifyModified(PathBox pathBox)
119 fsb.path = pathBox.path;
123 Window s6 { toolBar, size = { w = 8 } };
126 toolBar, this, id = ExplorerToolId::goUp;
128 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
130 char * path = fsb.path;
131 char * newPath = new char[strlen(path)];
132 StripLastDirectory(path, newPath);
138 Window s7 { toolBar, size = { w = 8 } };
139 GroupToggleToolButton selectedPanel;
140 GroupToggleToolButton panelTree { toolBar, this, id = ExplorerToolId::panelTree, selected = &selectedPanel, checked = true };
141 GroupToggleToolButton panelSearch { toolBar, this, id = ExplorerToolId::panelSearch, selected = &selectedPanel };
142 selectedPanel = panelTree;
143 Window s8 { toolBar, size = { w = 8 } };
144 OptionToolButton selectedView;
145 OptionToolButton viewList { toolBar, this, id = ExplorerToolId::viewList, selected = &selectedView, checked = true };
146 OptionToolButton viewDetails { toolBar, this, id = ExplorerToolId::viewDetails, selected = &selectedView };
147 OptionToolButton viewIcons { toolBar, this, id = ExplorerToolId::viewIcons, selected = &selectedView };
148 OptionToolButton viewTiles { toolBar, this, id = ExplorerToolId::viewCards, selected = &selectedView };
149 OptionToolButton viewShowcase { toolBar, this, id = ExplorerToolId::viewShowcase, selected = &selectedView };
150 selectedView = viewList;
151 Window s9 { toolBar, size = { w = 8 } };
152 ToggleToolButton previewPictures
154 toolBar, this, id = ExplorerToolId::previewPictures;
156 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
158 fsb.previewPictures = button.checked;
163 Window s10 { toolBar, size = { w = 8 } };
166 toolBar, this, id = ExplorerToolId::newWindow;
168 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
170 ExplorerWindow { }.Create();
177 iconBag.window = null;
181 bool OnLoadGraphics()
187 void OnUnloadGraphics()
195 //anchor = { left = 0, top = 4, right = 0, bottom = 0 };
199 locationBox = addressBar;
200 navigateFolders = true;
205 addressBar.path = fsb.path;