diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-04 17:03:07 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-04 17:03:07 -0400 |
| commit | 1ba1f475ba1652d57ff569d42ede09944d74f2fb (patch) | |
| tree | 8308b8319c81047d988fdc0da3c96450c2011aa8 /redo/tab_darwin.go | |
| parent | 39a2414cf94a6f69ddca853fd9ed97a576e30dd2 (diff) | |
Switched Tab on Mac OS X to use a dedicated container type system. This container type will eventually be the new home of all the sizer stuff. Now to remove the dedicated NSTabView stuff...
Diffstat (limited to 'redo/tab_darwin.go')
| -rw-r--r-- | redo/tab_darwin.go | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/redo/tab_darwin.go b/redo/tab_darwin.go index 503c138..3a9b338 100644 --- a/redo/tab_darwin.go +++ b/redo/tab_darwin.go @@ -11,7 +11,7 @@ import "C" type tab struct { _id C.id - tabs []*sizer + tabs []*container } func newTab() Tab { @@ -21,22 +21,20 @@ func newTab() Tab { } func (t *tab) Append(name string, control Control) { - s := new(sizer) - t.tabs = append(t.tabs, s) + c := newContainer(control) + t.tabs = append(t.tabs, c) cname := C.CString(name) defer C.free(unsafe.Pointer(cname)) - tabview := C.tabAppend(t._id, cname) - s.child = control - s.child.setParent(&controlParent{tabview}) + C.tabAppend(t._id, cname, c.view) } //export tabResized func tabResized(data unsafe.Pointer, width C.intptr_t, height C.intptr_t) { - t := (*tab)(unsafe.Pointer(data)) - for _, s := range t.tabs { +// t := (*tab)(unsafe.Pointer(data)) +// for _, c := range t.tabs { // the tab area's coordinate system is localized, so the origin is (0, 0) - s.resize(0, 0, int(width), int(height)) - } +// c.resize(0, 0, int(width), int(height)) +// } } func (t *tab) id() C.id { |
