Now it animates on the way out, animates on the way in. And hitting the hotkey again toggles it back, again with animation.
JYPY2I2R7E4FYGJKIHVBXZ6ASKDRHNVTEXOPCTUXEBT7PLW7IYYQC
undo_zoom_out = function()
snapshot_canvas()
Animating = {
Save_viewport,
}
Save_viewport = nil
Zoomed_out = nil
end
{"Manifest":769,"Viewport":604,"approximate":579,"snapshot_canvas":913,"get_manifest":768,"copy_viewport":866,"on.save_settings":742,"sy":469,"approximate_up":658,"Definitions":503,"update_editor_box":711,"new_definition":848,"on.code_submit":787,"table_and_array_both_empty":689,"zoom_in":920,"Page":475,"schema1_of_y":667,"initialize_manifest_navigator":773,"y_of_schema1":364,"get_multiple_definitions_from_app":783,"wait_for_response":781,"Menu_background_color":611,"Menu_border_color":612,"on.text_input":855,"box_height":680,"fw_parent":920,"compute_layout":385,"fw_app":"driver","on.code_change":820,"on_text":539,"survey_animation":906,"animate_next":914,"scale":712,"sx":544,"undo_zoom_out":921,"vx":545,"load_from_iterator":670,"from_viewport":823,"get_definition_from_app":784,"Surface":422,"on_handle":547,"Ticks_font":669,"draw_menu_bar":861,"manifest_navigator_up":628,"copy_shape":396,"manifest_navigator_down":635,"surface_bounds":814,"Save_viewport":865,"delete_definition":673,"font":353,"move_candidate_to_front_of_manifest":632,"draw_cursor":639,"keychord_press_on_manifest_navigator":765,"on.update":900,"text_input_on_manifest_navigator":634,"Spawn_point":822,"zoom_out":908,"manifest_coord":636,"on.mouse_release":836,"manifest_index":637,"animate_next_frame":915,"manifest_navigator_candidates":638,"initialize_editor":678,"interpolate_viewport":843,"add_def_to_menu":640,"on.load_settings":782,"A":831,"maybe_update_key_in_definitions":529,"order_of_magnitude":573,"on.initialize":807,"on":1,"add_thick_line":400,"load_manifest":694,"on.key_release":720,"on.keychord_press":919,"Menu_highlight_color":614,"Num_animation_frames":840,"draw_run_time_error":808,"reset_manifest_navigator":772,"on.mouse_press":916,"num_lines_for_manifest_navigator":676,"draw_manifest_navigator":677,"mouse_cursor":558,"add_hotkey_to_menu":616,"Mouse_cursor":559,"tick_spec":660,"Definition_background_color":849,"Manifest_navigator":495,"set_mouse_cursor":562,"vy":546,"draw_ticks":862,"Test_definition_background_color":858,"Cursor_node":172,"definition_background_color":859,"Animating":842,"Menu_command_color":613,"Zoomed_out":869,"line_height":365,"B":830,"on.draw":917,"load_definition":854}
zoom_in = function(x,y)
-- precondition: Zoomed_out
-- precondition: Viewport == Global_viewport
-- precondition: Save_viewport exists
-- center Viewport on x,y at zoom level Saved_viewport.zoom
snapshot_canvas()
Animating = {
{
x=sx(x)-App.screen.width/Save_viewport.zoom/2,
y=sy(y)-App.screen.height/Save_viewport.zoom/2,
w=App.screen.width/Save_viewport.zoom,
h=App.screen.height/Save_viewport.zoom,
zoom=Save_viewport.zoom,
},
}
Zoomed_out = nil
Save_viewport = nil
end
{"Manifest":769,"Viewport":604,"approximate":579,"snapshot_canvas":913,"get_manifest":768,"copy_viewport":866,"on.save_settings":742,"sy":469,"approximate_up":658,"Definitions":503,"update_editor_box":711,"new_definition":848,"on.code_submit":787,"table_and_array_both_empty":689,"zoom_in":920,"Page":475,"schema1_of_y":667,"initialize_manifest_navigator":773,"y_of_schema1":364,"get_multiple_definitions_from_app":783,"wait_for_response":781,"Menu_background_color":611,"Menu_border_color":612,"on.text_input":855,"box_height":680,"fw_parent":919,"compute_layout":385,"fw_app":"driver","on.code_change":820,"on_text":539,"survey_animation":906,"animate_next":914,"scale":712,"sx":544,"vx":545,"load_from_iterator":670,"from_viewport":823,"get_definition_from_app":784,"Surface":422,"on_handle":547,"Ticks_font":669,"draw_menu_bar":861,"manifest_navigator_up":628,"copy_shape":396,"manifest_navigator_down":635,"surface_bounds":814,"Save_viewport":865,"delete_definition":673,"font":353,"move_candidate_to_front_of_manifest":632,"draw_cursor":639,"keychord_press_on_manifest_navigator":765,"on.update":900,"text_input_on_manifest_navigator":634,"Spawn_point":822,"zoom_out":908,"manifest_coord":636,"on.mouse_release":836,"manifest_index":637,"animate_next_frame":915,"manifest_navigator_candidates":638,"initialize_editor":678,"interpolate_viewport":843,"add_def_to_menu":640,"on.load_settings":782,"A":831,"maybe_update_key_in_definitions":529,"order_of_magnitude":573,"on.initialize":807,"on":1,"add_thick_line":400,"load_manifest":694,"on.key_release":720,"on.keychord_press":919,"Menu_highlight_color":614,"Num_animation_frames":840,"draw_run_time_error":808,"reset_manifest_navigator":772,"on.mouse_press":916,"num_lines_for_manifest_navigator":676,"draw_manifest_navigator":677,"mouse_cursor":558,"add_hotkey_to_menu":616,"Mouse_cursor":559,"tick_spec":660,"Definition_background_color":849,"Manifest_navigator":495,"set_mouse_cursor":562,"vy":546,"draw_ticks":862,"Test_definition_background_color":858,"Cursor_node":172,"definition_background_color":859,"Animating":842,"Menu_command_color":613,"Zoomed_out":869,"line_height":365,"B":830,"on.draw":917,"load_definition":854}
on.keychord_press = function(chord, key)
print('key', chord)
if Animating then return end
if Move then return end
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
if (Viewport.zoom-0.1)*20 >= 1 then -- disallow font size of 0
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-g' then
-- special Expose-like 'global zoom' mode
if Zoomed_out == nil then
zoom_out()
else
undo_zoom_out()
end
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()
A()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
initialize_manifest_navigator()
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
initialize_manifest_navigator()
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
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
local definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)
B(--[[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
{"Manifest":769,"Viewport":604,"approximate":579,"snapshot_canvas":913,"get_manifest":768,"copy_viewport":866,"on.save_settings":742,"sy":469,"approximate_up":658,"Definitions":503,"update_editor_box":711,"new_definition":848,"on.code_submit":787,"table_and_array_both_empty":689,"zoom_in":895,"Page":475,"schema1_of_y":667,"initialize_manifest_navigator":773,"y_of_schema1":364,"get_multiple_definitions_from_app":783,"wait_for_response":781,"Menu_background_color":611,"Menu_border_color":612,"on.text_input":855,"box_height":680,"fw_parent":918,"compute_layout":385,"fw_app":"driver","on.code_change":820,"on_text":539,"survey_animation":906,"animate_next":914,"scale":712,"sx":544,"vx":545,"load_from_iterator":670,"from_viewport":823,"get_definition_from_app":784,"Surface":422,"on_handle":547,"Ticks_font":669,"draw_menu_bar":861,"manifest_navigator_up":628,"copy_shape":396,"manifest_navigator_down":635,"surface_bounds":814,"Save_viewport":865,"delete_definition":673,"font":353,"move_candidate_to_front_of_manifest":632,"draw_cursor":639,"keychord_press_on_manifest_navigator":765,"on.update":900,"text_input_on_manifest_navigator":634,"Spawn_point":822,"zoom_out":908,"manifest_coord":636,"on.mouse_release":836,"manifest_index":637,"animate_next_frame":915,"manifest_navigator_candidates":638,"initialize_editor":678,"interpolate_viewport":843,"add_def_to_menu":640,"on.load_settings":782,"A":831,"maybe_update_key_in_definitions":529,"order_of_magnitude":573,"on.initialize":807,"on":1,"add_thick_line":400,"load_manifest":694,"on.key_release":720,"on.keychord_press":919,"Menu_highlight_color":614,"Num_animation_frames":840,"draw_run_time_error":808,"reset_manifest_navigator":772,"on.mouse_press":916,"num_lines_for_manifest_navigator":676,"draw_manifest_navigator":677,"mouse_cursor":558,"add_hotkey_to_menu":616,"Mouse_cursor":559,"tick_spec":660,"Definition_background_color":849,"Manifest_navigator":495,"set_mouse_cursor":562,"vy":546,"draw_ticks":862,"Test_definition_background_color":858,"Cursor_node":172,"definition_background_color":859,"Animating":842,"Menu_command_color":613,"Zoomed_out":869,"line_height":365,"B":830,"on.draw":917,"load_definition":854}
on.keychord_press = function(chord, key)
print('key', chord)
if Animating then return end
if Move then return end
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
if (Viewport.zoom-0.1)*20 >= 1 then -- disallow font size of 0
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-g' then
-- special Expose-like 'global zoom' mode
if Zoomed_out == nil then
zoom_out()
else
Animation = {
Save_viewport,
}
Save_viewport = nil
Zoomed_out = nil
end
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()
A()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
initialize_manifest_navigator()
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
initialize_manifest_navigator()
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
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
local definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)
B(--[[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
{"Manifest":769,"Viewport":604,"approximate":579,"snapshot_canvas":913,"get_manifest":768,"copy_viewport":866,"on.save_settings":742,"sy":469,"approximate_up":658,"Definitions":503,"update_editor_box":711,"new_definition":848,"on.code_submit":787,"table_and_array_both_empty":689,"zoom_in":895,"Page":475,"schema1_of_y":667,"initialize_manifest_navigator":773,"y_of_schema1":364,"get_multiple_definitions_from_app":783,"wait_for_response":781,"Menu_background_color":611,"Menu_border_color":612,"on.text_input":855,"box_height":680,"fw_parent":917,"compute_layout":385,"fw_app":"driver","on.code_change":820,"on_text":539,"survey_animation":906,"animate_next":914,"scale":712,"sx":544,"vx":545,"load_from_iterator":670,"from_viewport":823,"get_definition_from_app":784,"Surface":422,"on_handle":547,"Ticks_font":669,"draw_menu_bar":861,"manifest_navigator_up":628,"copy_shape":396,"manifest_navigator_down":635,"surface_bounds":814,"Save_viewport":865,"delete_definition":673,"font":353,"move_candidate_to_front_of_manifest":632,"draw_cursor":639,"keychord_press_on_manifest_navigator":765,"on.update":900,"text_input_on_manifest_navigator":634,"Spawn_point":822,"zoom_out":908,"manifest_coord":636,"on.mouse_release":836,"manifest_index":637,"animate_next_frame":915,"manifest_navigator_candidates":638,"initialize_editor":678,"interpolate_viewport":843,"add_def_to_menu":640,"on.load_settings":782,"A":831,"maybe_update_key_in_definitions":529,"order_of_magnitude":573,"on.initialize":807,"on":1,"add_thick_line":400,"load_manifest":694,"on.key_release":720,"on.keychord_press":918,"Menu_highlight_color":614,"Num_animation_frames":840,"draw_run_time_error":808,"reset_manifest_navigator":772,"on.mouse_press":916,"num_lines_for_manifest_navigator":676,"draw_manifest_navigator":677,"mouse_cursor":558,"add_hotkey_to_menu":616,"Mouse_cursor":559,"tick_spec":660,"Definition_background_color":849,"Manifest_navigator":495,"set_mouse_cursor":562,"vy":546,"draw_ticks":862,"Test_definition_background_color":858,"Cursor_node":172,"definition_background_color":859,"Animating":842,"Menu_command_color":613,"Zoomed_out":869,"line_height":365,"B":830,"on.draw":917,"load_definition":854}
on.draw = function()
if Animating then
local q = love.graphics.newQuad((Viewport.x-Global_viewport.x)*Viewport.zoom,(Viewport.y-Global_viewport.y)*Viewport.zoom, App.screen.width, App.screen.height, Global_viewport.w*Viewport.zoom, Global_viewport.h*Viewport.zoom)
App.color{r=1,g=1,b=1}
love.graphics.draw(Canvas, q, 0,0)
return
end
for _,obj in ipairs(Surface) do
love.graphics.setColor(obj.r or 0, obj.g or 0, obj.b or 0)
if obj.type == 'rectangle' then
love.graphics.rectangle(obj.drawmode or 'fill', vx(obj.x),vy(obj.y), scale(obj.w),scale(obj.h))
elseif obj.type == 'line' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'circle' then
love.graphics.circle(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radius))
elseif obj.type == 'arc' then
love.graphics.arc(obj.drawmode or 'line', obj.arctype or 'open', vx(obj.x), vy(obj.y), scale(obj.radius), obj.angle1, obj.angle2, obj.segments)
elseif obj.type == 'ellipse' then
love.graphics.ellipse(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radiusx), scale(obj.radiusy))
elseif obj.type == 'bezier' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'text' then
if obj.w == nil then
love.graphics.draw(obj.text, vx(obj.x), vy(obj.y))
else
love.graphics.setColor(0.5,0.5,0.5)
love.graphics.rectangle('fill', vx(obj.x),vy(obj.y-30), scale(obj.w/2-5), scale(20))
edit.draw(obj.editor, obj.fg, not obj.show_cursor)
if obj.editor.load_time_error then
love.graphics.setColor(0.8,0,0)
local error_y = math.min(vy(obj.y+obj.h), App.screen.height-20*5*Viewport.zoom)
error_y = math.max(error_y, vy(obj.y))
love.graphics.rectangle('fill', vx(obj.x), error_y, scale(obj.w), scale(5*20*Viewport.zoom))
love.graphics.setColor(0,0,0)
love.graphics.print(obj.editor.load_time_error, vx(obj.x), error_y)
end
end
end
end
draw_run_time_error()
draw_ticks()
draw_menu_bar()
end
{"Manifest":769,"Viewport":604,"approximate":579,"snapshot_canvas":913,"get_manifest":768,"copy_viewport":866,"on.save_settings":742,"sy":469,"approximate_up":658,"Definitions":503,"update_editor_box":711,"new_definition":848,"on.code_submit":787,"table_and_array_both_empty":689,"zoom_in":895,"Page":475,"schema1_of_y":667,"initialize_manifest_navigator":773,"y_of_schema1":364,"get_multiple_definitions_from_app":783,"wait_for_response":781,"Menu_background_color":611,"Menu_border_color":612,"on.text_input":855,"box_height":680,"fw_parent":916,"compute_layout":385,"fw_app":"driver","on.code_change":820,"on_text":539,"survey_animation":906,"animate_next":914,"scale":712,"sx":544,"vx":545,"load_from_iterator":670,"from_viewport":823,"get_definition_from_app":784,"Surface":422,"on_handle":547,"Ticks_font":669,"draw_menu_bar":861,"manifest_navigator_up":628,"copy_shape":396,"manifest_navigator_down":635,"surface_bounds":814,"Save_viewport":865,"delete_definition":673,"font":353,"move_candidate_to_front_of_manifest":632,"draw_cursor":639,"keychord_press_on_manifest_navigator":765,"on.update":900,"text_input_on_manifest_navigator":634,"Spawn_point":822,"zoom_out":908,"manifest_coord":636,"on.mouse_release":836,"manifest_index":637,"animate_next_frame":915,"manifest_navigator_candidates":638,"initialize_editor":678,"interpolate_viewport":843,"add_def_to_menu":640,"on.load_settings":782,"A":831,"maybe_update_key_in_definitions":529,"order_of_magnitude":573,"on.initialize":807,"on":1,"add_thick_line":400,"load_manifest":694,"on.key_release":720,"on.keychord_press":912,"Menu_highlight_color":614,"Num_animation_frames":840,"draw_run_time_error":808,"reset_manifest_navigator":772,"on.mouse_press":916,"num_lines_for_manifest_navigator":676,"draw_manifest_navigator":677,"mouse_cursor":558,"add_hotkey_to_menu":616,"Mouse_cursor":559,"tick_spec":660,"Definition_background_color":849,"Manifest_navigator":495,"set_mouse_cursor":562,"vy":546,"draw_ticks":862,"Test_definition_background_color":858,"Cursor_node":172,"definition_background_color":859,"Animating":842,"Menu_command_color":613,"Zoomed_out":869,"line_height":365,"B":830,"on.draw":917,"load_definition":854}
on.mouse_press = function(x,y, mouse_button)
if Animating then return end
if Zoomed_out then
zoom_in(x,y)
return
end
if Cursor_node then
Cursor_node.show_cursor = nil
Cursor_node = nil
end
if mouse_press_consumed_by_any_button_handler(HUD, x,y, mouse_button) then
return
end
local node = on_text(x,y)
if node then
-- position cursor in node
Cursor_node = node
edit.mouse_press(node.editor, x,y, mouse_button)
return
end
local node = on_handle(x,y)
if node then
-- move node
Move = {xoff=App.mouse_x()-vx(node.x), yoff=App.mouse_y()-vy(node.y), node=node}
return
end
-- pan surface
Pan = {x=Viewport.x+x,y=Viewport.y+y}
end
{"Manifest":769,"Viewport":604,"approximate":579,"snapshot_canvas":913,"get_manifest":768,"copy_viewport":866,"on.save_settings":742,"sy":469,"approximate_up":658,"Definitions":503,"update_editor_box":711,"new_definition":848,"on.code_submit":787,"table_and_array_both_empty":689,"zoom_in":895,"Page":475,"schema1_of_y":667,"initialize_manifest_navigator":773,"y_of_schema1":364,"get_multiple_definitions_from_app":783,"wait_for_response":781,"Menu_background_color":611,"Menu_border_color":612,"on.text_input":855,"box_height":680,"fw_parent":915,"compute_layout":385,"fw_app":"driver","on.code_change":820,"on_text":539,"survey_animation":906,"animate_next":914,"scale":712,"sx":544,"vx":545,"load_from_iterator":670,"from_viewport":823,"get_definition_from_app":784,"Surface":422,"on_handle":547,"Ticks_font":669,"draw_menu_bar":861,"manifest_navigator_up":628,"copy_shape":396,"manifest_navigator_down":635,"surface_bounds":814,"Save_viewport":865,"delete_definition":673,"font":353,"move_candidate_to_front_of_manifest":632,"draw_cursor":639,"keychord_press_on_manifest_navigator":765,"on.update":900,"text_input_on_manifest_navigator":634,"Spawn_point":822,"zoom_out":908,"manifest_coord":636,"on.mouse_release":836,"manifest_index":637,"animate_next_frame":915,"manifest_navigator_candidates":638,"initialize_editor":678,"interpolate_viewport":843,"add_def_to_menu":640,"on.load_settings":782,"A":831,"maybe_update_key_in_definitions":529,"order_of_magnitude":573,"on.initialize":807,"on":1,"add_thick_line":400,"load_manifest":694,"on.key_release":720,"on.keychord_press":912,"Menu_highlight_color":614,"Num_animation_frames":840,"draw_run_time_error":808,"reset_manifest_navigator":772,"on.mouse_press":916,"num_lines_for_manifest_navigator":676,"draw_manifest_navigator":677,"mouse_cursor":558,"add_hotkey_to_menu":616,"Mouse_cursor":559,"tick_spec":660,"Definition_background_color":849,"Manifest_navigator":495,"set_mouse_cursor":562,"vy":546,"draw_ticks":862,"Test_definition_background_color":858,"Cursor_node":172,"definition_background_color":859,"Animating":842,"Menu_command_color":613,"Zoomed_out":869,"line_height":365,"B":830,"on.draw":885,"load_definition":854}
{"Manifest":769,"Viewport":604,"approximate":579,"snapshot_canvas":913,"get_manifest":768,"copy_viewport":866,"on.save_settings":742,"sy":469,"approximate_up":658,"Definitions":503,"update_editor_box":711,"new_definition":848,"on.code_submit":787,"table_and_array_both_empty":689,"zoom_in":895,"Page":475,"schema1_of_y":667,"initialize_manifest_navigator":773,"y_of_schema1":364,"get_multiple_definitions_from_app":783,"wait_for_response":781,"Menu_background_color":611,"Menu_border_color":612,"on.text_input":855,"box_height":680,"fw_parent":914,"compute_layout":385,"fw_app":"driver","on.code_change":820,"on_text":539,"survey_animation":906,"animate_next":914,"scale":712,"sx":544,"vx":545,"load_from_iterator":670,"from_viewport":823,"get_definition_from_app":784,"Surface":422,"on_handle":547,"Ticks_font":669,"draw_menu_bar":861,"manifest_navigator_up":628,"copy_shape":396,"manifest_navigator_down":635,"surface_bounds":814,"Save_viewport":865,"delete_definition":673,"font":353,"move_candidate_to_front_of_manifest":632,"draw_cursor":639,"keychord_press_on_manifest_navigator":765,"on.update":900,"text_input_on_manifest_navigator":634,"Spawn_point":822,"zoom_out":908,"manifest_coord":636,"on.mouse_release":836,"manifest_index":637,"animate_next_frame":915,"manifest_navigator_candidates":638,"initialize_editor":678,"interpolate_viewport":843,"add_def_to_menu":640,"on.load_settings":782,"A":831,"maybe_update_key_in_definitions":529,"order_of_magnitude":573,"on.initialize":807,"on":1,"add_thick_line":400,"load_manifest":694,"on.key_release":720,"on.keychord_press":912,"Menu_highlight_color":614,"Num_animation_frames":840,"draw_run_time_error":808,"reset_manifest_navigator":772,"on.mouse_press":911,"num_lines_for_manifest_navigator":676,"draw_manifest_navigator":677,"mouse_cursor":558,"add_hotkey_to_menu":616,"Mouse_cursor":559,"tick_spec":660,"Definition_background_color":849,"Manifest_navigator":495,"set_mouse_cursor":562,"vy":546,"draw_ticks":862,"Test_definition_background_color":858,"Cursor_node":172,"definition_background_color":859,"Animating":842,"Menu_command_color":613,"Zoomed_out":869,"line_height":365,"B":830,"on.draw":885,"load_definition":854}
animate_next_frame = function(state, dt)
if state.initial == nil then
state.initial = from_viewport(state)
-- once we've checked keys, pollute the keyspace
state.step = 0
state.frame_time = 0
return
end
state.frame_time = state.frame_time + dt
if state.frame_time > 0.01 then
state.frame_time = state.frame_time - 0.01
state.step = state.step+1
interpolate_viewport(state.initial, state, state.step)
B()
end
end
{"Manifest":769,"Viewport":604,"approximate":579,"snapshot_canvas":913,"get_manifest":768,"copy_viewport":866,"on.save_settings":742,"sy":469,"approximate_up":658,"Definitions":503,"update_editor_box":711,"new_definition":848,"on.code_submit":787,"table_and_array_both_empty":689,"zoom_in":895,"Page":475,"schema1_of_y":667,"initialize_manifest_navigator":773,"y_of_schema1":364,"get_multiple_definitions_from_app":783,"wait_for_response":781,"Menu_background_color":611,"Menu_border_color":612,"on.text_input":855,"box_height":680,"fw_parent":913,"compute_layout":385,"fw_app":"driver","on.code_change":820,"on_text":539,"survey_animation":906,"animate_next":914,"scale":712,"sx":544,"vx":545,"load_from_iterator":670,"from_viewport":823,"get_definition_from_app":784,"Surface":422,"on_handle":547,"Ticks_font":669,"draw_menu_bar":861,"manifest_navigator_up":628,"copy_shape":396,"manifest_navigator_down":635,"surface_bounds":814,"Save_viewport":865,"delete_definition":673,"font":353,"move_candidate_to_front_of_manifest":632,"draw_cursor":639,"keychord_press_on_manifest_navigator":765,"on.update":900,"text_input_on_manifest_navigator":634,"Spawn_point":822,"zoom_out":908,"manifest_coord":636,"on.mouse_release":836,"manifest_index":637,"animate_next_frame":902,"manifest_navigator_candidates":638,"initialize_editor":678,"interpolate_viewport":843,"add_def_to_menu":640,"on.load_settings":782,"A":831,"maybe_update_key_in_definitions":529,"order_of_magnitude":573,"on.initialize":807,"on":1,"add_thick_line":400,"load_manifest":694,"on.key_release":720,"on.keychord_press":912,"Menu_highlight_color":614,"Num_animation_frames":840,"draw_run_time_error":808,"reset_manifest_navigator":772,"on.mouse_press":911,"num_lines_for_manifest_navigator":676,"draw_manifest_navigator":677,"mouse_cursor":558,"add_hotkey_to_menu":616,"Mouse_cursor":559,"tick_spec":660,"Definition_background_color":849,"Manifest_navigator":495,"set_mouse_cursor":562,"vy":546,"draw_ticks":862,"Test_definition_background_color":858,"Cursor_node":172,"definition_background_color":859,"Animating":842,"Menu_command_color":613,"Zoomed_out":869,"line_height":365,"B":830,"on.draw":885,"load_definition":854}
animate_next = function(dt)
if Animating[1].step and Animating[1].step >= Num_animation_frames then
table.remove(Animating, 1)
if #Animating == 0 then
Animating = nil
Canvas = nil
A()
return
end
end
animate_next_frame(Animating[1], dt)
end
snapshot_canvas = function()
-- Render the canvas at pixel perfect resolution.
local winw,winh = App.screen.width, App.screen.height
App.screen.width,App.screen.height = Global_viewport.w, Global_viewport.h
local saved_viewport = Viewport
Viewport = copy_viewport(Global_viewport)
Viewport.zoom = 1.0
A()
Canvas = love.graphics.newCanvas(cw,ch)
love.graphics.setCanvas(Canvas)
App.fake_key_press = true -- Hack; disable drawing the menu and ticks
on.draw()
App.fake_key_press = nil
love.graphics.setCanvas()
Viewport = saved_viewport
App.screen.width,App.screen.height = winw,winh
end
{"on_text":539,"approximate":579,"on.mouse_press":911,"on.code_submit":787,"vx":545,"approximate_up":658,"on.key_release":720,"box_height":680,"compute_layout":385,"get_multiple_definitions_from_app":783,"on.code_change":820,"mouse_cursor":558,"wait_for_response":781,"vy":546,"draw_cursor":639,"load_definition":854,"on.text_input":855,"Menu_background_color":611,"draw_run_time_error":808,"Menu_border_color":612,"A":831,"Menu_command_color":613,"Menu_highlight_color":614,"B":830,"animate_next":910,"sy":469,"add_hotkey_to_menu":616,"draw_manifest_navigator":677,"Cursor_node":172,"num_lines_for_manifest_navigator":676,"initialize_manifest_navigator":773,"Animating":842,"reset_manifest_navigator":772,"draw_ticks":862,"line_height":365,"load_from_iterator":670,"survey_animation":906,"snapshot_canvas":913,"manifest_coord":636,"Test_definition_background_color":858,"y_of_schema1":364,"manifest_navigator_up":628,"tick_spec":660,"manifest_navigator_down":635,"add_def_to_menu":640,"fw_parent":912,"delete_definition":673,"fw_app":"driver","move_candidate_to_front_of_manifest":632,"scale":712,"Manifest":769,"on.save_settings":742,"text_input_on_manifest_navigator":634,"load_manifest":694,"sx":544,"get_manifest":768,"Manifest_navigator":495,"manifest_index":637,"on":1,"Mouse_cursor":559,"Definition_background_color":849,"Zoomed_out":869,"Definitions":503,"set_mouse_cursor":562,"new_definition":848,"update_editor_box":711,"manifest_navigator_candidates":638,"definition_background_color":859,"surface_bounds":814,"Num_animation_frames":840,"keychord_press_on_manifest_navigator":765,"on.draw":885,"add_thick_line":400,"on.initialize":807,"schema1_of_y":667,"Viewport":604,"order_of_magnitude":573,"Spawn_point":822,"table_and_array_both_empty":689,"maybe_update_key_in_definitions":529,"on.load_settings":782,"interpolate_viewport":843,"initialize_editor":678,"copy_viewport":866,"animate_next_frame":902,"on.mouse_release":836,"zoom_out":908,"on.update":900,"get_definition_from_app":784,"on.keychord_press":912,"font":353,"Save_viewport":865,"copy_shape":396,"Page":475,"zoom_in":895,"draw_menu_bar":861,"Ticks_font":669,"on_handle":547,"Surface":422,"from_viewport":823}
on.keychord_press = function(chord, key)
print('key', chord)
if Animating then return end
if Move then return end
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
if (Viewport.zoom-0.1)*20 >= 1 then -- disallow font size of 0
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-g' then
-- special Expose-like 'global zoom' mode
-- if Zoomed_out == nil then
print('C-g 1', Viewport.x)
zoom_out()
print(Animating)
-- else
-- Animation = {
-- Save_viewport,
-- }
-- Save_viewport = nil
-- Zoomed_out = nil
-- end
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()
A()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
initialize_manifest_navigator()
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
initialize_manifest_navigator()
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
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
local definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)
B(--[[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
{"initialize_manifest_navigator":773,"mouse_cursor":558,"Mouse_cursor":559,"tick_spec":660,"copy_shape":396,"get_multiple_definitions_from_app":783,"set_mouse_cursor":562,"Cursor_node":172,"wait_for_response":781,"order_of_magnitude":573,"load_definition":854,"font":353,"approximate":579,"box_height":680,"draw_run_time_error":808,"compute_layout":385,"on":1,"survey_animation":906,"on.load_settings":782,"animate_next":910,"Save_viewport":865,"copy_viewport":866,"Ticks_font":669,"table_and_array_both_empty":689,"zoom_out":908,"Zoomed_out":869,"zoom_in":895,"surface_bounds":814,"initialize_editor":678,"get_manifest":768,"Spawn_point":822,"animate_next_frame":902,"from_viewport":823,"manifest_navigator_up":628,"interpolate_viewport":843,"Definitions":503,"Menu_border_color":612,"new_definition":848,"Menu_command_color":613,"maybe_update_key_in_definitions":529,"Animating":842,"B":830,"draw_menu_bar":861,"fw_app":"driver","add_hotkey_to_menu":616,"Menu_background_color":611,"Menu_highlight_color":614,"draw_manifest_navigator":677,"Manifest":769,"num_lines_for_manifest_navigator":676,"schema1_of_y":667,"on.code_change":820,"reset_manifest_navigator":772,"sy":469,"fw_parent":911,"load_from_iterator":670,"update_editor_box":711,"get_definition_from_app":784,"on.draw":885,"on.key_release":720,"y_of_schema1":364,"approximate_up":658,"Definition_background_color":849,"Surface":422,"manifest_navigator_down":635,"Manifest_navigator":495,"on.code_submit":787,"delete_definition":673,"on.initialize":807,"move_candidate_to_front_of_manifest":632,"on_handle":547,"keychord_press_on_manifest_navigator":765,"vy":546,"text_input_on_manifest_navigator":634,"Num_animation_frames":840,"on_text":539,"manifest_coord":636,"on.mouse_press":911,"manifest_index":637,"draw_cursor":639,"manifest_navigator_candidates":638,"on.update":900,"Viewport":604,"sx":544,"load_manifest":694,"vx":545,"on.save_settings":742,"scale":712,"add_def_to_menu":640,"on.mouse_release":836,"Test_definition_background_color":858,"definition_background_color":859,"on.text_input":855,"snapshot_canvas":872,"on.keychord_press":912,"line_height":365,"draw_ticks":862,"A":831,"Page":475,"add_thick_line":400}
on.mouse_press = function(x,y, mouse_button)
if Animating then return end
print('mouse press')
if Zoomed_out then
print('zoom out', Viewport.zoom)
zoom_in(x,y)
return
end
if Cursor_node then
Cursor_node.show_cursor = nil
Cursor_node = nil
end
if mouse_press_consumed_by_any_button_handler(HUD, x,y, mouse_button) then
return
end
local node = on_text(x,y)
if node then
-- position cursor in node
Cursor_node = node
edit.mouse_press(node.editor, x,y, mouse_button)
return
end
local node = on_handle(x,y)
if node then
-- move node
Move = {xoff=App.mouse_x()-vx(node.x), yoff=App.mouse_y()-vy(node.y), node=node}
return
end
-- pan surface
Pan = {x=Viewport.x+x,y=Viewport.y+y}
end
{"on.save_settings":742,"on.load_settings":782,"add_thick_line":400,"copy_shape":396,"compute_layout":385,"survey_animation":906,"draw_menu_bar":861,"animate_next":910,"on.initialize":807,"draw_manifest_navigator":677,"load_manifest":694,"reset_manifest_navigator":772,"on_handle":547,"load_from_iterator":670,"fw_app":"driver","get_definition_from_app":784,"on_text":539,"on":1,"update_editor_box":711,"manifest_navigator_down":635,"sx":544,"Cursor_node":172,"delete_definition":673,"on.mouse_release":836,"move_candidate_to_front_of_manifest":632,"from_viewport":823,"keychord_press_on_manifest_navigator":765,"get_manifest":768,"text_input_on_manifest_navigator":634,"Animating":842,"manifest_coord":636,"manifest_index":637,"manifest_navigator_candidates":638,"on.mouse_press":911,"Definition_background_color":849,"add_def_to_menu":640,"set_mouse_cursor":562,"Test_definition_background_color":858,"on.code_change":820,"definition_background_color":859,"Num_animation_frames":840,"zoom_in":895,"schema1_of_y":667,"snapshot_canvas":872,"scale":712,"Save_viewport":865,"tick_spec":660,"copy_viewport":866,"draw_cursor":639,"zoom_out":908,"on.keychord_press":897,"Zoomed_out":869,"sy":469,"font":353,"table_and_array_both_empty":689,"interpolate_viewport":843,"Page":475,"Menu_highlight_color":614,"draw_ticks":862,"Manifest":769,"on.update":900,"Mouse_cursor":559,"Manifest_navigator":495,"mouse_cursor":558,"Viewport":604,"order_of_magnitude":573,"on.text_input":855,"vy":546,"on.code_submit":787,"Surface":422,"approximate_up":658,"initialize_editor":678,"y_of_schema1":364,"Spawn_point":822,"on.key_release":720,"Ticks_font":669,"initialize_manifest_navigator":773,"on.draw":885,"Menu_border_color":612,"fw_parent":910,"Menu_command_color":613,"vx":545,"line_height":365,"surface_bounds":814,"A":831,"add_hotkey_to_menu":616,"Definitions":503,"draw_run_time_error":808,"load_definition":854,"Menu_background_color":611,"approximate":579,"num_lines_for_manifest_navigator":676,"wait_for_response":781,"new_definition":848,"get_multiple_definitions_from_app":783,"box_height":680,"B":830,"maybe_update_key_in_definitions":529,"manifest_navigator_up":628,"animate_next_frame":902}
{"Cursor_node":172,"load_definition":854,"approximate":579,"Definition_background_color":849,"update_editor_box":711,"on.code_submit":787,"Test_definition_background_color":858,"on.load_settings":782,"approximate_up":658,"sy":469,"initialize_manifest_navigator":773,"schema1_of_y":667,"box_height":680,"compute_layout":385,"get_multiple_definitions_from_app":783,"snapshot_canvas":872,"Save_viewport":865,"wait_for_response":781,"on.mouse_release":836,"on.text_input":855,"zoom_out":908,"Zoomed_out":869,"zoom_in":895,"Viewport":604,"Menu_background_color":611,"Menu_border_color":612,"load_manifest":694,"Menu_command_color":613,"get_manifest":768,"initialize_editor":678,"draw_menu_bar":861,"scale":712,"Definitions":503,"draw_manifest_navigator":677,"new_definition":848,"num_lines_for_manifest_navigator":676,"reset_manifest_navigator":772,"copy_viewport":866,"load_from_iterator":670,"add_thick_line":400,"get_definition_from_app":784,"copy_shape":396,"sx":544,"Manifest_navigator":495,"draw_run_time_error":808,"manifest_navigator_up":628,"maybe_update_key_in_definitions":529,"manifest_navigator_down":635,"line_height":365,"survey_animation":906,"delete_definition":673,"animate_next":910,"move_candidate_to_front_of_manifest":632,"B":830,"keychord_press_on_manifest_navigator":765,"on_handle":547,"text_input_on_manifest_navigator":634,"animate_next_frame":902,"on.code_change":820,"manifest_coord":636,"on_text":539,"manifest_index":637,"on.mouse_press":893,"manifest_navigator_candidates":638,"A":831,"Surface":422,"add_def_to_menu":640,"surface_bounds":814,"on.initialize":807,"vx":545,"fw_parent":909,"Ticks_font":669,"fw_app":"driver","on.draw":885,"draw_cursor":639,"on.key_release":720,"Spawn_point":822,"Animating":842,"from_viewport":823,"y_of_schema1":364,"interpolate_viewport":843,"add_hotkey_to_menu":616,"on":1,"order_of_magnitude":573,"mouse_cursor":558,"definition_background_color":859,"Mouse_cursor":559,"tick_spec":660,"on.update":900,"set_mouse_cursor":562,"on.keychord_press":897,"Manifest":769,"draw_ticks":862,"Menu_highlight_color":614,"Page":475,"on.save_settings":742,"vy":546,"Num_animation_frames":840,"table_and_array_both_empty":689,"font":353}
animate_next = function(dt)
print('animate_next', Animating[1].step)
if Animating[1].step and Animating[1].step >= Num_animation_frames then
print('animate_next A')
table.remove(Animating, 1)
if #Animating == 0 then
Animating = nil
Canvas = nil
A()
return
end
end
print('animate_next B', Viewport.x, Viewport.zoom)
animate_next_frame(Animating[1], dt)
end
{"Definition_background_color":849,"fw_parent":908,"Test_definition_background_color":858,"definition_background_color":859,"Menu_background_color":611,"snapshot_canvas":872,"Manifest":769,"Save_viewport":865,"Menu_command_color":613,"load_manifest":694,"Menu_highlight_color":614,"get_manifest":768,"zoom_out":908,"on.text_input":855,"on.mouse_release":836,"draw_manifest_navigator":677,"Definitions":503,"num_lines_for_manifest_navigator":676,"new_definition":848,"reset_manifest_navigator":772,"draw_cursor":639,"load_from_iterator":670,"on.code_submit":787,"get_definition_from_app":784,"add_thick_line":400,"copy_shape":396,"update_editor_box":711,"font":353,"initialize_manifest_navigator":773,"maybe_update_key_in_definitions":529,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"get_multiple_definitions_from_app":783,"keychord_press_on_manifest_navigator":765,"schema1_of_y":667,"text_input_on_manifest_navigator":634,"wait_for_response":781,"Cursor_node":172,"manifest_index":637,"manifest_navigator_candidates":638,"box_height":680,"compute_layout":385,"load_definition":854,"on":1,"draw_run_time_error":808,"on.save_settings":742,"sx":544,"on.load_settings":782,"animate_next":909,"table_and_array_both_empty":689,"on.key_release":720,"Num_animation_frames":840,"animate_next_frame":902,"fw_app":"driver","set_mouse_cursor":562,"on.keychord_press":897,"draw_ticks":862,"approximate_up":658,"initialize_editor":678,"mouse_cursor":558,"surface_bounds":814,"Mouse_cursor":559,"vy":546,"on.update":900,"scale":712,"order_of_magnitude":573,"manifest_coord":636,"Page":475,"draw_menu_bar":861,"Spawn_point":822,"approximate":579,"from_viewport":823,"add_def_to_menu":640,"interpolate_viewport":843,"add_hotkey_to_menu":616,"survey_animation":906,"y_of_schema1":364,"sy":469,"on.mouse_press":893,"Animating":842,"Menu_border_color":612,"Viewport":604,"on.draw":885,"manifest_navigator_up":628,"Ticks_font":669,"on_text":539,"tick_spec":660,"on.initialize":807,"Surface":422,"A":831,"on.code_change":820,"on_handle":547,"manifest_navigator_down":635,"B":830,"line_height":365,"zoom_in":895,"Manifest_navigator":495,"vx":545,"Zoomed_out":869,"copy_viewport":866}
animate_next = function(dt)
print('animate_next', Animating[1].step)
if Animating[1].step and Animating[1].step >= Num_animation_frames then
print('animate_next A')
table.remove(Animating, 1)
if #Animating == 0 then
Animating = nil
Canvas = nil
A()
return
end
end
print('animate_next B', Viewport.zoom)
animate_next_frame(Animating[1], dt)
end
zoom_out = function()
Save_viewport = copy_viewport(Viewport)
snapshot_canvas()
Animating = {
copy_viewport(Global_viewport),
}
Zoomed_out = true
end
{"initialize_manifest_navigator":773,"manifest_navigator_up":628,"manifest_navigator_down":635,"get_multiple_definitions_from_app":783,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"Manifest":769,"keychord_press_on_manifest_navigator":765,"load_manifest":694,"fw_parent":907,"get_manifest":768,"manifest_coord":636,"manifest_index":637,"manifest_navigator_candidates":638,"Definitions":503,"new_definition":848,"scale":712,"A":831,"font":353,"Surface":422,"animate_next_frame":902,"on.text_input":855,"maybe_update_key_in_definitions":529,"surface_bounds":814,"Ticks_font":669,"draw_run_time_error":808,"tick_spec":660,"copy_shape":396,"Animating":842,"add_thick_line":400,"update_editor_box":711,"on_handle":547,"from_viewport":823,"table_and_array_both_empty":689,"interpolate_viewport":843,"vy":546,"on_text":539,"Cursor_node":172,"on.code_submit":787,"schema1_of_y":667,"zoom_in":895,"on.update":900,"zoom_out":908,"sx":544,"animate_next":903,"vx":545,"initialize_editor":678,"Zoomed_out":869,"box_height":680,"on.mouse_release":836,"on":1,"on.code_change":820,"on.key_release":720,"on.save_settings":742,"snapshot_canvas":872,"on.load_settings":782,"definition_background_color":859,"copy_viewport":866,"load_definition":854,"Save_viewport":865,"compute_layout":385,"mouse_cursor":558,"Definition_background_color":849,"Mouse_cursor":559,"text_input_on_manifest_navigator":634,"draw_ticks":862,"Spawn_point":822,"Test_definition_background_color":858,"B":830,"on.draw":885,"get_definition_from_app":784,"wait_for_response":781,"load_from_iterator":670,"Viewport":604,"set_mouse_cursor":562,"Menu_background_color":611,"draw_cursor":639,"Menu_border_color":612,"order_of_magnitude":573,"Menu_command_color":613,"Menu_highlight_color":614,"on.mouse_press":893,"sy":469,"y_of_schema1":364,"survey_animation":906,"add_hotkey_to_menu":616,"add_def_to_menu":640,"approximate_up":658,"draw_manifest_navigator":677,"draw_menu_bar":861,"num_lines_for_manifest_navigator":676,"Page":475,"line_height":365,"reset_manifest_navigator":772,"Manifest_navigator":495,"approximate":579,"on.keychord_press":897,"fw_app":"driver","on.initialize":807,"Num_animation_frames":840}
zoom_out = function()
Save_viewport = copy_viewport(Viewport)
snapshot_canvas()
Animating = {
copy(Global_viewport),
}
Zoomed_out = true
end
{"on_handle":547,"wait_for_response":781,"on_text":539,"on.mouse_press":893,"sx":544,"font":353,"vx":545,"draw_cursor":639,"on.key_release":720,"Animating":842,"survey_animation":906,"on.initialize":807,"scale":712,"A":831,"Menu_highlight_color":614,"draw_menu_bar":861,"B":830,"animate_next_frame":902,"Mouse_cursor":559,"reset_manifest_navigator":772,"set_mouse_cursor":562,"load_from_iterator":670,"get_definition_from_app":784,"surface_bounds":814,"load_manifest":694,"manifest_navigator_up":628,"manifest_navigator_down":635,"on.draw":885,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"Viewport":604,"keychord_press_on_manifest_navigator":765,"text_input_on_manifest_navigator":634,"manifest_coord":636,"approximate_up":658,"manifest_navigator_candidates":638,"on.update":900,"add_def_to_menu":640,"on.keychord_press":897,"on":1,"maybe_update_key_in_definitions":529,"num_lines_for_manifest_navigator":676,"Num_animation_frames":840,"from_viewport":823,"draw_manifest_navigator":677,"update_editor_box":711,"new_definition":848,"Manifest_navigator":495,"add_hotkey_to_menu":616,"fw_parent":906,"approximate":579,"fw_app":"driver","Definition_background_color":849,"Menu_command_color":613,"schema1_of_y":667,"order_of_magnitude":573,"line_height":365,"Test_definition_background_color":858,"tick_spec":660,"Surface":422,"y_of_schema1":364,"Page":475,"Menu_background_color":611,"sy":469,"on.mouse_release":836,"Manifest":769,"Spawn_point":822,"draw_ticks":862,"Menu_border_color":612,"box_height":680,"definition_background_color":859,"compute_layout":385,"Save_viewport":865,"load_definition":854,"on.code_change":820,"copy_viewport":866,"interpolate_viewport":843,"mouse_cursor":558,"zoom_out":907,"snapshot_canvas":872,"on.text_input":855,"Ticks_font":669,"Zoomed_out":869,"on.save_settings":742,"animate_next":903,"on.load_settings":782,"zoom_in":895,"manifest_index":637,"on.code_submit":787,"Cursor_node":172,"vy":546,"table_and_array_both_empty":689,"initialize_manifest_navigator":773,"Definitions":503,"add_thick_line":400,"get_manifest":768,"copy_shape":396,"get_multiple_definitions_from_app":783,"draw_run_time_error":808,"initialize_editor":678}
survey_animation = function()
---[[ '--' at start to disable animation, '---' to enable
local minx, miny, maxx, maxy = surface_bounds(Definitions)
-- ensure 1px of white background all around
-- just in case the viewport ever goes
-- outside canvas bounds while animating
minx,miny, maxx,maxy = minx-1,miny-1, maxx+1,maxx+1
local zoomx = App.screen.width/(maxx-minx)
local zoomy = App.screen.height/(maxy-miny)
local zoom, cw, ch
if zoomx < zoomy then
zoom = zoomx
cw = maxx-minx
ch = cw*App.screen.height/App.screen.width
else
zoom = zoomy
ch = maxy-miny
cw = ch*App.screen.width/App.screen.height
end
local desired_viewport = Viewport
Global_viewport = {x=minx, y=miny, w=cw, h=ch, zoom=zoom}
snapshot_canvas()
-- initialize animation
Animating = {
copy_viewport(Global_viewport),
desired_viewport,
}
Viewport.x = -App.screen.width/2
Viewport.y = -App.screen.height/2
Viewport.w = App.screen.width
Viewport.h = App.screen.height
Viewport.zoom = 1.0 --]]
end
{"approximate_up":658,"reset_manifest_navigator":772,"schema1_of_y":667,"Cursor_node":172,"load_from_iterator":670,"font":353,"get_definition_from_app":784,"y_of_schema1":364,"Manifest":769,"manifest_navigator_up":628,"load_manifest":694,"manifest_navigator_down":635,"get_manifest":768,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"Definitions":503,"text_input_on_manifest_navigator":634,"new_definition":848,"manifest_coord":636,"manifest_index":637,"manifest_navigator_candidates":638,"on.code_submit":787,"add_def_to_menu":640,"on.draw":885,"Viewport":604,"initialize_manifest_navigator":773,"add_thick_line":400,"copy_shape":396,"get_multiple_definitions_from_app":783,"on.mouse_release":836,"wait_for_response":781,"on.update":900,"on.code_change":820,"tick_spec":660,"Page":475,"on_handle":547,"Surface":422,"on_text":539,"draw_run_time_error":808,"Num_animation_frames":840,"on.text_input":855,"load_definition":854,"survey_animation":906,"on.initialize":807,"animate_next":903,"A":831,"on.mouse_press":893,"B":830,"animate_next_frame":902,"on.save_settings":742,"draw_menu_bar":861,"on.load_settings":782,"on.keychord_press":897,"box_height":680,"Test_definition_background_color":858,"compute_layout":385,"sx":544,"table_and_array_both_empty":689,"surface_bounds":814,"on.key_release":720,"scale":712,"draw_cursor":639,"vx":545,"Zoomed_out":869,"Ticks_font":669,"snapshot_canvas":872,"maybe_update_key_in_definitions":529,"Save_viewport":865,"mouse_cursor":558,"copy_viewport":866,"Mouse_cursor":559,"interpolate_viewport":843,"zoom_out":905,"definition_background_color":859,"set_mouse_cursor":562,"Menu_border_color":612,"draw_ticks":862,"fw_parent":905,"fw_app":"driver","Spawn_point":822,"zoom_in":895,"sy":469,"Menu_background_color":611,"initialize_editor":678,"line_height":365,"order_of_magnitude":573,"Menu_command_color":613,"Animating":842,"Menu_highlight_color":614,"add_hotkey_to_menu":616,"approximate":579,"Definition_background_color":849,"update_editor_box":711,"Manifest_navigator":495,"vy":546,"draw_manifest_navigator":677,"from_viewport":823,"num_lines_for_manifest_navigator":676,"on":1}
zoom_out = function()
Save_viewport = copy_viewport(Viewport)
snapshot_canvas()
Animating = {
Global_viewport,
}
Zoomed_out = true
end
{"approximate_up":658,"reset_manifest_navigator":772,"schema1_of_y":667,"Cursor_node":172,"load_from_iterator":670,"font":353,"get_definition_from_app":784,"y_of_schema1":364,"Manifest":769,"manifest_navigator_up":628,"load_manifest":694,"manifest_navigator_down":635,"get_manifest":768,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"Definitions":503,"text_input_on_manifest_navigator":634,"new_definition":848,"manifest_coord":636,"manifest_index":637,"manifest_navigator_candidates":638,"on.code_submit":787,"add_def_to_menu":640,"on.draw":885,"Viewport":604,"initialize_manifest_navigator":773,"add_thick_line":400,"copy_shape":396,"get_multiple_definitions_from_app":783,"on.mouse_release":836,"wait_for_response":781,"on.update":900,"on.code_change":820,"tick_spec":660,"Page":475,"on_handle":547,"Surface":422,"on_text":539,"draw_run_time_error":808,"Num_animation_frames":840,"on.text_input":855,"load_definition":854,"survey_animation":863,"on.initialize":807,"animate_next":903,"A":831,"on.mouse_press":893,"B":830,"animate_next_frame":902,"on.save_settings":742,"draw_menu_bar":861,"on.load_settings":782,"on.keychord_press":897,"box_height":680,"Test_definition_background_color":858,"compute_layout":385,"sx":544,"table_and_array_both_empty":689,"surface_bounds":814,"on.key_release":720,"scale":712,"draw_cursor":639,"vx":545,"Zoomed_out":869,"Ticks_font":669,"snapshot_canvas":872,"maybe_update_key_in_definitions":529,"Save_viewport":865,"mouse_cursor":558,"copy_viewport":866,"Mouse_cursor":559,"interpolate_viewport":843,"zoom_out":905,"definition_background_color":859,"set_mouse_cursor":562,"Menu_border_color":612,"draw_ticks":862,"fw_parent":904,"fw_app":"driver","Spawn_point":822,"zoom_in":895,"sy":469,"Menu_background_color":611,"initialize_editor":678,"line_height":365,"order_of_magnitude":573,"Menu_command_color":613,"Animating":842,"Menu_highlight_color":614,"add_hotkey_to_menu":616,"approximate":579,"Definition_background_color":849,"update_editor_box":711,"Manifest_navigator":495,"vy":546,"draw_manifest_navigator":677,"from_viewport":823,"num_lines_for_manifest_navigator":676,"on":1}
zoom_out = function()
Save_viewport = copy_viewport(Viewport)
snapshot_canvas()
Global_viewport.step = nil
Animating = {
Global_viewport,
}
Zoomed_out = true
end
{"approximate_up":658,"reset_manifest_navigator":772,"schema1_of_y":667,"Cursor_node":172,"load_from_iterator":670,"font":353,"get_definition_from_app":784,"y_of_schema1":364,"Manifest":769,"manifest_navigator_up":628,"load_manifest":694,"manifest_navigator_down":635,"get_manifest":768,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"Definitions":503,"text_input_on_manifest_navigator":634,"new_definition":848,"manifest_coord":636,"manifest_index":637,"manifest_navigator_candidates":638,"on.code_submit":787,"add_def_to_menu":640,"on.draw":885,"Viewport":604,"initialize_manifest_navigator":773,"add_thick_line":400,"copy_shape":396,"get_multiple_definitions_from_app":783,"on.mouse_release":836,"wait_for_response":781,"on.update":900,"on.code_change":820,"tick_spec":660,"Page":475,"on_handle":547,"Surface":422,"on_text":539,"draw_run_time_error":808,"Num_animation_frames":840,"on.text_input":855,"load_definition":854,"survey_animation":863,"on.initialize":807,"animate_next":903,"A":831,"on.mouse_press":893,"B":830,"animate_next_frame":902,"on.save_settings":742,"draw_menu_bar":861,"on.load_settings":782,"on.keychord_press":897,"box_height":680,"Test_definition_background_color":858,"compute_layout":385,"sx":544,"table_and_array_both_empty":689,"surface_bounds":814,"on.key_release":720,"scale":712,"draw_cursor":639,"vx":545,"Zoomed_out":869,"Ticks_font":669,"snapshot_canvas":872,"maybe_update_key_in_definitions":529,"Save_viewport":865,"mouse_cursor":558,"copy_viewport":866,"Mouse_cursor":559,"interpolate_viewport":843,"zoom_out":904,"definition_background_color":859,"set_mouse_cursor":562,"Menu_border_color":612,"draw_ticks":862,"fw_parent":903,"fw_app":"driver","Spawn_point":822,"zoom_in":895,"sy":469,"Menu_background_color":611,"initialize_editor":678,"line_height":365,"order_of_magnitude":573,"Menu_command_color":613,"Animating":842,"Menu_highlight_color":614,"add_hotkey_to_menu":616,"approximate":579,"Definition_background_color":849,"update_editor_box":711,"Manifest_navigator":495,"vy":546,"draw_manifest_navigator":677,"from_viewport":823,"num_lines_for_manifest_navigator":676,"on":1}
{"approximate_up":658,"reset_manifest_navigator":772,"schema1_of_y":667,"Cursor_node":172,"load_from_iterator":670,"font":353,"get_definition_from_app":784,"y_of_schema1":364,"Manifest":769,"manifest_navigator_up":628,"load_manifest":694,"manifest_navigator_down":635,"get_manifest":768,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"Definitions":503,"text_input_on_manifest_navigator":634,"new_definition":848,"manifest_coord":636,"manifest_index":637,"manifest_navigator_candidates":638,"on.code_submit":787,"add_def_to_menu":640,"on.draw":885,"Viewport":604,"initialize_manifest_navigator":773,"add_thick_line":400,"copy_shape":396,"get_multiple_definitions_from_app":783,"on.mouse_release":836,"wait_for_response":781,"on.update":900,"on.code_change":820,"tick_spec":660,"Page":475,"on_handle":547,"Surface":422,"on_text":539,"draw_run_time_error":808,"Num_animation_frames":840,"on.text_input":855,"load_definition":854,"survey_animation":863,"on.initialize":807,"animate_next":903,"A":831,"on.mouse_press":893,"B":830,"animate_next_frame":902,"on.save_settings":742,"draw_menu_bar":861,"on.load_settings":782,"on.keychord_press":897,"box_height":680,"Test_definition_background_color":858,"compute_layout":385,"sx":544,"table_and_array_both_empty":689,"surface_bounds":814,"on.key_release":720,"scale":712,"draw_cursor":639,"vx":545,"Zoomed_out":869,"Ticks_font":669,"snapshot_canvas":872,"maybe_update_key_in_definitions":529,"Save_viewport":865,"mouse_cursor":558,"copy_viewport":866,"Mouse_cursor":559,"interpolate_viewport":843,"zoom_out":888,"definition_background_color":859,"set_mouse_cursor":562,"Menu_border_color":612,"draw_ticks":862,"fw_parent":902,"fw_app":"driver","Spawn_point":822,"zoom_in":895,"sy":469,"Menu_background_color":611,"initialize_editor":678,"line_height":365,"order_of_magnitude":573,"Menu_command_color":613,"Animating":842,"Menu_highlight_color":614,"add_hotkey_to_menu":616,"approximate":579,"Definition_background_color":849,"update_editor_box":711,"Manifest_navigator":495,"vy":546,"draw_manifest_navigator":677,"from_viewport":823,"num_lines_for_manifest_navigator":676,"on":1}
animate_next = function(dt)
print('animate_next', Animating[1].step)
if Animating[1].step and Animating[1].step >= Num_animation_frames then
print('animate_next A')
table.remove(Animating, 1)
if #Animating == 0 then
Animating = nil
Canvas = nil
A()
return
end
end
print('animate_next B')
animate_next_frame(Animating[1], dt)
end
{"approximate_up":658,"reset_manifest_navigator":772,"schema1_of_y":667,"Cursor_node":172,"load_from_iterator":670,"font":353,"get_definition_from_app":784,"y_of_schema1":364,"Manifest":769,"manifest_navigator_up":628,"load_manifest":694,"manifest_navigator_down":635,"get_manifest":768,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"Definitions":503,"text_input_on_manifest_navigator":634,"new_definition":848,"manifest_coord":636,"manifest_index":637,"manifest_navigator_candidates":638,"on.code_submit":787,"add_def_to_menu":640,"on.draw":885,"Viewport":604,"initialize_manifest_navigator":773,"add_thick_line":400,"copy_shape":396,"get_multiple_definitions_from_app":783,"on.mouse_release":836,"wait_for_response":781,"on.update":900,"on.code_change":820,"tick_spec":660,"Page":475,"on_handle":547,"Surface":422,"on_text":539,"draw_run_time_error":808,"Num_animation_frames":840,"on.text_input":855,"load_definition":854,"survey_animation":863,"on.initialize":807,"animate_next":901,"A":831,"on.mouse_press":893,"B":830,"animate_next_frame":902,"on.save_settings":742,"draw_menu_bar":861,"on.load_settings":782,"on.keychord_press":897,"box_height":680,"Test_definition_background_color":858,"compute_layout":385,"sx":544,"table_and_array_both_empty":689,"surface_bounds":814,"on.key_release":720,"scale":712,"draw_cursor":639,"vx":545,"Zoomed_out":869,"Ticks_font":669,"snapshot_canvas":872,"maybe_update_key_in_definitions":529,"Save_viewport":865,"mouse_cursor":558,"copy_viewport":866,"Mouse_cursor":559,"interpolate_viewport":843,"zoom_out":888,"definition_background_color":859,"set_mouse_cursor":562,"Menu_border_color":612,"draw_ticks":862,"fw_parent":901,"fw_app":"driver","Spawn_point":822,"zoom_in":895,"sy":469,"Menu_background_color":611,"initialize_editor":678,"line_height":365,"order_of_magnitude":573,"Menu_command_color":613,"Animating":842,"Menu_highlight_color":614,"add_hotkey_to_menu":616,"approximate":579,"Definition_background_color":849,"update_editor_box":711,"Manifest_navigator":495,"vy":546,"draw_manifest_navigator":677,"from_viewport":823,"num_lines_for_manifest_navigator":676,"on":1}
animate_next_frame = function(state, dt)
if state.initial == nil then
print('animate_next_frame A')
state.initial = from_viewport(state)
-- once we've checked keys, pollute the keyspace
state.step = 0
state.frame_time = 0
return
end
print('animate_next_frame B')
state.frame_time = state.frame_time + dt
if state.frame_time > 0.01 then
print('animate_next_frame C')
state.frame_time = state.frame_time - 0.01
state.step = state.step+1
interpolate_viewport(state.initial, state, state.step)
B()
end
end
{"approximate_up":658,"reset_manifest_navigator":772,"schema1_of_y":667,"Cursor_node":172,"load_from_iterator":670,"font":353,"get_definition_from_app":784,"y_of_schema1":364,"Manifest":769,"manifest_navigator_up":628,"load_manifest":694,"manifest_navigator_down":635,"get_manifest":768,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"Definitions":503,"text_input_on_manifest_navigator":634,"new_definition":848,"manifest_coord":636,"manifest_index":637,"manifest_navigator_candidates":638,"on.code_submit":787,"add_def_to_menu":640,"on.draw":885,"Viewport":604,"initialize_manifest_navigator":773,"add_thick_line":400,"copy_shape":396,"get_multiple_definitions_from_app":783,"on.mouse_release":836,"wait_for_response":781,"on.update":900,"on.code_change":820,"tick_spec":660,"Page":475,"on_handle":547,"Surface":422,"on_text":539,"draw_run_time_error":808,"Num_animation_frames":840,"on.text_input":855,"load_definition":854,"survey_animation":863,"on.initialize":807,"animate_next":901,"A":831,"on.mouse_press":893,"B":830,"animate_next_frame":825,"on.save_settings":742,"draw_menu_bar":861,"on.load_settings":782,"on.keychord_press":897,"box_height":680,"Test_definition_background_color":858,"compute_layout":385,"sx":544,"table_and_array_both_empty":689,"surface_bounds":814,"on.key_release":720,"scale":712,"draw_cursor":639,"vx":545,"Zoomed_out":869,"Ticks_font":669,"snapshot_canvas":872,"maybe_update_key_in_definitions":529,"Save_viewport":865,"mouse_cursor":558,"copy_viewport":866,"Mouse_cursor":559,"interpolate_viewport":843,"zoom_out":888,"definition_background_color":859,"set_mouse_cursor":562,"Menu_border_color":612,"draw_ticks":862,"fw_parent":900,"fw_app":"driver","Spawn_point":822,"zoom_in":895,"sy":469,"Menu_background_color":611,"initialize_editor":678,"line_height":365,"order_of_magnitude":573,"Menu_command_color":613,"Animating":842,"Menu_highlight_color":614,"add_hotkey_to_menu":616,"approximate":579,"Definition_background_color":849,"update_editor_box":711,"Manifest_navigator":495,"vy":546,"draw_manifest_navigator":677,"from_viewport":823,"num_lines_for_manifest_navigator":676,"on":1}
animate_next = function(dt)
print('animate_next')
if Animating[1].step and Animating[1].step >= Num_animation_frames then
print('animate_next A')
table.remove(Animating, 1)
if #Animating == 0 then
Animating = nil
Canvas = nil
A()
return
end
end
print('animate_next B')
animate_next_frame(Animating[1], dt)
end
on.update = function(dt)
if Animating then
animate_next(dt)
return
end
if Pan then
set_mouse_cursor('hand')
elseif Move or on_handle(App.mouse_x(), App.mouse_y()) then
set_mouse_cursor('crosshair')
else
set_mouse_cursor('arrow')
end
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move then
Move.node.x = sx(App.mouse_x())-Move.xoff
Move.node.y = sy(App.mouse_y())-Move.yoff
B()
return
end
end
{"approximate_up":658,"reset_manifest_navigator":772,"schema1_of_y":667,"Cursor_node":172,"load_from_iterator":670,"font":353,"get_definition_from_app":784,"y_of_schema1":364,"Manifest":769,"manifest_navigator_up":628,"load_manifest":694,"manifest_navigator_down":635,"get_manifest":768,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"Definitions":503,"text_input_on_manifest_navigator":634,"new_definition":848,"manifest_coord":636,"manifest_index":637,"manifest_navigator_candidates":638,"on.code_submit":787,"add_def_to_menu":640,"on.draw":885,"Viewport":604,"initialize_manifest_navigator":773,"add_thick_line":400,"copy_shape":396,"get_multiple_definitions_from_app":783,"on.mouse_release":836,"wait_for_response":781,"on.update":900,"on.code_change":820,"tick_spec":660,"Page":475,"on_handle":547,"Surface":422,"on_text":539,"draw_run_time_error":808,"Num_animation_frames":840,"on.text_input":855,"load_definition":854,"survey_animation":863,"on.initialize":807,"animate_next":882,"A":831,"on.mouse_press":893,"B":830,"animate_next_frame":825,"on.save_settings":742,"draw_menu_bar":861,"on.load_settings":782,"on.keychord_press":897,"box_height":680,"Test_definition_background_color":858,"compute_layout":385,"sx":544,"table_and_array_both_empty":689,"surface_bounds":814,"on.key_release":720,"scale":712,"draw_cursor":639,"vx":545,"Zoomed_out":869,"Ticks_font":669,"snapshot_canvas":872,"maybe_update_key_in_definitions":529,"Save_viewport":865,"mouse_cursor":558,"copy_viewport":866,"Mouse_cursor":559,"interpolate_viewport":843,"zoom_out":888,"definition_background_color":859,"set_mouse_cursor":562,"Menu_border_color":612,"draw_ticks":862,"fw_parent":899,"fw_app":"driver","Spawn_point":822,"zoom_in":895,"sy":469,"Menu_background_color":611,"initialize_editor":678,"line_height":365,"order_of_magnitude":573,"Menu_command_color":613,"Animating":842,"Menu_highlight_color":614,"add_hotkey_to_menu":616,"approximate":579,"Definition_background_color":849,"update_editor_box":711,"Manifest_navigator":495,"vy":546,"draw_manifest_navigator":677,"from_viewport":823,"num_lines_for_manifest_navigator":676,"on":1}
on.update = function(dt)
if Animating then
print('on.update: animating')
animate_next(dt)
return
end
if Pan then
set_mouse_cursor('hand')
elseif Move or on_handle(App.mouse_x(), App.mouse_y()) then
set_mouse_cursor('crosshair')
else
set_mouse_cursor('arrow')
end
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move then
Move.node.x = sx(App.mouse_x())-Move.xoff
Move.node.y = sy(App.mouse_y())-Move.yoff
B()
return
end
end
{"approximate_up":658,"reset_manifest_navigator":772,"schema1_of_y":667,"Cursor_node":172,"load_from_iterator":670,"font":353,"get_definition_from_app":784,"y_of_schema1":364,"Manifest":769,"manifest_navigator_up":628,"load_manifest":694,"manifest_navigator_down":635,"get_manifest":768,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"Definitions":503,"text_input_on_manifest_navigator":634,"new_definition":848,"manifest_coord":636,"manifest_index":637,"manifest_navigator_candidates":638,"on.code_submit":787,"add_def_to_menu":640,"on.draw":885,"Viewport":604,"initialize_manifest_navigator":773,"add_thick_line":400,"copy_shape":396,"get_multiple_definitions_from_app":783,"on.mouse_release":836,"wait_for_response":781,"on.update":899,"on.code_change":820,"tick_spec":660,"Page":475,"on_handle":547,"Surface":422,"on_text":539,"draw_run_time_error":808,"Num_animation_frames":840,"on.text_input":855,"load_definition":854,"survey_animation":863,"on.initialize":807,"animate_next":882,"A":831,"on.mouse_press":893,"B":830,"animate_next_frame":825,"on.save_settings":742,"draw_menu_bar":861,"on.load_settings":782,"on.keychord_press":897,"box_height":680,"Test_definition_background_color":858,"compute_layout":385,"sx":544,"table_and_array_both_empty":689,"surface_bounds":814,"on.key_release":720,"scale":712,"draw_cursor":639,"vx":545,"Zoomed_out":869,"Ticks_font":669,"snapshot_canvas":872,"maybe_update_key_in_definitions":529,"Save_viewport":865,"mouse_cursor":558,"copy_viewport":866,"Mouse_cursor":559,"interpolate_viewport":843,"zoom_out":888,"definition_background_color":859,"set_mouse_cursor":562,"Menu_border_color":612,"draw_ticks":862,"fw_parent":898,"fw_app":"driver","Spawn_point":822,"zoom_in":895,"sy":469,"Menu_background_color":611,"initialize_editor":678,"line_height":365,"order_of_magnitude":573,"Menu_command_color":613,"Animating":842,"Menu_highlight_color":614,"add_hotkey_to_menu":616,"approximate":579,"Definition_background_color":849,"update_editor_box":711,"Manifest_navigator":495,"vy":546,"draw_manifest_navigator":677,"from_viewport":823,"num_lines_for_manifest_navigator":676,"on":1}
on.update = function(dt)
print('on.update')
if Animating then
print('on.update: animating')
animate_next(dt)
return
end
if Pan then
set_mouse_cursor('hand')
elseif Move or on_handle(App.mouse_x(), App.mouse_y()) then
set_mouse_cursor('crosshair')
else
set_mouse_cursor('arrow')
end
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move then
Move.node.x = sx(App.mouse_x())-Move.xoff
Move.node.y = sy(App.mouse_y())-Move.yoff
B()
return
end
end
{"add_hotkey_to_menu":616,"on.mouse_press":893,"survey_animation":863,"draw_manifest_navigator":677,"Cursor_node":172,"num_lines_for_manifest_navigator":676,"Page":475,"on_handle":547,"line_height":365,"animate_next_frame":825,"load_from_iterator":670,"on_text":539,"get_definition_from_app":784,"on.code_submit":787,"sx":544,"surface_bounds":814,"initialize_manifest_navigator":773,"delete_definition":673,"Viewport":604,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"get_multiple_definitions_from_app":783,"text_input_on_manifest_navigator":634,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"manifest_index":637,"on.update":898,"on.keychord_press":897,"add_def_to_menu":640,"B":830,"on.key_release":720,"Num_animation_frames":840,"animate_next":882,"tick_spec":660,"set_mouse_cursor":562,"Definition_background_color":849,"draw_ticks":862,"manifest_coord":636,"sy":469,"A":831,"Test_definition_background_color":858,"vy":546,"definition_background_color":859,"manifest_navigator_down":635,"update_editor_box":711,"new_definition":848,"order_of_magnitude":573,"manifest_navigator_up":628,"reset_manifest_navigator":772,"load_definition":854,"Manifest_navigator":495,"approximate":579,"on.draw":885,"scale":712,"snapshot_canvas":872,"box_height":680,"Save_viewport":865,"draw_run_time_error":808,"copy_viewport":866,"manifest_navigator_candidates":638,"on.save_settings":742,"zoom_out":888,"on.load_settings":782,"Zoomed_out":869,"schema1_of_y":667,"on.mouse_release":836,"Spawn_point":822,"approximate_up":658,"table_and_array_both_empty":689,"zoom_in":895,"on.initialize":807,"compute_layout":385,"fw_app":"driver","on.code_change":820,"get_manifest":768,"fw_parent":897,"load_manifest":694,"Menu_border_color":612,"y_of_schema1":364,"Mouse_cursor":559,"on.text_input":855,"Animating":842,"wait_for_response":781,"Definitions":503,"maybe_update_key_in_definitions":529,"add_thick_line":400,"Ticks_font":669,"copy_shape":396,"Surface":422,"Manifest":769,"Menu_background_color":611,"font":353,"vx":545,"draw_cursor":639,"Menu_command_color":613,"initialize_editor":678,"Menu_highlight_color":614,"on":1,"draw_menu_bar":861}
on.keychord_press = function(chord, key)
print('key', chord)
if Animating then return end
if Move then return end
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
if (Viewport.zoom-0.1)*20 >= 1 then -- disallow font size of 0
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-g' then
-- special Expose-like 'global zoom' mode
-- if Zoomed_out == nil then
zoom_out()
print(Animating)
-- else
-- Animation = {
-- Save_viewport,
-- }
-- Save_viewport = nil
-- Zoomed_out = nil
-- end
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()
A()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
initialize_manifest_navigator()
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
initialize_manifest_navigator()
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
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
local definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)
B(--[[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
{"add_hotkey_to_menu":616,"on.mouse_press":893,"survey_animation":863,"draw_manifest_navigator":677,"Cursor_node":172,"num_lines_for_manifest_navigator":676,"Page":475,"on_handle":547,"line_height":365,"animate_next_frame":825,"load_from_iterator":670,"on_text":539,"get_definition_from_app":784,"on.code_submit":787,"sx":544,"surface_bounds":814,"initialize_manifest_navigator":773,"delete_definition":673,"Viewport":604,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"get_multiple_definitions_from_app":783,"text_input_on_manifest_navigator":634,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"manifest_index":637,"on.update":835,"on.keychord_press":897,"add_def_to_menu":640,"B":830,"on.key_release":720,"Num_animation_frames":840,"animate_next":882,"tick_spec":660,"set_mouse_cursor":562,"Definition_background_color":849,"draw_ticks":862,"manifest_coord":636,"sy":469,"A":831,"Test_definition_background_color":858,"vy":546,"definition_background_color":859,"manifest_navigator_down":635,"update_editor_box":711,"new_definition":848,"order_of_magnitude":573,"manifest_navigator_up":628,"reset_manifest_navigator":772,"load_definition":854,"Manifest_navigator":495,"approximate":579,"on.draw":885,"scale":712,"snapshot_canvas":872,"box_height":680,"Save_viewport":865,"draw_run_time_error":808,"copy_viewport":866,"manifest_navigator_candidates":638,"on.save_settings":742,"zoom_out":888,"on.load_settings":782,"Zoomed_out":869,"schema1_of_y":667,"on.mouse_release":836,"Spawn_point":822,"approximate_up":658,"table_and_array_both_empty":689,"zoom_in":895,"on.initialize":807,"compute_layout":385,"fw_app":"driver","on.code_change":820,"get_manifest":768,"fw_parent":896,"load_manifest":694,"Menu_border_color":612,"y_of_schema1":364,"Mouse_cursor":559,"on.text_input":855,"Animating":842,"wait_for_response":781,"Definitions":503,"maybe_update_key_in_definitions":529,"add_thick_line":400,"Ticks_font":669,"copy_shape":396,"Surface":422,"Manifest":769,"Menu_background_color":611,"font":353,"vx":545,"draw_cursor":639,"Menu_command_color":613,"initialize_editor":678,"Menu_highlight_color":614,"on":1,"draw_menu_bar":861}
on.keychord_press = function(chord, key)
print('key', chord)
if Animating then return end
if Move then return end
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
if (Viewport.zoom-0.1)*20 >= 1 then -- disallow font size of 0
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-g' then
-- special Expose-like 'global zoom' mode
-- if Zoomed_out == nil then
zoom_out()
-- else
-- Animation = {
-- Save_viewport,
-- }
-- Save_viewport = nil
-- Zoomed_out = nil
-- end
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()
A()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
initialize_manifest_navigator()
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
initialize_manifest_navigator()
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
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
local definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)
B(--[[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
{"add_hotkey_to_menu":616,"on.mouse_press":893,"survey_animation":863,"draw_manifest_navigator":677,"Cursor_node":172,"num_lines_for_manifest_navigator":676,"Page":475,"on_handle":547,"line_height":365,"animate_next_frame":825,"load_from_iterator":670,"on_text":539,"get_definition_from_app":784,"on.code_submit":787,"sx":544,"surface_bounds":814,"initialize_manifest_navigator":773,"delete_definition":673,"Viewport":604,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"get_multiple_definitions_from_app":783,"text_input_on_manifest_navigator":634,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"manifest_index":637,"on.update":835,"on.keychord_press":896,"add_def_to_menu":640,"B":830,"on.key_release":720,"Num_animation_frames":840,"animate_next":882,"tick_spec":660,"set_mouse_cursor":562,"Definition_background_color":849,"draw_ticks":862,"manifest_coord":636,"sy":469,"A":831,"Test_definition_background_color":858,"vy":546,"definition_background_color":859,"manifest_navigator_down":635,"update_editor_box":711,"new_definition":848,"order_of_magnitude":573,"manifest_navigator_up":628,"reset_manifest_navigator":772,"load_definition":854,"Manifest_navigator":495,"approximate":579,"on.draw":885,"scale":712,"snapshot_canvas":872,"box_height":680,"Save_viewport":865,"draw_run_time_error":808,"copy_viewport":866,"manifest_navigator_candidates":638,"on.save_settings":742,"zoom_out":888,"on.load_settings":782,"Zoomed_out":869,"schema1_of_y":667,"on.mouse_release":836,"Spawn_point":822,"approximate_up":658,"table_and_array_both_empty":689,"zoom_in":895,"on.initialize":807,"compute_layout":385,"fw_app":"driver","on.code_change":820,"get_manifest":768,"fw_parent":895,"load_manifest":694,"Menu_border_color":612,"y_of_schema1":364,"Mouse_cursor":559,"on.text_input":855,"Animating":842,"wait_for_response":781,"Definitions":503,"maybe_update_key_in_definitions":529,"add_thick_line":400,"Ticks_font":669,"copy_shape":396,"Surface":422,"Manifest":769,"Menu_background_color":611,"font":353,"vx":545,"draw_cursor":639,"Menu_command_color":613,"initialize_editor":678,"Menu_highlight_color":614,"on":1,"draw_menu_bar":861}
zoom_in = function(x,y)
-- precondition: Zoomed_out
-- precondition: Viewport == Global_viewport
-- precondition: Save_viewport exists
-- center Viewport on x,y at zoom level Saved_viewport.zoom
print('zoom in')
snapshot_canvas()
Animating = {
{
x=sx(x)-App.screen.width/Save_viewport.zoom/2,
y=sy(y)-App.screen.height/Save_viewport.zoom/2,
w=App.screen.width/Save_viewport.zoom,
h=App.screen.height/Save_viewport.zoom,
zoom=Save_viewport.zoom,
},
}
Zoomed_out = nil
Save_viewport = nil
end
{"add_hotkey_to_menu":616,"on.mouse_press":893,"survey_animation":863,"draw_manifest_navigator":677,"Cursor_node":172,"num_lines_for_manifest_navigator":676,"Page":475,"on_handle":547,"line_height":365,"animate_next_frame":825,"load_from_iterator":670,"on_text":539,"get_definition_from_app":784,"on.code_submit":787,"sx":544,"surface_bounds":814,"initialize_manifest_navigator":773,"delete_definition":673,"Viewport":604,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"get_multiple_definitions_from_app":783,"text_input_on_manifest_navigator":634,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"manifest_index":637,"on.update":835,"on.keychord_press":892,"add_def_to_menu":640,"B":830,"on.key_release":720,"Num_animation_frames":840,"animate_next":882,"tick_spec":660,"set_mouse_cursor":562,"Definition_background_color":849,"draw_ticks":862,"manifest_coord":636,"sy":469,"A":831,"Test_definition_background_color":858,"vy":546,"definition_background_color":859,"manifest_navigator_down":635,"update_editor_box":711,"new_definition":848,"order_of_magnitude":573,"manifest_navigator_up":628,"reset_manifest_navigator":772,"load_definition":854,"Manifest_navigator":495,"approximate":579,"on.draw":885,"scale":712,"snapshot_canvas":872,"box_height":680,"Save_viewport":865,"draw_run_time_error":808,"copy_viewport":866,"manifest_navigator_candidates":638,"on.save_settings":742,"zoom_out":888,"on.load_settings":782,"Zoomed_out":869,"schema1_of_y":667,"on.mouse_release":836,"Spawn_point":822,"approximate_up":658,"table_and_array_both_empty":689,"zoom_in":895,"on.initialize":807,"compute_layout":385,"fw_app":"driver","on.code_change":820,"get_manifest":768,"fw_parent":894,"load_manifest":694,"Menu_border_color":612,"y_of_schema1":364,"Mouse_cursor":559,"on.text_input":855,"Animating":842,"wait_for_response":781,"Definitions":503,"maybe_update_key_in_definitions":529,"add_thick_line":400,"Ticks_font":669,"copy_shape":396,"Surface":422,"Manifest":769,"Menu_background_color":611,"font":353,"vx":545,"draw_cursor":639,"Menu_command_color":613,"initialize_editor":678,"Menu_highlight_color":614,"on":1,"draw_menu_bar":861}
zoom_in = function(x,y)
-- precondition: Zoomed_out
-- precondition: Viewport == Global_viewport
-- precondition: Save_viewport exists
-- center Viewport on x,y at zoom level Saved_viewport.zoom
snapshot_canvas()
Animating = {
{
x=sx(x)-App.screen.width/Save_viewport.zoom/2,
y=sy(y)-App.screen.height/Save_viewport.zoom/2,
w=App.screen.width/Save_viewport.zoom,
h=App.screen.height/Save_viewport.zoom,
zoom=Save_viewport.zoom,
},
}
Zoomed_out = nil
Save_viewport = nil
end
{"add_hotkey_to_menu":616,"on.mouse_press":893,"survey_animation":863,"draw_manifest_navigator":677,"Cursor_node":172,"num_lines_for_manifest_navigator":676,"Page":475,"on_handle":547,"line_height":365,"animate_next_frame":825,"load_from_iterator":670,"on_text":539,"get_definition_from_app":784,"on.code_submit":787,"sx":544,"surface_bounds":814,"initialize_manifest_navigator":773,"delete_definition":673,"Viewport":604,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"get_multiple_definitions_from_app":783,"text_input_on_manifest_navigator":634,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"manifest_index":637,"on.update":835,"on.keychord_press":892,"add_def_to_menu":640,"B":830,"on.key_release":720,"Num_animation_frames":840,"animate_next":882,"tick_spec":660,"set_mouse_cursor":562,"Definition_background_color":849,"draw_ticks":862,"manifest_coord":636,"sy":469,"A":831,"Test_definition_background_color":858,"vy":546,"definition_background_color":859,"manifest_navigator_down":635,"update_editor_box":711,"new_definition":848,"order_of_magnitude":573,"manifest_navigator_up":628,"reset_manifest_navigator":772,"load_definition":854,"Manifest_navigator":495,"approximate":579,"on.draw":885,"scale":712,"snapshot_canvas":872,"box_height":680,"Save_viewport":865,"draw_run_time_error":808,"copy_viewport":866,"manifest_navigator_candidates":638,"on.save_settings":742,"zoom_out":888,"on.load_settings":782,"Zoomed_out":869,"schema1_of_y":667,"on.mouse_release":836,"Spawn_point":822,"approximate_up":658,"table_and_array_both_empty":689,"zoom_in":894,"on.initialize":807,"compute_layout":385,"fw_app":"driver","on.code_change":820,"get_manifest":768,"fw_parent":893,"load_manifest":694,"Menu_border_color":612,"y_of_schema1":364,"Mouse_cursor":559,"on.text_input":855,"Animating":842,"wait_for_response":781,"Definitions":503,"maybe_update_key_in_definitions":529,"add_thick_line":400,"Ticks_font":669,"copy_shape":396,"Surface":422,"Manifest":769,"Menu_background_color":611,"font":353,"vx":545,"draw_cursor":639,"Menu_command_color":613,"initialize_editor":678,"Menu_highlight_color":614,"on":1,"draw_menu_bar":861}
on.mouse_press = function(x,y, mouse_button)
if Animating then return end
print('mouse press')
if Zoomed_out then
zoom_in(x,y)
return
end
if Cursor_node then
Cursor_node.show_cursor = nil
Cursor_node = nil
end
if mouse_press_consumed_by_any_button_handler(HUD, x,y, mouse_button) then
return
end
local node = on_text(x,y)
if node then
-- position cursor in node
Cursor_node = node
edit.mouse_press(node.editor, x,y, mouse_button)
return
end
local node = on_handle(x,y)
if node then
-- move node
Move = {xoff=App.mouse_x()-vx(node.x), yoff=App.mouse_y()-vy(node.y), node=node}
return
end
-- pan surface
Pan = {x=Viewport.x+x,y=Viewport.y+y}
end
{"add_hotkey_to_menu":616,"on.mouse_press":893,"survey_animation":863,"draw_manifest_navigator":677,"Cursor_node":172,"num_lines_for_manifest_navigator":676,"Page":475,"on_handle":547,"line_height":365,"animate_next_frame":825,"load_from_iterator":670,"on_text":539,"get_definition_from_app":784,"on.code_submit":787,"sx":544,"surface_bounds":814,"initialize_manifest_navigator":773,"delete_definition":673,"Viewport":604,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"get_multiple_definitions_from_app":783,"text_input_on_manifest_navigator":634,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"manifest_index":637,"on.update":835,"on.keychord_press":892,"add_def_to_menu":640,"B":830,"on.key_release":720,"Num_animation_frames":840,"animate_next":882,"tick_spec":660,"set_mouse_cursor":562,"Definition_background_color":849,"draw_ticks":862,"manifest_coord":636,"sy":469,"A":831,"Test_definition_background_color":858,"vy":546,"definition_background_color":859,"manifest_navigator_down":635,"update_editor_box":711,"new_definition":848,"order_of_magnitude":573,"manifest_navigator_up":628,"reset_manifest_navigator":772,"load_definition":854,"Manifest_navigator":495,"approximate":579,"on.draw":885,"scale":712,"snapshot_canvas":872,"box_height":680,"Save_viewport":865,"draw_run_time_error":808,"copy_viewport":866,"manifest_navigator_candidates":638,"on.save_settings":742,"zoom_out":888,"on.load_settings":782,"Zoomed_out":869,"schema1_of_y":667,"on.mouse_release":836,"Spawn_point":822,"approximate_up":658,"table_and_array_both_empty":689,"zoom_in":889,"on.initialize":807,"compute_layout":385,"fw_app":"driver","on.code_change":820,"get_manifest":768,"fw_parent":892,"load_manifest":694,"Menu_border_color":612,"y_of_schema1":364,"Mouse_cursor":559,"on.text_input":855,"Animating":842,"wait_for_response":781,"Definitions":503,"maybe_update_key_in_definitions":529,"add_thick_line":400,"Ticks_font":669,"copy_shape":396,"Surface":422,"Manifest":769,"Menu_background_color":611,"font":353,"vx":545,"draw_cursor":639,"Menu_command_color":613,"initialize_editor":678,"Menu_highlight_color":614,"on":1,"draw_menu_bar":861}
on.keychord_press = function(chord, key)
print('key', chord)
if Animating then return end
if Move then return end
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
if (Viewport.zoom-0.1)*20 >= 1 then -- disallow font size of 0
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-g' then
-- special Expose-like 'global zoom' mode
-- if Zoomed_out == nil then
print('foo')
zoom_out()
-- else
-- Animation = {
-- Save_viewport,
-- }
-- Save_viewport = nil
-- Zoomed_out = nil
-- end
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()
A()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
initialize_manifest_navigator()
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
initialize_manifest_navigator()
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
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
local definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)
B(--[[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
{"add_hotkey_to_menu":616,"on.mouse_press":890,"survey_animation":863,"draw_manifest_navigator":677,"Cursor_node":172,"num_lines_for_manifest_navigator":676,"Page":475,"on_handle":547,"line_height":365,"animate_next_frame":825,"load_from_iterator":670,"on_text":539,"get_definition_from_app":784,"on.code_submit":787,"sx":544,"surface_bounds":814,"initialize_manifest_navigator":773,"delete_definition":673,"Viewport":604,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"get_multiple_definitions_from_app":783,"text_input_on_manifest_navigator":634,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"manifest_index":637,"on.update":835,"on.keychord_press":892,"add_def_to_menu":640,"B":830,"on.key_release":720,"Num_animation_frames":840,"animate_next":882,"tick_spec":660,"set_mouse_cursor":562,"Definition_background_color":849,"draw_ticks":862,"manifest_coord":636,"sy":469,"A":831,"Test_definition_background_color":858,"vy":546,"definition_background_color":859,"manifest_navigator_down":635,"update_editor_box":711,"new_definition":848,"order_of_magnitude":573,"manifest_navigator_up":628,"reset_manifest_navigator":772,"load_definition":854,"Manifest_navigator":495,"approximate":579,"on.draw":885,"scale":712,"snapshot_canvas":872,"box_height":680,"Save_viewport":865,"draw_run_time_error":808,"copy_viewport":866,"manifest_navigator_candidates":638,"on.save_settings":742,"zoom_out":888,"on.load_settings":782,"Zoomed_out":869,"schema1_of_y":667,"on.mouse_release":836,"Spawn_point":822,"approximate_up":658,"table_and_array_both_empty":689,"zoom_in":889,"on.initialize":807,"compute_layout":385,"fw_app":"driver","on.code_change":820,"get_manifest":768,"fw_parent":891,"load_manifest":694,"Menu_border_color":612,"y_of_schema1":364,"Mouse_cursor":559,"on.text_input":855,"Animating":842,"wait_for_response":781,"Definitions":503,"maybe_update_key_in_definitions":529,"add_thick_line":400,"Ticks_font":669,"copy_shape":396,"Surface":422,"Manifest":769,"Menu_background_color":611,"font":353,"vx":545,"draw_cursor":639,"Menu_command_color":613,"initialize_editor":678,"Menu_highlight_color":614,"on":1,"draw_menu_bar":861}
on.keychord_press = function(chord, key)
print('key', chord)
if Animating then return end
if Move then return end
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
if (Viewport.zoom-0.1)*20 >= 1 then -- disallow font size of 0
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-g' then
-- special 'global zoom' mode
-- if Zoomed_out == nil then
print('foo')
zoom_out()
-- else
-- Animation = {
-- Save_viewport,
-- }
-- Save_viewport = nil
-- Zoomed_out = nil
-- end
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()
A()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
initialize_manifest_navigator()
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
initialize_manifest_navigator()
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
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
local definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)
B(--[[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
{"add_hotkey_to_menu":616,"on.mouse_press":890,"survey_animation":863,"draw_manifest_navigator":677,"Cursor_node":172,"num_lines_for_manifest_navigator":676,"Page":475,"on_handle":547,"line_height":365,"animate_next_frame":825,"load_from_iterator":670,"on_text":539,"get_definition_from_app":784,"on.code_submit":787,"sx":544,"surface_bounds":814,"initialize_manifest_navigator":773,"delete_definition":673,"Viewport":604,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"get_multiple_definitions_from_app":783,"text_input_on_manifest_navigator":634,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"manifest_index":637,"on.update":835,"on.keychord_press":891,"add_def_to_menu":640,"B":830,"on.key_release":720,"Num_animation_frames":840,"animate_next":882,"tick_spec":660,"set_mouse_cursor":562,"Definition_background_color":849,"draw_ticks":862,"manifest_coord":636,"sy":469,"A":831,"Test_definition_background_color":858,"vy":546,"definition_background_color":859,"manifest_navigator_down":635,"update_editor_box":711,"new_definition":848,"order_of_magnitude":573,"manifest_navigator_up":628,"reset_manifest_navigator":772,"load_definition":854,"Manifest_navigator":495,"approximate":579,"on.draw":885,"scale":712,"snapshot_canvas":872,"box_height":680,"Save_viewport":865,"draw_run_time_error":808,"copy_viewport":866,"manifest_navigator_candidates":638,"on.save_settings":742,"zoom_out":888,"on.load_settings":782,"Zoomed_out":869,"schema1_of_y":667,"on.mouse_release":836,"Spawn_point":822,"approximate_up":658,"table_and_array_both_empty":689,"zoom_in":889,"on.initialize":807,"compute_layout":385,"fw_app":"driver","on.code_change":820,"get_manifest":768,"fw_parent":890,"load_manifest":694,"Menu_border_color":612,"y_of_schema1":364,"Mouse_cursor":559,"on.text_input":855,"Animating":842,"wait_for_response":781,"Definitions":503,"maybe_update_key_in_definitions":529,"add_thick_line":400,"Ticks_font":669,"copy_shape":396,"Surface":422,"Manifest":769,"Menu_background_color":611,"font":353,"vx":545,"draw_cursor":639,"Menu_command_color":613,"initialize_editor":678,"Menu_highlight_color":614,"on":1,"draw_menu_bar":861}
on.mouse_press = function(x,y, mouse_button)
if Animating then return end
print('mouse press')
if Zoomed_out then
print('zoomed out')
zoom_in(x,y)
Zoomed_out = nil
Save_viewport = nil
return
end
if Cursor_node then
Cursor_node.show_cursor = nil
Cursor_node = nil
end
if mouse_press_consumed_by_any_button_handler(HUD, x,y, mouse_button) then
return
end
local node = on_text(x,y)
if node then
-- position cursor in node
Cursor_node = node
edit.mouse_press(node.editor, x,y, mouse_button)
return
end
local node = on_handle(x,y)
if node then
-- move node
Move = {xoff=App.mouse_x()-vx(node.x), yoff=App.mouse_y()-vy(node.y), node=node}
return
end
-- pan surface
Pan = {x=Viewport.x+x,y=Viewport.y+y}
end
{"add_hotkey_to_menu":616,"on.mouse_press":890,"survey_animation":863,"draw_manifest_navigator":677,"Cursor_node":172,"num_lines_for_manifest_navigator":676,"Page":475,"on_handle":547,"line_height":365,"animate_next_frame":825,"load_from_iterator":670,"on_text":539,"get_definition_from_app":784,"on.code_submit":787,"sx":544,"surface_bounds":814,"initialize_manifest_navigator":773,"delete_definition":673,"Viewport":604,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":765,"get_multiple_definitions_from_app":783,"text_input_on_manifest_navigator":634,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"manifest_index":637,"on.update":835,"on.keychord_press":886,"add_def_to_menu":640,"B":830,"on.key_release":720,"Num_animation_frames":840,"animate_next":882,"tick_spec":660,"set_mouse_cursor":562,"Definition_background_color":849,"draw_ticks":862,"manifest_coord":636,"sy":469,"A":831,"Test_definition_background_color":858,"vy":546,"definition_background_color":859,"manifest_navigator_down":635,"update_editor_box":711,"new_definition":848,"order_of_magnitude":573,"manifest_navigator_up":628,"reset_manifest_navigator":772,"load_definition":854,"Manifest_navigator":495,"approximate":579,"on.draw":885,"scale":712,"snapshot_canvas":872,"box_height":680,"Save_viewport":865,"draw_run_time_error":808,"copy_viewport":866,"manifest_navigator_candidates":638,"on.save_settings":742,"zoom_out":888,"on.load_settings":782,"Zoomed_out":869,"schema1_of_y":667,"on.mouse_release":836,"Spawn_point":822,"approximate_up":658,"table_and_array_both_empty":689,"zoom_in":889,"on.initialize":807,"compute_layout":385,"fw_app":"driver","on.code_change":820,"get_manifest":768,"fw_parent":889,"load_manifest":694,"Menu_border_color":612,"y_of_schema1":364,"Mouse_cursor":559,"on.text_input":855,"Animating":842,"wait_for_response":781,"Definitions":503,"maybe_update_key_in_definitions":529,"add_thick_line":400,"Ticks_font":669,"copy_shape":396,"Surface":422,"Manifest":769,"Menu_background_color":611,"font":353,"vx":545,"draw_cursor":639,"Menu_command_color":613,"initialize_editor":678,"Menu_highlight_color":614,"on":1,"draw_menu_bar":861}
zoom_in = function(x,y)
-- precondition: Zoomed_out
-- precondition: Viewport == Global_viewport
-- precondition: Save_viewport exists
-- center Viewport on x,y at zoom level Saved_viewport.zoom
snapshot_canvas()
Animating = {
{
x=sx(x)-App.screen.width/Save_viewport.zoom/2,
y=sy(y)-App.screen.height/Save_viewport.zoom/2,
w=App.screen.width/Save_viewport.zoom,
h=App.screen.height/Save_viewport.zoom,
zoom=Save_viewport.zoom,
},
}
end
{"on.mouse_release":836,"text_input_on_manifest_navigator":634,"on.update":835,"on.keychord_press":886,"on_text":539,"manifest_index":637,"on.mouse_press":884,"scale":712,"copy_viewport":866,"Surface":422,"zoom_out":888,"Manifest":769,"Zoomed_out":869,"load_manifest":694,"update_editor_box":711,"get_manifest":768,"on.key_release":720,"table_and_array_both_empty":689,"Definitions":503,"schema1_of_y":667,"new_definition":848,"Num_animation_frames":840,"mouse_cursor":558,"Mouse_cursor":559,"y_of_schema1":364,"set_mouse_cursor":562,"draw_ticks":862,"Definition_background_color":849,"on.code_change":820,"line_height":365,"maybe_update_key_in_definitions":529,"Test_definition_background_color":858,"definition_background_color":859,"order_of_magnitude":573,"approximate":579,"Animating":842,"snapshot_canvas":872,"Cursor_node":172,"approximate_up":658,"add_thick_line":400,"Ticks_font":669,"font":353,"tick_spec":660,"copy_shape":396,"initialize_manifest_navigator":773,"on.text_input":855,"Save_viewport":865,"draw_cursor":639,"on.code_submit":787,"compute_layout":385,"vx":545,"on.load_settings":782,"on.save_settings":742,"zoom_in":889,"on":1,"initialize_editor":678,"on.initialize":807,"surface_bounds":814,"load_definition":854,"wait_for_response":781,"box_height":680,"fw_app":"driver","Menu_background_color":611,"add_def_to_menu":640,"Menu_border_color":612,"fw_parent":888,"Menu_command_color":613,"Viewport":604,"Menu_highlight_color":614,"Spawn_point":822,"draw_menu_bar":861,"Page":475,"B":830,"from_viewport":823,"manifest_navigator_candidates":638,"draw_run_time_error":808,"on_handle":547,"num_lines_for_manifest_navigator":676,"interpolate_viewport":843,"sx":544,"survey_animation":863,"on.draw":885,"animate_next":882,"load_from_iterator":670,"draw_manifest_navigator":677,"get_definition_from_app":784,"sy":469,"reset_manifest_navigator":772,"animate_next_frame":825,"get_multiple_definitions_from_app":783,"manifest_navigator_up":628,"add_hotkey_to_menu":616,"manifest_navigator_down":635,"vy":546,"A":831,"delete_definition":673,"manifest_coord":636,"move_candidate_to_front_of_manifest":632,"Manifest_navigator":495,"keychord_press_on_manifest_navigator":765}
zoom_out = function()
Save_viewport = copy_viewport(Viewport)
snapshot_canvas()
Animating = {
Global_viewport,
}
Zoomed_out = true
end
{"on.mouse_release":836,"text_input_on_manifest_navigator":634,"on.update":835,"on.keychord_press":886,"on_text":539,"manifest_index":637,"on.mouse_press":884,"scale":712,"copy_viewport":866,"Surface":422,"zoom_out":888,"Manifest":769,"Zoomed_out":869,"load_manifest":694,"update_editor_box":711,"get_manifest":768,"on.key_release":720,"table_and_array_both_empty":689,"Definitions":503,"schema1_of_y":667,"new_definition":848,"Num_animation_frames":840,"mouse_cursor":558,"Mouse_cursor":559,"y_of_schema1":364,"set_mouse_cursor":562,"draw_ticks":862,"Definition_background_color":849,"on.code_change":820,"line_height":365,"maybe_update_key_in_definitions":529,"Test_definition_background_color":858,"definition_background_color":859,"order_of_magnitude":573,"approximate":579,"Animating":842,"snapshot_canvas":872,"Cursor_node":172,"approximate_up":658,"add_thick_line":400,"Ticks_font":669,"font":353,"tick_spec":660,"copy_shape":396,"initialize_manifest_navigator":773,"on.text_input":855,"Save_viewport":865,"draw_cursor":639,"on.code_submit":787,"compute_layout":385,"vx":545,"on.load_settings":782,"on.save_settings":742,"zoom_in":887,"on":1,"initialize_editor":678,"on.initialize":807,"surface_bounds":814,"load_definition":854,"wait_for_response":781,"box_height":680,"fw_app":"driver","Menu_background_color":611,"add_def_to_menu":640,"Menu_border_color":612,"fw_parent":887,"Menu_command_color":613,"Viewport":604,"Menu_highlight_color":614,"Spawn_point":822,"draw_menu_bar":861,"Page":475,"B":830,"from_viewport":823,"manifest_navigator_candidates":638,"draw_run_time_error":808,"on_handle":547,"num_lines_for_manifest_navigator":676,"interpolate_viewport":843,"sx":544,"survey_animation":863,"on.draw":885,"animate_next":882,"load_from_iterator":670,"draw_manifest_navigator":677,"get_definition_from_app":784,"sy":469,"reset_manifest_navigator":772,"animate_next_frame":825,"get_multiple_definitions_from_app":783,"manifest_navigator_up":628,"add_hotkey_to_menu":616,"manifest_navigator_down":635,"vy":546,"A":831,"delete_definition":673,"manifest_coord":636,"move_candidate_to_front_of_manifest":632,"Manifest_navigator":495,"keychord_press_on_manifest_navigator":765}
zoom_in = function(x,y)
-- precondition: Zoomed_out
-- precondition: Viewport == Global_viewport
-- precondition: Save_viewport exists
-- center Viewport on x,y at zoom level Saved_viewport.zoom
Animating = {
{
x=sx(x)-App.screen.width/Save_viewport.zoom/2,
y=sy(y)-App.screen.height/Save_viewport.zoom/2,
w=App.screen.width/Save_viewport.zoom,
h=App.screen.height/Save_viewport.zoom,
zoom=Save_viewport.zoom,
},
}
end
{"on.mouse_release":836,"text_input_on_manifest_navigator":634,"on.update":835,"on.keychord_press":886,"on_text":539,"manifest_index":637,"on.mouse_press":884,"scale":712,"copy_viewport":866,"Surface":422,"zoom_out":870,"Manifest":769,"Zoomed_out":869,"load_manifest":694,"update_editor_box":711,"get_manifest":768,"on.key_release":720,"table_and_array_both_empty":689,"Definitions":503,"schema1_of_y":667,"new_definition":848,"Num_animation_frames":840,"mouse_cursor":558,"Mouse_cursor":559,"y_of_schema1":364,"set_mouse_cursor":562,"draw_ticks":862,"Definition_background_color":849,"on.code_change":820,"line_height":365,"maybe_update_key_in_definitions":529,"Test_definition_background_color":858,"definition_background_color":859,"order_of_magnitude":573,"approximate":579,"Animating":842,"snapshot_canvas":872,"Cursor_node":172,"approximate_up":658,"add_thick_line":400,"Ticks_font":669,"font":353,"tick_spec":660,"copy_shape":396,"initialize_manifest_navigator":773,"on.text_input":855,"Save_viewport":865,"draw_cursor":639,"on.code_submit":787,"compute_layout":385,"vx":545,"on.load_settings":782,"on.save_settings":742,"zoom_in":887,"on":1,"initialize_editor":678,"on.initialize":807,"surface_bounds":814,"load_definition":854,"wait_for_response":781,"box_height":680,"fw_app":"driver","Menu_background_color":611,"add_def_to_menu":640,"Menu_border_color":612,"fw_parent":886,"Menu_command_color":613,"Viewport":604,"Menu_highlight_color":614,"Spawn_point":822,"draw_menu_bar":861,"Page":475,"B":830,"from_viewport":823,"manifest_navigator_candidates":638,"draw_run_time_error":808,"on_handle":547,"num_lines_for_manifest_navigator":676,"interpolate_viewport":843,"sx":544,"survey_animation":863,"on.draw":885,"animate_next":882,"load_from_iterator":670,"draw_manifest_navigator":677,"get_definition_from_app":784,"sy":469,"reset_manifest_navigator":772,"animate_next_frame":825,"get_multiple_definitions_from_app":783,"manifest_navigator_up":628,"add_hotkey_to_menu":616,"manifest_navigator_down":635,"vy":546,"A":831,"delete_definition":673,"manifest_coord":636,"move_candidate_to_front_of_manifest":632,"Manifest_navigator":495,"keychord_press_on_manifest_navigator":765}
on.keychord_press = function(chord, key)
print('key', chord)
if Animating then return end
if Move then return end
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
if (Viewport.zoom-0.1)*20 >= 1 then -- disallow font size of 0
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-g' then
-- special 'global zoom' mode
-- if Zoomed_out == nil then
zoom_out()
-- else
-- Animation = {
-- Save_viewport,
-- }
-- Save_viewport = nil
-- Zoomed_out = nil
-- end
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()
A()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
initialize_manifest_navigator()
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
initialize_manifest_navigator()
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
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
local definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)
B(--[[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.mouse_release":836,"text_input_on_manifest_navigator":634,"on.update":835,"on.keychord_press":886,"on_text":539,"manifest_index":637,"on.mouse_press":884,"scale":712,"copy_viewport":866,"Surface":422,"zoom_out":870,"Manifest":769,"Zoomed_out":869,"load_manifest":694,"update_editor_box":711,"get_manifest":768,"on.key_release":720,"table_and_array_both_empty":689,"Definitions":503,"schema1_of_y":667,"new_definition":848,"Num_animation_frames":840,"mouse_cursor":558,"Mouse_cursor":559,"y_of_schema1":364,"set_mouse_cursor":562,"draw_ticks":862,"Definition_background_color":849,"on.code_change":820,"line_height":365,"maybe_update_key_in_definitions":529,"Test_definition_background_color":858,"definition_background_color":859,"order_of_magnitude":573,"approximate":579,"Animating":842,"snapshot_canvas":872,"Cursor_node":172,"approximate_up":658,"add_thick_line":400,"Ticks_font":669,"font":353,"tick_spec":660,"copy_shape":396,"initialize_manifest_navigator":773,"on.text_input":855,"Save_viewport":865,"draw_cursor":639,"on.code_submit":787,"compute_layout":385,"vx":545,"on.load_settings":782,"on.save_settings":742,"zoom_in":880,"on":1,"initialize_editor":678,"on.initialize":807,"surface_bounds":814,"load_definition":854,"wait_for_response":781,"box_height":680,"fw_app":"driver","Menu_background_color":611,"add_def_to_menu":640,"Menu_border_color":612,"fw_parent":885,"Menu_command_color":613,"Viewport":604,"Menu_highlight_color":614,"Spawn_point":822,"draw_menu_bar":861,"Page":475,"B":830,"from_viewport":823,"manifest_navigator_candidates":638,"draw_run_time_error":808,"on_handle":547,"num_lines_for_manifest_navigator":676,"interpolate_viewport":843,"sx":544,"survey_animation":863,"on.draw":885,"animate_next":882,"load_from_iterator":670,"draw_manifest_navigator":677,"get_definition_from_app":784,"sy":469,"reset_manifest_navigator":772,"animate_next_frame":825,"get_multiple_definitions_from_app":783,"manifest_navigator_up":628,"add_hotkey_to_menu":616,"manifest_navigator_down":635,"vy":546,"A":831,"delete_definition":673,"manifest_coord":636,"move_candidate_to_front_of_manifest":632,"Manifest_navigator":495,"keychord_press_on_manifest_navigator":765}
on.draw = function()
if Animating then
print('animating')
local q = love.graphics.newQuad((Viewport.x-Global_viewport.x)*Viewport.zoom,(Viewport.y-Global_viewport.y)*Viewport.zoom, App.screen.width, App.screen.height, Global_viewport.w*Viewport.zoom, Global_viewport.h*Viewport.zoom)
App.color{r=1,g=1,b=1}
love.graphics.draw(Canvas, q, 0,0)
return
end
for _,obj in ipairs(Surface) do
love.graphics.setColor(obj.r or 0, obj.g or 0, obj.b or 0)
if obj.type == 'rectangle' then
love.graphics.rectangle(obj.drawmode or 'fill', vx(obj.x),vy(obj.y), scale(obj.w),scale(obj.h))
elseif obj.type == 'line' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'circle' then
love.graphics.circle(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radius))
elseif obj.type == 'arc' then
love.graphics.arc(obj.drawmode or 'line', obj.arctype or 'open', vx(obj.x), vy(obj.y), scale(obj.radius), obj.angle1, obj.angle2, obj.segments)
elseif obj.type == 'ellipse' then
love.graphics.ellipse(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radiusx), scale(obj.radiusy))
elseif obj.type == 'bezier' then
love.graphics.line(unpack(obj.zdata))
elseif obj.type == 'text' then
if obj.w == nil then
love.graphics.draw(obj.text, vx(obj.x), vy(obj.y))
else
love.graphics.setColor(0.5,0.5,0.5)
love.graphics.rectangle('fill', vx(obj.x),vy(obj.y-30), scale(obj.w/2-5), scale(20))
edit.draw(obj.editor, obj.fg, not obj.show_cursor)
if obj.editor.load_time_error then
love.graphics.setColor(0.8,0,0)
local error_y = math.min(vy(obj.y+obj.h), App.screen.height-20*5*Viewport.zoom)
error_y = math.max(error_y, vy(obj.y))
love.graphics.rectangle('fill', vx(obj.x), error_y, scale(obj.w), scale(5*20*Viewport.zoom))
love.graphics.setColor(0,0,0)
love.graphics.print(obj.editor.load_time_error, vx(obj.x), error_y)
end
end
end
end
draw_run_time_error()
draw_ticks()
draw_menu_bar()
end
{"maybe_update_key_in_definitions":529,"get_multiple_definitions_from_app":783,"schema1_of_y":667,"on.mouse_press":884,"wait_for_response":781,"line_height":365,"y_of_schema1":364,"Surface":422,"on.mouse_release":836,"on_handle":547,"Cursor_node":172,"draw_run_time_error":808,"on_text":539,"on.keychord_press":881,"survey_animation":863,"animate_next":882,"sx":544,"vx":545,"on.initialize":807,"on.draw":885,"A":831,"on.key_release":720,"scale":712,"B":830,"Menu_background_color":611,"Menu_border_color":612,"copy_viewport":866,"Menu_highlight_color":614,"zoom_out":870,"draw_menu_bar":861,"Zoomed_out":869,"add_hotkey_to_menu":616,"set_mouse_cursor":562,"draw_manifest_navigator":677,"draw_ticks":862,"zoom_in":880,"Page":475,"interpolate_viewport":843,"reset_manifest_navigator":772,"load_from_iterator":670,"get_definition_from_app":784,"Animating":842,"manifest_navigator_up":628,"approximate":579,"manifest_navigator_down":635,"font":353,"sy":469,"delete_definition":673,"Num_animation_frames":840,"move_candidate_to_front_of_manifest":632,"approximate_up":658,"keychord_press_on_manifest_navigator":765,"Ticks_font":669,"text_input_on_manifest_navigator":634,"Mouse_cursor":559,"manifest_index":637,"manifest_coord":636,"Definitions":503,"Manifest_navigator":495,"table_and_array_both_empty":689,"manifest_navigator_candidates":638,"from_viewport":823,"on.code_change":820,"Menu_command_color":613,"Spawn_point":822,"on.update":835,"Viewport":604,"definition_background_color":859,"fw_parent":884,"add_def_to_menu":640,"Manifest":769,"surface_bounds":814,"box_height":680,"load_definition":854,"fw_app":"driver","vy":546,"load_manifest":694,"on":1,"get_manifest":768,"order_of_magnitude":573,"initialize_editor":678,"animate_next_frame":825,"Definition_background_color":849,"on.save_settings":742,"Test_definition_background_color":858,"on.load_settings":782,"num_lines_for_manifest_navigator":676,"new_definition":848,"compute_layout":385,"on.code_submit":787,"mouse_cursor":558,"snapshot_canvas":872,"draw_cursor":639,"Save_viewport":865,"on.text_input":855,"update_editor_box":711,"add_thick_line":400,"initialize_manifest_navigator":773,"copy_shape":396,"tick_spec":660}
on.mouse_press = function(x,y, mouse_button)
if Animating then return end
if Zoomed_out then
print('zoomed out')
zoom_in(x,y)
Zoomed_out = nil
Save_viewport = nil
return
end
if Cursor_node then
Cursor_node.show_cursor = nil
Cursor_node = nil
end
if mouse_press_consumed_by_any_button_handler(HUD, x,y, mouse_button) then
return
end
local node = on_text(x,y)
if node then
-- position cursor in node
Cursor_node = node
edit.mouse_press(node.editor, x,y, mouse_button)
return
end
local node = on_handle(x,y)
if node then
-- move node
Move = {xoff=App.mouse_x()-vx(node.x), yoff=App.mouse_y()-vy(node.y), node=node}
return
end
-- pan surface
Pan = {x=Viewport.x+x,y=Viewport.y+y}
end
{"maybe_update_key_in_definitions":529,"get_multiple_definitions_from_app":783,"schema1_of_y":667,"on.mouse_press":884,"wait_for_response":781,"line_height":365,"y_of_schema1":364,"Surface":422,"on.mouse_release":836,"on_handle":547,"Cursor_node":172,"draw_run_time_error":808,"on_text":539,"on.keychord_press":881,"survey_animation":863,"animate_next":882,"sx":544,"vx":545,"on.initialize":807,"on.draw":797,"A":831,"on.key_release":720,"scale":712,"B":830,"Menu_background_color":611,"Menu_border_color":612,"copy_viewport":866,"Menu_highlight_color":614,"zoom_out":870,"draw_menu_bar":861,"Zoomed_out":869,"add_hotkey_to_menu":616,"set_mouse_cursor":562,"draw_manifest_navigator":677,"draw_ticks":862,"zoom_in":880,"Page":475,"interpolate_viewport":843,"reset_manifest_navigator":772,"load_from_iterator":670,"get_definition_from_app":784,"Animating":842,"manifest_navigator_up":628,"approximate":579,"manifest_navigator_down":635,"font":353,"sy":469,"delete_definition":673,"Num_animation_frames":840,"move_candidate_to_front_of_manifest":632,"approximate_up":658,"keychord_press_on_manifest_navigator":765,"Ticks_font":669,"text_input_on_manifest_navigator":634,"Mouse_cursor":559,"manifest_index":637,"manifest_coord":636,"Definitions":503,"Manifest_navigator":495,"table_and_array_both_empty":689,"manifest_navigator_candidates":638,"from_viewport":823,"on.code_change":820,"Menu_command_color":613,"Spawn_point":822,"on.update":835,"Viewport":604,"definition_background_color":859,"fw_parent":883,"add_def_to_menu":640,"Manifest":769,"surface_bounds":814,"box_height":680,"load_definition":854,"fw_app":"driver","vy":546,"load_manifest":694,"on":1,"get_manifest":768,"order_of_magnitude":573,"initialize_editor":678,"animate_next_frame":825,"Definition_background_color":849,"on.save_settings":742,"Test_definition_background_color":858,"on.load_settings":782,"num_lines_for_manifest_navigator":676,"new_definition":848,"compute_layout":385,"on.code_submit":787,"mouse_cursor":558,"snapshot_canvas":872,"draw_cursor":639,"Save_viewport":865,"on.text_input":855,"update_editor_box":711,"add_thick_line":400,"initialize_manifest_navigator":773,"copy_shape":396,"tick_spec":660}
on.mouse_press = function(x,y, mouse_button)
if Animating then return end
if Zoomed_out then
zoom_in(x,y)
Zoomed_out = nil
Save_viewport = nil
return
end
if Cursor_node then
Cursor_node.show_cursor = nil
Cursor_node = nil
end
if mouse_press_consumed_by_any_button_handler(HUD, x,y, mouse_button) then
return
end
local node = on_text(x,y)
if node then
-- position cursor in node
Cursor_node = node
edit.mouse_press(node.editor, x,y, mouse_button)
return
end
local node = on_handle(x,y)
if node then
-- move node
Move = {xoff=App.mouse_x()-vx(node.x), yoff=App.mouse_y()-vy(node.y), node=node}
return
end
-- pan surface
Pan = {x=Viewport.x+x,y=Viewport.y+y}
end
{"maybe_update_key_in_definitions":529,"get_multiple_definitions_from_app":783,"schema1_of_y":667,"on.mouse_press":883,"wait_for_response":781,"line_height":365,"y_of_schema1":364,"Surface":422,"on.mouse_release":836,"on_handle":547,"Cursor_node":172,"draw_run_time_error":808,"on_text":539,"on.keychord_press":881,"survey_animation":863,"animate_next":882,"sx":544,"vx":545,"on.initialize":807,"on.draw":797,"A":831,"on.key_release":720,"scale":712,"B":830,"Menu_background_color":611,"Menu_border_color":612,"copy_viewport":866,"Menu_highlight_color":614,"zoom_out":870,"draw_menu_bar":861,"Zoomed_out":869,"add_hotkey_to_menu":616,"set_mouse_cursor":562,"draw_manifest_navigator":677,"draw_ticks":862,"zoom_in":880,"Page":475,"interpolate_viewport":843,"reset_manifest_navigator":772,"load_from_iterator":670,"get_definition_from_app":784,"Animating":842,"manifest_navigator_up":628,"approximate":579,"manifest_navigator_down":635,"font":353,"sy":469,"delete_definition":673,"Num_animation_frames":840,"move_candidate_to_front_of_manifest":632,"approximate_up":658,"keychord_press_on_manifest_navigator":765,"Ticks_font":669,"text_input_on_manifest_navigator":634,"Mouse_cursor":559,"manifest_index":637,"manifest_coord":636,"Definitions":503,"Manifest_navigator":495,"table_and_array_both_empty":689,"manifest_navigator_candidates":638,"from_viewport":823,"on.code_change":820,"Menu_command_color":613,"Spawn_point":822,"on.update":835,"Viewport":604,"definition_background_color":859,"fw_parent":882,"add_def_to_menu":640,"Manifest":769,"surface_bounds":814,"box_height":680,"load_definition":854,"fw_app":"driver","vy":546,"load_manifest":694,"on":1,"get_manifest":768,"order_of_magnitude":573,"initialize_editor":678,"animate_next_frame":825,"Definition_background_color":849,"on.save_settings":742,"Test_definition_background_color":858,"on.load_settings":782,"num_lines_for_manifest_navigator":676,"new_definition":848,"compute_layout":385,"on.code_submit":787,"mouse_cursor":558,"snapshot_canvas":872,"draw_cursor":639,"Save_viewport":865,"on.text_input":855,"update_editor_box":711,"add_thick_line":400,"initialize_manifest_navigator":773,"copy_shape":396,"tick_spec":660}
{"maybe_update_key_in_definitions":529,"get_multiple_definitions_from_app":783,"schema1_of_y":667,"on.mouse_press":879,"wait_for_response":781,"line_height":365,"y_of_schema1":364,"Surface":422,"on.mouse_release":836,"on_handle":547,"Cursor_node":172,"draw_run_time_error":808,"on_text":539,"on.keychord_press":881,"survey_animation":863,"animate_next":882,"sx":544,"vx":545,"on.initialize":807,"on.draw":797,"A":831,"on.key_release":720,"scale":712,"B":830,"Menu_background_color":611,"Menu_border_color":612,"copy_viewport":866,"Menu_highlight_color":614,"zoom_out":870,"draw_menu_bar":861,"Zoomed_out":869,"add_hotkey_to_menu":616,"set_mouse_cursor":562,"draw_manifest_navigator":677,"draw_ticks":862,"zoom_in":880,"Page":475,"interpolate_viewport":843,"reset_manifest_navigator":772,"load_from_iterator":670,"get_definition_from_app":784,"Animating":842,"manifest_navigator_up":628,"approximate":579,"manifest_navigator_down":635,"font":353,"sy":469,"delete_definition":673,"Num_animation_frames":840,"move_candidate_to_front_of_manifest":632,"approximate_up":658,"keychord_press_on_manifest_navigator":765,"Ticks_font":669,"text_input_on_manifest_navigator":634,"Mouse_cursor":559,"manifest_index":637,"manifest_coord":636,"Definitions":503,"Manifest_navigator":495,"table_and_array_both_empty":689,"manifest_navigator_candidates":638,"from_viewport":823,"on.code_change":820,"Menu_command_color":613,"Spawn_point":822,"on.update":835,"Viewport":604,"definition_background_color":859,"fw_parent":881,"add_def_to_menu":640,"Manifest":769,"surface_bounds":814,"box_height":680,"load_definition":854,"fw_app":"driver","vy":546,"load_manifest":694,"on":1,"get_manifest":768,"order_of_magnitude":573,"initialize_editor":678,"animate_next_frame":825,"Definition_background_color":849,"on.save_settings":742,"Test_definition_background_color":858,"on.load_settings":782,"num_lines_for_manifest_navigator":676,"new_definition":848,"compute_layout":385,"on.code_submit":787,"mouse_cursor":558,"snapshot_canvas":872,"draw_cursor":639,"Save_viewport":865,"on.text_input":855,"update_editor_box":711,"add_thick_line":400,"initialize_manifest_navigator":773,"copy_shape":396,"tick_spec":660}
animate_next = function(dt)
if Animating[1].step and Animating[1].step >= Num_animation_frames then
table.remove(Animating, 1)
if #Animating == 0 then
Animating = nil
Canvas = nil
A()
return
end
end
animate_next_frame(Animating[1], dt)
end
on.keychord_press = function(chord, key)
print('key', chord)
if Animating then return end
if Move then return end
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
if (Viewport.zoom-0.1)*20 >= 1 then -- disallow font size of 0
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-g' then
-- special 'global zoom' mode
if Zoomed_out == nil then
zoom_out()
else
Animation = {
Save_viewport,
}
Save_viewport = nil
Zoomed_out = nil
end
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()
A()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
initialize_manifest_navigator()
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
initialize_manifest_navigator()
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
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
local definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)
B(--[[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
{"compute_layout":385,"on.code_change":820,"maybe_update_key_in_definitions":529,"add_thick_line":400,"copy_shape":396,"Menu_background_color":611,"Menu_border_color":612,"Menu_command_color":613,"Definition_background_color":849,"Menu_highlight_color":614,"draw_menu_bar":861,"add_hotkey_to_menu":616,"on_handle":547,"num_lines_for_manifest_navigator":676,"font":353,"reset_manifest_navigator":772,"load_from_iterator":670,"get_definition_from_app":784,"sx":544,"vx":545,"manifest_navigator_up":628,"on.mouse_release":836,"on.key_release":720,"on.code_submit":787,"keychord_press_on_manifest_navigator":765,"Test_definition_background_color":858,"Page":475,"definition_background_color":859,"mouse_cursor":558,"initialize_manifest_navigator":773,"Mouse_cursor":559,"y_of_schema1":364,"manifest_navigator_candidates":638,"on.text_input":855,"set_mouse_cursor":562,"get_multiple_definitions_from_app":783,"scale":712,"snapshot_canvas":872,"wait_for_response":781,"Save_viewport":865,"initialize_editor":678,"copy_viewport":866,"zoom_out":870,"text_input_on_manifest_navigator":634,"Zoomed_out":869,"on.draw":797,"schema1_of_y":667,"move_candidate_to_front_of_manifest":632,"Num_animation_frames":840,"on.mouse_press":879,"zoom_in":880,"update_editor_box":711,"draw_run_time_error":808,"tick_spec":660,"add_def_to_menu":640,"on.keychord_press":881,"manifest_navigator_down":635,"survey_animation":863,"draw_ticks":862,"animate_next":841,"on.update":835,"Manifest_navigator":495,"line_height":365,"draw_manifest_navigator":677,"on.initialize":807,"animate_next_frame":825,"manifest_coord":636,"order_of_magnitude":573,"load_definition":854,"Viewport":604,"on":1,"fw_parent":880,"vy":546,"fw_app":"driver","box_height":680,"surface_bounds":814,"sy":469,"Manifest":769,"delete_definition":673,"on.save_settings":742,"load_manifest":694,"on.load_settings":782,"get_manifest":768,"Surface":422,"Spawn_point":822,"draw_cursor":639,"from_viewport":823,"table_and_array_both_empty":689,"interpolate_viewport":843,"Definitions":503,"manifest_index":637,"new_definition":848,"Cursor_node":172,"Ticks_font":669,"Animating":842,"B":830,"approximate_up":658,"approximate":579,"A":831,"on_text":539}
zoom_in = function(x,y)
-- precondition: Zoomed_out
-- precondition: Viewport == Global_viewport
-- precondition: Save_viewport exists
-- center Viewport on x,y at zoom level Saved_viewport.zoom
Animation = {
{
x=sx(x)-App.screen.width/Save_viewport.zoom/2,
y=sy(y)-App.screen.height/Save_viewport.zoom/2,
w=App.screen.width/Save_viewport.zoom,
h=App.screen.height/Save_viewport.zoom,
zoom=Save_viewport.zoom,
},
}
end
{"compute_layout":385,"on.code_change":820,"maybe_update_key_in_definitions":529,"add_thick_line":400,"copy_shape":396,"Menu_background_color":611,"Menu_border_color":612,"Menu_command_color":613,"Definition_background_color":849,"Menu_highlight_color":614,"draw_menu_bar":861,"add_hotkey_to_menu":616,"on_handle":547,"num_lines_for_manifest_navigator":676,"font":353,"reset_manifest_navigator":772,"load_from_iterator":670,"get_definition_from_app":784,"sx":544,"vx":545,"manifest_navigator_up":628,"on.mouse_release":836,"on.key_release":720,"on.code_submit":787,"keychord_press_on_manifest_navigator":765,"Test_definition_background_color":858,"Page":475,"definition_background_color":859,"mouse_cursor":558,"initialize_manifest_navigator":773,"Mouse_cursor":559,"y_of_schema1":364,"manifest_navigator_candidates":638,"on.text_input":855,"set_mouse_cursor":562,"get_multiple_definitions_from_app":783,"scale":712,"snapshot_canvas":872,"wait_for_response":781,"Save_viewport":865,"initialize_editor":678,"copy_viewport":866,"zoom_out":870,"text_input_on_manifest_navigator":634,"Zoomed_out":869,"on.draw":797,"schema1_of_y":667,"move_candidate_to_front_of_manifest":632,"Num_animation_frames":840,"on.mouse_press":879,"zoom_in":880,"update_editor_box":711,"draw_run_time_error":808,"tick_spec":660,"add_def_to_menu":640,"on.keychord_press":871,"manifest_navigator_down":635,"survey_animation":863,"draw_ticks":862,"animate_next":841,"on.update":835,"Manifest_navigator":495,"line_height":365,"draw_manifest_navigator":677,"on.initialize":807,"animate_next_frame":825,"manifest_coord":636,"order_of_magnitude":573,"load_definition":854,"Viewport":604,"on":1,"fw_parent":879,"vy":546,"fw_app":"driver","box_height":680,"surface_bounds":814,"sy":469,"Manifest":769,"delete_definition":673,"on.save_settings":742,"load_manifest":694,"on.load_settings":782,"get_manifest":768,"Surface":422,"Spawn_point":822,"draw_cursor":639,"from_viewport":823,"table_and_array_both_empty":689,"interpolate_viewport":843,"Definitions":503,"manifest_index":637,"new_definition":848,"Cursor_node":172,"Ticks_font":669,"Animating":842,"B":830,"approximate_up":658,"approximate":579,"A":831,"on_text":539}