#include Once "window9.bi"

Function Menuitem(iNumberMenu As Long  ,titleMenu As HMENU , sTitle As String , iFlag As Long = 0) As HMENU Export
	
	Dim As HMENU itemMenu = gtk_image_menu_item_new_with_label(Strptr(sTitle))
	
	gtk_menu_shell_append (GTK_MENU_SHELL (titleMenu), itemMenu)
	
	g_object_set_data (Cast(Any Ptr, itemMenu), "IDmenu" , Cast(Any Ptr,Cast(Integer , iNumberMenu)))
	
	g_object_set_data (Cast(Any Ptr, itemMenu), "Check" , Cast(Any Ptr,Cast(Integer , 0)))
	
	gtk_image_menu_item_set_always_show_image(Cast(GtkImageMenuItem Ptr,itemMenu) , True)
	
	pGlobalTypeWindow9->ListMenus->addNodeSub(Cint(iNumberMenu), Cint(itemMenu) , Cint(titleMenu) )
	
	g_signal_connect_swapped (G_OBJECT (itemMenu), "activate",_
	G_CALLBACK (@EventActivateMenuSub), itemMenu)	
	
	gtk_widget_show (itemMenu)	
	
	Return itemMenu
	
End Function