NewButton creates a new Button with the given text as its label.
(text string)
| 20 | |
| 21 | // NewButton creates a new Button with the given text as its label. |
| 22 | func NewButton(text string) *Button { |
| 23 | b := new(Button) |
| 24 | |
| 25 | ctext := C.CString(text) |
| 26 | b.b = C.uiNewButton(ctext) |
| 27 | freestr(ctext) |
| 28 | |
| 29 | C.pkguiButtonOnClicked(b.b) |
| 30 | |
| 31 | b.ControlBase = NewControlBase(b, uintptr(unsafe.Pointer(b.b))) |
| 32 | return b |
| 33 | } |
| 34 | |
| 35 | // Text returns the Button's text. |
| 36 | func (b *Button) Text() string { |
nothing calls this directly
no test coverage detected