summaryrefslogtreecommitdiff
path: root/newctrl/container.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-10-14 20:31:35 -0400
committerPietro Gagliardi <[email protected]>2014-10-14 20:31:35 -0400
commit8fd3e653d162e1c79da213a4e36f4d51a5447e1e (patch)
tree4c2d6ce6c8821e88874438bdaf25778c73f9fbdf /newctrl/container.go
parent93f0882991f05f5719e1f752191c5241d78afc6c (diff)
Started the actual new container framework.
Diffstat (limited to 'newctrl/container.go')
-rw-r--r--newctrl/container.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/newctrl/container.go b/newctrl/container.go
new file mode 100644
index 0000000..ea7449f
--- /dev/null
+++ b/newctrl/container.go
@@ -0,0 +1,29 @@
+// 25 june 2014
+
+package ui
+
+type sizingbase struct {
+ xpadding int
+ ypadding int
+}
+
+// The container type, which is defined per-platform, is an internal Control that is only used to house other Controls from the underlying UI toolkit's point of view
+
+// set to true to apply spacing to all windows
+var spaced bool = false
+
+/* TODO
+func (c *container) resize(x, y, width, height int) {
+ if c.child == nil { // no children; nothing to do
+ return
+ }
+ d := c.beginResize()
+ allocations := c.child.allocate(x+d.xmargin, y+d.ymargintop,
+ width-(2*d.xmargin), height-d.ymargintop-d.ymarginbottom, d)
+ c.translateAllocationCoords(allocations, width, height)
+ // move in reverse so as to approximate right->left order so neighbors make sense
+ for i := len(allocations) - 1; i >= 0; i-- {
+ allocations[i].this.commitResize(allocations[i], d)
+ }
+}
+*/