示例#1
0
文件: group.go 项目: carriercomm/ui-1
// Destroy destroys the Group. If the Group has a child,
// Destroy calls Destroy on that as well.
func (g *Group) Destroy() {
	if g.child != nil {
		c := g.child
		g.SetChild(nil)
		c.Destroy()
	}
	C.uiControlDestroy(g.c)
}
示例#2
0
文件: box.go 项目: carriercomm/ui-1
// Destroy destroys the Box. If the Box has children,
// Destroy calls Destroy on those Controls as well.
func (b *Box) Destroy() {
	for len(b.children) != 0 {
		c := b.children[0]
		b.Delete(0)
		c.Destroy()
	}
	C.uiControlDestroy(b.c)
}
示例#3
0
文件: tab.go 项目: carriercomm/ui-1
// Destroy destroys the Tab. If the Tab has pages,
// Destroy calls Destroy on the pages's Controls as well.
func (t *Tab) Destroy() {
	for len(t.children) != 0 {
		c := t.children[0]
		t.Delete(0)
		c.Destroy()
	}
	C.uiControlDestroy(t.c)
}
示例#4
0
文件: window.go 项目: sjn1978/ui
// Destroy destroys the Window. If the Window has a child,
// Destroy calls Destroy on that as well.
func (w *Window) Destroy() {
	// first hide ourselves
	w.Hide()
	// get rid of the child
	if w.child != nil {
		c := w.child
		w.SetChild(nil)
		c.Destroy()
	}
	// unregister events
	delete(windows, w.w)
	// and finally destroy ourselves
	C.uiControlDestroy(w.c)
}
示例#5
0
文件: combobox.go 项目: duckbrain/ui
// Destroy destroys the Combobox.
func (c *Combobox) Destroy() {
	delete(comboboxes, c.cb)
	C.uiControlDestroy(c.c)
}
示例#6
0
// Destroy destroys the Button.
func (b *Button) Destroy() {
	delete(buttons, b.b)
	C.uiControlDestroy(b.c)
}
示例#7
0
文件: spinbox.go 项目: sjn1978/ui
// Destroy destroys the Spinbox.
func (s *Spinbox) Destroy() {
	delete(spinboxes, s.s)
	C.uiControlDestroy(s.c)
}
示例#8
0
// Destroy destroys the DateTimePicker.
func (d *DateTimePicker) Destroy() {
	C.uiControlDestroy(d.c)
}
示例#9
0
文件: label.go 项目: duckbrain/ui
// Destroy destroys the Label.
func (l *Label) Destroy() {
	C.uiControlDestroy(l.c)
}
示例#10
0
文件: entry.go 项目: duckbrain/ui
// Destroy destroys the Entry.
func (e *Entry) Destroy() {
	delete(entries, e.e)
	C.uiControlDestroy(e.c)
}
示例#11
0
// Destroy destroys the ProgressBar.
func (p *ProgressBar) Destroy() {
	C.uiControlDestroy(p.c)
}
示例#12
0
文件: separator.go 项目: duckbrain/ui
// Destroy destroys the Separator.
func (s *Separator) Destroy() {
	C.uiControlDestroy(s.c)
}
示例#13
0
// Destroy destroys the Slider.
func (s *Slider) Destroy() {
	delete(sliders, s.s)
	C.uiControlDestroy(s.c)
}
示例#14
0
文件: area.go 项目: duckbrain/ui
// Destroy destroys the Area.
func (a *Area) Destroy() {
	delete(areas, a.a)
	C.uiControlDestroy(a.c)
	unregisterAreaHandler(a.ah)
}
示例#15
0
// Destroy destroys the RadioButtons.
func (r *RadioButtons) Destroy() {
	C.uiControlDestroy(r.c)
}
示例#16
0
// Destroy destroys the Checkbox.
func (c *Checkbox) Destroy() {
	delete(checkboxes, c.c)
	C.uiControlDestroy(c.co)
}
示例#17
0
文件: control.go 项目: duckbrain/ui
// LibuiControlDestroy allows implementations of Control
// to call the libui function uiControlDestroy.
func LibuiControlDestroy(c uintptr) {
	C.uiControlDestroy(touiControl(c))
}