3 enum ToolId { none, newWindow, goBack, goForward, goHome };
5 class ToolBarDemo : Window
7 background = activeBorder;
13 minClientSize = { 600, 300 };
14 nativeDecorations = true;
21 background = activeBorder;
22 anchor = { left = 0, top = 0, right = 0, bottom = 0 };
30 /*bool NotifyClicked(Button button, int x, int y, Modifiers mods)
32 ToolId id = (ToolId)button.id;
35 case newWindow: break;
37 case goForward: break;
44 Window s1 { toolBar, size = { w = 8 } };
45 ToolButton goBack { toolBar, this, id = ToolId::goBack, toolTip = "Go Back", bitmap = { "<:ecere>actions/goPrevious.png" } };
46 Window s2 { toolBar, size = { w = 2 } };
47 ToolButton goForward { toolBar, this, id = ToolId::goForward, toolTip = "Go Forward", bitmap = { "<:ecere>actions/goNext.png" } };
48 Window s3 { toolBar, size = { w = 12 } };
49 ToolButton newWindow { toolBar, this, id = ToolId::newWindow, toolTip = "New Window", bitmap = { "<:ecere>actions/windowNew.png" } };
50 Window s4 { toolBar, size = { w = 2 } };
51 ToolButton goHome { toolBar, this, id = ToolId::goHome, toolTip = "Go Home", bitmap = { "<:ecere>actions/goHome.png" } };
55 ToolBarDemo tbDemo { };