Example #1
0
func Canvas(opts ...interface{}) *iup.Ihandle {
	iup.OpenControlLib()

	ih := (*iup.Ihandle)(C.IupGLCanvas(nil))

	for _, o := range opts {
		switch o.(type) {
		default:
			iup.Decorate(ih, o)
		}
	}

	return ih
}
Example #2
0
File: pplot.go Project: DaviWei/iup
func Open(opts ...interface{}) *iup.Ihandle {
	iup.OpenControlLib()

	if libOpened == false {
		C.IupPPlotOpen()
		libOpened = true
	}

	ih := (*iup.Ihandle)(C.IupPPlot())

	for _, o := range opts {
		switch o.(type) {
		default:
			iup.Decorate(ih, o)
		}
	}

	return ih
}