SOOY5XYLNNJQSPMYWLFG7D2VIOX4U2U7VPAP7QBBVLHYCIVSMO5AC
{"compute_layout":385,"approximate":579,"maybe_update_key_in_definitions":529,"approximate_up":658,"Ticks_font":669,"sy":469,"update_editor_box":570,"on_handle":547,"initialize_editor":678,"on_text":539,"schema1_of_y":667,"Manifest_navigator":495,"sx":544,"y_of_schema1":364,"draw_manifest_navigator":677,"Menu_background_color":611,"num_lines_for_manifest_navigator":676,"Menu_border_color":612,"Menu_command_color":613,"Menu_highlight_color":614,"Manifest":494,"draw_menu_bar":641,"Cursor_node":172,"add_hotkey_to_menu":616,"on.code_change":306,"get_manifest":497,"manifest_navigator_up":628,"manifest_navigator_down":635,"draw_cursor":639,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"text_input_on_manifest_navigator":634,"on":1,"manifest_index":637,"manifest_navigator_candidates":638,"on.text_input":521,"add_def_to_menu":640,"Viewport":604,"vy":546,"on.mouse_press":617,"on.mouse_release":554,"vx":545,"on.draw":565,"tick_spec":660,"on.key_release":552,"Page":475,"on.initialize":506,"A":507,"load_definition":682,"line_height":365,"add_thick_line":400,"B":379,"mouse_cursor":558,"Surface":422,"box_height":680,"get_definition_from_app":624,"load_from_iterator":670,"font":353,"set_mouse_cursor":562,"scale":7,"draw_ticks":663,"parent":681,"Definitions":503,"load_manifest":496,"new_definition":681,"Mouse_cursor":559,"reset_manifest_navigator":621,"on.update":561,"on.keychord_press":666,"order_of_magnitude":573,"copy_shape":396,"manifest_coord":636}
load_definition = function(name)
move_candidate_to_front_of_manifest(name)
if Definitions[name] then return end -- just one copy per definition for now
Definitions[name] = {
type='text',
data=load_from_iterator(get_definition_from_app(name):gmatch("[^\r\n]+")),
x=0, y=0,
width=600,
bg={r=0.7,g=0.7,b=1},
}
end
new_definition = function()
table.insert(Definitions, {
type='text',
data={''},
x=0, y=0,
width=600,
bg={r=0.7,g=0.7,b=1},
})
end
{"compute_layout":385,"approximate":579,"maybe_update_key_in_definitions":529,"approximate_up":658,"Ticks_font":669,"sy":469,"update_editor_box":570,"on_handle":547,"initialize_editor":678,"on_text":539,"schema1_of_y":667,"Manifest_navigator":495,"sx":544,"y_of_schema1":364,"draw_manifest_navigator":677,"Menu_background_color":611,"num_lines_for_manifest_navigator":676,"Menu_border_color":612,"Menu_command_color":613,"Menu_highlight_color":614,"Manifest":494,"draw_menu_bar":641,"Cursor_node":172,"add_hotkey_to_menu":616,"on.code_change":306,"get_manifest":497,"manifest_navigator_up":628,"manifest_navigator_down":635,"draw_cursor":639,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"text_input_on_manifest_navigator":634,"on":1,"manifest_index":637,"manifest_navigator_candidates":638,"on.text_input":521,"add_def_to_menu":640,"Viewport":604,"vy":546,"on.mouse_press":617,"on.mouse_release":554,"vx":545,"on.draw":565,"tick_spec":660,"on.key_release":552,"Page":475,"on.initialize":506,"A":507,"load_definition":674,"line_height":365,"add_thick_line":400,"B":379,"mouse_cursor":558,"Surface":422,"box_height":680,"get_definition_from_app":624,"load_from_iterator":670,"font":353,"set_mouse_cursor":562,"scale":7,"draw_ticks":663,"parent":680,"Definitions":503,"load_manifest":496,"new_definition":681,"Mouse_cursor":559,"reset_manifest_navigator":621,"on.update":561,"on.keychord_press":666,"order_of_magnitude":573,"copy_shape":396,"manifest_coord":636}
{"compute_layout":385,"approximate":579,"maybe_update_key_in_definitions":529,"approximate_up":658,"Ticks_font":669,"sy":469,"update_editor_box":570,"on_handle":547,"initialize_editor":678,"on_text":539,"schema1_of_y":667,"Manifest_navigator":495,"sx":544,"y_of_schema1":364,"draw_manifest_navigator":677,"Menu_background_color":611,"num_lines_for_manifest_navigator":676,"Menu_border_color":612,"Menu_command_color":613,"Menu_highlight_color":614,"Manifest":494,"draw_menu_bar":641,"Cursor_node":172,"add_hotkey_to_menu":616,"on.code_change":306,"get_manifest":497,"manifest_navigator_up":628,"manifest_navigator_down":635,"draw_cursor":639,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"text_input_on_manifest_navigator":634,"on":1,"manifest_index":637,"manifest_navigator_candidates":638,"on.text_input":521,"add_def_to_menu":640,"Viewport":604,"vy":546,"on.mouse_press":617,"on.mouse_release":554,"vx":545,"on.draw":565,"tick_spec":660,"on.key_release":552,"Page":475,"on.initialize":506,"A":507,"load_definition":674,"line_height":365,"add_thick_line":400,"B":379,"mouse_cursor":558,"Surface":422,"box_height":680,"get_definition_from_app":624,"load_from_iterator":670,"font":353,"set_mouse_cursor":562,"scale":7,"draw_ticks":663,"parent":679,"Definitions":503,"load_manifest":496,"new_definition":671,"Mouse_cursor":559,"reset_manifest_navigator":621,"on.update":561,"on.keychord_press":666,"order_of_magnitude":573,"copy_shape":396,"manifest_coord":636}
box_height = function(node)
-- return the height of a text editor node (explicit width). The result is unscaled.
local y = 0
for i=1,#node.editor.lines do
local line = node.editor.lines[i]
if node.editor.line_cache[i] == nil then
node.editor.line_cache[i] = {}
end
node.editor.line_cache[i].fragments = nil
node.editor.line_cache[i].screen_line_starting_pos = nil
Text.compute_fragments(node.editor, i)
Text.populate_screen_line_starting_pos(node.editor, i)
y = y + 20*1.3*#node.editor.line_cache[i].screen_line_starting_pos
Text.clear_screen_line_cache(node.editor, i)
end
return y
end