2OWAM6JHKJSODFCQXMJI5WTCVSAQYUXZBBS4HPYEWKWJZPXI5SCQC MO5QZNU5MCKNZSIAXL3KF5TLGA5NVSFBZU2IA3L5WUCPVAUYC5GQC EZHO4TSWIYYUE73S6XQWIEF3HA3H7MKCNJOT27NTWTVSPVS2SL5QC R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC 72MX5RH3KPJEGB73354XAFNP7L4B3N63II6BK3Z3SAAGWEIBIE2QC YEICDDOOQCEO6IM6YDZOHNL7KPG6WR5OEDPFPKI2T6B7Y5WKHJXAC ET3DXVSEDGTJNX4C5TJ35CXSXNUVIUHBXYF6HCUFMVFQ2L7ESE5AC A3F4NKHEWN5J4F2T62MSFWJJYYM73XIX4KYIZ2WQ3AKMTZLC4Z4QC SKDZZG2AOA5A4VHGDFTNDQZIXN6JELKFAZXI3MBPRKIX35DJNQZQC 6JIMFQY7YBJCFHR4VLILTINAPRIIAYGWY22Z4EOT4BDEJCZRANWQC WLUHKHG5IHJJUNQWELNDTH3NI3U2RKXMOWD4CM63VCINWIQ4NJHQC X25YKED2GFLM4K6U5LTFZCSHGLM2HRT7SO4RKSLP4ARCHKZIAJUQC UJKBKUX3Q3FFCGIZB3P57Q2RM32CA6I3Q5OPHLR3LAE5RNFVAQRQC TTDLEUKK2SLTBKQJO7DGEX6MSX3MB6QKEBIWQHDB2O4BIV5GJ5LQC LVGODUR4JTC7AT6B5QZK6QV35VW3L6RFSLCNKQSSA2FGTCYROUTQC VPJQ3OFGU65HBMITNFYF6KJ2K3HK3ILMYAJRVEXB3D4CDD7YOQXAC 5LJNACHJYP5J3UXMYM6YZA6JZZXIIGM6W2QJUKZT7T6D6ICD77AQC ESXAEBLUP3QHNHBW6ZIIGYMYEYKVW5ODZRINWK77SS6D5AQVQTBQC SL76CLAK427PIBNBNHIKSCCUJYH5YS6542CEGMRFRU52LO7CB7WAC LRDM35CEK3OHXOTB7TEFJRL7P6PQWO5ZG3F2BVA7DIDFHBPJQ7KAC 2DVVKKVA6PJ7VKYLGPQ22AXUB6ZWFMPWB445PRDZJDNLURUFDNDQC FS2ITYYHBLFT66YUC3ENPFYI2HOYHOVEPQIN7NQR6KF5MEK4NKZAC 6PPPVJKRJ2GPFYUIGLNHJLOQKZGRZ27JMSBFWJ5GGQAQ7V7CQOHAC D4FEFHQCSILZFQ5VLWNXAIRZNUMCDNGJSM4UJ6T6FDMMIWYRYILQC KQWIMWJ5VRAXM7SFNWDSBZMQ6ZE3CZQTKZHVM5ZQCW4RHPTI64MQC PNBKVYZ4ANUAZNQN6KEWYNDF7552ROZPNAPRJE7Q6O7ZZJMJ3S3QC CZRMAMSBRVX26IXKHNPG6M3YSWMOZTM73X3XHAMBDSNETTFVRCUQC on.mouse_press = function(x,y, mouse_button)for _,editor in ipairs(Editors) doeditor.selection1 = {}endfor i,editor in ipairs(Editors) doif x >= editor.left and x <= editor.right thenCursor_editor = editoredit.mouse_press(editor, x,y, mouse_button)breakendendend
on.mouse_press = function(x,y, mouse_button)for _,editor in ipairs(Editors) doeditor.selection1 = {}endfor _,editor in ipairs(Editors) doif x >= editor.left and x <= editor.right thenCursor_editor = editoredit.mouse_press(editor, x,y, mouse_button)breakendendend
{"resync_editors":70,"on.keychord_press":74,"on.key_release":15,"Cursor_editor":16,"on.save_settings":75,"on.mouse_press":63,"Font_height":76,"on.mouse_release":59,"on.load_settings":79,"on.initialize":82,"fw_parent":81,"fw_app":"broadsheet","Editors":6,"on.text_input":69,"on":1,"on.draw":60,"initialize_editors":81}
on.keychord_press = function(chord, key)assert(#Editors > 0)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
on.keychord_press = function(chord, key)local old_editor = Editors[1]Editors = {}if chord == 'C-0' theninitialize_editors( --[[font height]] 20, old_editor.filename, old_editor.screen_top1)elseif chord == 'C-=' theninitialize_editors(old_editor.font_height+2, old_editor.filename, old_editor.screen_top1)elseif chord == 'C--' theninitialize_editors(old_editor.font_height-2, old_editor.filename, old_editor.screen_top1)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
{"on.mouse_press":63,"on.mouse_release":59,"Filename":85,"Screen_top":87,"on.text_input":69,"initialize_editors":81,"on.draw":60,"resync_editors":70,"Editors":6,"on":1,"on.save_settings":88,"on.initialize":94,"Font_height":86,"on.keychord_press":74,"fw_app":"broadsheet","on.key_release":15,"on.load_settings":95,"Cursor_editor":16,"fw_parent":94}
{"resync_editors":70,"on.keychord_press":74,"on.key_release":15,"Cursor_editor":16,"on.save_settings":88,"on.mouse_press":63,"Font_height":86,"on.mouse_release":59,"on.load_settings":95,"fw_app":"broadsheet","on.initialize":94,"initialize_editors":96,"Filename":85,"on.draw":60,"on":1,"Screen_top":87,"Editors":6,"fw_parent":97,"on.text_input":69,"on.resize":98}
on.keychord_press = function(chord, key)assert(#Editors > 0)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-f' or chord == 'backspace' or chord == 'return' then-- find in just the left-most pane for nowedit.keychord_press(Editors[1], chord, key)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
on.keychord_press = function(chord, key)assert(#Editors > 0)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-f' or chord == 'backspace' or chord == 'return' then-- find in just the left-most pane for nowedit.keychord_press(Editors[1], chord, key)elseif chord == 'pageup' or chord == 'pagedown' thenedit.keychord_press(Editors[1], chord, key)resync_editors()endend
on.keychord_press = function(chord, key)assert(#Editors > 0)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-f' or chord == 'backspace' or chord == 'return' then-- find in just the left-most pane for nowedit.keychord_press(Editors[1], chord, key)elseif chord == 'pageup' or chord == 'pagedown' thenfor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
{"on.key_release":15,"Cursor_editor":16,"on.file_drop":108,"on.mouse_press":63,"on.mouse_release":59,"Filename":85,"Screen_top":87,"initialize_editors":96,"on.draw":105,"fw_app":"broadsheet","resync_editors":107,"fw_parent":107,"on.load_settings":95,"on.resize":98,"on.keychord_press":99,"on":1,"Editors":6,"on.text_input":69,"on.save_settings":88,"on.initialize":94,"Font_height":86}
{"on.load_settings":95,"fw_parent":104,"initialize_editors":96,"fw_app":"broadsheet","on.keychord_press":99,"Screen_top":87,"on.text_input":69,"on":1,"resync_editors":70,"on.initialize":94,"on.resize":98,"Editors":6,"on.key_release":15,"on.mouse_press":63,"Cursor_editor":16,"on.save_settings":88,"on.draw":105,"Font_height":86,"Filename":85,"on.mouse_release":59}
on.initialize = function(arg)if #arg == 0 or arg[1] == Filename thenif Filename == nil then error('provide a filename') endinitialize_editors(Font_height, Filename, Screen_top)elseinitialize_editors(Font_height, arg[1], {line=1, pos=1})endend
{"on.keychord_press":73,"on.initialize":36,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"on":1,"fw_parent":72,"on.text_input":69,"on.mouse_release":59,"on.mouse_press":63,"Editors":6,"resync_editors":70,"initialize_editors":67,"fw_app":"broadsheet"}
{"on.text_input":69,"on.mouse_release":59,"fw_app":"broadsheet","resync_editors":70,"initialize_editors":67,"on":1,"on.keychord_press":74,"on.initialize":36,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"Editors":6,"on.mouse_press":63,"fw_parent":73}
initialize_editors = function(font_height, filename, screen_top)Editors = {}love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's lineslove.window.setTitle('broadsheet.love - ' .. filename)Editors[1].filename = filenameload_from_disk(Editors[1])Text.redraw_all(Editors[1])for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].linesText.redraw_all(editor) -- TODO: share fragments between editorsendEditors[1].screen_top1 = screen_topresync_editors()end
{"on.mouse_release":59,"resync_editors":70,"on.resize":98,"initialize_editors":96,"on.save_settings":88,"on.draw":60,"Font_height":86,"Editors":6,"on.load_settings":95,"on":1,"Filename":85,"on.keychord_press":99,"on.key_release":15,"Screen_top":87,"fw_parent":98,"fw_app":"broadsheet","on.text_input":69,"on.mouse_press":63,"Cursor_editor":16,"on.initialize":94}
{"initialize_editors":96,"Filename":85,"on.draw":60,"Screen_top":87,"Editors":6,"on.text_input":69,"resync_editors":70,"on.resize":97,"on.keychord_press":74,"on.key_release":15,"Cursor_editor":16,"on.save_settings":88,"on.mouse_press":63,"Font_height":86,"on.mouse_release":59,"on.load_settings":95,"fw_parent":96,"on":1,"on.initialize":94,"fw_app":"broadsheet"}
on.initialize = function(arg)local font_height = 20love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthprint(App.screen.width, editor_width)local width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = arg[1]load_from_disk(Editors[1])Text.redraw_all(Editors[1])edit.draw(Editors[1], Text_color)for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].lineseditor.line_cache = Editors[1].line_cacheeditor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}editor.cursor1 = {line=editor.screen_top1.line, pos=editor.screen_top1.pos}endend
{"initialize_editors":96,"Filename":85,"on.draw":105,"Screen_top":87,"Editors":6,"on.text_input":69,"on":1,"resync_editors":107,"on.keychord_press":99,"on.key_release":15,"Cursor_editor":16,"on.save_settings":88,"fw_app":"broadsheet","Font_height":86,"on.mouse_release":59,"on.initialize":94,"on.load_settings":95,"on.resize":98,"on.mouse_press":63,"fw_parent":106}
{"Editors":6,"on.text_input":69,"resync_editors":70,"on.keychord_press":74,"fw_parent":92,"Cursor_editor":16,"on.save_settings":88,"on.mouse_press":63,"Font_height":86,"on":1,"on.load_settings":92,"on.mouse_release":59,"on.initialize":94,"fw_app":"broadsheet","initialize_editors":81,"Filename":85,"on.draw":60,"on.key_release":15,"Screen_top":87}
on.mouse_press = function(x,y, mouse_button)for _,editor in ipairs(Editors) doeditor.selection1 = {}endfor _,editor in ipairs(Editors) doif x >= editor.left and x <= editor.right thenCursor_editor = editoredit.mouse_press(editor, x,y, mouse_button)breakendendend
on.draw = function()for i,editor in ipairs(Editors) doedit.draw(editor, Text_color, --[[hide cursor]] true)print(editor.screen_bottom1.line, editor.screen_bottom1.pos)if editor.screen_top1.line == #editor.lines thenText.populate_screen_line_starting_pos(editor, #editor.lines)local start = editor.line_cache[#editor.lines].screen_line_starting_posif editor.screen_top1.pos >= start[#start] thenbreakendendendend
on.keychord_press = function(chord, key)local old_editor = Editors[1]Editors = {}if chord == 'C-0' theninitialize_editors( --[[font height]] 20, old_editor.filename, old_editor.screen_top1)elseif chord == 'C-=' theninitialize_editors(old_editor.font_height+2, old_editor.filename, old_editor.screen_top1)elseif chord == 'C--' theninitialize_editors(old_editors.font_height-2, old_editor.filename, old_editor.screen_top1)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
on.keychord_press = function(chord, key)assert(#Editors > 0)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)elseprint(chord)for _,editor in ipairs(Editors) doprint(editor.selection1.line, editor.selection1.pos)edit.keychord_press(editor, chord, key)endendend
{"on.mouse_press":63,"on.mouse_release":59,"Filename":85,"Screen_top":87,"on.text_input":69,"initialize_editors":96,"on.draw":60,"resync_editors":70,"Editors":6,"on":1,"on.save_settings":88,"on.initialize":94,"Font_height":86,"on.keychord_press":74,"fw_app":"broadsheet","on.key_release":15,"on.load_settings":95,"Cursor_editor":16,"fw_parent":95}
on.initialize = function(arg)if #arg == 0 or arg[1] == Filename thenif Filename == nil then error('provide a filename')initialize_editors(Font_height, Filename, Screen_top)elseinitialize_editors(Font_height, arg[1], {line=1, pos=1})endend
initialize_editors = function(font_height, filename, screen_top)Editors = {}love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = filenameload_from_disk(Editors[1])Text.redraw_all(Editors[1])for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].linesText.redraw_all(editor) -- TODO: share fragments between editorsendEditors[1].screen_top1 = screen_topresync_editors()end
{"fw_app":"broadsheet","on.keychord_press":39,"initialize_editors":35,"on.key_release":15,"Cursor_editor":16,"on.mouse_press":20,"on":1,"on.initialize":36,"on.mouse_release":19,"Editors":6,"on.draw":12,"fw_parent":38}
{"on.mouse_release":19,"on.key_release":15,"initialize_editors":43,"fw_parent":43,"on.initialize":36,"on":1,"on.draw":12,"Cursor_editor":16,"on.keychord_press":44,"Editors":6,"fw_app":"broadsheet","on.mouse_press":20}
on.keychord_press = function(chord, key)assert(#Editors > 0)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-f' or chord == 'backspace' then-- find in just the left-most pane for nowedit.keychord_press(Editors[1], chord, key)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
{"on.load_settings":95,"fw_parent":103,"initialize_editors":96,"fw_app":"broadsheet","on.keychord_press":99,"Screen_top":87,"on.text_input":69,"on":1,"resync_editors":70,"on.initialize":94,"on.resize":98,"Editors":6,"on.key_release":15,"on.mouse_press":63,"Cursor_editor":16,"on.save_settings":88,"on.draw":104,"Font_height":86,"Filename":85,"on.mouse_release":59}
on.mouse_press = function(x,y, mouse_button)for _,editor in ipairs(Editors) doeditor.selection1 = {}endfor _,editor in ipairs(Editors) doif x >= editor.left and x <= editor.right thenCursor_editor = editoredit.mouse_press(editor, x,y, mouse_button)breakendend
{"Cursor_editor":16,"on.save_settings":75,"on":1,"Font_height":76,"on.mouse_release":59,"on.load_settings":79,"on.initialize":80,"on.draw":60,"Editors":6,"on.text_input":69,"initialize_editors":81,"fw_parent":80,"resync_editors":70,"fw_app":"broadsheet","on.keychord_press":74,"on.mouse_press":63,"on.key_release":15}
initialize_editors = function(font_height, filename, screen_top)Editors = {}love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = filenameload_from_disk(Editors[1])Text.redraw_all(Editors[1])Editors[1].screen_top = screen_topedit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].linesText.redraw_all(editor) -- TODO: share fragments between editorseditor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}editor.cursor1 = {line=editor.screen_top1.line, pos=editor.screen_top1.pos}edit.draw(editor, Text_color) -- initialize screen_bottom1endend
{"Editors":6,"on.text_input":69,"resync_editors":70,"on.keychord_press":74,"on.key_release":15,"fw_app":"broadsheet","on.save_settings":88,"on.mouse_press":63,"Font_height":86,"on":1,"on.load_settings":92,"fw_parent":92,"on.mouse_release":59,"Cursor_editor":16,"initialize_editors":81,"Filename":85,"on.draw":60,"on.initialize":93,"Screen_top":87}
resync_editors = function()edit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors dolocal editor = Editors[e]editor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}-- scroll down one linelocal _, screen_line_index = Text.pos_at_start_of_screen_line(editor, editor.cursor1)if screen_line_index < #editor.line_cache[editor.screen_top1.line].screen_line_starting_pos theneditor.screen_top1.pos = editor.line_cache[editor.screen_top1.line].screen_line_starting_pos[screen_line_index+1]elseeditor.screen_top1 = {line=editor.screen_top1.line+1, pos=1}endedit.draw(Editors[e], Text_color) -- initialize screen_bottom1endend
{"on.text_input":69,"on.mouse_release":59,"on":1,"resync_editors":70,"fw_parent":71,"on.keychord_press":72,"fw_app":"broadsheet","on.initialize":36,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"initialize_editors":67,"Editors":6,"on.mouse_press":63}
{"initialize_editors":110,"Filename":85,"on.draw":105,"Screen_top":87,"Editors":6,"on.text_input":69,"resync_editors":107,"on.resize":98,"fw_parent":109,"on.key_release":15,"fw_app":"broadsheet","Cursor_editor":16,"on.save_settings":88,"on.mouse_press":63,"Font_height":86,"on.mouse_release":59,"on.load_settings":95,"on":1,"on.initialize":109,"on.file_drop":108,"on.keychord_press":99}
on.keychord_press = function(chord, key)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
{"on.keychord_press":45,"initialize_editors":62,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"Editors":6,"fw_parent":61,"on.mouse_release":59,"fw_app":"broadsheet","on":1,"on.mouse_press":61,"on.initialize":36}
on.draw = function()for i,editor in ipairs(Editors) doedit.draw(editor, Text_color, --[[hide cursor]] true)if editor.screen_top1.line == #editor.lines thenprint(editor.screen_bottom1.line, editor.screen_bottom1.pos)Text.populate_screen_line_starting_pos(editor, #editor.lines)local start = editor.line_cache[#editor.lines].screen_line_starting_posif editor.screen_top1.pos >= start[#start] thenbreakendendendend
{"initialize_editors":96,"Filename":85,"on.draw":105,"Screen_top":87,"Editors":6,"on.text_input":69,"on":1,"resync_editors":106,"on.keychord_press":99,"on.key_release":15,"Cursor_editor":16,"on.save_settings":88,"fw_app":"broadsheet","Font_height":86,"on.mouse_release":59,"on.initialize":94,"on.load_settings":95,"on.resize":98,"on.mouse_press":63,"fw_parent":105}
{"fw_app":"broadsheet","on":1,"on.keychord_press":38,"initialize_editors":35,"on.key_release":15,"on.draw":12,"Cursor_editor":16,"fw_parent":37,"Editors":6,"on.initialize":36,"on.mouse_press":20,"on.mouse_release":19}
{"Editors":6,"on.text_input":69,"on":1,"resync_editors":70,"on.keychord_press":74,"on.key_release":15,"Cursor_editor":16,"on.save_settings":75,"on.mouse_press":63,"Font_height":76,"on.mouse_release":59,"on.load_settings":79,"initialize_editors":67,"on.initialize":80,"fw_parent":79,"on.draw":60,"fw_app":"broadsheet"}
{"Editors":6,"on.text_input":69,"resync_editors":70,"on.keychord_press":74,"on.key_release":15,"fw_app":"broadsheet","on.save_settings":88,"on.mouse_press":63,"Font_height":86,"on":1,"on.load_settings":92,"fw_parent":91,"on.mouse_release":59,"Cursor_editor":16,"initialize_editors":81,"Filename":85,"on.draw":60,"on.initialize":90,"Screen_top":87}
on.mouse_press = function(x,y, mouse_button)for _,editor in ipairs(Editors) doeditor.selection1 = {}endfor i,editor in ipairs(Editors) doprint(i, editor.cursor1.line, editor.cursor1.pos)if x >= editor.left and x <= editor.right thenCursor_editor = editoredit.mouse_press(editor, x,y, mouse_button)breakendendend
{"on.load_settings":95,"fw_parent":102,"initialize_editors":96,"fw_app":"broadsheet","on.keychord_press":99,"Screen_top":87,"on.text_input":69,"on":1,"resync_editors":70,"on.initialize":94,"on.resize":98,"Editors":6,"on.key_release":15,"on.mouse_press":63,"Cursor_editor":16,"on.save_settings":88,"on.draw":103,"Font_height":86,"Filename":85,"on.mouse_release":59}
on.initialize = function(arg)local font_height = 20love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthprint(App.screen.width, editor_width)local width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = arg[1]load_from_disk(Editors[1])Text.redraw_all(Editors[1])edit.draw(Editors[1], Text_color)for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].lineseditor.line_cache = Editors[1].line_cacheeditor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}editor.cursor1 = {line=editor.screen_top1.line, pos=editor.screen_top1.pos}endend
on.keychord_press = function(chord, key)assert(#Editors > 0)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-f' then-- find in just the left-most pane for nowedit.keychord_press(Editors[1], chord, key)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
{"initialize_editors":96,"Filename":85,"on.draw":105,"Screen_top":87,"Editors":6,"on.text_input":69,"resync_editors":107,"on.resize":98,"fw_parent":108,"on.key_release":15,"fw_app":"broadsheet","Cursor_editor":16,"on.save_settings":88,"on.mouse_press":63,"Font_height":86,"on.mouse_release":59,"on.load_settings":95,"on":1,"on.initialize":109,"on.file_drop":108,"on.keychord_press":99}
{"on.keychord_press":45,"initialize_editors":43,"fw_parent":60,"on.draw":60,"Cursor_editor":16,"Editors":6,"fw_app":"broadsheet","on":1,"on.mouse_release":59,"on.initialize":36,"on.key_release":15,"on.mouse_press":61}
{"fw_app":"broadsheet","on.text_input":69,"on.initialize":36,"resync_editors":70,"on.draw":60,"on":1,"fw_parent":70,"Editors":6,"on.mouse_release":59,"on.mouse_press":63,"initialize_editors":67,"on.key_release":15,"on.keychord_press":71,"Cursor_editor":16}
on.keychord_press = function(chord, key)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
{"on.mouse_release":59,"initialize_editors":67,"on.save_settings":75,"fw_parent":78,"Font_height":76,"on.text_input":69,"resync_editors":70,"on.load_settings":79,"on":1,"on.keychord_press":74,"on.initialize":78,"on.key_release":15,"Editors":6,"Cursor_editor":16,"on.draw":60,"on.mouse_press":63,"fw_app":"broadsheet"}
initialize_editors = function(font_height, filename, screen_top)Editors = {}love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = filenameload_from_disk(Editors[1])Text.redraw_all(Editors[1])Editors[1].screen_top = screen_topedit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].lineseditor.line_cache = Editors[1].line_cacheeditor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}editor.cursor1 = {line=editor.screen_top1.line, pos=editor.screen_top1.pos}edit.draw(editor, Text_color) -- initialize screen_bottom1endend
on.draw = function()for i,editor in ipairs(Editors) doedit.draw(editor, Text_color, --[[hide cursor]] true)if editor.screen_top1.line == #editor.lines thenText.populate_screen_line_starting_pos(editor, #editor.lines)local start = editor.line_cache[#editor.lines].screen_line_starting_posif editor.screen_top1.pos >= start[#start] thenbreakendendendend
{"on.text_input":69,"resync_editors":70,"on":1,"fw_app":"broadsheet","on.key_release":15,"Cursor_editor":16,"on.save_settings":88,"on.mouse_press":63,"Font_height":86,"on.mouse_release":59,"on.load_settings":91,"on.initialize":90,"initialize_editors":81,"Filename":85,"on.draw":60,"on.keychord_press":74,"Screen_top":87,"Editors":6,"fw_parent":90}
{"fw_app":"broadsheet","on.keychord_press":37,"initialize_editors":35,"on.key_release":15,"on.draw":12,"Cursor_editor":16,"on":1,"Editors":6,"on.mouse_release":19,"on.mouse_press":20,"on.initialize":36,"fw_parent":36}
{"Editors":6,"fw_parent":59,"initialize_editors":43,"on.key_release":15,"on":1,"Cursor_editor":16,"on.mouse_press":58,"on.mouse_release":59,"on.initialize":36,"on.keychord_press":45,"on.draw":60,"fw_app":"broadsheet"}
resync_editors = function()edit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors doEditors[e].screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}edit.draw(Editors[e], Text_color) -- initialize screen_bottom1endend
{"on.mouse_release":19,"on.key_release":15,"initialize_editors":43,"fw_parent":42,"on.initialize":36,"on":1,"on.draw":12,"Cursor_editor":16,"on.keychord_press":42,"Editors":6,"fw_app":"broadsheet","on.mouse_press":20}
{"on.load_settings":95,"fw_parent":101,"initialize_editors":96,"fw_app":"broadsheet","on.keychord_press":99,"Screen_top":87,"on.text_input":69,"on":1,"resync_editors":70,"on.initialize":94,"on.resize":98,"Editors":6,"on.key_release":15,"on.mouse_press":63,"Cursor_editor":16,"on.save_settings":88,"on.draw":102,"Font_height":86,"Filename":85,"on.mouse_release":59}
on.initialize = function(arg)print(#arg, Filename)if #arg == 0 or arg[1] == Filename theninitialize_editors(Font_height, Filename, Screen_top)elseprint('new file; reset cursor')initialize_editors(Font_height, arg[1], {line=1, pos=1})endend
{"on.text_input":69,"on.mouse_release":59,"Font_height":76,"on.save_settings":75,"fw_app":"broadsheet","resync_editors":70,"initialize_editors":67,"on":1,"on.keychord_press":74,"on.initialize":78,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"Editors":6,"on.mouse_press":63,"fw_parent":77}
{"fw_app":"broadsheet","on.text_input":69,"on.initialize":36,"resync_editors":70,"on.draw":60,"on":1,"fw_parent":69,"Editors":6,"on.mouse_release":59,"on.mouse_press":63,"initialize_editors":67,"on.key_release":15,"on.keychord_press":45,"Cursor_editor":16}
{"Editors":6,"on":1,"on.mouse_release":19,"initialize_editors":35,"on.initialize":36,"fw_app":"broadsheet","on.keychord_press":34,"fw_parent":35,"on.key_release":15,"on.draw":12,"Cursor_editor":16,"on.mouse_press":20}
{"initialize_editors":43,"on.key_release":15,"on.draw":56,"Cursor_editor":16,"Editors":6,"fw_parent":58,"fw_app":"broadsheet","on.initialize":36,"on.mouse_release":59,"on.mouse_press":58,"on":1,"on.keychord_press":45}
on.draw = function()for i,editor in ipairs(Editors) doedit.draw(editor, Text_color, --[[hide cursor]] true)if editor.screen_top1.line == #editor.lines thenlocal start = editor.line_cache[#editor.lines].screen_line_starting_posif editor.screen_top1.pos >= start[#start] thenbreakendendendend
{"on.keychord_press":74,"on.key_release":15,"Cursor_editor":16,"on.mouse_press":63,"Filename":85,"on.mouse_release":59,"Screen_top":87,"fw_parent":89,"fw_app":"broadsheet","initialize_editors":81,"resync_editors":70,"on.draw":60,"Editors":6,"on.save_settings":88,"on":1,"Font_height":86,"on.initialize":90,"on.text_input":69,"on.load_settings":79}
on.keychord_press = function(chord, key)assert(#Editors > 0)local old_editor = Editors[1]Editors = {}if chord == 'C-0' theninitialize_editors( --[[font height]] 20, old_editor.filename, old_editor.screen_top1)elseif chord == 'C-=' theninitialize_editors(old_editor.font_height+2, old_editor.filename, old_editor.screen_top1)elseif chord == 'C--' theninitialize_editors(old_editor.font_height-2, old_editor.filename, old_editor.screen_top1)elseprint(chord)for _,editor in ipairs(Editors) doprint(editor.selection1.line, editor.selection1.pos)edit.keychord_press(editor, chord, key)endendend
{"on.text_input":69,"on.mouse_release":59,"Font_height":76,"on.save_settings":75,"fw_app":"broadsheet","resync_editors":70,"initialize_editors":67,"on":1,"on.keychord_press":74,"on.initialize":77,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"Editors":6,"on.mouse_press":63,"fw_parent":76}
{"fw_app":"broadsheet","on.text_input":69,"on.initialize":36,"resync_editors":68,"on.draw":60,"on":1,"fw_parent":68,"Editors":6,"on.mouse_release":59,"on.mouse_press":63,"initialize_editors":67,"on.key_release":15,"on.keychord_press":45,"Cursor_editor":16}
on.initialize = function(arg)local font_height = 20love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftbreakuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = arg[1]load_from_disk(Editors[1])Text.redraw_all(Editors[1])edit.draw(Editors[1], Text_color)for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].lineseditor.line_cache = Editors[1].line_cacheeditor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}editor.cursor1 = {line=editor.screen_top1.line, pos=editor.screen_top1.pos}endend
{"on.load_settings":95,"fw_parent":99,"initialize_editors":96,"fw_app":"broadsheet","on.keychord_press":99,"Screen_top":87,"on.text_input":69,"on":1,"resync_editors":70,"on.initialize":94,"on.resize":98,"Editors":6,"on.key_release":15,"on.mouse_press":63,"Cursor_editor":16,"on.save_settings":88,"on.draw":101,"Font_height":86,"Filename":85,"on.mouse_release":59}
{"on.mouse_release":19,"on.key_release":15,"initialize_editors":35,"fw_parent":41,"on.initialize":36,"on":1,"on.draw":12,"Cursor_editor":16,"on.keychord_press":42,"Editors":6,"fw_app":"broadsheet","on.mouse_press":20}
{"initialize_editors":43,"on.key_release":15,"on.draw":56,"Cursor_editor":16,"Editors":6,"fw_parent":57,"fw_app":"broadsheet","on.initialize":36,"on.mouse_release":48,"on.mouse_press":58,"on":1,"on.keychord_press":45}
{"on.text_input":69,"on.mouse_release":59,"Font_height":76,"on.save_settings":75,"fw_app":"broadsheet","resync_editors":70,"initialize_editors":67,"on":1,"on.keychord_press":74,"on.initialize":36,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"Editors":6,"on.mouse_press":63,"fw_parent":75}
resync_editors = function()edit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors doEditors[e].screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}edit.draw(Editors[i], Text_color) -- initialize screen_bottom1endend
{"on.draw":60,"Editors":6,"on.text_input":69,"Filename":85,"fw_parent":88,"resync_editors":70,"fw_app":"broadsheet","on.keychord_press":74,"on.key_release":15,"Cursor_editor":16,"on.save_settings":88,"on.mouse_press":63,"Font_height":86,"on.mouse_release":59,"on.load_settings":79,"Screen_top":87,"initialize_editors":81,"on.initialize":89,"on":1}
on.draw = function()for i,editor in ipairs(Editors) doedit.draw(editor, Text_color, --[[hide cursor]] true)if editor.screen_top1.line == #editor.lines thenlocal start = editor.line_cache[#editor.lines].screen_line_starting_posif editor.screen_top1.pos >= start[#start] thenbreakendendend
{"fw_app":"broadsheet","on.text_input":66,"on.initialize":36,"resync_editors":68,"on.draw":60,"on":1,"fw_parent":67,"Editors":6,"on.mouse_release":59,"on.mouse_press":63,"initialize_editors":67,"on.key_release":15,"on.keychord_press":45,"Cursor_editor":16}
on.mouse_press = function(x,y, mouse_button)for _,editor in ipairs(Editors) doeditor.selection1 = {}endfor i,editor in ipairs(Editors) doif x >= editor.left and x <= editor.right thenprint('column', i, editor.selection1.line, editor.selection1.pos)Cursor_editor = editoredit.mouse_press(editor, x,y, mouse_button)print('after mouse press', i, editor.selection1.line, editor.selection1.pos)breakendendend
on.keychord_press = function(chord, key)assert(#Editors > 0)local old_editor = Editors[1]Editors = {}if chord == 'C-0' theninitialize_editors( --[[font height]] 20, old_editor.filename, old_editor.screen_top1)elseif chord == 'C-=' theninitialize_editors(old_editor.font_height+2, old_editor.filename, old_editor.screen_top1)elseif chord == 'C--' theninitialize_editors(old_editor.font_height-2, old_editor.filename, old_editor.screen_top1)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
{"on.text_input":69,"on.mouse_release":59,"on.save_settings":75,"fw_app":"broadsheet","resync_editors":70,"initialize_editors":67,"on":1,"on.keychord_press":74,"on.initialize":36,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"Editors":6,"on.mouse_press":63,"fw_parent":74}
{"on.load_settings":95,"fw_parent":99,"initialize_editors":96,"fw_app":"broadsheet","on.keychord_press":99,"Screen_top":87,"on.text_input":69,"on":1,"resync_editors":70,"on.initialize":94,"on.resize":98,"Editors":6,"on.key_release":15,"on.mouse_press":63,"Cursor_editor":16,"on.save_settings":88,"on.draw":100,"Font_height":86,"Filename":85,"on.mouse_release":59}
initialize_editors = function(font_height, filename, screen_top)love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = filenameload_from_disk(Editors[1])Text.redraw_all(Editors[1])Editors[1].screen_top = screen_topedit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].lineseditor.line_cache = Editors[1].line_cacheeditor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}editor.cursor1 = {line=editor.screen_top1.line, pos=editor.screen_top1.pos}edit.draw(editor, Text_color) -- initialize screen_bottom1endend
{"initialize_editors":43,"on.key_release":15,"on.draw":56,"Cursor_editor":16,"Editors":6,"fw_parent":56,"fw_app":"broadsheet","on.initialize":36,"on.mouse_release":48,"on.mouse_press":57,"on":1,"on.keychord_press":45}
{"on.draw":60,"Editors":6,"on.text_input":69,"Filename":85,"fw_parent":87,"resync_editors":70,"fw_app":"broadsheet","on.keychord_press":74,"on.key_release":15,"Cursor_editor":16,"on.save_settings":88,"on.mouse_press":63,"Font_height":86,"on.mouse_release":59,"on.load_settings":79,"Screen_top":87,"initialize_editors":81,"on.initialize":82,"on":1}
{"on.draw":12,"Cursor_editor":16,"on.mouse_press":20,"fw_parent":40,"on.mouse_release":19,"on.initialize":36,"Editors":6,"on":1,"fw_app":"broadsheet","on.keychord_press":41,"initialize_editors":35,"on.key_release":15}
{"Editors":6,"on":1,"on.mouse_release":19,"initialize_editors":35,"on.initialize":33,"fw_app":"broadsheet","on.keychord_press":34,"fw_parent":34,"on.key_release":15,"on.draw":12,"Cursor_editor":16,"on.mouse_press":20}
{"on.draw":60,"Editors":6,"on.text_input":69,"Filename":85,"fw_parent":86,"resync_editors":70,"fw_app":"broadsheet","on.keychord_press":74,"on.key_release":15,"Cursor_editor":16,"on.save_settings":83,"on.mouse_press":63,"Font_height":86,"on.mouse_release":59,"on.load_settings":79,"Screen_top":87,"initialize_editors":81,"on.initialize":82,"on":1}
{"on.keychord_press":45,"initialize_editors":43,"on.key_release":15,"on.draw":56,"Cursor_editor":16,"Editors":6,"on.mouse_press":49,"fw_parent":55,"on":1,"on.mouse_release":48,"on.initialize":36,"fw_app":"broadsheet"}
initialize_editors = function(font_height, filename, screen_top)Editors = {}love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = filenameload_from_disk(Editors[1])Text.redraw_all(Editors[1])for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].linesText.redraw_all(editor) -- TODO: share fragments between editorsendEditors[1].screen_top = screen_topresync_editors()end
on.initialize = function(arg)local font_height = 20love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftbreakuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = arg[1]load_from_disk(Editors[1])Text.redraw_all(Editors[1])for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].lineseditor.line_cache = Editors[1].line_cacheendend
on.keychord_press = function(chord, key)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].screen_top1)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
{"on.draw":60,"Editors":6,"on.text_input":69,"Filename":85,"fw_parent":85,"resync_editors":70,"fw_app":"broadsheet","on.keychord_press":74,"on.key_release":15,"Cursor_editor":16,"on.save_settings":83,"on.mouse_press":63,"Font_height":86,"on.mouse_release":59,"on.load_settings":79,"initialize_editors":81,"on.initialize":82,"on":1}
{"on.keychord_press":45,"initialize_editors":43,"on.key_release":15,"on.draw":55,"Cursor_editor":16,"Editors":6,"on.mouse_press":49,"fw_parent":54,"on":1,"on.mouse_release":48,"on.initialize":36,"fw_app":"broadsheet"}
{"Editors":6,"on":1,"on.mouse_release":19,"initialize_editors":32,"on.initialize":33,"fw_app":"broadsheet","on.keychord_press":34,"fw_parent":33,"on.key_release":15,"on.draw":12,"Cursor_editor":16,"on.mouse_press":20}
{"fw_app":"broadsheet","on.text_input":66,"on.initialize":36,"on.draw":60,"on":1,"fw_parent":66,"Editors":6,"on.mouse_release":59,"on.mouse_press":63,"initialize_editors":67,"on.key_release":15,"on.keychord_press":45,"Cursor_editor":16}
{"on.draw":60,"Editors":6,"on.text_input":69,"Filename":85,"fw_parent":84,"resync_editors":70,"fw_app":"broadsheet","on.keychord_press":74,"on.key_release":15,"Cursor_editor":16,"on.save_settings":83,"on.mouse_press":63,"Font_height":84,"on.mouse_release":59,"on.load_settings":79,"initialize_editors":81,"on.initialize":82,"on":1}
{"fw_app":"broadsheet","on.keychord_press":45,"initialize_editors":62,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"on.initialize":36,"Editors":6,"on.mouse_press":63,"on.text_input":66,"on.mouse_release":59,"fw_parent":64,"on":1}
{"Editors":6,"on":1,"on.mouse_release":19,"initialize_editors":32,"on.initialize":33,"fw_app":"broadsheet","on.keychord_press":31,"fw_parent":32,"on.key_release":15,"on.draw":12,"Cursor_editor":16,"on.mouse_press":20}
{"on.keychord_press":45,"initialize_editors":43,"on.key_release":15,"on.draw":54,"Cursor_editor":16,"Editors":6,"on.mouse_press":49,"fw_parent":53,"on":1,"on.mouse_release":48,"on.initialize":36,"fw_app":"broadsheet"}
on.initialize = function(arg)local font_height = 20love.graphics.setFont(love.graphics.newFont(font_height))local emwidth = App.newText('m'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftuntil width_remaining < editor_widthend
{"on.draw":60,"Editors":6,"on.text_input":69,"fw_parent":83,"resync_editors":70,"fw_app":"broadsheet","on.keychord_press":74,"on.key_release":15,"Cursor_editor":16,"on.save_settings":83,"on.mouse_press":63,"Font_height":84,"on.mouse_release":59,"on.load_settings":79,"initialize_editors":81,"on.initialize":82,"on":1}
{"fw_app":"broadsheet","on.keychord_press":45,"initialize_editors":62,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"on.initialize":36,"Editors":6,"on.mouse_press":63,"on.text_input":65,"on.mouse_release":59,"fw_parent":64,"on":1}
{"on.keychord_press":45,"initialize_editors":43,"on.key_release":15,"on.draw":53,"Cursor_editor":16,"Editors":6,"on.mouse_press":49,"fw_parent":52,"on":1,"on.mouse_release":48,"on.initialize":36,"fw_app":"broadsheet"}
{"fw_app":"broadsheet","on":1,"on.keychord_press":45,"initialize_editors":62,"on.key_release":15,"on.draw":60,"Cursor_editor":16,"Editors":6,"on.text_input":64,"on.mouse_press":63,"on.mouse_release":59,"fw_parent":63,"on.initialize":36}
{"on.keychord_press":45,"on.initialize":36,"on.key_release":15,"on.draw":52,"fw_parent":51,"on.mouse_press":49,"initialize_editors":43,"on.mouse_release":48,"on":1,"fw_app":"broadsheet","Cursor_editor":16,"Editors":6}
{"on.draw":60,"Editors":6,"on.text_input":69,"fw_parent":82,"resync_editors":70,"fw_app":"broadsheet","on.keychord_press":74,"on.key_release":15,"Cursor_editor":16,"on.save_settings":83,"on.mouse_press":63,"Font_height":76,"on.mouse_release":59,"on.load_settings":79,"initialize_editors":81,"on.initialize":82,"on":1}
on.initialize = function(arg)local font_height = 20love.graphics.setFont(love.graphics.newFont(font_height))local emwidth = App.newText('m'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3)table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftuntil width_remaining < editor_widthend
initialize_editors = function(font_height, screen_top, filename)love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = arg[1]load_from_disk(Editors[1])Text.redraw_all(Editors[1])Editors[1].screen_top = screen_topedit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].lineseditor.line_cache = Editors[1].line_cacheeditor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}editor.cursor1 = {line=editor.screen_top1.line, pos=editor.screen_top1.pos}edit.draw(editor, Text_color) -- initialize screen_bottom1endend
{"on.keychord_press":45,"on.initialize":36,"on.key_release":15,"on.draw":51,"fw_parent":50,"on.mouse_press":49,"initialize_editors":43,"on.mouse_release":48,"on":1,"fw_app":"broadsheet","Cursor_editor":16,"Editors":6}
{"Editors":6,"on":1,"on.mouse_release":19,"initialize_editors":32,"on.initialize":25,"fw_app":"broadsheet","on.keychord_press":31,"fw_parent":31,"on.key_release":15,"on.draw":12,"Cursor_editor":16,"on.mouse_press":20}
{"on.keychord_press":45,"on.initialize":36,"on.key_release":15,"on.draw":50,"fw_parent":49,"on.mouse_press":49,"initialize_editors":43,"on.mouse_release":48,"on":1,"fw_app":"broadsheet","Cursor_editor":16,"Editors":6}
on.keychord_press = function(chord, key)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].screen_top1)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
{"Editors":6,"on":1,"on.mouse_release":19,"initialize_editors":29,"on.initialize":25,"fw_app":"broadsheet","on.keychord_press":31,"fw_parent":30,"on.key_release":15,"on.draw":12,"Cursor_editor":16,"on.mouse_press":20}
on.mouse_press = function(x,y, mouse_button)for _,editor in ipairs(Editors) doeditor.selection1 = {}endfor i,editor in ipairs(Editors) doprint(i, editor.selection1)if x >= editor.left and x <= editor.right thenprint('column', i, editor.selection1.line, editor.selection1.pos)Cursor_editor = editoredit.mouse_press(editor, x,y, mouse_button)print('after mouse press', i, editor.selection1.line, editor.selection1.pos)breakendendend
on.keychord_press = function(chord, key)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].screen_top1)elsefor _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)endendend
{"on.keychord_press":45,"on.initialize":36,"on.key_release":15,"on.draw":12,"fw_parent":48,"on.mouse_press":49,"initialize_editors":43,"on.mouse_release":48,"on":1,"fw_app":"broadsheet","Cursor_editor":16,"Editors":6}
{"Editors":6,"on":1,"on.mouse_release":19,"initialize_editors":29,"on.initialize":25,"fw_app":"broadsheet","on.keychord_press":30,"fw_parent":29,"on.key_release":15,"on.draw":12,"Cursor_editor":16,"on.mouse_press":20}
{"on.key_release":15,"Cursor_editor":16,"on.draw":12,"on.mouse_release":48,"on.mouse_press":47,"on.initialize":36,"Editors":6,"fw_parent":47,"on":1,"fw_app":"broadsheet","on.keychord_press":45,"initialize_editors":43}
on.mouse_press = function(x,y, mouse_button)for _,editor in ipairs(Editors) doeditor.selection1 = {}endfor i,editor in ipairs(Editors) doprint(i, editor.selection1)if x >= editor.left and x <= editor.right thenprint('column', i)Cursor_editor = editoredit.mouse_press(editor, x,y, mouse_button)breakendendend
{"on.key_release":15,"Cursor_editor":16,"on.draw":12,"on.mouse_release":19,"on.mouse_press":47,"on.initialize":36,"Editors":6,"fw_parent":46,"on":1,"fw_app":"broadsheet","on.keychord_press":45,"initialize_editors":43}
on.mouse_press = function(x,y, mouse_button)for _,editor in ipairs(Editors) doeditor.selection1 = {}endfor i,editor in ipairs(Editors) doif x >= editor.left and x <= editor.right thenprint('column', i)Cursor_editor = editoredit.mouse_press(editor, x,y, mouse_button)breakendendend
initialize_editors = function(font_height, screen_top)love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = arg[1]load_from_disk(Editors[1])Text.redraw_all(Editors[1])Editors[1].screen_top = screen_topedit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].lineseditor.line_cache = Editors[1].line_cacheeditor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}editor.cursor1 = {line=editor.screen_top1.line, pos=editor.screen_top1.pos}edit.draw(editor, Text_color) -- initialize screen_bottom1endend
{"on.key_release":15,"Cursor_editor":16,"on.draw":12,"on.mouse_release":19,"on.mouse_press":46,"on.initialize":36,"Editors":6,"fw_parent":45,"on":1,"fw_app":"broadsheet","on.keychord_press":45,"initialize_editors":43}
{"Editors":6,"on":1,"on.mouse_release":19,"initialize_editors":29,"on.initialize":25,"fw_app":"broadsheet","on.keychord_press":14,"fw_parent":28,"on.key_release":15,"on.draw":12,"Cursor_editor":16,"on.mouse_press":20}
initialize_editors = function(font_height, screen_top)love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthlocal width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = arg[1]load_from_disk(Editors[1])Text.redraw_all(Editors[1])edit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].lineseditor.line_cache = Editors[1].line_cacheeditor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}editor.cursor1 = {line=editor.screen_top1.line, pos=editor.screen_top1.pos}edit.draw(editor, Text_color) -- initialize screen_bottom1endend
{"Editors":6,"on":1,"on.mouse_release":19,"initialize_editors":28,"on.initialize":25,"fw_app":"broadsheet","on.keychord_press":14,"fw_parent":27,"on.key_release":15,"on.draw":12,"Cursor_editor":16,"on.mouse_press":20}
initialize_editors = function(font_height, screen_top)love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthprint(App.screen.width, editor_width)local width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = arg[1]load_from_disk(Editors[1])Text.redraw_all(Editors[1])edit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].lineseditor.line_cache = Editors[1].line_cacheeditor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}editor.cursor1 = {line=editor.screen_top1.line, pos=editor.screen_top1.pos}edit.draw(editor, Text_color) -- initialize screen_bottom1endend
{"Editors":6,"on":1,"on.mouse_release":19,"initialize_editors":27,"on.initialize":25,"fw_app":"broadsheet","on.keychord_press":14,"fw_parent":26,"on.key_release":15,"on.draw":12,"Cursor_editor":16,"on.mouse_press":20}
initialize_editors = function(font_height, screen_top1)love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthprint(App.screen.width, editor_width)local width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = arg[1]load_from_disk(Editors[1])Text.redraw_all(Editors[1])edit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].lineseditor.line_cache = Editors[1].line_cacheeditor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}editor.cursor1 = {line=editor.screen_top1.line, pos=editor.screen_top1.pos}edit.draw(editor, Text_color) -- initialize screen_bottom1endend
{"Editors":6,"on":1,"on.mouse_release":19,"initialize_editors":26,"on.initialize":25,"fw_app":"broadsheet","on.keychord_press":14,"fw_parent":25,"on.key_release":15,"on.draw":12,"Cursor_editor":16,"on.mouse_press":20}
on.initialize = function(arg)local font_height = 20love.graphics.setFont(love.graphics.newFont(font_height))-- initialize multiple editor widgetslocal emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()local editor_width = 40*emwidthprint(App.screen.width, editor_width)local width_remaining = App.screen.width - Margin_left - Margin_rightlocal left = Margin_leftrepeatlocal editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))table.insert(Editors, editor)width_remaining = width_remaining - editor_width - Margin_leftleft = left + editor_width + Margin_leftuntil width_remaining < editor_width-- have them all operate on the file's linesEditors[1].filename = arg[1]load_from_disk(Editors[1])Text.redraw_all(Editors[1])edit.draw(Editors[1], Text_color) -- initialize screen_bottom1for e=2,#Editors dolocal editor = Editors[e]editor.lines = Editors[1].lineseditor.line_cache = Editors[1].line_cacheeditor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}editor.cursor1 = {line=editor.screen_top1.line, pos=editor.screen_top1.pos}edit.draw(editor, Text_color) -- initialize screen_bottom1endend
for _,editor in ipairs(Editors) doedit.keychord_press(editor, chord, key)
assert(#Editors > 0)if chord == 'C-0' theninitialize_editors( --[[font height]] 20, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-=' theninitialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C--' theninitialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)elseif chord == 'C-f' or chord == 'backspace' or chord == 'return' then-- find in just the left-most pane for nowedit.keychord_press(Editors[1], chord, key)elseif chord == 'pageup' or chord == 'pagedown' thenedit.keychord_press(Editors[1], chord, key)resync_editors()
This file contains no definition, but is used as a marker in the save dir toindicate all definitions have been copied from the repo to the save dir.
This file contains no definition, but is used as a marker in the save dir to indicate all definitions have been copied from the repo to the save dir.