diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-18 12:47:19 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-18 12:47:19 -0400 |
| commit | b1ac28cc938d2de25357328d9da910a84a2cc8cc (patch) | |
| tree | d34d26f0022dd0e9d9c7179bd59b1c4dbe7b6942 /newctrl/control_unix.go | |
| parent | 0f6e65188af0c4b1d3e4dff17ceb96bbd8ebb271 (diff) | |
Fixed parenting weirdnesses.
Diffstat (limited to 'newctrl/control_unix.go')
| -rw-r--r-- | newctrl/control_unix.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/newctrl/control_unix.go b/newctrl/control_unix.go index 363be55..6aa2278 100644 --- a/newctrl/control_unix.go +++ b/newctrl/control_unix.go @@ -23,22 +23,22 @@ type controlSingleWidget struct { func newControlSingleWidget(widget *C.GtkWidget) *controlSingleWidget { c := new(controlSingleWidget) c.controlbase = &controlbase{ - fsetParent: c.setParent, - fpreferredSize: c.preferredSize, - fresize: c.resize, + fsetParent: c.xsetParent, + fpreferredSize: c.xpreferredSize, + fresize: c.xresize, } c.widget = widget return c } -func (c *controlSingleWidget) setParent(p *controlParent) { +func (c *controlSingleWidget) xsetParent(p *controlParent) { C.gtk_container_add(p.c, c.widget) // make sure the new widget is shown if not explicitly hidden // TODO why did I have this again? C.gtk_widget_show_all(c.widget) } -func (c *controlSingleWidget) preferredSize(d *sizing) (int, int) { +func (c *controlSingleWidget) xpreferredSize(d *sizing) (int, int) { // GTK+ 3 makes this easy: controls can tell us what their preferred size is! // ...actually, it tells us two things: the "minimum size" and the "natural size". // The "minimum size" is the smallest size we /can/ display /anything/. The "natural size" is the smallest size we would /prefer/ to display. @@ -51,7 +51,7 @@ func (c *controlSingleWidget) preferredSize(d *sizing) (int, int) { return int(r.width), int(r.height) } -func (c *controlSingleWidget) resize(x int, y int, width int, height int, d *sizing) { +func (c *controlSingleWidget) xresize(x int, y int, width int, height int, d *sizing) { // as we resize on size-allocate, we have to also use size-allocate on our children // this is fine anyway; in fact, this allows us to move without knowing what the container is! // this is what GtkBox does anyway |
