示例#1
0
// Selectable turns on/off whether a menu option is "greyed out"
func (mi *MenuItem) Selectable(on bool) {
	if on {
		C.item_opts_on(mi.item, O_SELECTABLE)
	} else {
		C.item_opts_off(mi.item, O_SELECTABLE)
	}
}
示例#2
0
文件: menus.go 项目: mpatraw/gocurse
func (item *Item) OptsOn(opt ItemOptions) bool {
	return isOk(C.item_opts_on((*C.ITEM)(item), (C.Item_Options)(opt)))
}
示例#3
0
文件: menu.go 项目: zozor/gocurse
func (i *Item) OptsOn(opt ItemOptions) error {
	if C.item_opts_on(i.item, opt.itemOptions) == ERR {
		return Error
	}
	return nil
}