diff options
| author | Pietro Gagliardi <[email protected]> | 2014-07-25 22:13:09 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-07-25 22:13:09 -0400 |
| commit | 41f3ef292f2e0d70beb3722004c968881ca0fae2 (patch) | |
| tree | 1993bd896d607ef7b961bd7c3f89c6258401d69d /redo/containers_unix.go | |
| parent | c676a2d9b7996df8d76d42c47b5f376b72b08ae0 (diff) | |
Cleaned up sizing a bit. Being able to know how big something will be ahead of time would be better.
Diffstat (limited to 'redo/containers_unix.go')
| -rw-r--r-- | redo/containers_unix.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/redo/containers_unix.go b/redo/containers_unix.go index 20d1bef..2bae60b 100644 --- a/redo/containers_unix.go +++ b/redo/containers_unix.go @@ -36,7 +36,7 @@ func (t *tab) Append(name string, control Control) { t.layoutcs = append(t.layoutcs, (*C.GtkContainer)(unsafe.Pointer(layout))) t.layouts = append(t.layouts, (*C.GtkLayout)(unsafe.Pointer(layout))) c := new(container) - c.beginResize = beginResize + // don't set beginResize; this container's resize() will be a recursive call t.containers = append(t.containers, c) c.child = control c.child.setParent((*C.GtkContainer)(unsafe.Pointer(layout))) @@ -55,6 +55,15 @@ func (t *tab) Append(name string, control Control) { } } +func (t *tab) allocate(x int, y int, width int, height int, d *sizing) []*allocation { + // set up the recursive calls + for _, c := range t.containers { + c.d = d + } + // and prepare the tabbed control itself + return t.widgetbase.allocate(x, y, width, height, d) +} + //export layoutResizing func layoutResizing(wid *C.GtkWidget, r *C.GdkRectangle, data C.gpointer) { c := (*container)(unsafe.Pointer(data)) |
