Things are a hot mess right now. Perhaps pulling commands.lua directly in was a bad idea and I should have added them gradually into the editor. However, it's nice to see multiple definitions and I don't have that yet in the driver. We'll eventually decontruct commands.lua away into nothing.
The major issue I'm stuck on is the representation of definitions in memory. Each needs to be an editor buffer. I'd like to be able to get to each by name. However, what should happen if I edit a buffer to change the code inside it?
Y6O2RFHV5UGHFS3ZZEH5HPKN5I7SV74GEV47MTI4WGJPAINJMBZAC
love.graphics.rectangle('fill', 0,Menu_bar_height, App.screen.width, Manifest_navigator.num_lines * (Editor_state.line_height + --[[highlight padding]]5) + --[[extra highlight padding for bottom]] 2)
love.graphics.rectangle('fill', 0,Menu_bar_height, App.screen.width, Manifest_navigator.num_lines * (HUD_line_height + --[[highlight padding]]5) + --[[extra highlight padding for bottom]] 2)
{"Cursor_node":172,"line_height":365,"on":1,"sy":469,"initialize_editor":450,"parent":506,"Surface":422,"compute_layout":385,"Page":475,"on.code_change":306,"scale":7,"Viewport":505,"vy":462,"Manifest":494,"on.mouse_press":179,"to_text":180,"on.keychord_press":502,"update_editor_box":479,"load_manifest":496,"get_manifest":497,"font":353,"box_height":345,"schema1_of_y":467,"on.initialize":506,"add_thick_line":400,"A":507,"copy_shape":396,"on.text_input":487,"on.mouse_release":367,"on.update":368,"Manifest_navigator":495,"new_definition":504,"Definitions":503,"B":379,"y_of_schema1":364,"on.draw":452,"vx":5}
A = function(preserve_screen_top_of_cursor_node)
-- translate Definitions to Surface
Surface = {}
for _,node in pairs(Definitions) do
compute_layout(node, node.x,node.y, Surface, preserve_screen_top_of_cursor_node)
end
-- continue the pipeline
B(preserve_screen_top_of_cursor_node)
-- TODO: ugly that we're manipulating editor objects twice
end
on.initialize = function()
load_manifest()
new_definition()
A()
end
{"Cursor_node":172,"line_height":365,"on":1,"sy":469,"initialize_editor":450,"parent":505,"Surface":422,"compute_layout":385,"Page":475,"on.code_change":306,"scale":7,"Viewport":505,"vy":462,"Manifest":494,"on.mouse_press":179,"to_text":180,"on.keychord_press":502,"update_editor_box":479,"load_manifest":496,"get_manifest":497,"font":353,"box_height":345,"schema1_of_y":467,"on.initialize":506,"add_thick_line":400,"A":433,"copy_shape":396,"on.text_input":487,"on.mouse_release":367,"on.update":368,"Manifest_navigator":495,"new_definition":504,"Definitions":503,"B":379,"y_of_schema1":364,"on.draw":452,"vx":5}
{"Cursor_node":172,"line_height":365,"on":1,"sy":469,"initialize_editor":450,"parent":504,"Surface":422,"compute_layout":385,"Page":475,"on.code_change":306,"scale":7,"Viewport":505,"vy":462,"Manifest":494,"on.mouse_press":179,"to_text":180,"on.keychord_press":502,"update_editor_box":479,"load_manifest":496,"get_manifest":497,"font":353,"box_height":345,"schema1_of_y":467,"on.initialize":500,"add_thick_line":400,"A":433,"copy_shape":396,"on.text_input":487,"on.mouse_release":367,"on.update":368,"Manifest_navigator":495,"new_definition":504,"Definitions":503,"B":379,"y_of_schema1":364,"on.draw":452,"vx":5}
Viewport = {x=-50, y=-50, w=800,h=600, zoom=1.0}
new_definition = function()
table.insert(Definitions, {
type='text',
data={''},
x=0, y=0,
width=400, bg={r=0.7,g=0.7,b=1},
})
end
{"Cursor_node":172,"line_height":365,"on":1,"sy":469,"initialize_editor":450,"parent":503,"Surface":422,"compute_layout":385,"Page":475,"on.code_change":306,"scale":7,"Viewport":459,"vy":462,"Manifest":494,"on.mouse_press":179,"to_text":180,"on.keychord_press":502,"update_editor_box":479,"load_manifest":496,"get_manifest":497,"font":353,"box_height":345,"schema1_of_y":467,"on.initialize":500,"add_thick_line":400,"A":433,"copy_shape":396,"on.text_input":487,"on.mouse_release":367,"on.update":368,"Manifest_navigator":495,"new_definition":504,"Definitions":503,"B":379,"y_of_schema1":364,"on.draw":452,"vx":5}
{"Cursor_node":172,"line_height":365,"on":1,"sy":469,"initialize_editor":450,"parent":502,"Surface":422,"compute_layout":385,"Page":475,"on.code_change":306,"scale":7,"Viewport":459,"vy":462,"Manifest":494,"on.mouse_press":179,"to_text":180,"on.keychord_press":502,"update_editor_box":479,"load_manifest":496,"get_manifest":497,"font":353,"box_height":345,"schema1_of_y":467,"on.initialize":500,"add_thick_line":400,"A":433,"copy_shape":396,"on.text_input":487,"on.mouse_release":367,"on.update":368,"Manifest_navigator":495,"Definitions":503,"B":379,"y_of_schema1":364,"on.draw":452,"vx":5}
Definitions = {
-- table mapping names to boxes where we edit their definitions
}
on.keychord_press = function(chord, key)
if Manifest_navigator.reload then
load_manifest()
end
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-n' then
new_definition()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"on.initialize":500,"vx":5,"scale":7,"on.mouse_press":179,"to_text":180,"Viewport":459,"get_manifest":497,"compute_layout":385,"A":433,"Cursor_node":172,"vy":462,"on.keychord_press":502,"line_height":365,"add_thick_line":400,"copy_shape":396,"y_of_schema1":364,"parent":501,"Page":475,"box_height":345,"update_editor_box":479,"on.mouse_release":367,"initialize_editor":450,"sy":469,"font":353,"Manifest":494,"on.update":368,"on.text_input":487,"on.draw":452,"Manifest_navigator":495,"load_manifest":496,"on.code_change":306,"Surface":422,"schema1_of_y":467,"B":379,"on":1}
on.keychord_press = function(chord, key)
if Manifest_navigator.reload then
load_manifest()
end
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"on.code_change":306,"Manifest_navigator":495,"Viewport":459,"compute_layout":385,"line_height":365,"vy":462,"vx":5,"y_of_schema1":364,"Manifest":494,"copy_shape":396,"on.mouse_press":179,"on.text_input":487,"on.mouse_release":367,"on.update":368,"schema1_of_y":467,"sy":469,"on.draw":452,"Surface":422,"load_manifest":496,"A":433,"initialize_editor":450,"B":379,"on.initialize":500,"get_manifest":497,"add_thick_line":400,"on":1,"parent":500,"update_editor_box":479,"on.keychord_press":501,"scale":7,"font":353,"to_text":180,"box_height":345,"Page":475,"Cursor_node":172}
on.initialize = function()
load_manifest()
print('on.initialize', Manifest_navigator.show)
A()
end
{"Viewport":459,"scale":7,"schema1_of_y":467,"compute_layout":385,"on.mouse_press":179,"y_of_schema1":364,"font":353,"Manifest_navigator":495,"load_manifest":496,"get_manifest":497,"on.keychord_press":492,"line_height":365,"on.text_input":487,"vx":5,"to_text":180,"on.update":368,"parent":499,"Page":475,"on.initialize":500,"box_height":345,"A":433,"copy_shape":396,"on":1,"B":379,"initialize_editor":450,"add_thick_line":400,"Manifest":494,"update_editor_box":479,"Cursor_node":172,"on.code_change":306,"sy":469,"on.draw":452,"Surface":422,"vy":462,"on.mouse_release":367}
on.initialize = function()
load_manifest()
A()
end
{"on.mouse_press":179,"on.mouse_release":367,"on.update":368,"to_text":180,"Manifest":494,"on":1,"schema1_of_y":467,"sy":469,"B":379,"on.draw":452,"Surface":422,"Cursor_node":172,"on.initialize":499,"box_height":345,"on.text_input":487,"update_editor_box":479,"on.code_change":306,"Page":475,"load_manifest":496,"get_manifest":497,"y_of_schema1":364,"scale":7,"Manifest_navigator":495,"vy":462,"on.keychord_press":492,"font":353,"Viewport":459,"vx":5,"A":433,"compute_layout":385,"parent":498,"initialize_editor":450,"add_thick_line":400,"line_height":365,"copy_shape":396}
on.initialize = function()
load_manifest
A()
end
{"Surface":422,"on.initialize":498,"on.draw":452,"on":1,"Viewport":459,"y_of_schema1":364,"vx":5,"on.mouse_press":179,"add_thick_line":400,"B":379,"copy_shape":396,"on.mouse_release":367,"on.update":368,"on.keychord_press":492,"Page":475,"box_height":345,"compute_layout":385,"font":353,"update_editor_box":479,"on.code_change":306,"load_manifest":496,"scale":7,"schema1_of_y":467,"Manifest_navigator":495,"A":433,"on.text_input":487,"line_height":365,"vy":462,"Cursor_node":172,"to_text":180,"get_manifest":497,"Manifest":494,"parent":497,"initialize_editor":450,"sy":469}
{"Surface":422,"on.initialize":493,"on.draw":452,"on":1,"Viewport":459,"y_of_schema1":364,"vx":5,"on.mouse_press":179,"add_thick_line":400,"B":379,"copy_shape":396,"on.mouse_release":367,"on.update":368,"on.keychord_press":492,"Page":475,"box_height":345,"compute_layout":385,"font":353,"update_editor_box":479,"on.code_change":306,"load_manifest":496,"scale":7,"schema1_of_y":467,"Manifest_navigator":495,"A":433,"on.text_input":487,"line_height":365,"vy":462,"Cursor_node":172,"to_text":180,"get_manifest":497,"Manifest":494,"parent":496,"initialize_editor":450,"sy":469}
get_manifest = function()
live.send_to_app('MANIFEST')
local response_string
repeat
love.timer.sleep(0.01)
response_string = live.receive_from_app()
until response_string
local result = {}
if #response_string == 0 then
-- error; retry
return result
else
-- stop retrying
Manifest_navigator.reload = false
end
local response = json.decode(response_string)
for name in pairs(response) do
if name ~= 'parent' then
table.insert(result, name)
end
end
return result
end
{"Surface":422,"on.initialize":493,"on.draw":452,"on":1,"Viewport":459,"y_of_schema1":364,"vx":5,"on.mouse_press":179,"add_thick_line":400,"B":379,"copy_shape":396,"on.mouse_release":367,"on.update":368,"on.keychord_press":492,"Page":475,"box_height":345,"compute_layout":385,"font":353,"update_editor_box":479,"on.code_change":306,"load_manifest":496,"scale":7,"schema1_of_y":467,"Manifest_navigator":495,"A":433,"on.text_input":487,"line_height":365,"vy":462,"Cursor_node":172,"to_text":180,"Manifest":494,"parent":495,"initialize_editor":450,"sy":469}
load_manifest = function()
local new_manifest = get_manifest()
-- preserve existing order
-- 1. add new definitions in front
for _,name in ipairs(new_manifest) do
if not array.find(Manifest, name) then
table.insert(Manifest, 1, name)
end
end
-- 2. remove missing definitions
for idx=#Manifest,1,-1 do
local name = Manifest[idx]
if not array.find(new_manifest, name) then
table.remove(Manifest, idx)
end
end
end
{"Surface":422,"on.initialize":493,"on.draw":452,"on":1,"Viewport":459,"y_of_schema1":364,"vx":5,"on.mouse_press":179,"add_thick_line":400,"B":379,"copy_shape":396,"on.mouse_release":367,"on.update":368,"on.keychord_press":492,"Page":475,"box_height":345,"compute_layout":385,"font":353,"update_editor_box":479,"on.code_change":306,"scale":7,"schema1_of_y":467,"Manifest_navigator":495,"A":433,"on.text_input":487,"line_height":365,"vy":462,"Cursor_node":172,"to_text":180,"Manifest":494,"parent":494,"initialize_editor":450,"sy":469}
Manifest_navigator = {
-- state for the command palette
display = false, -- display navigator on screen
for_delete = false, -- if true, delete selected definition from navigator
reload = false, -- if true, refresh manifest to display on next keystroke
num_lines = nil, -- number of screen lines of space to devote to the navigator
index = 1, -- where the cursor is right now. Modified on arrow keys, reset on any non-arrow keystroke.
filter = '', -- prefix being typed into the command palette
candidates = Manifest, -- list of candidates matching filter
bottom_y = nil, -- cache a tiny bit of state in display logic
}
{"Surface":422,"on.initialize":493,"on.draw":452,"on":1,"Viewport":459,"y_of_schema1":364,"vx":5,"on.mouse_press":179,"add_thick_line":400,"B":379,"copy_shape":396,"on.mouse_release":367,"on.update":368,"on.keychord_press":492,"Page":475,"box_height":345,"compute_layout":385,"font":353,"update_editor_box":479,"on.code_change":306,"scale":7,"schema1_of_y":467,"Manifest_navigator":480,"A":433,"on.text_input":487,"line_height":365,"vy":462,"Cursor_node":172,"to_text":180,"Manifest":494,"parent":493,"initialize_editor":450,"sy":469}
Manifest = {
-- list of definitions to display
-- TODO: can we just reuse Live.manifest here?
}
on.initialize = function()
A()
end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":492,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":493,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":492,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)
if Manifest_navigator.reload then
load_manifest()
end
print('AAA', chord, Manifest_navigator.show)
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
print('CCC')
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-l' then
print('BBB')
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":491,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":492,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)
if Manifest_navigator.reload then
load_manifest()
end
print('AAA', chord, Manifest_navigator.show)
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
print('CCC')
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-l' then
print('BBB')
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":490,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":491,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)
if Manifest_navigator.reload then
load_manifest()
end
print('AAA', chord)
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
print('CCC')
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-l' then
print('BBB')
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":489,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":490,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)
if Manifest_navigator.reload then
load_manifest()
end
print('AAA', chord)
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-l' then
print('BBB')
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":488,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":489,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)
if Manifest_navigator.reload then
load_manifest()
end
print('AAA', chord)
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":487,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":488,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.text_input = function(t)
if Manifest_navigator.show then
text_input_on_manifest_navigator(t)
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.text_input(Cursor_node.editor, t)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
A(--[[preserve screen_top of cursor node]] true)
end
end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":486,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":487,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":486,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)
if Manifest_navigator.reload then
load_manifest()
end
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":485,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":486,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)
if Manifest_navigator.reload then
load_manifest()
end
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":484,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":485,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)
if Manifest_navigator.reload then
load_manifest()
end
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":483,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":484,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)
if Manifest_navigator.reload then
load_manifest()
end
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":482,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":483,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.initialize = function()
load_manifest()
A()
end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":481,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":482,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":481,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
on.keychord_press = function(chord, key)
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":480,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":350,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":481,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
{"Page":475,"Manifest_navigator":480,"initialize_editor":450,"sy":469,"parent":479,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":350,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":391,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
Manifest_navigator = {
-- state for the command palette
display = false,
for_delete = false,
reload = false,
}
update_editor_box = function(node, preserve_screen_top_of_cursor_node)
if node.editor == nil then return end
-- Compute screen_top1 in viewport coordinates because the editor's font takes scaling into account.
if vy(node.y) > 0 then
if not preserve_screen_top_of_cursor_node or node ~= Cursor_node then
node.editor.screen_top1.line = 1
node.editor.screen_top1.pos = 1
end
node.editor.top = vy(node.y)
else
node.editor.screen_top1, node.editor.top = schema1_of_y(node.editor, -vy(node.y))
end
node.editor.left = math.floor(vx(node.x)) + Line_number_width*App.width(node.editor.em)
node.editor.right = math.ceil(vx(node.x+node.w))
edit.update_font_settings(node.editor, scale(20))
Text.redraw_all(node.editor)
end
{"Page":475,"initialize_editor":450,"sy":469,"parent":478,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":479,"y_of_schema1":364,"vy":462,"on.initialize":350,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":391,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}
update_editor_box = function(node, preserve_screen_top_of_cursor_node)
if node.editor == nil then return end
-- Compute screen_top1 in viewport coordinates because the editor's font takes scaling into account.
if vy(node.y) > 0 then
if not preserve_screen_top_of_cursor_node or node ~= Cursor_node then
node.editor.screen_top1.line = 1
node.editor.screen_top1.pos = 1
end
node.editor.top = vy(node.y)
else
node.editor.screen_top1, node.editor.top = schema1_of_y(node.editor, -vy(node.y))
end
node.editor.left = math.floor(vx(node.x))+Line_number_width*App.width(node.editor.em)
node.editor.right = math.ceil(vx(node.x+node.w))
edit.update_font_settings(node.editor, scale(20))
Text.redraw_all(node.editor)
end
{"Page":475,"initialize_editor":450,"sy":469,"parent":477,"add_thick_line":400,"line_height":365,"Surface":422,"copy_shape":396,"schema1_of_y":467,"Cursor_node":172,"to_text":180,"vx":5,"on.draw":452,"Viewport":459,"update_editor_box":478,"y_of_schema1":364,"vy":462,"on.initialize":350,"A":433,"on":1,"on.text_input":388,"on.mouse_press":179,"on.mouse_release":367,"B":379,"on.keychord_press":391,"on.update":368,"box_height":345,"scale":7,"font":353,"on.code_change":306,"compute_layout":385}