Code Sample |
/* XPM */ static char *empty[] = { "1 1 1 1", "o c None", "o", }; |
Code Sample |
-- label="command" my_menu={ Aterm="aterm -fn proggy", Dillo="dillo", Wings3D="wings" } size=11 -- text size bh=16 -- button height w=fltk:Fl_Window(Fl:w(),bh) w:callback(function() end) butt_pack=fltk:Fl_Pack(0,0,Fl:w(),bh) butt_pack:type(fltk.FL_HORIZONTAL) close=fltk:Fl_Button(0,0,bh,bh,"x") close:callback(function() os.exit() end) close:labelsize(size) butt={} cnt=1 for k,v in pairs(my_menu) do butt[cnt]=fltk:Fl_Button(0,0,100,30) butt[cnt]:label(k) butt[cnt]:labelsize(size) butt[cnt]:callback(function() os.execute(v.." &") end) cnt=cnt+1 end fltk:Fl_End() w:position(0,0) w:border(0) w:show() Fl:run() |