Example #1
0
// Option sets the options for the menu. See the O_* definitions for
// a list of values which can be OR'd together
func (m *Menu) Option(opts int, on bool) error {
	var err C.int
	if on {
		err = C.menu_opts_on(m.menu, C.Menu_Options(opts))
	} else {
		err = C.menu_opts_off(m.menu, C.Menu_Options(opts))
	}
	return ncursesError(syscall.Errno(err))
}
Example #2
0
func (menu *Menu) OptsOff(opt MenuOptions) bool {
	return isOk(C.menu_opts_off((*C.MENU)(menu), (C.Menu_Options)(opt)))
}
Example #3
0
func (m *Menu) OptsOff(opt MenuOptions) error {
	if C.menu_opts_off(m.menu, opt.menuOptions) == ERR {
		return Error
	}
	return nil
}