How to add GtkCheckMenuItem to GtkMenu

aaaab3a0c80c41392a39a4f76156f7a3.png
1. create
GtkMenu()
as usual: add
GtkMenuBar()
to the window, create a
GtkMenu()
, add
GtkMenuItem()
;
2. create a
GtkCheckMenuItem()
with
GtkCheckMenuItem::new_with_label($label)
;
3. on the callback of activate signal, you can get if
GtkCheckMenuItem()
is checked or not by using
GtkCheckMenuItem::get_active()
;