From 0453e59f294390457e860356c050445cfb52290f Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Mon, 21 Oct 2013 19:24:22 -0400 Subject: [PATCH] staticlayout --- minigui.d | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/minigui.d b/minigui.d index 6c1ae97..ec99a5d 100644 --- a/minigui.d +++ b/minigui.d @@ -677,7 +677,18 @@ class Widget { class VerticalLayout : Widget { // intentionally blank - widget's default is vertical layout right now + this(Widget parent = null) { super(parent); if(parent) this.parentWindow = parent.parentWindow; } } + +class StaticLayout : Widget { + this(Widget parent = null) { super(parent); if(parent) this.parentWindow = parent.parentWindow; } + override void recomputeChildLayout() { + registerMovement(); + foreach(child; children) + child.recomputeChildLayout(); + } +} + class HorizontalLayout : Widget { this(Widget parent = null) { super(parent); if(parent) this.parentWindow = parent.parentWindow; } override void recomputeChildLayout() {