distinguish consistently between mouse buttons and other buttons

[?]
Aug 23, 2022, 4:36 PM
5UKUADTWMNWPOPBBTXUXY7UNFW64DWANI2RQHKSCSZNWHTQM4GUAC

Dependencies

  • [2] 3OTESDW6 move drawing.starty into line cache
  • [3] HYEAFRZ2 split mouse_pressed events between Text and Drawing
  • [4] 6E3HVYWF test and App helper for mouse clicks
  • [5] DLQAEAC7 add state arg to Drawing.mouse_pressed
  • [6] KTZQ57HV replace globals with args in a few functions
  • [7] YTSPVDZH first successful pagedown test, first bug found by test
  • [8] L6XA5EY2 test: moving a point
  • [9] RT6EV6OP delegate update events to drawings
  • [10] C45WCXJ2 keep drawings within the line width slider as well
  • [11] LF7BWEG4 group all editor globals
  • [12] UHB4GARJ left/right margin -> left/right coordinates
  • [13] LUNH47XX make text and drawings the same width
  • [14] QFC3WRDZ chunking by simple local variable
  • [15] 2L5MEZV3 experiment: new edit namespace
  • [16] SRVDX4I5 local var
  • [17] VG75U7IM bugfix: typing should delete highlighted text
  • [18] K2X6G75Z start writing some tests for drawings
  • [19] 5DOTWNVM right margin
  • [20] JF5L2BBS test harness now supports copy/paste
  • [21] Y2ZIPXEM new test
  • [22] ZLJGZYQG select text with shift + mouseclick
  • [23] APYPFFS3 call edit rather than App callbacks in tests
  • [24] AVTNUQYR basic test-enabled framework
  • [25] QXVD2RIF add state arg to Drawing.mouse_released
  • [26] M6TH7VSZ rip out notion of Line_width
  • [27] 6DE7RBZ6 move mouse_released events to Drawing
  • [28] WTDKUACN rectangle and square shapes
  • [29] BJ2C6F2B ignore 'name' mode in a few places
  • [30] 2ENZW7TV select text using mouse drag
  • [31] JFFUF5AL override mouse state lookups in tests
  • [32] LYN3L74W correct commit f3abc2cbf2
  • [*] BLWAYPKV extract a module
  • [*] 3QNOKBFM beginnings of a test harness

Change contents

  • replacement in edit.lua at line 500
    [3.6651][3.6651:6864]()
    function edit.run_after_mouse_click(State, x,y, button)
    App.fake_mouse_press(x,y, button)
    edit.mouse_pressed(State, x,y, button)
    App.fake_mouse_release(x,y, button)
    edit.mouse_released(State, x,y, button)
    [3.6651]
    [3.6864]
    function edit.run_after_mouse_click(State, x,y, mouse_button)
    App.fake_mouse_press(x,y, mouse_button)
    edit.mouse_pressed(State, x,y, mouse_button)
    App.fake_mouse_release(x,y, mouse_button)
    edit.mouse_released(State, x,y, mouse_button)
  • replacement in edit.lua at line 509
    [3.6915][3.6915:7048]()
    function edit.run_after_mouse_press(State, x,y, button)
    App.fake_mouse_press(x,y, button)
    edit.mouse_pressed(State, x,y, button)
    [3.6915]
    [3.7048]
    function edit.run_after_mouse_press(State, x,y, mouse_button)
    App.fake_mouse_press(x,y, mouse_button)
    edit.mouse_pressed(State, x,y, mouse_button)
  • replacement in edit.lua at line 516
    [3.7099][3.7099:7237]()
    function edit.run_after_mouse_release(State, x,y, button)
    App.fake_mouse_release(x,y, button)
    edit.mouse_released(State, x,y, button)
    [3.7099]
    [3.7237]
    function edit.run_after_mouse_release(State, x,y, mouse_button)
    App.fake_mouse_release(x,y, mouse_button)
    edit.mouse_released(State, x,y, mouse_button)
  • replacement in drawing.lua at line 221
    [3.800][2.2624:2690]()
    function Drawing.mouse_pressed(State, drawing_index, x,y, button)
    [3.800]
    [2.2690]
    function Drawing.mouse_pressed(State, drawing_index, x,y, mouse_button)
  • replacement in drawing.lua at line 295
    [3.1875][3.71:123]()
    function Drawing.mouse_released(State, x,y, button)
    [3.1875]
    [3.123]
    function Drawing.mouse_released(State, x,y, mouse_button)
  • replacement in app.lua at line 210
    [3.4618][3.4618:4661]()
    function App.fake_mouse_press(x,y, button)
    [3.4618]
    [3.4661]
    function App.fake_mouse_press(x,y, mouse_button)
  • replacement in app.lua at line 213
    [3.4719][3.4719:4757]()
    App.fake_mouse_state[button] = true
    [3.4719]
    [3.4757]
    App.fake_mouse_state[mouse_button] = true
  • replacement in app.lua at line 215
    [3.4761][3.4761:4806]()
    function App.fake_mouse_release(x,y, button)
    [3.4761]
    [3.4806]
    function App.fake_mouse_release(x,y, mouse_button)
  • replacement in app.lua at line 218
    [3.4864][3.4864:4901]()
    App.fake_mouse_state[button] = nil
    [3.4864]
    [3.4901]
    App.fake_mouse_state[mouse_button] = nil
  • replacement in app.lua at line 224
    [3.4996][3.4996:5066]()
    function App.mouse_down(button)
    return App.fake_mouse_state[button]
    [3.4996]
    [3.5066]
    function App.mouse_down(mouse_button)
    return App.fake_mouse_state[mouse_button]
  • replacement in app.lua at line 253
    [3.755][3.545:732]()
    function App.run_after_mouse_click(x,y, button)
    App.fake_mouse_press(x,y, button)
    App.mousepressed(x,y, button)
    App.fake_mouse_release(x,y, button)
    App.mousereleased(x,y, button)
    [3.755]
    [3.732]
    function App.run_after_mouse_click(x,y, mouse_button)
    App.fake_mouse_press(x,y, mouse_button)
    App.mousepressed(x,y, mouse_button)
    App.fake_mouse_release(x,y, mouse_button)
    App.mousereleased(x,y, mouse_button)
  • replacement in app.lua at line 262
    [3.777][3.5185:5269](),[3.755][3.5185:5269](),[3.5269][3.802:834](),[3.802][3.802:834]()
    function App.run_after_mouse_press(x,y, button)
    App.fake_mouse_press(x,y, button)
    App.mousepressed(x,y, button)
    [3.777]
    [3.677]
    function App.run_after_mouse_press(x,y, mouse_button)
    App.fake_mouse_press(x,y, mouse_button)
    App.mousepressed(x,y, mouse_button)
  • replacement in app.lua at line 269
    [3.722][3.5270:5358](),[3.5358][3.771:804](),[3.771][3.771:804]()
    function App.run_after_mouse_release(x,y, button)
    App.fake_mouse_release(x,y, button)
    App.mousereleased(x,y, button)
    [3.722]
    [3.7039]
    function App.run_after_mouse_release(x,y, mouse_button)
    App.fake_mouse_release(x,y, mouse_button)
    App.mousereleased(x,y, mouse_button)