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PKWULAC ZMRMC3O6RXECMBAPOOKUSYDJ3K6CQVRFHFE2BID4BUBOL3YB6MGAC 2CK5QI7WA7M4IVSACFGOJYAIDKRUTZVMMPSFWEJTUNMWTN7AX4NAC KTSXR2MUTVMBEU7BGN5CHXL5UP6PPA6TTHN4CON7T67YWGZB72VAC KEFZWDCOCLPTLSZJKRV4VYAHRITV5T33YKG2VGT332YAUCOBS3EAC 4C5277X7DTT6YSUD7QXQJ323CIRU4IERYZGOG43JWCPZ67B4N5AQC QPJMOH5SQSTDF52FEQVOJ5XMUNLTUHLO3ANQJP7Y6UHID3RTROIAC UOTHQWM74AFOCPGQKKPLZXRI5HQFH3SRGI336AVZRGWPR6P256EAC end--? print('selection:', State.selection1.line, State.selection1.pos)endfunction edit.mouse_wheel_move(State, dx,dy)if dy > 0 thenState.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}for i=1,math.floor(dy) doText.up(State)endState.cursor1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}for i=1,math.floor(-dy) doText.down(State)endendelseif dy < 0 then
function source.mouse_wheel_move(dx,dy)Cursor_time = 0 -- ensure cursor is visible immediately after it movesif Focus == 'edit' thenreturn edit.mouse_wheel_move(Editor_state, dx,dy)elsereturn log_browser.mouse_wheel_move(Log_browser_state, dx,dy)endendfunction source.text_input(t)
function run.mouse_wheel_move(dx,dy)Cursor_time = 0 -- ensure cursor is visible immediately after it movesreturn edit.mouse_wheel_move(Editor_state, dx,dy)endfunction run.text_input(t)
function log_browser.down(State)while State.screen_top1.line < #State.lines doState.screen_top1.line = State.screen_top1.line+1if should_show(State.lines[State.screen_top1.line]) thenbreakendendendfunction log_browser.height(State, line_index)local line = State.lines[line_index]if line.data == nil then-- section headerreturn State.line_heightelseif type(line.data) == 'string' thenreturn State.line_heightelseif line.height == nil then--? print('nil line height! rendering off screen to calculate')line.height = log_render[line.data.name](line.data, State.left, App.screen.height, State.right-State.left)endreturn line.heightendendendendendfunction log_browser.up(State)while State.screen_top1.line > 1 doState.screen_top1.line = State.screen_top1.line-1if should_show(State.lines[State.screen_top1.line]) thenbreakendendendlog_browser.down(State)elseif chord == 'pageup' thenlocal y = 0while State.screen_top1.line > 1 and y < App.screen.height - 100 doState.screen_top1.line = State.screen_top1.line - 1if should_show(State.lines[State.screen_top1.line]) theny = y + log_browser.height(State, State.screen_top1.line)endendelseif chord == 'pagedown' thenlocal y = 0while State.screen_top1.line < #State.lines and y < App.screen.height - 100 doif should_show(State.lines[State.screen_top1.line]) theny = y + log_browser.height(State, State.screen_top1.line)endState.screen_top1.line = State.screen_top1.line + 1log_browser.up(State)elseif chord == 'down' thenendfunction log_browser.mouse_wheel_move(State, dx,dy)if dy > 0 thenfor i=1,math.floor(dy) dolog_browser.up(State)endelseif dy < 0 thenfor i=1,math.floor(-dy) dolog_browser.down(State)endendend
endendfunction edit.mouse_wheel_move(State, dx,dy)if dy > 0 thenState.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}for i=1,math.floor(dy) doText.up(State)endelseif dy < 0 thenState.cursor1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}for i=1,math.floor(-dy) doText.down(State)end
endendfunction edit.mouse_wheel_move(State, dx,dy)if dy > 0 thenState.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}for i=1,math.floor(dy) doText.up(State)endelseif dy < 0 thenState.cursor1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}for i=1,math.floor(-dy) doText.down(State)end
function App.wheelmoved(dx,dy)if Current_app == 'run' thenif run.mouse_wheel_move then run.mouse_wheel_move(dx,dy) endelseif Current_app == 'source' thenif source.mouse_wheel_move then source.mouse_wheel_move(dx,dy) endelseassert(false, 'unknown app "'..Current_app..'"')endend
function App.wheelmoved(dx,dy)if run.mouse_wheel_move then run.mouse_wheel_move(dx,dy) endif source.mouse_wheel_move then source.mouse_wheel_move(dx,dy) endelseassert(false, 'unknown app "'..Current_app..'"')endend
function App.mousereleased(x,y, mouse_button)if Current_app == 'run' thenif run.mouse_release then run.mouse_release(x,y, mouse_button) endelseif Current_app == 'source' thenif source.mouse_release then source.mouse_release(x,y, mouse_button) end
while State.screen_top1.line > 1 doState.screen_top1.line = State.screen_top1.line-1if should_show(State.lines[State.screen_top1.line]) thenbreakendend
log_browser.up(State)
while State.screen_top1.line < #State.lines doState.screen_top1.line = State.screen_top1.line+1if should_show(State.lines[State.screen_top1.line]) thenbreakendend
log_browser.down(State)