forked from andlabs/ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontainer.go
More file actions
26 lines (22 loc) · 782 Bytes
/
Copy pathcontainer.go
File metadata and controls
26 lines (22 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// 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
/* 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)
}
}
*/