How do you create options with radio boxes or check boxes in the menu bar? I can't find any examples.
See standard library menu-bar.el
and C-h f menu-bar-make-toggle
. Here are some examples from standard Emacs libraries.
For a checkbox (from menu-bar.el
:
(define-key menu-bar-options-menu [case-fold-search]
(menu-bar-make-toggle
toggle-case-fold-search case-fold-search
"Ignore Case for Search"
"Case-Insensitive Search %s"
"Ignore letter-case in search commands"))
For a radio button (from bubbles.el
):
(define-key bubbles-game-theme-menu [bubbles-set-game-hard]
(list 'menu-item "Hard" 'bubbles-set-game-hard
:button '(:radio . (eq bubbles-game-theme 'hard))))
See also the Elisp manual, node Extended Menu Items.