Package: gtk

Function gtk-radio-menu-item-join-group

Lambda List

gtk-radio-menu-item-join-group (menu-item group-source)

Arguments

menu-item -- a gtk-radio-menu-item widget
group-source -- a gtk-radio-menu-item widget whose group we are joining, or nil to remove menu-item from iths current group

Details

Joins a radio menu item to the group of another radio menu item.

This function should be used by language bindings to avoid the memory manangement of the opaque GSList of the functions gtk_radio_menu_item_get_group() and gtk_radio_menu_item_set_group().

Example

A common way to set up a group of radio menu item instances is:
(let (menu-item last-menu-item)
  ;; Add three menu items to a group
  (dolist (label '("First Menu Item" "Second Menu Item" "Third Menu Item"))
    (setf menu-item (gtk-radio-menu-item-new-with-label nil label))
    (gtk-radio-menu-item-join-group menu-item last-menu-item)
    (setf last-menu-item menu-item)))    
 

See also

2020-7-18