+ text = "Ecere Explorer";
+ background = activeBorder;
+ borderStyle = sizable;
+ hasMaximize = true;
+ hasMinimize = true;
+ hasClose = true;
+ //hasMenuBar = true;
+ //tabCycle = true;
+ size = { 840, 480 };
+ minClientSize = { 600, 300 };
+ nativeDecorations = true;
+
+ /*
+ bool userMode;
+ bool clipboard;
+
+ int treeSplit;
+ int searchSplit;
+
+ ExplorerToolId lastViewId;
+
+ menu = Menu { };
+
+ Menu fileMenu { menu, "File", f };
+ Menu windowMenu { menu, "Window", w };
+ MenuItem newWindow
+ {
+ windowMenu, "New Window", n;
+
+ bool NotifySelect(MenuItem selection, Modifiers mods)
+ {
+ ExplorerWindow { }.Create();
+ return true;
+ }
+ };
+*/
+
+ IconBag<ExplorerToolId> iconBag
+ {
+ //window = guiApp.desktop;
+ window = this;
+ alphaBlend = true;
+ iconNames =
+ [
+ "<:ecere>emblems/unreadable.png", /* none */
+
+ "<:ecere>actions/windowNew.png", /* newWindow */
+ "<:ecere>actions/goPrevious.png", /* goBack */
+ "<:ecere>actions/goNext.png", /* goForward */
+ "<:ecere>actions/goUp.png", /* goUp */
+ "<:ecere>actions/goHome.png", /* goHome */
+
+ ":browse.png", /* browse */
+
+ ":panel-tree.png", /* panelTree */
+ "<:ecere>actions/editFind.png", /* panelSearch */
+
+ "<:ecere>emblems/unreadable.png", /* addressBar */
+
+ "<:ecere>actions/viewRefresh.png", /* refresh */
+
+ ":view-list.png", /* viewList */
+ ":view-details.png", /* viewDetails */
+ ":view-icons.png", /* viewIcons */
+ ":view-cards.png", /* viewCards */
+ ":view-showcase-right.png", /* viewShowcase */
+ ":view-custom.png", /* viewCustom */
+
+ "<:ecere>mimeTypes/image.png" /* previewPictures */
+ ];
+ };
+
+ Stacker stack
+ {
+ this;
+ gap = 0;
+ direction = vertical;
+ background = activeBorder;
+ //opacity = 1.0f;
+
+ anchor = { left = 0, top = 0, right = 0, bottom = 0 };
+ //moveable = false;
+ };
+
+ ToolBar/*<ExplorerToolId>*/ toolBar
+ {
+ stack, this;
+ iconBag = iconBag;
+ size = { h = 32 };
+ //moveable = false;
+
+ void NotifyToolClick(ToolButton button)
+ {
+ ExplorerToolId id = (ExplorerToolId)button.id;
+ switch(id)
+ {
+ case none:
+ break;
+ case newWindow:
+ ExplorerWindow { }.Create();
+ break;
+ case goBack:
+ case goForward:
+ break;
+ case goUp:
+ {
+ char * path = view.path;
+ char * newPath = new char[strlen(path)];
+ StripLastDirectory(path, newPath);
+ view.path = newPath;
+ delete newPath;
+ break;
+ }
+ case panelTree:
+ // TODO TOFIX : need to fix Stacker for this to work
+ tree.visible = button.checked;
+ //search.visible = !button.checked;
+ panels.size = { panels.size.w, panels.size.h }; // TOFIX : another Stacker fix needed
+ break;
+ case panelSearch:
+ // TODO TOFIX : need to fix Stacker for this to work
+ //search.visible = button.checked;
+ tree.visible = !button.checked;
+ panels.size = { panels.size.w, panels.size.h }; // TOFIX : another Stacker fix needed
+ break;
+ case refresh:
+ if(tree.visible)
+ tree.Refresh();
+ view.Refresh();
+ break;
+ case previewPictures:
+ view.previewPictures = button.checked;
+ view.Refresh();
+ break;
+ case viewList:
+ case viewDetails:
+ case viewIcons:
+ case viewCards:
+ case viewShowcase:
+ //SwitchViews(toolId);
+ break;
+ }
+ }
+ };
+
+ Window s1 { toolBar, size = { w = 8 } };
+ ToolButton goBack { toolBar, this, id = ExplorerToolId::goBack };
+ Window s2 { toolBar, size = { w = 2 } };
+ ToolButton goForward { toolBar, this, id = ExplorerToolId::goForward };
+ Window s3 { toolBar, size = { w = 2 } };
+ ToolButton refresh { toolBar, this, id = ExplorerToolId::refresh };
+ Window s4 { toolBar, size = { w = 2 } };
+ ToolButton goHome { toolBar, this, id = ExplorerToolId::goHome };
+ Window s5 { toolBar, size = { w = 8 } };
+ PathBox addressBar
+ {
+ toolBar, this;
+ size = { 300, 23 }, id = ExplorerToolId::addressBar;
+ typeExpected = directory;
+
+ bool OnKeyDown(Key key, unichar ch)
+ {
+ if((SmartKey)key == enter)
+ {
+ // how to make enter effect a modification
+ // how to implement in PathBox
+ }
+ return true;
+ }
+
+ bool NotifyModified(PathBox pathBox)
+ {
+ view.path = pathBox.path;
+ return true;
+ }
+ };
+ FlipStacker { toolBar, spring = previous };
+ Window s6 { toolBar, size = { w = 8 } };
+ ToolButton goUp { toolBar, this, id = ExplorerToolId::goUp };
+ Window s7 { toolBar, size = { w = 8 } };
+ GroupToggleToolButton selectedPanel;
+ GroupToggleToolButton panelTree { toolBar, this, id = ExplorerToolId::panelTree, selected = &selectedPanel, checked = true };
+ GroupToggleToolButton panelSearch { toolBar, this, id = ExplorerToolId::panelSearch, selected = &selectedPanel };
+ selectedPanel = panelTree;
+ Window s8 { toolBar, size = { w = 8 } };
+ OptionToolButton selectedView;
+ OptionToolButton viewList { toolBar, this, id = ExplorerToolId::viewList, selected = &selectedView, checked = true };
+ OptionToolButton viewDetails { toolBar, this, id = ExplorerToolId::viewDetails, selected = &selectedView };
+ OptionToolButton viewIcons { toolBar, this, id = ExplorerToolId::viewIcons, selected = &selectedView };
+ OptionToolButton viewTiles { toolBar, this, id = ExplorerToolId::viewCards, selected = &selectedView };
+ OptionToolButton viewShowcase { toolBar, this, id = ExplorerToolId::viewShowcase, selected = &selectedView };
+ selectedView = viewList;
+ Window s9 { toolBar, size = { w = 8 } };
+ ToggleToolButton previewPictures { toolBar, this, id = ExplorerToolId::previewPictures };
+
+ Window s10 { toolBar, size = { w = 8 } };
+ ToolButton newWindow { toolBar, this, id = ExplorerToolId::newWindow };
+ Window s11 { toolBar, size = { w = 8 } };
+
+ /*void OnDestroy()
+ {
+ iconBag.window = null;
+ delete iconBag;
+ }*/
+
+ bool OnLoadGraphics()
+ {
+ iconBag.Load();
+ return true;
+ }
+
+ void OnUnloadGraphics()
+ {
+ iconBag.Unload();
+ }
+
+ Stacker panels
+ {
+ stack, this;
+ gap = 0;
+ direction = horizontal;
+ background = yellow;//activeBorder;
+ //opacity = 1.0f;
+
+ anchor.left = 0;
+ anchor.bottom = 0;
+ anchor.right = 0;
+ };
+
+ //FlipStacker flipStack { stack, spring = previous };
+
+ /*SearchPanel searchPanel
+ {
+ panels, this;
+ };*/
+
+ /*Tree*/FileSystemBox tree
+ {
+ panels, this;
+ size = { w = 240 };
+ anchor.top = 0;
+ anchor.bottom = 0;
+ navigateFolders = true;
+ treeBranches = true;
+ foldersOnly = true;
+ borderStyle = none;
+ visible = false;
+ };
+
+ FileSystemBox view
+ {
+ panels, this;
+ anchor.top = 0;
+ anchor.bottom = 0;
+ anchor.right = 0;
+ locationBox = addressBar;
+ navigateFolders = true;
+ borderStyle = none;
+ };
+
+ /*ExplorerSearch search
+ {
+ deep, this;
+ visible = false;
+ tabCycle = true;
+ size = Size { 624, 268 };
+ anchor = Anchor { left = 0, top = 0, bottom = 0 };
+ };
+
+ ExplorerViewSearch results;*/
+
+ /*Window viewHolder
+ {
+ parent = deep, master = this;
+ tabCycle = true;
+ anchor = Anchor { top = 0, bottom = 0, right = 0 };
+ };
+
+ SplitWindow split
+ {
+ deep, this;
+ leftPane = tree, rightPane = viewHolder;
+ split = 300;
+ };*/
+
+ // Preview / Showcase
+ /*PreviewArea previewArea
+ {
+ panels, this;
+ };*/
+
+ //FlipStacker flipPanels { panels, spring = previous };
+
+ /*bool TreeNotifyBranchSelect(ExplorerTree tree, ExplorerFileBranch branch)
+ {
+ if(branch)
+ {
+ char path[MAX_LOCATION];
+ branch.GetPath(path);
+ toolBar.addressBar.contents = path;
+ view.Load(branch);
+ }
+ return true;
+ }*/
+
+ /*bool ViewNotifyItemOpen(ExplorerView view, ExplorerFileItem item)
+ {
+ ExplorerFileBranch branch = tree.branch;
+ if(item && branch)
+ {
+ if(item.type.isFolderType)
+ {
+ ExplorerFileBranch child;
+
+ if(!branch.loaded || !branch.childrenLoaded)
+ BranchLoad(branch, tree.tree);