1) fix in rev 5911

2) add mouse scroll in 'tree_list'

git-svn-id: svn://kolibrios.org@5914 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2015-11-14 21:31:00 +00:00
parent 8bc2caddf7
commit e7401d7710

View File

@ -1,6 +1,6 @@
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj ; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
; í«¥¬¥­â TreeList ¤«ï Kolibri OS ; í«¥¬¥­â TreeList ¤«ï Kolibri OS
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 10.11.2015 IgorA ; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 14.11.2015 IgorA
; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï ; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï
@ -207,6 +207,48 @@ proc tl_mouse, tlist:dword
cmp ax,bx ;¢¥àå­ïï £à ­¨æ  ®ª­  + ¢ëá®â  ¯®¤¯¨á¨ cmp ax,bx ;¢¥àå­ïï £à ­¨æ  ®ª­  + ¢ëá®â  ¯®¤¯¨á¨
jl .test_scroll jl .test_scroll
push eax ebx
mcall 37,7 ;®¡à ¡®âª  ª®«¥á  ¬ëè¨
mov edx,eax
xor ecx,ecx
test eax,eax
jz .mouse_next
test ax,0x8000
jnz .decr
shr eax,16
test ax,0x8000
jnz .decr_1
mov cx,dx ;dx = mouse scroll data vertical
test ecx,ecx
jnz @f
shr edx,16
mov cx,dx ;dx = mouse scroll data horizontal
test ecx,ecx
jz .mouse_next
@@:
stdcall tl_cur_next, edi
dec ecx
jnz @r
jmp .mouse_next
;----------------------------------------
.decr: ;¢¥à⨪ «ì­ ï ¯à®ªàã⪠ ®âà¨æ â¥«ì­ ï
mov bx,ax ;ax = mouse scroll data vertical
jmp @f
.decr_1: ;£®à¨§®­â «ì­ ï ¯à®ªàã⪠ ®âà¨æ â¥«ì­ ï
mov bx,ax ;ax = mouse scroll data horizontal
@@:
mov ecx,0xffff
sub ecx,ebx
inc ecx
@@:
stdcall tl_cur_perv, edi
dec ecx
jnz @r
;---------------------------------------------------
.mouse_next:
pop ebx eax
push eax ebx push eax ebx
mcall 37,2 mcall 37,2
@ -1412,25 +1454,26 @@ endp
;output: ;output:
; eax - pointer to node info ; eax - pointer to node info
align 4 align 4
proc tl_node_poi_get_info uses ebx ecx edi, tlist:dword, node_ind:dword proc tl_node_poi_get_info uses ebx ecx edx edi, tlist:dword, node_ind:dword
mov edi,dword[tlist] mov edi,dword[tlist]
mov ebx,dword[node_ind] mov ebx,dword[node_ind]
;cycle to nodes ;cycle to nodes
mov eax,tl_data_nodes mov edx,tl_data_nodes
mov ecx,eax mov ecx,edx
add ecx,sizeof.TreeList add ecx,sizeof.TreeList
@@: @@:
call tl_iterat_next_all call tl_iterat_next_all
cmp eax,ecx cmp edx,ecx
jle @f jle @f
dec ebx dec ebx
cmp ebx,0 cmp ebx,0
jg @b jg @b
jmp .find jmp .find
@@: @@:
xor eax,eax xor edx,edx
.find: .find:
mov eax,edx
ret ret
endp endp
@ -1832,7 +1875,8 @@ endp
;¯¥à¥¬¥é ¥¬ 㧥« ¢¢¥àå ;¯¥à¥¬¥é ¥¬ 㧥« ¢¢¥àå
align 4 align 4
proc tl_node_move_up uses eax ebx ecx edx edi esi, tlist:dword proc tl_node_move_up tlist:dword
pushad
mov edi,dword[tlist] mov edi,dword[tlist]
call tl_get_cur_node_index ;eax=po_t call tl_get_cur_node_index ;eax=po_t
cmp eax,2 cmp eax,2
@ -1861,12 +1905,14 @@ proc tl_node_move_up uses eax ebx ecx edx edi esi, tlist:dword
push dword edi push dword edi
call tl_draw call tl_draw
@@: @@:
popad
ret ret
endp endp
;¯¥à¥¬¥é ¥¬ 㧥« ¢­¨§ ;¯¥à¥¬¥é ¥¬ 㧥« ¢­¨§
align 4 align 4
proc tl_node_move_down uses eax ebx ecx edx edi esi, tlist:dword proc tl_node_move_down tlist:dword
pushad
mov edi,dword[tlist] mov edi,dword[tlist]
call tl_get_cur_node_index ;eax=po_t call tl_get_cur_node_index ;eax=po_t
cmp eax,2 cmp eax,2
@ -1896,6 +1942,7 @@ proc tl_node_move_down uses eax ebx ecx edx edi esi, tlist:dword
stdcall tl_draw, edi stdcall tl_draw, edi
@@: @@:
ret ret
popad
endp endp
align 4 align 4