From 62048303a34f6cac733798651adb53b640e2114a Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 18 Oct 2014 17:03:07 -0400 Subject: Merged new container/sizing stuff. --- button_unix.go | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'button_unix.go') 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) -} -- cgit v1.2.3