diff options
| author | Pietro Gagliardi <[email protected]> | 2016-05-30 00:14:46 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2016-05-30 00:14:46 -0400 |
| commit | 52f7d276a6bb04b8827ac019ad1e135b43819cea (patch) | |
| tree | 5f0ebbfdf5885ef832e77e243b5916e59f46ba18 /prev/control_darwin.go | |
| parent | c9b32c1333e4009b342eedc5f5b39127a724fb42 (diff) | |
Removed prev/.
Diffstat (limited to 'prev/control_darwin.go')
| -rw-r--r-- | prev/control_darwin.go | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/prev/control_darwin.go b/prev/control_darwin.go deleted file mode 100644 index 330d50c..0000000 --- a/prev/control_darwin.go +++ /dev/null @@ -1,56 +0,0 @@ -// 30 july 2014 - -package ui - -// #include "objc_darwin.h" -import "C" - -type controlParent struct { - id C.id -} - -type controlSingleObject struct { - *controlbase - id C.id -} - -func newControlSingleObject(id C.id) *controlSingleObject { - c := new(controlSingleObject) - c.controlbase = &controlbase{ - fsetParent: c.xsetParent, - fpreferredSize: c.xpreferredSize, - fresize: c.xresize, - } - c.id = id - return c -} - -func (c *controlSingleObject) xsetParent(p *controlParent) { - // redrawing the new window handled by C.parent() - C.parent(c.id, p.id) -} - -func (c *controlSingleObject) xpreferredSize(d *sizing) (int, int) { - s := C.controlPreferredSize(c.id) - return int(s.width), int(s.height) -} - -func (c *controlSingleObject) xresize(x int, y int, width int, height int, d *sizing) { - C.moveControl(c.id, C.intptr_t(x), C.intptr_t(y), C.intptr_t(width), C.intptr_t(height)) -} - -type scroller struct { - *controlSingleObject - scroller *controlSingleObject -} - -func newScroller(child C.id, bordered bool) *scroller { - sid := C.newScrollView(child, toBOOL(bordered)) - s := &scroller{ - controlSingleObject: newControlSingleObject(child), - scroller: newControlSingleObject(sid), - } - s.fsetParent = s.scroller.fsetParent - s.fresize = s .scroller.fresize - return s -} |
