Esempio n. 1
0
func (w *window) Title() string {
	return C.GoString(C.windowTitle(w.id))
}
Esempio n. 2
0
var classTypes = [nctypes]*classData{
	c_window: &classData{
		make: func(parentWindow C.id, alternate bool, s *sysData) C.id {
			return C.makeWindow(appDelegate)
		},
		show: func(what C.id) {
			C.windowShow(what)
		},
		hide: func(what C.id) {
			C.windowHide(what)
		},
		settext: func(what C.id, text C.id) {
			C.windowSetTitle(what, text)
		},
		text: func(what C.id, alternate bool) C.id {
			return C.windowTitle(what)
		},
	},
	c_button: &classData{
		make: func(parentWindow C.id, alternate bool, s *sysData) C.id {
			button := C.makeButton()
			C.buttonSetTargetAction(button, appDelegate)
			applyStandardControlFont(button)
			addControl(parentWindow, button)
			return button
		},
		show: controlShow,
		hide: controlHide,
		settext: func(what C.id, text C.id) {
			C.buttonSetText(what, text)
		},