Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9058 → Rev 9059

/programs/fs/kfar/trunk/dialogs.inc
145,9 → 145,11
mov eax,SF_MOUSE_GET
mov ebx,SSF_BUTTON_EXT
int 0x40
mov byte[mousestate], 1
bt eax,8 ;left but. down
jnc .event
 
jc @f
mov byte[mousestate], 0
@@:
mov eax,SF_MOUSE_GET
mov ebx,SSF_WINDOW_POSITION
int 0x40
169,8 → 171,6
pop edx
 
mov ebx, [esp+24h+8] ;DLGTEMPLATE* dlg
cmp dword[ebx+dlgtemplate.size], 0
jne .event ;¥á«¨ ¤¨ «®£®¢®¥ ®ª­® ­¥ áâ ­¤ àâ­®¥ (ᯨ᮪ §­ ç¥­¨©)
cmp edx, [ebx+dlgtemplate.y]
jl .event
cmp eax, [ebx+dlgtemplate.x]
181,7 → 181,32
jge .event
cmp eax, [ebx+dlgtemplate.width]
jge .event
 
cmp dword[ebx+dlgtemplate.size], 0
je .m_menu_end
;¥á«¨ ¤¨ «®£®¢®¥ ®ª­® ­¥ áâ ­¤ àâ­®¥ (ᯨ᮪ §­ ç¥­¨©)
cmp edx, [ebx+44]
jl @f
mov edx, [ebx+44]
dec edx
@@:
mov ecx, [ebx+48]
mov ecx, [ecx] ;¡¥à¥¬ 㪠§ â¥«ì ­  listitem[1]
sub ecx, [ebx+48] ;ecx - à §¬¥à ®¤­®£® listitem
mov [ebx+56], edx
imul edx, ecx
add edx, [ebx+48]
mov [ebx+40], edx
cmp byte[mousestate], 1
jne @f
mov [esp+28], edx ;save to eax
jmp .exit
@@:
call MenuDlgProc.dodraw
call draw_image
jmp .event
.m_menu_end:
cmp byte[mousestate], 1
jne .event
add ebx, dlgtemplate.size+12
mov ecx, [ebx-4]
or ecx, ecx
193,8 → 218,8
je .m_comp
cmp [ebx+dlgitemtemplate.type], 3 ;edit
je .m_comp
;cmp [ebx+dlgitemtemplate.type], 5 ;check
;je .m_comp
cmp [ebx+dlgitemtemplate.type], 5 ;check
je .m_comp
jmp .m_next
align 4
.m_comp:
213,6 → 238,12
pop ecx ebx
jmp .exit
@@:
cmp [ebx+dlgitemtemplate.type], 5 ;check
jne @f
xor [ebx+dlgitemtemplate.flags], 10h
mov eax, ebx
jmp .m_new_focus
@@:
mov eax, [ebx+dlgitemtemplate.flags]
and eax, 4
jnz .m_old_focus
744,11 → 775,11
pushad
mov ecx, 60
; 40 bytes for dlgtemplate + additional:
; +40: dd cur_variant - [???]
; +44: dd num_variants - ᪮«ìª® í«¥¬¥­â®¢ ¢« §¨â ¢ ®ª­®
; +48: dd begin_variant - [dd ..,..,???]
; +52: dd end_variant - [dd ..,..,???]
; +56: dd cur_variant_idx - ???
; +40: dd cur_variant - 㪠§ â¥«ì ­  ¬ áᨢ listitem[num_variants]
; +44: dd num_variants - ᪮«ìª® í«¥¬¥­â®¢ ¢ ᯨ᪥
; +48: dd begin_variant - 㪠§ â¥«ì ­  listitem[0]
; +52: dd end_variant - 㪠§ â¥«ì ­  listitem[num_variants-1]
; +56: dd cur_variant_idx - ¨­¤¥ªá ¢ë¡à ­­®£® í«¥¬¥­â  ®â 0 ¤® num_variants-1
call xpgalloc
test eax, eax
jnz @f
1358,11 → 1389,16
jz .draw
dec eax
jz .key
;sub eax, 4
;jz .mouse
xor eax, eax
ret 16
.draw:
call .dodraw
ret 16
;.mouse:
;todo
;ret 16
.key:
; find item with focus
add ebx, dlgtemplate.size+12
1824,9 → 1860,12
@@:
lodsb
test al, al
jz .ret
jz .correct
stosw
loop @b
ret
.correct:
sub [ebx+dlgitemtemplate.x2], ecx
.ret:
ret
 
/programs/fs/kfar/trunk/kfar.asm
984,13 → 984,21
ret
 
align 4
OnMouse_ctrl_f39:
OnMouse_ctrl_f3_9:
sub eax, panels_mouse.ctrl+8
shr eax, 2
add eax, 0x3D
call panels_OnKey.ctrl_f39
call panels_OnKey.ctrl_f3_9
ret
 
align 4
OnMouse_alt_f1_2:
sub eax, panels_mouse.alt
shr eax, 2
add eax, 0x3B
call panels_OnKey.alt_f1_2
ret
 
align 16
process_ctrl_keys:
cmp byte [esi], 0
2241,7 → 2249,7
pop edi
mov byte [edi], 0
jmp .done_cmdbar
.ctrl_f39:
.ctrl_f3_9:
sub al, 0x3D
add al, al
mov ah, [ebp + PanelData.sortmode]
2277,7 → 2285,7
inc ecx
add [ebp + PanelData.start], ecx
jmp @b
.alt_f12:
.alt_f1_2:
mov ebp, panel1
cmp al, 0x3B
jz @f
7566,16 → 7574,17
.ctrl:
rd 2
repeat 9-3+1
dd OnMouse_ctrl_f39
dd OnMouse_ctrl_f3_9
end repeat
rd 3
; Ctrl+Shift
rd 12
; Alt
rd 6
.alt:
dd OnMouse_alt_f1_2
dd OnMouse_alt_f1_2
rd 4
dd panels_OnKey.alt_f7
rd 4
dd panels_OnKey.alt_f12
rd 5
; Alt+Shift
rd 12
; Alt+Ctrl
7636,12 → 7645,12
dd panels_OnKey.menu
repeat 9-3+1
dw 0x3D+%-1, 0x10
dd panels_OnKey.ctrl_f39
dd panels_OnKey.ctrl_f3_9
end repeat
dw 0x3B, 0x100
dd panels_OnKey.alt_f12
dd panels_OnKey.alt_f1_2
dw 0x3C, 0x100
dd panels_OnKey.alt_f12
dd panels_OnKey.alt_f1_2
dw 0x58, 0
dd F12
dw 0x13, 0x10