summaryrefslogtreecommitdiff
path: root/redo/containerctrls_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-30 10:21:23 -0400
committerPietro Gagliardi <[email protected]>2014-07-30 10:21:23 -0400
commit4740f72efb09042abc3b0577044e720bcc36dcb2 (patch)
treea3fd18f31065d8c2764adf27cdf32f151fcab17e /redo/containerctrls_unix.go
parent210102fe95a72f32f9149fd674bb0c2190f14171 (diff)
Applied the new Control system to the GTK+ backend.
Diffstat (limited to 'redo/containerctrls_unix.go')
-rw-r--r--redo/containerctrls_unix.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/redo/containerctrls_unix.go b/redo/containerctrls_unix.go
index 36118fe..2f2c1f2 100644
--- a/redo/containerctrls_unix.go
+++ b/redo/containerctrls_unix.go
@@ -13,7 +13,7 @@ import (
import "C"
type tab struct {
- *widgetbase
+ *controlbase
notebook *C.GtkNotebook
containers []*container
@@ -25,7 +25,7 @@ type tab struct {
func newTab() Tab {
widget := C.gtk_notebook_new()
t := &tab{
- widgetbase: newWidget(widget),
+ controlbase: newControl(widget),
notebook: (*C.GtkNotebook)(unsafe.Pointer(widget)),
}
// there are no scrolling arrows by default; add them in case there are too many tabs
@@ -58,10 +58,7 @@ func (t *tab) Append(name string, control Control) {
}
}
-func (t *tab) allocate(x int, y int, width int, height int, d *sizing) []*allocation {
- // only prepared the tabbed control; its children will be reallocated when that one is resized
- return t.widgetbase.allocate(x, y, width, height, d)
-}
+// no need to override Control.allocate() as only prepared the tabbed control; its children will be reallocated when that one is resized
//export layoutResizing
func layoutResizing(wid *C.GtkWidget, r *C.GdkRectangle, data C.gpointer) {