Esempio n. 1
0
func NewButtonWithMnemonic(label string) *Button {
	b := &Button{}
	l := gobject.GString(label)
	o := C.gtk_button_new_with_mnemonic((*C.gchar)(l.GetPtr()))
	b.Container = NewContainer(unsafe.Pointer(o))
	b.object = C.to_GtkButton(unsafe.Pointer(o))
	return b
}
Esempio n. 2
0
//Create and return new button Structure
func NewButton() *Button {
	b := &Button{}

	o := C.gtk_button_new()

	b.Container = NewContainer(unsafe.Pointer(o))

	b.object = C.to_GtkButton(unsafe.Pointer(o))
	return b
}
Esempio n. 3
0
// Conversion function for gobject registration map
func newButtonFromNative(obj unsafe.Pointer) interface{} {
	var button Button
	button.object = C.to_GtkButton(obj)
	button.Container = NewContainer(unsafe.Pointer(obj))
	return &button
}