summaryrefslogtreecommitdiff
path: root/button_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-10-18 17:03:07 -0400
committerPietro Gagliardi <[email protected]>2014-10-18 17:03:07 -0400
commit62048303a34f6cac733798651adb53b640e2114a (patch)
treeb03994dfe1d5cfbc94be65075f3345a45166bbef /button_unix.go
parent8c8b642adbed274133b6e9d975c7ca8786300d2c (diff)
Merged new container/sizing stuff.
Diffstat (limited to 'button_unix.go')
-rw-r--r--button_unix.go28
1 files changed, 2 insertions, 26 deletions
diff --git a/button_unix.go b/button_unix.go
index a880b8c..a1da527 100644
--- a/button_unix.go
+++ b/button_unix.go
@@ -13,7 +13,7 @@ import (
import "C"
type button struct {
- _widget *C.GtkWidget
+ *controlSingleWidget
button *C.GtkButton
clicked *event
}
@@ -24,7 +24,7 @@ func newButton(text string) *button {
defer freegstr(ctext)
widget := C.gtk_button_new_with_label(ctext)
b := &button{
- _widget: widget,
+ controlSingleWidget: newControlSingleWidget(widget),
button: (*C.GtkButton)(unsafe.Pointer(widget)),
clicked: newEvent(),
}
@@ -55,27 +55,3 @@ func buttonClicked(bwid *C.GtkButton, data C.gpointer) {
b := (*button)(unsafe.Pointer(data))
b.clicked.fire()
}
-
-func (b *button) widget() *C.GtkWidget {
- return b._widget
-}
-
-func (b *button) setParent(p *controlParent) {
- basesetParent(b, p)
-}
-
-func (b *button) allocate(x int, y int, width int, height int, d *sizing) []*allocation {
- return baseallocate(b, x, y, width, height, d)
-}
-
-func (b *button) preferredSize(d *sizing) (width, height int) {
- return basepreferredSize(b, d)
-}
-
-func (b *button) commitResize(a *allocation, d *sizing) {
- basecommitResize(b, a, d)
-}
-
-func (b *button) getAuxResizeInfo(d *sizing) {
- basegetAuxResizeInfo(b, d)
-}