3 class SplitWindow : Window
7 background = activeBorder, borderStyle = bevel;
8 anchor = { top = -2, bottom = -2 }, stayOnTop = true, inactive = true;
10 cursor = ((GuiApplication)__thisModule).GetCursor(sizeWE);
12 Window leftPane, rightPane;
17 property double scaleSplit
22 property::split = (int)(parent.clientSize.w * (value) + 0.5);
31 int pw = parent.clientSize.w;
36 if(leftPane && !rightPane)
37 leftPane.anchor.right = 0;
38 else if(rightPane && !leftPane)
39 rightPane.anchor.left = 0;
43 leftPane.anchor.right = pw - x;
45 rightPane.anchor.left = x + w / 2;
53 void OnResize(int width, int height)
58 property::scaleSplit = scaleSplit;
60 property::split = split;
64 bool OnLeftButtonDown(int x, int y, Modifiers mods)
67 startPos = x + absPosition.x;
75 bool OnMouseLeave(Modifiers mods)
80 bool OnMouseMove(int x, int y, Modifiers mods)
82 parent.cursor = cursor;
85 bool oldScale = scale;
90 x = Min(x, parent.clientSize.w - 20);
98 bool OnLeftButtonUp(int x, int y, Modifiers mods)
103 parent.cursor = null;