13,7 → 13,23 |
inc ecx |
mov edx,[cl_3d_inset] |
call draw_framerect |
|
@^ |
mov ebx,[cur_editor.Bounds.Left-2] |
mov bx,word[cur_editor.Bounds.Right] |
mov ecx,[cur_editor.Bounds.Top-2] |
mov cx,word[cur_editor.Bounds.Top] |
mcall 38,,,[cl_3d_inset] |
mov ecx,[cur_editor.Bounds.Bottom-2] |
mov cx,word[cur_editor.Bounds.Bottom] |
mcall |
mov bx,word[cur_editor.Bounds.Left] |
mov cx,word[cur_editor.Bounds.Top] |
mcall |
mov ebx,[cur_editor.Bounds.Right-2] |
mov bx,word[cur_editor.Bounds.Right] |
mov cx,word[cur_editor.Bounds.Top] |
mcall |
^@ |
mov [cur_editor.Gutter.Visible],0 |
test [options],OPTS_LINENUMS |
jnz @f |
33,26 → 49,6 |
.lp1: mov [cur_editor.Gutter.Width],eax ;! [left_ofs],eax |
mov [left_ofs],eax |
|
mov eax,[cur_editor.Bounds.Right] |
sub eax,[cur_editor.Bounds.Left] |
sub eax,[cur_editor.Gutter.Width] |
sub eax,SCRLW+LCHGW+4 |
js .exit |
cdq |
mov ebx,6 |
div ebx |
mov [columns.scr],eax |
|
mov eax,[cur_editor.Bounds.Bottom] |
sub eax,[cur_editor.Bounds.Top] |
|
sub eax,SCRLW+3 |
js .exit |
cdq |
mov ebx,LINEH |
div ebx |
mov [lines.scr],eax |
|
call draw_editor_gutter |
call draw_editor_vscroll |
call draw_editor_hscroll |
59,7 → 55,6 |
call draw_editor_text |
call draw_editor_caret |
|
.exit: |
ret |
endf |
|
176,7 → 171,7 |
mov ecx,[cur_editor.TopLeft.Y] |
mov edx,[cur_editor.Bounds.Bottom] |
sub edx,[cur_editor.Bounds.Top] |
add edx,-SCRLW*3;+1 |
add edx,-SCRLW*3+1 |
call get_scroll_vars |
mov [cur_editor.VScroll.Top],eax |
mov [cur_editor.VScroll.Size],ebx |
278,7 → 273,6 |
mov ebx,[columns.scr] |
mov ecx,[cur_editor.TopLeft.X] |
mov edx,[cur_editor.Bounds.Right] |
sub edx,[cur_editor.Bounds.Left] |
add edx,-(SCRLW*3) |
call get_scroll_vars |
mov [cur_editor.HScroll.Top],eax |
335,10 → 329,7 |
;----------------------------------------------------------------------------- |
func draw_editor_text ;///// DRAW EDITOR TEXT //////////////////////////////// |
;----------------------------------------------------------------------------- |
cmp [cur_editor.Lines],0 |
jne @f |
ret |
@@: mov eax,[cur_editor.Bounds.Bottom] |
mov eax,[cur_editor.Bounds.Bottom] |
sub eax,[cur_editor.Bounds.Top] |
cmp eax,LINEH |
jge @f |
372,6 → 363,9 |
add esp,-4 |
|
imul ebp,[cur_editor.TopLeft.X],6*65536 ;! ebp,[left_col],6*65536 |
mov eax,[lines.scr] |
sub eax,[cur_editor.Lines.Count] ;! eax,[lines] |
mov [draw_blines],eax |
|
.next_line: |
|
689,6 → 683,13 |
|
.exit: |
|
cmp [draw_blines],0 |
jl @f |
mov ecx,[esp-8] |
shl ecx,16 |
mov cx,word[cur_editor.Bounds.Bottom] |
sub cx,[esp-8] |
add cx,-SCRLW |
mov eax,[cur_editor.Bounds.Left] |
add eax,[cur_editor.Gutter.Width] |
inc eax |
697,27 → 698,8 |
mov bx,word[cur_editor.Bounds.Right] |
sub bx,ax |
add ebx,-SCRLW |
mov edx,[color_tbl+4*5] |
mov eax,13 |
mov ecx,[esp-8] |
add ecx,LINEH |
shl ecx,16 |
mov cx,word[cur_editor.Bounds.Bottom] |
sub cx,[esp-8] |
add cx,-SCRLW-LINEH |
jle @f |
mcall |
@@: mov ecx,[cur_editor.Bounds.Top-2] |
mov cx,2 |
add ecx,0x00010000 |
mcall |
mov ebx,[cur_editor.Bounds.Right] |
mov ecx,[cur_editor.Bounds.Bottom] |
shl ebx,16 |
shl ecx,16 |
add ebx,-(SCRLW-1)*65536+SCRLW-1 |
add ecx,-(SCRLW-1)*65536+SCRLW-1 |
mcall |
mcall 13,,,[color_tbl+4*5] |
@@: |
|
popad |
add esp,4 |
762,22 → 744,4 |
loop .lp8 |
@@: |
ret |
endf |
|
;----------------------------------------------------------------------------- |
func editor_realloc_lines ;///// ADD $DELTA$ TO LINES SIZE /////////////////// |
;----------------------------------------------------------------------------- |
; EAX = delta |
;----------------------------------------------------------------------------- |
push ebx ecx |
mov ebx,[cur_editor.Lines.Size] |
add ebx,eax |
mov eax,[cur_editor.Lines] |
mov [cur_editor.Lines.Size],ebx |
mov ecx,eax |
call mem.ReAlloc |
mov [cur_editor.Lines],eax |
sub eax,ecx |
pop ecx ebx |
ret |
endf |
endf |