A3F4NKHEWN5J4F2T62MSFWJJYYM73XIX4KYIZ2WQ3AKMTZLC4Z4QC
on.mouse_press = function(x,y, mouse_button)
for _,editor in ipairs(Editors) do
editor.selection1 = {}
end
for _,editor in ipairs(Editors) do
if x >= editor.left and x <= editor.right then
Cursor_editor = editor
edit.mouse_press(editor, x,y, mouse_button)
break
end
end
end
{"on.initialize":13,"on.draw":12,"on.mouse_release":19,"Editors":6,"fw_parent":19,"on.keychord_press":14,"fw_app":"broadsheet","on":1,"Cursor_editor":16,"on.mouse_press":20,"on.key_release":15}
on.mouse_release = function(x,y, mouse_button)
if Cursor_editor then
edit.mouse_release(Cursor_editor, x,y, mouse_button)
end
end
{"on.initialize":13,"on.draw":12,"on.mouse_release":19,"Editors":6,"fw_parent":18,"on.keychord_press":14,"fw_app":"broadsheet","on":1,"Cursor_editor":16,"on.mouse_press":18,"on.key_release":15}
on.mouse_press = function(x,y, mouse_button)
for _,editor in ipairs(Editors) do
editor.selection1 = {}
end
for _,editor in ipairs(Editors) do
if x >= editor.left and x <= editor.right then
Cursor_editor = editor
edit.mouse_press(editor, x,y, mouse_button)
break
end
end
end
{"on.initialize":13,"on.draw":12,"Editors":6,"fw_parent":16,"on.keychord_press":14,"fw_app":"broadsheet","on":1,"Cursor_editor":16,"on.mouse_press":18,"on.key_release":15}
on.mouse_press = function(x,y, mouse_button)
for _,editor in ipairs(Editors) do
editor.selection1 = {}
end
for _,editor in ipairs(Editors) do
if x >= editor.left and x <= editor.right then
Cursor_editor = editor
edit.mouse_press(editor, x,y, mouse_button)
break
end
end
{"on.initialize":13,"on.draw":12,"Editors":6,"fw_parent":16,"on.keychord_press":14,"fw_app":"broadsheet","on":1,"Cursor_editor":16,"on.mouse_press":17,"on.key_release":15}
{"on.initialize":13,"on.draw":12,"Editors":6,"fw_parent":15,"on.keychord_press":14,"fw_app":"broadsheet","on":1,"Cursor_editor":16,"on.key_release":15}
Cursor_editor = nil
on.key_release = function(key, scancode)
for _,editor in ipairs(Editors) do
edit.key_release(editor, key, scancode)
end
end
{"Editors":6,"fw_parent":14,"on.keychord_press":14,"on.initialize":13,"on":1,"on.draw":12,"fw_app":"broadsheet","on.key_release":15}
on.keychord_press = function(chord, key)
for _,editor in ipairs(Editors) do
edit.keychord_press(editor, chord, key)
end
end
{"Editors":6,"fw_parent":13,"on.keychord_press":14,"on.initialize":13,"on":1,"on.draw":12,"fw_app":"broadsheet"}
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
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
break
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
{"Editors":6,"fw_parent":12,"on.initialize":13,"on":1,"on.draw":12,"fw_app":"broadsheet"}
on.draw = function()
for _,editor in ipairs(Editors) do
edit.draw(editor, Text_color, --[[hide cursor]] true)
end
end
{"Editors":6,"fw_parent":11,"on.initialize":10,"on":1,"on.draw":12,"fw_app":"broadsheet"}
on.draw = function()
for _,editor in ipairs(Editors) do
edit.draw(editor, Text_color)
end
end
{"Editors":6,"fw_parent":10,"on.initialize":10,"on":1,"on.draw":11,"fw_app":"broadsheet"}
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
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
break
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])
for e=2,#Editors do
local editor = Editors[e]
editor.lines = Editors[1].lines
editor.line_cache = Editors[1].line_cache
end
end
{"fw_parent":9,"Editors":6,"fw_app":"broadsheet","on.initialize":10,"on.draw":9,"on":1}
on.draw = function()
for _,editor in ipairs(Editors) do
edit.draw(editor)
end
end
{"fw_parent":8,"Editors":6,"fw_app":"broadsheet","on.initialize":8,"on.draw":9,"on":1}
on.initialize = function(arg)
local font_height = 20
love.graphics.setFont(love.graphics.newFont(font_height))
local emwidth = App.newText('m'):getWidth()
local editor_width = 40*emwidth
local width_remaining = App.screen.width - Margin_left - Margin_right
local left = Margin_left
repeat
local 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_left
until width_remaining < editor_width
end
{"fw_parent":6,"Editors":6,"fw_app":"broadsheet","on.initialize":8,"on.draw":3,"on":1}
on.initialize = function(arg)
local font_height = 20
love.graphics.setFont(love.graphics.newFont(font_height))
local emwidth = App.newText('m'):getWidth()
local editor_width = 40*emwidth
local width_remaining = App.screen.width - Margin_left - Margin_right
local left = Margin_left
repeat
local 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_left
until width_remaining < editor_width
end
{"fw_parent":6,"Editors":6,"fw_app":"broadsheet","on.initialize":7,"on.draw":3,"on":1}
{"fw_parent":5,"Editors":6,"fw_app":"broadsheet","on.initialize":4,"on.draw":3,"on":1}
Editors = {} -- multiple widgets to cover the screen
-- but they'll share lines in common
{"fw_parent":4,"Editors":5,"fw_app":"broadsheet","on.initialize":4,"on.draw":3,"on":1}
Editors = {}
on.initialize = function(arg)
print(arg[1])
end
{"fw_parent":3,"fw_app":"broadsheet","on.initialize":4,"on":1,"on.draw":3}
on.draw = function()
end
{"fw_parent":2,"on.initialize":2,"on.draw":3,"on":1,"fw_app":"broadsheet"}
on.initialize = function(arg)
print(arg)
end
{"fw_parent":1,"on.initialize":2,"fw_app":"broadsheet","on":1}