diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-18 17:03:38 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-18 17:03:38 -0400 |
| commit | aed423a09f35e26a318bd44a6670d4222906de9a (patch) | |
| tree | 01ad31d5c137859dfeae5f42094834b405971177 /newctrl/group_darwin.go | |
| parent | 62048303a34f6cac733798651adb53b640e2114a (diff) | |
Remvoed the newctrl working directory.
Diffstat (limited to 'newctrl/group_darwin.go')
| -rw-r--r-- | newctrl/group_darwin.go | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/newctrl/group_darwin.go b/newctrl/group_darwin.go deleted file mode 100644 index 23dd563..0000000 --- a/newctrl/group_darwin.go +++ /dev/null @@ -1,60 +0,0 @@ -// 16 august 2014 - -package ui - -import ( - "unsafe" -) - -// #include "objc_darwin.h" -import "C" - -type group struct { - *controlSingleObject - - child Control - container *container - - margined bool - - chainresize func(x int, y int, width int, height int, d *sizing) -} - -func newGroup(text string, control Control) Group { - g := new(group) - g.container = newContainer() - g.controlSingleObject = newControlSingleObject(C.newGroup(g.container.id)) - g.child = control - g.child.setParent(g.container.parent()) - g.SetText(text) - g.chainresize = g.fresize - g.fresize = g.xresize - return g -} - -func (g *group) Text() string { - return C.GoString(C.groupText(g.id)) -} - -func (g *group) SetText(text string) { - ctext := C.CString(text) - defer C.free(unsafe.Pointer(ctext)) - C.groupSetText(g.id, ctext) -} - -func (g *group) Margined() bool { - return g.margined -} - -func (g *group) SetMargined(margined bool) { - g.margined = margined -} - -func (g *group) xresize(x int, y int, width int, height int, d *sizing) { - // first, chain up to change the GtkFrame and its child container - g.chainresize(x, y, width, height, d) - - // now that the container has the correct size, we can resize the child - a := g.container.allocation(g.margined) - g.child.resize(int(a.x), int(a.y), int(a.width), int(a.height), d) -} |
