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HWD67F5ZTXKR5EEVSGTZZQC
SQLVYKVJ5O4UMKTT56LMFPDQX66SZJJ7FZSFEN5MTWPXXWL7X3WQC
PX7DDEMOBGPVK3FXKK5XEPG24CJXZSVW67DLG2JZZ5E77NVEAA3AC
4J2WLDRMP76H4ZFRQR244KZNOUDN3VSLFBFHI3GSCGKKWA3LNKJQC
RTDYYP4HQI4RLAISRXGB6TFWALBXSO3EQ4JCABRZM2TOQEJOGB6QC
XVR2O5PIN4KDGEIFAXR2A54Q2GDYJHXUIHRFI74UU736M4R4CLVQC
5DOC2CBMBDMAOJ7IKLDGVRCY4SNPCJTTF7DK7WGNLPGNV4AWVJNAC
Z4XRNDTRTGSZHNB65WNHOVUBFW4QWQABLVSK4RM3QJHGK33DMRJAC
QKAMUWSB6GWKEGLXFKALGCIU7HBTZ4YGLIR7TLA6ZZCUK7WNCNUQC
4C375P53EXHUPXUFQSI3LA7THEP2WOKX5ZB57OQ5ZSM7LYOVW5HAC
ZZ2B5RPQKANSIWAZA4ATDXVBK3XLYIORJ7I4IH2WQOG5JAPJFZ4AC
YJGADSGKT43NZWJL4BKCN6LCBVDNNHED6XGN76PWF54R3LNM46LAC
MYC7XR5QOT2AXHF6UNGSNFFD5VL6UHGUZQBP7PWWLZ5NNXE7UMTAC
M6TH7VSZQGKDB7SFNN5K52WWAX5VTVNT6GOKNKTXPVZBT6NEYDOQC
CVGE3SIGJRGCLY3A2RBPGFXAEKVZXUUIZQLRHJLM4VPUM4SHEZIAC
--? print('a')
if line_index >= Screen_top1.line then
Screen_bottom1.line = line_index
if line.mode == 'text' and line.data == '' then
line.starty = y
line.startpos = 1
-- insert new drawing
button('draw', {x=4,y=y+4, w=12,h=12, color={1,1,0},
icon = icon.insert_drawing,
onpress1 = function()
Drawing.before = snapshot(line_index-1, line_index)
table.insert(Lines, line_index, {mode='drawing', y=y, h=256/2, points={}, shapes={}, pending={}})
if Cursor1.line >= line_index then
Cursor1.line = Cursor1.line+1
end
schedule_save()
record_undo_event({before=Drawing.before, after=snapshot(line_index-1, line_index+1)})
Screen_bottom1.line = line_index
if line.mode == 'text' and line.data == '' then
line.starty = y
line.startpos = 1
-- insert new drawing
button('draw', {x=4,y=y+4, w=12,h=12, color={1,1,0},
icon = icon.insert_drawing,
onpress1 = function()
Drawing.before = snapshot(line_index-1, line_index)
table.insert(Lines, line_index, {mode='drawing', y=y, h=256/2, points={}, shapes={}, pending={}})
if Cursor1.line >= line_index then
Cursor1.line = Cursor1.line+1
})
if Search_term == nil then
if line_index == Cursor1.line then
Text.draw_cursor(Margin_left, y)
end
end
Screen_bottom1.pos = Screen_top1.pos
y = y + Line_height
elseif line.mode == 'drawing' then
y = y+Drawing_padding_top
line.y = y
Drawing.draw(line)
y = y + Drawing.pixels(line.h) + Drawing_padding_bottom
else
line.starty = y
line.startpos = 1
if line_index == Screen_top1.line then
line.startpos = Screen_top1.pos
schedule_save()
record_undo_event({before=Drawing.before, after=snapshot(line_index-1, line_index+1)})
end
})
if Search_term == nil then
if line_index == Cursor1.line then
Text.draw_cursor(Margin_left, y)
--? print('text.draw', y, line_index)
y, Screen_bottom1.pos = Text.draw(line, line_index)
y = y + Line_height
--? print('=> y', y)
end
Screen_bottom1.pos = Screen_top1.pos
y = y + Line_height
elseif line.mode == 'drawing' then
y = y+Drawing_padding_top
line.y = y
Drawing.draw(line)
y = y + Drawing.pixels(line.h) + Drawing_padding_bottom
else
line.starty = y
line.startpos = 1
if line_index == Screen_top1.line then
line.startpos = Screen_top1.pos