From 335480db7cd6ed97778ef8fef0710e4d68606457 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 26 Oct 2014 15:15:13 -0400 Subject: Reimplemented Control.containerShow()/Control.containerHide(). Will be needed to fully move Tab on Windows away from container. --- control.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'control.go') diff --git a/control.go b/control.go index 34e5c84..52202b7 100644 --- a/control.go +++ b/control.go @@ -8,6 +8,11 @@ type Control interface { preferredSize(d *sizing) (width, height int) resize(x int, y int, width int, height int, d *sizing) nTabStops() int // used by the Windows backend + + // these are provided for Tab on Windows, where we have to show and hide the individual tab pages manually + // if we ever get something like a SidebarStack of some sort, we'll need to implement this everywhere + containerShow() // show if and only if programmer said to show + containerHide() // hide regardless of whether programmer said to hide } type controlbase struct { @@ -15,6 +20,8 @@ type controlbase struct { fpreferredSize func(d *sizing) (width, height int) fresize func(x int, y int, width int, height int, d *sizing) fnTabStops func() int + fcontainerShow func() + fcontainerHide func() } // children should not use the same name as these, otherwise weird things will happen @@ -34,3 +41,11 @@ func (c *controlbase) resize(x int, y int, width int, height int, d *sizing) { func (c *controlbase) nTabStops() int { return c.fnTabStops() } + +func (c *controlbase) containerShow() { + c.fcontainerShow() +} + +func (c *controlbase) containerHide() { + c.fcontainerHide() +} -- cgit v1.2.3