ESXAEBLUP3QHNHBW6ZIIGYMYEYKVW5ODZRINWK77SS6D5AQVQTBQC
on.initialize = function(arg)
local font_height = 20
love.graphics.setFont(love.graphics.newFont(font_height))
-- initialize multiple editor widgets
local emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()
local editor_width = 40*emwidth
print(App.screen.width, editor_width)
local width_remaining = App.screen.width - Margin_left - Margin_right
local left = Margin_left
repeat
local 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_left
left = left + editor_width + Margin_left
until width_remaining < editor_width
-- have them all operate on the file's lines
Editors[1].filename = arg[1]
load_from_disk(Editors[1])
Text.redraw_all(Editors[1])
edit.draw(Editors[1], Text_color)
for e=2,#Editors do
local editor = Editors[e]
editor.lines = Editors[1].lines
editor.line_cache = Editors[1].line_cache
editor.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}
end
end
{"on.key_release":15,"on.draw":12,"Cursor_editor":16,"Editors":6,"on.mouse_release":19,"fw_app":"broadsheet","on":1,"on.mouse_press":20,"fw_parent":21,"on.keychord_press":14,"on.initialize":22}
on.initialize = function(arg)
local font_height = 20
love.graphics.setFont(love.graphics.newFont(font_height))
-- initialize multiple editor widgets
local emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()
local editor_width = 40*emwidth
print(App.screen.width, editor_width)
local width_remaining = App.screen.width - Margin_left - Margin_right
local left = Margin_left
repeat
local 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_left
until width_remaining < editor_width
-- have them all operate on the file's lines
Editors[1].filename = arg[1]
load_from_disk(Editors[1])
Text.redraw_all(Editors[1])
edit.draw(Editors[1], Text_color)
for e=2,#Editors do
local editor = Editors[e]
editor.lines = Editors[1].lines
editor.line_cache = Editors[1].line_cache
editor.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}
end
end
{"on.keychord_press":14,"on.initialize":21,"fw_parent":20,"on.draw":12,"fw_app":"broadsheet","Editors":6,"on.key_release":15,"on.mouse_release":19,"on.mouse_press":20,"on":1,"Cursor_editor":16}