diff options
Diffstat (limited to 'button_unix.go')
| -rw-r--r-- | button_unix.go | 28 |
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) -} |
