summaryrefslogtreecommitdiff
path: root/redo/containerctrls_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-02 22:35:58 -0400
committerPietro Gagliardi <[email protected]>2014-08-02 22:35:58 -0400
commitd018953d7ef1b276cc3229e04ba6fc75018c888a (patch)
tree3f980a017ca498bf499ff9c5e6a53210606b12f9 /redo/containerctrls_unix.go
parent1f6bcde3d9ddcab921f2f4347148f6784ca36a14 (diff)
Split all the Control implementations into their own files and renamed the containerctrls implementation files to say tab instead as they only hold Tab. This is the first part of what should hopefully be the final restructuring.
Diffstat (limited to 'redo/containerctrls_unix.go')
-rw-r--r--redo/containerctrls_unix.go45
1 files changed, 0 insertions, 45 deletions
diff --git a/redo/containerctrls_unix.go b/redo/containerctrls_unix.go
deleted file mode 100644
index 60978ea..0000000
--- a/redo/containerctrls_unix.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// +build !windows,!darwin
-
-// 25 july 2014
-
-package ui
-
-import (
- "unsafe"
-)
-
-// #include "gtk_unix.h"
-import "C"
-
-type tab struct {
- *controlbase
- notebook *C.GtkNotebook
-
- tabs []*layout
-}
-
-func newTab() Tab {
- widget := C.gtk_notebook_new()
- t := &tab{
- 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
- C.gtk_notebook_set_scrollable(t.notebook, C.TRUE)
- return t
-}
-
-func (t *tab) Append(name string, control Control) {
- tl := newLayout(control)
- t.tabs = append(t.tabs, tl)
- cname := togstr(name)
- defer freegstr(cname)
- tab := C.gtk_notebook_append_page(t.notebook,
- tl.layoutwidget,
- C.gtk_label_new(cname))
- if tab == -1 {
- panic("gtk_notebook_append_page() failed")
- }
-}
-
-// no need to override Control.commitResize() as only prepared the tabbed control; its children will be reallocated when that one is resized