예제 #1
0
파일: gtkcalls_unix.go 프로젝트: UIKit0/ui
func gtk_combo_box_text_new_with_entry() *C.GtkWidget {
	w := C.gtk_combo_box_text_new_with_entry()
	// we need to set the entry's width-chars to achieve the arbitrary sizing we want
	// thanks to tristan in irc.gimp.net/#gtk+
	// in my tests, this is sufficient to get the effect we want; setting the cell renderer isn't necessary like it is with an entry-less combobox
	entry := togtkentry(C.gtk_bin_get_child((*C.GtkBin)(unsafe.Pointer(w))))
	C.gtk_entry_set_width_chars(entry, 0)
	return w
}
예제 #2
0
파일: bin.go 프로젝트: ziutek/gtk
func (b *Bin) GetChild() *Widget {
	w := new(Widget)
	w.SetPtr(glib.Pointer(C.gtk_bin_get_child(b.g())))
	return w
}
예제 #3
0
파일: area_unix.go 프로젝트: UIKit0/ui
func gtkAreaGetControl(scrollarea *C.GtkWidget) *C.GtkWidget {
	viewport := C.gtk_bin_get_child((*C.GtkBin)(unsafe.Pointer(scrollarea)))
	control := C.gtk_bin_get_child((*C.GtkBin)(unsafe.Pointer(viewport)))
	return control
}
예제 #4
0
파일: gtkcalls_unix.go 프로젝트: UIKit0/ui
func gtkMoveWidgetInLayout(container *C.GtkWidget, widget *C.GtkWidget, x int, y int) {
	layout := C.gtk_bin_get_child((*C.GtkBin)(unsafe.Pointer(container)))
	C.gtk_layout_move((*C.GtkLayout)(unsafe.Pointer(layout)), widget,
		C.gint(x), C.gint(y))
}
예제 #5
0
파일: gtkcalls_unix.go 프로젝트: UIKit0/ui
func gtkAddWidgetToLayout(container *C.GtkWidget, widget *C.GtkWidget) {
	layout := C.gtk_bin_get_child((*C.GtkBin)(unsafe.Pointer(container)))
	C.gtk_container_add((*C.GtkContainer)(unsafe.Pointer(layout)), widget)
}
예제 #6
0
파일: listbox_unix.go 프로젝트: UIKit0/ui
func getTreeViewFrom(widget *C.GtkWidget) *C.GtkTreeView {
	wid := C.gtk_bin_get_child((*C.GtkBin)(unsafe.Pointer(widget)))
	return (*C.GtkTreeView)(unsafe.Pointer(wid))
}