aggregate global state inside a 'pane' object
Dependencies
- [2]
6RYGW5H3bugfix: output border color - [3]
Z5M23NTKimplement second, 'output' editor - [4]
KMSL74GAsupport selections in the source editor - [5]
MZ3DMYPDstart sketching out a scrollbar - [6]
QD4LOFQRMerge text.love - [7]
57HKHZ7Zinclude the tool that's mentioned in representation.md - [8]
RU4HIK43Merge lines.love - [9]
6LJZN727handle chords - [10]
LXTTOB33extract a couple of files - [11]
JOPVPUSAediting source code from within the app - [12]
OL7ZCZWDMerge text.love - [13]
BLWAYPKVextract a module - [14]
36Z442IVback to commit 8123959e52f without code editing - [15]
2DVVKKVAflesh out Readme - [16]
TBTRYEBPMerge lines.love - [17]
PJ5PQAQErecord support for multiple versions - [18]
34BZ5ZKNMerge lines.love - [19]
66X36NZNa little more prose describing manual_tests - [20]
N2NUGNN4include a brief reference enabling many useful apps - [21]
VEAVIL4Xresize handler - [22]
RSZD5A7Gforgot to add json.lua - [23]
TLOAPLBJadd a license - [24]
D43U7GQ4alter on-disk representation (manifest files) - [25]
BULPIBEGbeginnings of a module for the text editor - [26]
4SR3Z4Y3document the version of LÖVE I've been using - [27]
ORKN6EOBMerge lines.love - [28]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [29]
SGMA5JLEsave the list of tests in repo - [30]
K2X6G75Zstart writing some tests for drawings - [31]
WR2WMEPEimplement 'Run' button - [32]
OTIBCAUJlove2d scaffold - [33]
ZM7NOBRMnew fork: carousel shell - [34]
73OCE2MCafter much struggle, a brute-force undo - [35]
XX7G2FFJintermingle freehand line drawings with text - [36]
3PSFWAILMerge lines.love - [37]
FM5LDKGTMerge text.love - [38]
6VJTQKW7start supporting LÖVE v12 - [39]
SW5GN5LPsuggest a default layout for freewheeling apps - [40]
YF2ATH2QMerge lines.love - [41]
AVTNUQYRbasic test-enabled framework - [42]
Q6RXCILQMerge text.love - [43]
ED4Z6ORCcleaner API for file-system access - [44]
D2GCFTTTclean up repl functionality - [45]
IP4LD33Dmouse events for scrollbar - [46]
2L5MEZV3experiment: new edit namespace - [47]
TVCPXAAUrename - [48]
VXORMHMEdelete experimental REPL - [49]
VHQCNMARseveral more modules - [50]
ZLJYLPOTMerge lines.love - [51]
VXRYVZ74Merge text.love - [52]
3QNOKBFMbeginnings of a test harness - [53]
VP5KC4XZMerge lines.love - [54]
VHUNJHXBMerge lines.love - [55]
EZHO4TSWnew file-system format for freewheeling apps - [56]
5RUFNRJOstart of the visual skeleton - [57]
VLTU33KWresolve conflicts - [58]
KKQKPGCIresolve conflicts - [59]
CE4LZV4Tdrop last couple of manual tests - [60]
R5QXEHUIsomebody stop me - [61]
ICS45BILeditor widget now takes a bottom margin - [62]
KKMFQDR4editing source code from within the app - [63]
4YDBYBA4clean up memory leak experiments - [64]
UEG224LHdebug animations - [65]
FS2ITYYHrecord a known issue - [66]
LRDM35CEapp running again - [67]
LWPFEZBIMerge lines.love - [68]
M5JXTW56Merge text.love - [69]
PRE6XPRNresponsively increase/decrease font height - [70]
T4FRZSYLdelete an ancient, unused file - [71]
OGUV4HSAremove some memory leaks from rendered fragments - [72]
CZQ3NJ4NMerge text0 - [73]
5OVKHVY6nice way to make on.* handlers more discoverable - [74]
2CFLXLIEMerge text.love - [75]
D2TYFYG2Merge text.love - [76]
CAG7PP5YMerge text.love - [77]
TEDSEOCWsend editor clicks to the left of the scrollbar
Change contents
- file deletion: 0044-Output_editor_state
Output_editor_state = nil - file deletion: 0041-Canvas
Canvas = nil - file deletion: 0009-Editor_state
Editor_state = nil - file addition: 0046-Global_state[4.2]
Global_state = {} - file addition: 0045-Current_pane[4.2]
Current_pane = {canvas = nil,editor_state = nil,output_editor_state = nil,} - replacement in 0042-draw_canvas at line 2
if Canvas == nil then return endif Current_pane.canvas == nil then return end - replacement in 0042-draw_canvas at line 5
love.graphics.draw(Canvas, 0,0)love.graphics.draw(Current_pane.canvas, 0,0) - replacement in 0032-update_font_settings at line 7
Editor_state.top = Menu_bottom + 20Editor_state.left = Menu_left + 50 + Line_number_paddingEditor_state.right = math.min(100+30*App.width('m'), Safe_width*2/3)Editor_state.width = Editor_state.right - Editor_state.leftedit.update_font_settings(Editor_state, font_height)Text.redraw_all(Editor_state)Current_pane.editor_state.top = Menu_bottom + 20Current_pane.editor_state.left = Menu_left + 50 + Line_number_paddingCurrent_pane.editor_state.right = math.min(100+30*App.width('m'), Safe_width*2/3)Current_pane.editor_state.width = Current_pane.editor_state.right - Current_pane.editor_state.leftedit.update_font_settings(Current_pane.editor_state, font_height)Text.redraw_all(Current_pane.editor_state) - replacement in 0031-on.resize at line 3[4.84]→[4.84:215](∅→∅),[4.215]→[4.666:705](∅→∅),[4.705]→[4.215:246](∅→∅),[4.215]→[4.215:246](∅→∅),[4.246]→[3.1379:1575](∅→∅)
Editor_state.right = math.min(100+30*App.width('m'), Safe_width*2/3)Editor_state.width = Editor_state.right - Editor_state.leftEditor_state.bottom = Safe_height/2-5Text.redraw_all(Editor_state)Output_editor_state.top = Editor_state.bottom+5+10+5Output_editor_state.right = Editor_state.rightOutput_editor_state.width = Editor_state.widthOutput_editor_state.bottom = Safe_height - 5Current_pane.editor_state.right = math.min(100+30*App.width('m'), Safe_width*2/3)Current_pane.editor_state.width = Current_pane.editor_state.right - Current_pane.editor_state.leftCurrent_pane.editor_state.bottom = Safe_height/2-5Text.redraw_all(Current_pane.editor_state)Current_pane.output_editor_state.top = Current_pane.editor_state.bottom+5+10+5Current_pane.output_editor_state.right = Current_pane.editor_state.rightCurrent_pane.output_editor_state.width = Current_pane.editor_state.widthCurrent_pane.output_editor_state.bottom = Safe_height - 5 - replacement in 0028-draw_output_border at line 4
local x1 = Editor_state.left-5-Line_number_paddinglocal x2 = Editor_state.right+5local y1 = Editor_state.bottom+5+10local x1 = Current_pane.editor_state.left-5-Line_number_paddinglocal x2 = Current_pane.editor_state.right+5local y1 = Current_pane.editor_state.bottom+5+10 - replacement in 0021-draw_menu at line 5
button(Editor_state, 'run', {x=Menu_left+5, y=Menu_top+5, w=App.width('Run')+10, h=Line_height, bg={r=0.6, g=0.8, b=0.6},button(Global_state, 'run', {x=Menu_left+5, y=Menu_top+5, w=App.width('Run')+10, h=Line_height, bg={r=0.6, g=0.8, b=0.6}, - replacement in 0021-draw_menu at line 13
local buf = table.concat(map(Editor_state.lines, function(line) return line.data end), '\n')Canvas = love.graphics.newCanvas()love.graphics.setCanvas(Canvas)local buf = table.concat(map(Current_pane.editor_state.lines, function(line) return line.data end), '\n')Current_pane.canvas = love.graphics.newCanvas()love.graphics.setCanvas(Current_pane.canvas) - replacement in 0021-draw_menu at line 23
Output_editor_state.lines = {Current_pane.output_editor_state.lines = { - replacement in 0021-draw_menu at line 26
Text.redraw_all(Output_editor_state)Text.redraw_all(Current_pane.output_editor_state) - replacement in 0021-draw_menu at line 34
button(Editor_state, 'settings', {x=Safe_width-w-10-5, y=Menu_top+5, w=w+10, h=Line_height, bg={r=0.6, g=0.8, b=0.6},button(Global_state, 'settings', {x=Safe_width-w-10-5, y=Menu_top+5, w=w+10, h=Line_height, bg={r=0.6, g=0.8, b=0.6}, - replacement in 0021-draw_menu at line 45
button(Editor_state, 'left', {x=0, y=Menu_bottom, w=Menu_left+30, h=App.screen.height, bg={r=0.5, g=0.5, b=0.5, a=0.2},button(Global_state, 'left', {x=0, y=Menu_bottom, w=Menu_left+30, h=App.screen.height, bg={r=0.5, g=0.5, b=0.5, a=0.2}, - replacement in 0021-draw_menu at line 52
button(Editor_state, 'left', {x=r-30, y=Menu_bottom, w=100, h=App.screen.height, bg={r=0.5, g=0.5, b=0.5, a=0.2},button(Global_state, 'left', {x=r-30, y=Menu_bottom, w=100, h=App.screen.height, bg={r=0.5, g=0.5, b=0.5, a=0.2}, - replacement in 0020-draw_editor_border at line 3
local x1 = Editor_state.left-5-Line_number_paddinglocal y1 = Editor_state.top-5local x2 = Editor_state.right+5local y2 = Editor_state.bottom+5local x1 = Current_pane.editor_state.left-5-Line_number_paddinglocal y1 = Current_pane.editor_state.top-5local x2 = Current_pane.editor_state.right+5local y2 = Current_pane.editor_state.bottom+5 - replacement in 0017-on.mouse_release at line 2[4.2259]→[3.1770:1972](∅→∅),[3.1972]→[4.47:133](∅→∅),[4.1356]→[4.47:133](∅→∅),[4.133]→[4.1362:1416](∅→∅),[4.1362]→[4.1362:1416](∅→∅),[4.1416]→[3.1973:2171](∅→∅)
if Editor_state.scrollbar_drag thenadjust_scrollbar(Editor_state, y)Editor_state.scrollbar_drag = nilelseif on_editor_scrollbar_area(Editor_state, x,y) thenadjust_scrollbar(Editor_state, y)elseif x < Editor_state.right + 15 - 5 and y < Editor_state.bottom + 5 + 10 - 5 thenedit.mouse_release(Editor_state, x,y, mouse_button)elseif Output_editor_state.scrollbar_drag thenadjust_scrollbar(Output_editor_state, y)elseif on_editor_scrollbar_area(Output_editor_state, x,y) thenadjust_scrollbar(Output_editor_state, y)if Current_pane.editor_state.scrollbar_drag thenadjust_scrollbar(Current_pane.editor_state, y)Current_pane.editor_state.scrollbar_drag = nilelseif on_editor_scrollbar_area(Current_pane.editor_state, x,y) thenadjust_scrollbar(Current_pane.editor_state, y)elseif x < Current_pane.editor_state.right + 15 - 5 and y < Current_pane.editor_state.bottom + 5 + 10 - 5 thenedit.mouse_release(Current_pane.editor_state, x,y, mouse_button)elseif Current_pane.output_editor_state.scrollbar_drag thenadjust_scrollbar(Current_pane.output_editor_state, y)elseif on_editor_scrollbar_area(Current_pane.output_editor_state, x,y) thenadjust_scrollbar(Current_pane.output_editor_state, y) - replacement in 0016-on.mouse_press at line 2
if mouse_press_consumed_by_any_button_handler(Editor_state, x,y, mouse_button) thenif mouse_press_consumed_by_any_button_handler(Global_state, x,y, mouse_button) then - replacement in 0016-on.mouse_press at line 5
if on_editor_scrollbar(Editor_state, x,y) thenEditor_state.scrollbar_drag = trueelseif on_editor_scrollbar_area(Editor_state, x,y) thenif on_editor_scrollbar(Current_pane.editor_state, x,y) thenCurrent_pane.editor_state.scrollbar_drag = trueelseif on_editor_scrollbar_area(Current_pane.editor_state, x,y) then - replacement in 0016-on.mouse_press at line 9[4.1543]→[4.135:221](∅→∅),[4.221]→[4.1549:1601](∅→∅),[4.1549]→[4.1549:1601](∅→∅),[4.1601]→[3.2315:2482](∅→∅)
elseif x < Editor_state.right + 15 - 5 and y < Editor_state.bottom + 5 + 10 - 5 thenedit.mouse_press(Editor_state, x,y, mouse_button)elseif on_editor_scrollbar(Output_editor_state, x,y) thenOutput_editor_state.scrollbar_drag = trueelseif on_editor_scrollbar_area(Output_editor_state, x,y) thenelseif x < Current_pane.editor_state.right + 15 - 5 and y < Current_pane.editor_state.bottom + 5 + 10 - 5 thenedit.mouse_press(Current_pane.editor_state, x,y, mouse_button)elseif on_editor_scrollbar(Current_pane.output_editor_state, x,y) thenCurrent_pane.output_editor_state.scrollbar_drag = trueelseif on_editor_scrollbar_area(Current_pane.output_editor_state, x,y) then - replacement in 0015-on.key_release at line 2
edit.key_release(Editor_state, key, scancode)edit.key_release(Current_pane.editor_state, key, scancode) - replacement in 0014-on.text_input at line 2
edit.text_input(Editor_state, t)edit.text_input(Current_pane.editor_state, t) - replacement in 0013-on.keychord_press at line 3
update_font_settings(Editor_state.font_height+2)update_font_settings(Current_pane.editor_state.font_height+2) - replacement in 0013-on.keychord_press at line 5
update_font_settings(Editor_state.font_height-2)update_font_settings(Current_pane.editor_state.font_height-2) - replacement in 0013-on.keychord_press at line 9
edit.keychord_press(Editor_state, chord, key)edit.keychord_press(Current_pane.editor_state, chord, key) - replacement in 0013-on.keychord_press at line 11
end[4.2303]end - replacement in 0012-on.draw at line 2
Editor_state.button_handlers = {}Global_state.button_handlers = {} - replacement in 0012-on.draw at line 7
edit.draw(Editor_state)draw_scrollbar(Editor_state)edit.draw(Current_pane.editor_state)draw_scrollbar(Current_pane.editor_state) - replacement in 0012-on.draw at line 10
edit.draw(Output_editor_state, Normal_color, --[[hide cursor]] true)draw_scrollbar(Output_editor_state)edit.draw(Current_pane.output_editor_state, Normal_color, --[[hide cursor]] true)draw_scrollbar(Current_pane.output_editor_state) - replacement in 0011-on.initialize at line 8
Editor_state = edit.initialize_state(Current_pane.editor_state = edit.initialize_state( - replacement in 0011-on.initialize at line 14[4.800]→[4.3379:3410](∅→∅),[4.2276]→[4.3379:3410](∅→∅),[4.3379]→[4.3379:3410](∅→∅),[4.3410]→[3.2604:2688](∅→∅)
Text.redraw_all(Editor_state)Output_editor_state = edit.initialize_state(Editor_state.bottom+5+10+5, -- topText.redraw_all(Current_pane.editor_state)Current_pane.output_editor_state = edit.initialize_state(Current_pane.editor_state.bottom+5+10+5, -- top - replacement in 0011-on.initialize at line 18
Editor_state.left, Editor_state.right,Current_pane.editor_state.left, Current_pane.editor_state.right, - replacement in 0011-on.initialize at line 20
Text.redraw_all(Output_editor_state)Text.redraw_all(Current_pane.output_editor_state) - replacement in 0004-on.update at line 3
if Editor_state.scrollbar_drag thenadjust_scrollbar(Editor_state, App.mouse_y())elseif Output_editor_state.scrollbar_drag thenadjust_scrollbar(Output_editor_state, App.mouse_y())if Current_pane.editor_state.scrollbar_drag thenadjust_scrollbar(Current_pane.editor_state, App.mouse_y())elseif Current_pane.output_editor_state.scrollbar_drag thenadjust_scrollbar(Current_pane.output_editor_state, App.mouse_y())