1if not modules then modules = { } end modules ['scrn-but'] = { 2 version = 1.001, 3 comment = "companion to scrn-but.mkiv", 4 author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", 5 copyright = "PRAGMA ADE / ConTeXt Development Team", 6 license = "see context related readme files" 7} 8 9local context = context 10local f_two_colon = string.formatters["%s:%s:%s"] 11local v_section = interfaces.variables.section 12 13local function registerbuttons(tag,register,language) 14 local data = sorters.definitions[language] 15 local orders = data and data.orders or sorters.definitions.default.orders 16 for i=1,#orders do 17 local order = orders[i] 18 context.doregistermenubutton(tag, order, f_two_colon(register,v_section,order) ) 19 end 20end 21 22interfaces.implement { 23 name = "registerbuttons", 24 actions = registerbuttons, 25 arguments = "3 strings", 26} 27 |