Pastey table_menu.e

namespace table_menu
 
constant tips = { -- here are the functions called by this menu: 
 "Select a table", 
 "", 
 "Create a new table", 
 "Rename currently selected table", 
 "Clear currently selected table", 
 "Delete currently selected table"} 
  
include GtkEngine.e 
 
--include table_funcs.e 
 
constant menu = create(GtkMenuItem,"_Tables"), 
 submenu = create(GtkMenu), 
    items = 
    create(GtkMenuItem,"gtk-apply#_Select",_("Select")) 
    & create(GtkSeparatorMenuItem) 
    & create(GtkMenuItem,"gtk-new",_("New")) 
    & create(GtkMenuItem,"error-correct-symbolic#_Rename",_("Rename")) 
    & create(GtkMenuItem,"gtk-clear",_("Clear")) 
    & create(GtkMenuItem,"gtk-delete",_("Delete")) 
 
 
for i = 1 to length(tips) do 
 set(items[i],"tooltip text",tips[i]) 
end for 
 
set(menu,"submenu",submenu) 
add(submenu,items) 
add("MainWin:MenuBar",menu) 
 
 
 
 

1. Comment by irv Oct 15, 2020

include table_funcs.e is commented out for testing the user-interface.