forked from KolibriOS/kolibrios
change cursor in t_edit
git-svn-id: svn://kolibrios.org@8532 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1230,16 +1230,16 @@ proc ted_text_add, edit:dword, text:dword, t_len:dword, add_opt:dword
|
||||
add edx,sizeof.symbol
|
||||
cmp edx,ted_tex_end
|
||||
jge @f ;out of memory
|
||||
cmp ebx,0
|
||||
jne .beg_cycle
|
||||
or ebx,ebx
|
||||
jnz .beg_cycle
|
||||
mov ted_ptr_free_symb,edx ;¬¥ï¥¬ 㪠§ ⥫ì ᢮¡®¤ë© ᨬ¢®«, ¤«ï ¡®«¥¥ ¡ëáâண® ¯®¨áª ¯ ¬ïâ¨
|
||||
jmp .add_all
|
||||
@@:
|
||||
cmp ted_increase_size,0
|
||||
je .add_all
|
||||
call ted_memory_increase
|
||||
cmp ebx,0
|
||||
jne .beg_cycle
|
||||
or ebx,ebx
|
||||
jnz .beg_cycle
|
||||
.add_all: ;¢á¥ ᨬ¢®«ë ¤®¡ ¢«¥ë
|
||||
|
||||
call ted_text_colored
|
||||
@@ -1954,27 +1954,27 @@ ted_strlen:
|
||||
; ebx = symbol position in line
|
||||
align 16
|
||||
ted_get_text_coords:
|
||||
push edx
|
||||
xor eax,eax
|
||||
xor ebx,ebx
|
||||
@@:
|
||||
call ted_iterat_perv
|
||||
push edx
|
||||
xor eax,eax
|
||||
xor ebx,ebx
|
||||
@@:
|
||||
call ted_iterat_perv
|
||||
|
||||
cmp eax,0
|
||||
jne .no_col_mov
|
||||
inc ebx
|
||||
.no_col_mov:
|
||||
or eax,eax
|
||||
jnz .no_col_mov
|
||||
inc ebx
|
||||
.no_col_mov:
|
||||
|
||||
cmp edx,ted_tex_1
|
||||
jle @f
|
||||
cmp byte [edx],13
|
||||
jne @b
|
||||
inc eax
|
||||
jmp @b
|
||||
@@:
|
||||
dec ebx
|
||||
pop edx
|
||||
ret
|
||||
cmp edx,ted_tex_1
|
||||
jle @f
|
||||
cmp byte [edx],13
|
||||
jne @b
|
||||
inc eax
|
||||
jmp @b
|
||||
@@:
|
||||
dec ebx
|
||||
pop edx
|
||||
ret
|
||||
|
||||
;input:
|
||||
; edi = pointer to tedit struct
|
||||
@@ -3596,19 +3596,8 @@ pushad
|
||||
imul edx,ted_rec_h
|
||||
add ecx,edx
|
||||
|
||||
cmp ted_cur_ins,1 ;¯à®¢¥àª ०¨¬ à ¡®âë ªãàá®à (®¡ëçë© ¨«¨ ¢áâ ¢ª )
|
||||
jne @f
|
||||
mov edx,ted_rec_h
|
||||
inc edx ;1->1, 3->2, 5->3, ...
|
||||
shr edx,1 ;edx = ¢ëá®â áâப¨ ¤¥«¥ ï 2 (ª®£¤ ªãàá®à ¥ ¯®«ë©)
|
||||
add ecx,edx
|
||||
@@:
|
||||
shl ecx,16
|
||||
add ecx,ted_rec_h
|
||||
cmp ted_cur_ins,1
|
||||
jne @f
|
||||
shr cx,1 ;¤¥«¨¬ ¢ëá®âã ªãàá®à 2
|
||||
@@:
|
||||
|
||||
mov ebx,ted_wnd_l ;calc rect -> x0,x1
|
||||
add ebx,ted_rec_l
|
||||
@@ -3617,6 +3606,10 @@ pushad
|
||||
add ebx,edx
|
||||
shl ebx,16
|
||||
add ebx,ted_rec_w
|
||||
cmp ted_cur_ins,1 ;¯à®¢¥àª ०¨¬ à ¡®âë ªãàá®à (®¡ëçë© ¨«¨ ¢áâ ¢ª )
|
||||
jne @f
|
||||
shr bx,2 ;㬥ìè ¥¬ è¨à¨ã ªãàá®à
|
||||
@@:
|
||||
|
||||
mov edx,ted_color_cursor
|
||||
int 0x40 ;¢ë¢®¤ ªãàá®à
|
||||
@@ -3628,13 +3621,6 @@ pushad
|
||||
ror ecx,16
|
||||
mov bx,cx
|
||||
add ebx,0x10001
|
||||
cmp ted_cur_ins,1
|
||||
jne .no_up_tetx
|
||||
mov ecx,ted_rec_h
|
||||
inc cx ; 1->1, 3->2, 5->3, ...
|
||||
shr cx,1
|
||||
sub bx,cx
|
||||
.no_up_tetx:
|
||||
mov ecx,ted_color_cur_text
|
||||
or ecx,ted_font_size
|
||||
call ted_convert_invis_symb
|
||||
@@ -4362,6 +4348,20 @@ ted_wnd_main_mouse_scroll:
|
||||
shr ebx,1
|
||||
cmp eax,ebx
|
||||
jae .no_scroll
|
||||
mov ebx,ted_cur_y ;¯®§¨æ¨ï ªãàá®à
|
||||
sub ebx,eax ;- ®¢ ï ¯®§¨æ¨ï áªà®««¨£
|
||||
add ebx,[ecx+sb_offs_position] ;+ áâ à ï ¯®§¨æ¨ï áªà®««¨£
|
||||
bt ebx,31
|
||||
jnc @f
|
||||
xor ebx,ebx ;¥á«¨ ªãàá®à áâ « ¢ëè¥ ®ª , â® áâ ¢¨¬ ¢¥àåîî áâபã
|
||||
@@:
|
||||
inc ebx
|
||||
cmp ebx,[ecx+sb_offs_cur_area]
|
||||
jle @f
|
||||
mov ebx,[ecx+sb_offs_cur_area] ;¥á«¨ ªãàá®à áâ « ¨¦¥ ®ª , â® áâ ¢¨¬ ¨¦îî áâபã
|
||||
@@:
|
||||
dec ebx
|
||||
mov ted_cur_y,ebx
|
||||
mov [ecx+sb_offs_position],eax
|
||||
stdcall ted_draw,edi
|
||||
.no_scroll:
|
||||
|
||||
Reference in New Issue
Block a user