forked from KolibriOS/kolibrios
kfar: clean code, mouse can change button focus in dialogs
opendial: remove old code git-svn-id: svn://kolibrios.org@9014 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
678de81f24
commit
0994411664
@ -25,6 +25,7 @@ dlgtemplate:
|
|||||||
.size = $
|
.size = $
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
|
align 16
|
||||||
GenericBox:
|
GenericBox:
|
||||||
push [cursor_x]
|
push [cursor_x]
|
||||||
push [cursor_y]
|
push [cursor_y]
|
||||||
@ -49,7 +50,7 @@ GenericBox:
|
|||||||
dec eax
|
dec eax
|
||||||
jz .key
|
jz .key
|
||||||
sub eax,4
|
sub eax,4
|
||||||
jz .event ;todo: mouse
|
jz .mouse
|
||||||
jmp exit
|
jmp exit
|
||||||
.redraw:
|
.redraw:
|
||||||
call draw_window
|
call draw_window
|
||||||
@ -86,7 +87,7 @@ GenericBox:
|
|||||||
push eax
|
push eax
|
||||||
push 2
|
push 2
|
||||||
push ebx
|
push ebx
|
||||||
call ecx
|
call ecx ;DlgProc
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .event
|
jz .event
|
||||||
mov [esp+28], eax
|
mov [esp+28], eax
|
||||||
@ -139,6 +140,97 @@ GenericBox:
|
|||||||
.ralt_up:
|
.ralt_up:
|
||||||
and [ctrlstate], not 0x20
|
and [ctrlstate], not 0x20
|
||||||
jmp .event
|
jmp .event
|
||||||
|
align 4
|
||||||
|
.mouse:
|
||||||
|
mov eax,SF_MOUSE_GET
|
||||||
|
mov ebx,SSF_BUTTON_EXT
|
||||||
|
int 0x40
|
||||||
|
bt eax,8 ;left but. down
|
||||||
|
jnc .event
|
||||||
|
|
||||||
|
mov eax,SF_MOUSE_GET
|
||||||
|
mov ebx,SSF_WINDOW_POSITION
|
||||||
|
int 0x40
|
||||||
|
cmp ax, word[skinh]
|
||||||
|
jl .event
|
||||||
|
sub ax, word[skinh]
|
||||||
|
xor dx,dx
|
||||||
|
mov bx, font_height
|
||||||
|
div bx
|
||||||
|
movzx edx,ax
|
||||||
|
shr eax,16
|
||||||
|
sub eax, 5 ;window border
|
||||||
|
|
||||||
|
push edx
|
||||||
|
xor dx,dx
|
||||||
|
mov bx, font_width
|
||||||
|
div bx
|
||||||
|
movzx eax,ax
|
||||||
|
pop edx
|
||||||
|
|
||||||
|
mov ebx, [esp+24h+8] ;DLGTEMPLATE* dlg
|
||||||
|
cmp edx, [ebx+dlgtemplate.y]
|
||||||
|
jl .event
|
||||||
|
cmp eax, [ebx+dlgtemplate.x]
|
||||||
|
jl .event
|
||||||
|
sub edx, [ebx+dlgtemplate.y]
|
||||||
|
sub eax, [ebx+dlgtemplate.x]
|
||||||
|
cmp edx, [ebx+dlgtemplate.height]
|
||||||
|
jge .event
|
||||||
|
cmp eax, [ebx+dlgtemplate.width]
|
||||||
|
jge .event
|
||||||
|
|
||||||
|
add ebx, dlgtemplate.size+12
|
||||||
|
mov ecx, [ebx-4]
|
||||||
|
or ecx, ecx
|
||||||
|
jz .event
|
||||||
|
|
||||||
|
push ebx ecx
|
||||||
|
.m_loop:
|
||||||
|
cmp [ebx+dlgitemtemplate.type], 2 ;button
|
||||||
|
je .m_comp
|
||||||
|
cmp [ebx+dlgitemtemplate.type], 3 ;edit
|
||||||
|
je .m_comp
|
||||||
|
;cmp [ebx+dlgitemtemplate.type], 5 ;check
|
||||||
|
;je .m_comp
|
||||||
|
jmp .m_next
|
||||||
|
align 4
|
||||||
|
.m_comp:
|
||||||
|
cmp [ebx+dlgitemtemplate.x1], eax
|
||||||
|
jg .m_next
|
||||||
|
cmp [ebx+dlgitemtemplate.y1], edx
|
||||||
|
jg .m_next
|
||||||
|
cmp [ebx+dlgitemtemplate.x2], eax
|
||||||
|
jl .m_next
|
||||||
|
cmp [ebx+dlgitemtemplate.y2], edx
|
||||||
|
jl .m_next
|
||||||
|
|
||||||
|
mov eax, [ebx+dlgitemtemplate.flags]
|
||||||
|
and eax, 4
|
||||||
|
jnz .m_old_focus
|
||||||
|
mov eax, ebx
|
||||||
|
jmp .m_new_focus
|
||||||
|
align 4
|
||||||
|
.m_next:
|
||||||
|
add ebx, sizeof.DlgBtn
|
||||||
|
loop .m_loop
|
||||||
|
.m_old_focus:
|
||||||
|
pop ecx ebx
|
||||||
|
jmp .event
|
||||||
|
align 4
|
||||||
|
.m_new_focus:
|
||||||
|
pop ecx ebx
|
||||||
|
call DlgClearFocus
|
||||||
|
or dword[eax+dlgitemtemplate.flags], 4
|
||||||
|
|
||||||
|
sub ebx, dlgtemplate.size+12
|
||||||
|
push ebp
|
||||||
|
mov ebp, ebx
|
||||||
|
call ManagerDlgProc.dodraw
|
||||||
|
pop ebp
|
||||||
|
call draw_image
|
||||||
|
jmp .event
|
||||||
|
align 4
|
||||||
.exit:
|
.exit:
|
||||||
popad
|
popad
|
||||||
push eax
|
push eax
|
||||||
@ -153,7 +245,21 @@ GenericBox:
|
|||||||
popad
|
popad
|
||||||
ret 8
|
ret 8
|
||||||
|
|
||||||
|
;input:
|
||||||
|
; ebx - pointer to first item
|
||||||
|
; ecx - count items
|
||||||
|
align 4
|
||||||
|
DlgClearFocus:
|
||||||
|
push ebx ecx
|
||||||
|
@@:
|
||||||
|
and byte [ebx+dlgitemtemplate.flags], not 4
|
||||||
|
add ebx, sizeof.DlgBtn
|
||||||
|
loop @b
|
||||||
|
pop ecx ebx
|
||||||
|
ret
|
||||||
|
|
||||||
; int __stdcall ShowGenericBox(DLGTEMPLATE* dlg, void* DlgProc);
|
; int __stdcall ShowGenericBox(DLGTEMPLATE* dlg, void* DlgProc);
|
||||||
|
align 16
|
||||||
ShowGenericBox:
|
ShowGenericBox:
|
||||||
pushad
|
pushad
|
||||||
mov ebx, [esp+20h+4]
|
mov ebx, [esp+20h+4]
|
||||||
@ -471,6 +577,7 @@ DrawGenericBox:
|
|||||||
ret 8
|
ret 8
|
||||||
|
|
||||||
; void __stdcall HideGenericBox(DLGTEMPLATE* dlg, int bRedrawWindow);
|
; void __stdcall HideGenericBox(DLGTEMPLATE* dlg, int bRedrawWindow);
|
||||||
|
align 16
|
||||||
HideGenericBox:
|
HideGenericBox:
|
||||||
; void __stdcall HideDialogBox(DLGDATA* dlg, int bRedrawWindow);
|
; void __stdcall HideDialogBox(DLGDATA* dlg, int bRedrawWindow);
|
||||||
HideDialogBox:
|
HideDialogBox:
|
||||||
@ -1104,6 +1211,65 @@ get_ascii_char:
|
|||||||
movzx eax, byte [layout+eax]
|
movzx eax, byte [layout+eax]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
struct DlgLbl
|
||||||
|
type dd 1
|
||||||
|
x1 dd ?
|
||||||
|
y1 dd ?
|
||||||
|
x2 dd ?
|
||||||
|
y2 dd ?
|
||||||
|
text dd ?
|
||||||
|
flags dd ?
|
||||||
|
ends
|
||||||
|
|
||||||
|
struct DlgBtn
|
||||||
|
type dd 2
|
||||||
|
x1 dd ?
|
||||||
|
y1 dd ?
|
||||||
|
x2 dd ?
|
||||||
|
y2 dd ?
|
||||||
|
text dd ?
|
||||||
|
flags dd ?
|
||||||
|
ends
|
||||||
|
|
||||||
|
struct DlgEdit
|
||||||
|
type dd 3
|
||||||
|
x1 dd ?
|
||||||
|
y1 dd ?
|
||||||
|
x2 dd ?
|
||||||
|
y2 dd ?
|
||||||
|
text dd ?
|
||||||
|
flags dd ?
|
||||||
|
ends
|
||||||
|
|
||||||
|
struct DlgLine
|
||||||
|
type dd 4
|
||||||
|
x1 dd ?
|
||||||
|
y1 dd ?
|
||||||
|
x2 dd ?
|
||||||
|
y2 dd ?
|
||||||
|
dq 0
|
||||||
|
ends
|
||||||
|
|
||||||
|
struct DlgCheck
|
||||||
|
type dd 5
|
||||||
|
x1 dd ?
|
||||||
|
y1 dd ?
|
||||||
|
x2 dd ?
|
||||||
|
y2 dd ?
|
||||||
|
text dd ?
|
||||||
|
flags dd ?
|
||||||
|
ends
|
||||||
|
|
||||||
|
struct DlgList
|
||||||
|
type dd 6
|
||||||
|
x1 dd ?
|
||||||
|
y1 dd ?
|
||||||
|
x2 dd ?
|
||||||
|
y2 dd ?
|
||||||
|
text dd ?
|
||||||
|
flags dd ?
|
||||||
|
ends
|
||||||
|
|
||||||
virtual at 0
|
virtual at 0
|
||||||
dlgitemtemplate:
|
dlgitemtemplate:
|
||||||
; <EFBFBD>«¥¬¥âë:
|
; <EFBFBD>«¥¬¥âë:
|
||||||
@ -1152,6 +1318,7 @@ end virtual
|
|||||||
; DLGITEMTEMPLATE items[]; /* array of dialog items */
|
; DLGITEMTEMPLATE items[]; /* array of dialog items */
|
||||||
; }
|
; }
|
||||||
; int __stdcall DialogBox(DLGDATA* dlg);
|
; int __stdcall DialogBox(DLGDATA* dlg);
|
||||||
|
align 16
|
||||||
DialogBox:
|
DialogBox:
|
||||||
push ManagerDlgProc
|
push ManagerDlgProc
|
||||||
push dword [esp+8]
|
push dword [esp+8]
|
||||||
@ -1172,6 +1339,7 @@ DrawDialogBox:
|
|||||||
call DrawGenericBox
|
call DrawGenericBox
|
||||||
ret 4
|
ret 4
|
||||||
|
|
||||||
|
align 16
|
||||||
ManagerDlgProc:
|
ManagerDlgProc:
|
||||||
mov ebp, ebx
|
mov ebp, ebx
|
||||||
mov eax, [esp+8]
|
mov eax, [esp+8]
|
||||||
@ -1399,6 +1567,7 @@ ManagerDlgProc:
|
|||||||
inc dword [edx+4]
|
inc dword [edx+4]
|
||||||
@@: jmp .ret_test
|
@@: jmp .ret_test
|
||||||
|
|
||||||
|
align 4
|
||||||
.dodraw:
|
.dodraw:
|
||||||
or [cursor_x], -1
|
or [cursor_x], -1
|
||||||
or [cursor_y], -1
|
or [cursor_y], -1
|
||||||
@ -1432,6 +1601,7 @@ label draw_functions dword
|
|||||||
draw_functions_num = ($ - draw_functions) / 4
|
draw_functions_num = ($ - draw_functions) / 4
|
||||||
endg
|
endg
|
||||||
|
|
||||||
|
align 4
|
||||||
draw_static_text:
|
draw_static_text:
|
||||||
; à¨á㥬 áâ â¨ç¥áª¨© ⥪áâ
|
; à¨á㥬 áâ â¨ç¥áª¨© ⥪áâ
|
||||||
mov ah, [dialog_main_color]
|
mov ah, [dialog_main_color]
|
||||||
@ -1533,6 +1703,7 @@ draw_text_esi:
|
|||||||
.ret2:
|
.ret2:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
align 4
|
||||||
draw_button:
|
draw_button:
|
||||||
mov ecx, dialog_colors
|
mov ecx, dialog_colors
|
||||||
test byte [ebp+dlgtemplate.flags], 2
|
test byte [ebp+dlgtemplate.flags], 2
|
||||||
@ -1546,6 +1717,7 @@ draw_button:
|
|||||||
@@:
|
@@:
|
||||||
jmp draw_text
|
jmp draw_text
|
||||||
|
|
||||||
|
align 4
|
||||||
draw_editbox:
|
draw_editbox:
|
||||||
mov edx, [ebx+dlgitemtemplate.data]
|
mov edx, [ebx+dlgitemtemplate.data]
|
||||||
test [ebx+dlgitemtemplate.flags], 4
|
test [ebx+dlgitemtemplate.flags], 4
|
||||||
@ -1574,6 +1746,7 @@ draw_editbox:
|
|||||||
add esi, 12
|
add esi, 12
|
||||||
jmp draw_text_esi
|
jmp draw_text_esi
|
||||||
|
|
||||||
|
align 4
|
||||||
dlgitem_get_console_ptr:
|
dlgitem_get_console_ptr:
|
||||||
mov eax, [ebx+dlgitemtemplate.x1]
|
mov eax, [ebx+dlgitemtemplate.x1]
|
||||||
mov edx, [ebx+dlgitemtemplate.y1]
|
mov edx, [ebx+dlgitemtemplate.y1]
|
||||||
@ -1582,6 +1755,7 @@ dlgitem_get_console_ptr:
|
|||||||
add edx, [ebp+dlgtemplate.y]
|
add edx, [ebp+dlgtemplate.y]
|
||||||
jmp get_console_ptr
|
jmp get_console_ptr
|
||||||
|
|
||||||
|
align 4
|
||||||
draw_h_separator:
|
draw_h_separator:
|
||||||
; à¨á㥬 £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
; à¨á㥬 £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
||||||
call dlgitem_get_console_ptr
|
call dlgitem_get_console_ptr
|
||||||
@ -1603,6 +1777,7 @@ draw_h_separator:
|
|||||||
.done:
|
.done:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
align 4
|
||||||
draw_checkbox:
|
draw_checkbox:
|
||||||
; à¨á㥬 ä« ¦®ª
|
; à¨á㥬 ä« ¦®ª
|
||||||
call dlgitem_get_console_ptr
|
call dlgitem_get_console_ptr
|
||||||
@ -1644,6 +1819,7 @@ draw_checkbox:
|
|||||||
.ret:
|
.ret:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
align 4
|
||||||
draw_listbox:
|
draw_listbox:
|
||||||
; à¨á㥬 ᯨ᮪
|
; à¨á㥬 ᯨ᮪
|
||||||
call dlgitem_get_console_ptr
|
call dlgitem_get_console_ptr
|
||||||
@ -1752,6 +1928,7 @@ draw_listbox:
|
|||||||
.noscrollbar:
|
.noscrollbar:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
align 4
|
||||||
listbox_key:
|
listbox_key:
|
||||||
mov edx, [ebx+dlgitemtemplate.data]
|
mov edx, [ebx+dlgitemtemplate.data]
|
||||||
cmp al, 0x48
|
cmp al, 0x48
|
||||||
@ -1914,6 +2091,7 @@ SayErrTitle:
|
|||||||
; int __stdcall Message(const char* title,
|
; int __stdcall Message(const char* title,
|
||||||
; int num_strings, const char* strings[],
|
; int num_strings, const char* strings[],
|
||||||
; int num_buttons, const char* buttons[]);
|
; int num_buttons, const char* buttons[]);
|
||||||
|
align 16
|
||||||
Message:
|
Message:
|
||||||
push 1
|
push 1
|
||||||
@@:
|
@@:
|
||||||
|
@ -2220,11 +2220,11 @@ editor_OnKey:
|
|||||||
cmp byte [ebx], al
|
cmp byte [ebx], al
|
||||||
jz .f7.ret
|
jz .f7.ret
|
||||||
mov esi, tolower_table
|
mov esi, tolower_table
|
||||||
test [find_in_file_dlgdata.flags_case], 10h
|
test [find_in_file_dlgdata.case.flags], 10h
|
||||||
jz @f
|
jz @f
|
||||||
mov esi, identical_table
|
mov esi, identical_table
|
||||||
@@:
|
@@:
|
||||||
test [find_in_file_dlgdata.flags_whole], 10h
|
test [find_in_file_dlgdata.whole.flags], 10h
|
||||||
setnz al
|
setnz al
|
||||||
push eax
|
push eax
|
||||||
push dword [ebp+editor_data.encoding]; always cp866 for now
|
push dword [ebp+editor_data.encoding]; always cp866 for now
|
||||||
@ -2239,7 +2239,7 @@ editor_OnKey:
|
|||||||
push ebx esi
|
push ebx esi
|
||||||
push edi
|
push edi
|
||||||
push edi
|
push edi
|
||||||
test [find_in_file_dlgdata.flags_whole], 10h
|
test [find_in_file_dlgdata.whole.flags], 10h
|
||||||
jnz @f
|
jnz @f
|
||||||
movzx eax, byte [esi+ebx]
|
movzx eax, byte [esi+ebx]
|
||||||
jmp .search_loop_next
|
jmp .search_loop_next
|
||||||
@ -2284,7 +2284,7 @@ editor_OnKey:
|
|||||||
jc .f7.nonextblock
|
jc .f7.nonextblock
|
||||||
.f7.notfound_pop:
|
.f7.notfound_pop:
|
||||||
; last chance - if we are looking for a whole word, EOF is ok for last symbol
|
; last chance - if we are looking for a whole word, EOF is ok for last symbol
|
||||||
test [find_in_file_dlgdata.flags_whole], 10h
|
test [find_in_file_dlgdata.whole.flags], 10h
|
||||||
jz @f
|
jz @f
|
||||||
mov esi, [ebp + editor_data.last_block]
|
mov esi, [ebp + editor_data.last_block]
|
||||||
add esi, ebp
|
add esi, ebp
|
||||||
@ -2300,7 +2300,7 @@ editor_OnKey:
|
|||||||
or [ebp + editor_data.cur_delta], -1
|
or [ebp + editor_data.cur_delta], -1
|
||||||
sub ebx, ecx
|
sub ebx, ecx
|
||||||
inc ebx
|
inc ebx
|
||||||
test [find_in_file_dlgdata.flags_whole], 10h
|
test [find_in_file_dlgdata.whole.flags], 10h
|
||||||
jz @f
|
jz @f
|
||||||
inc ebx
|
inc ebx
|
||||||
@@:
|
@@:
|
||||||
@ -2324,7 +2324,7 @@ editor_OnKey:
|
|||||||
pop edi
|
pop edi
|
||||||
; esi:ebx -> last symbol of match, eax = row, edi = delta in lines
|
; esi:ebx -> last symbol of match, eax = row, edi = delta in lines
|
||||||
pop esi ebx
|
pop esi ebx
|
||||||
test [find_in_file_dlgdata.flags_whole], 10h
|
test [find_in_file_dlgdata.whole.flags], 10h
|
||||||
jz @f
|
jz @f
|
||||||
dec ecx
|
dec ecx
|
||||||
@@:
|
@@:
|
||||||
@ -2550,23 +2550,23 @@ find_in_file_dlg:
|
|||||||
mov [ebx + dlgtemplate.width], eax
|
mov [ebx + dlgtemplate.width], eax
|
||||||
dec eax
|
dec eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx - find_in_file_dlgdata + find_in_file_dlgdata.width2], eax
|
mov [ebx + FindInFileDlgdata.efind.x2], eax
|
||||||
shr eax, 1
|
shr eax, 1
|
||||||
dec eax
|
dec eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx - find_in_file_dlgdata + find_in_file_dlgdata.search_x2], eax
|
mov [ebx + FindInFileDlgdata.search.x2], eax
|
||||||
sub eax, aSearchBLength-1
|
sub eax, aSearchBLength-1
|
||||||
mov [ebx - find_in_file_dlgdata + find_in_file_dlgdata.search_x1], eax
|
mov [ebx + FindInFileDlgdata.search.x1], eax
|
||||||
add eax, aSearchBLength+3
|
add eax, aSearchBLength+3
|
||||||
mov [ebx - find_in_file_dlgdata + find_in_file_dlgdata.cnl_x1], eax
|
mov [ebx + FindInFileDlgdata.cnl.x1], eax
|
||||||
add eax, aCancelBLength - 1
|
add eax, aCancelBLength - 1
|
||||||
mov [ebx - find_in_file_dlgdata + find_in_file_dlgdata.cnl_x2], eax
|
mov [ebx + FindInFileDlgdata.cnl.x2], eax
|
||||||
mov byte [ebx - find_in_file_dlgdata + find_in_file_dlgdata.flags0], 0xC
|
mov byte [ebx + FindInFileDlgdata.efind.flags], 0xC
|
||||||
and byte [ebx - find_in_file_dlgdata + find_in_file_dlgdata.flags1], not 4
|
and byte [ebx + FindInFileDlgdata.search.flags], not 4
|
||||||
and byte [ebx - find_in_file_dlgdata + find_in_file_dlgdata.flags2], not 4
|
and byte [ebx + FindInFileDlgdata.cnl.flags], not 4
|
||||||
and byte [ebx - find_in_file_dlgdata + find_in_file_dlgdata.flags_case], not 4
|
and byte [ebx + FindInFileDlgdata.case.flags], not 4
|
||||||
and byte [ebx - find_in_file_dlgdata + find_in_file_dlgdata.flags_whole], not 4
|
and byte [ebx + FindInFileDlgdata.whole.flags], not 4
|
||||||
push ebx
|
push ebx
|
||||||
call DialogBox
|
call DialogBox
|
||||||
cmp eax, find_in_file_dlgdata.search_btn
|
cmp eax, find_in_file_dlgdata.search
|
||||||
ret
|
ret
|
||||||
|
@ -977,8 +977,8 @@ filesearch_data:
|
|||||||
.list.head dd ?
|
.list.head dd ?
|
||||||
.list.curitem dd ?
|
.list.curitem dd ?
|
||||||
.list.end dd ?
|
.list.end dd ?
|
||||||
.query_dlgdata rb filesearch_query_template.size
|
.query_dlgdata rb sizeof.FileSearch_QueryTemplate
|
||||||
.search_dlgdata rb filesearch_search_template.size
|
.search_dlgdata rb sizeof.FileSearch_SearchTemplate
|
||||||
.mask.maxlen dd ?
|
.mask.maxlen dd ?
|
||||||
.mask.pos dd ?
|
.mask.pos dd ?
|
||||||
.mask.start dd ?
|
.mask.start dd ?
|
||||||
@ -1013,36 +1013,36 @@ panels_OnKey.alt_f7:
|
|||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
mov [ebp+filesearch_data.prev_screen_vtable], panels_vtable
|
mov [ebp+filesearch_data.prev_screen_vtable], panels_vtable
|
||||||
mov ecx, (filesearch_query_template.size + filesearch_search_template.size) / 4
|
mov ecx, (sizeof.FileSearch_QueryTemplate + sizeof.FileSearch_SearchTemplate) / 4
|
||||||
mov esi, filesearch_query_template
|
mov esi, filesearch_query_template
|
||||||
lea edi, [ebp+filesearch_data.query_dlgdata]
|
lea edi, [ebp+filesearch_data.query_dlgdata]
|
||||||
rep movsd
|
rep movsd
|
||||||
lea eax, [ebp+filesearch_data.string.maxlen]
|
lea eax, [ebp+filesearch_data.string.maxlen]
|
||||||
xor ebx, ebx
|
xor ebx, ebx
|
||||||
mov dword [ebp+filesearch_data.query_dlgdata+filesearch_query_template.editptr2-filesearch_query_template], eax
|
mov dword [ebp+filesearch_data.query_dlgdata+FileSearch_QueryTemplate.edit2.text], eax
|
||||||
mov dword [eax], 253
|
mov dword [eax], 253
|
||||||
mov [eax+4], ebx
|
mov [eax+4], ebx
|
||||||
mov [eax+8], ebx
|
mov [eax+8], ebx
|
||||||
mov [eax+12], bl
|
mov [eax+12], bl
|
||||||
sub eax, filesearch_data.string - filesearch_data.mask
|
sub eax, filesearch_data.string - filesearch_data.mask
|
||||||
mov dword [ebp+filesearch_data.query_dlgdata+filesearch_query_template.editptr1-filesearch_query_template], eax
|
mov dword [ebp+filesearch_data.query_dlgdata+FileSearch_QueryTemplate.edit1.text], eax
|
||||||
mov dword [eax], 511
|
mov dword [eax], 511
|
||||||
mov [eax+8], ebx
|
mov [eax+8], ebx
|
||||||
inc ebx
|
inc ebx
|
||||||
mov word [eax+12], '*'
|
mov word [eax+12], '*'
|
||||||
mov [eax+4], ebx
|
mov [eax+4], ebx
|
||||||
mov eax, [find_in_file_dlgdata.flags_case]
|
mov eax, [find_in_file_dlgdata.case.flags]
|
||||||
and al, 10h
|
and al, 10h
|
||||||
or al, 8
|
or al, 8
|
||||||
mov dword [ebp+filesearch_data.query_dlgdata+filesearch_query_template.flags_case-filesearch_query_template], eax
|
mov dword [ebp+filesearch_data.query_dlgdata+FileSearch_QueryTemplate.case.flags], eax
|
||||||
mov eax, [find_in_file_dlgdata.flags_whole]
|
mov eax, [find_in_file_dlgdata.whole.flags]
|
||||||
and al, 10h
|
and al, 10h
|
||||||
or al, 8
|
or al, 8
|
||||||
mov dword [ebp+filesearch_data.query_dlgdata+filesearch_query_template.flags_whole-filesearch_query_template], eax
|
mov dword [ebp+filesearch_data.query_dlgdata+FileSearch_QueryTemplate.whole.flags], eax
|
||||||
lea edi, [ebp+filesearch_data.caption]
|
lea edi, [ebp+filesearch_data.caption]
|
||||||
mov dword [ebp+dlgtemplate.title+filesearch_data.search_dlgdata], edi
|
mov dword [ebp+dlgtemplate.title+filesearch_data.search_dlgdata], edi
|
||||||
lea eax, [ebp+filesearch_data.list.curitemptr]
|
lea eax, [ebp+filesearch_data.list.curitemptr]
|
||||||
mov dword [ebp+filesearch_data.search_dlgdata+filesearch_search_template.data1-filesearch_search_template], eax
|
mov dword [ebp+filesearch_data.search_dlgdata+FileSearch_SearchTemplate.list1.text], eax
|
||||||
.reinit:
|
.reinit:
|
||||||
xor ebx, ebx
|
xor ebx, ebx
|
||||||
or [ebp+filesearch_data.tid], -1
|
or [ebp+filesearch_data.tid], -1
|
||||||
@ -1081,18 +1081,18 @@ filesearch_OnRedraw:
|
|||||||
mov [ebx + dlgtemplate.width], eax
|
mov [ebx + dlgtemplate.width], eax
|
||||||
dec eax
|
dec eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx - filesearch_query_template + filesearch_query_template.width2], eax
|
mov [ebx + FileSearch_QueryTemplate.edit1.x2], eax
|
||||||
mov [ebx - filesearch_query_template + filesearch_query_template.width3], eax
|
mov [ebx + FileSearch_QueryTemplate.edit2.x2], eax
|
||||||
shr eax, 1
|
shr eax, 1
|
||||||
dec eax
|
dec eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx - filesearch_query_template + filesearch_query_template.search_x2], eax
|
mov [ebx + FileSearch_QueryTemplate.search.x2], eax
|
||||||
sub eax, aSearchBLength-1
|
sub eax, aSearchBLength-1
|
||||||
mov [ebx - filesearch_query_template + filesearch_query_template.search_x1], eax
|
mov [ebx + FileSearch_QueryTemplate.search.x1], eax
|
||||||
add eax, aSearchBLength+3
|
add eax, aSearchBLength+3
|
||||||
mov [ebx - filesearch_query_template + filesearch_query_template.cnl_x1], eax
|
mov [ebx + FileSearch_QueryTemplate.cnl.x1], eax
|
||||||
add eax, aCancelBLength-1
|
add eax, aCancelBLength-1
|
||||||
mov [ebx - filesearch_query_template + filesearch_query_template.cnl_x2], eax
|
mov [ebx + FileSearch_QueryTemplate.cnl.x2], eax
|
||||||
mov eax, [cur_height]
|
mov eax, [cur_height]
|
||||||
sub eax, [ebx + dlgtemplate.height]
|
sub eax, [ebx + dlgtemplate.height]
|
||||||
shr eax, 1
|
shr eax, 1
|
||||||
@ -1121,11 +1121,11 @@ filesearch_OnRedraw:
|
|||||||
shr edx, 1
|
shr edx, 1
|
||||||
mov [ebx + dlgtemplate.x], edx
|
mov [ebx + dlgtemplate.x], edx
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx + filesearch_search_template.width1 - filesearch_search_template], eax
|
mov [ebx + FileSearch_SearchTemplate.list1.x2], eax
|
||||||
mov [ebx + filesearch_search_template.width4 - filesearch_search_template], eax
|
mov [ebx + FileSearch_SearchTemplate.lbl2.x2], eax
|
||||||
cmp [ebp + filesearch_data.slot], 0
|
cmp [ebp + filesearch_data.slot], 0
|
||||||
jnz @f
|
jnz @f
|
||||||
mov [ebx + filesearch_search_template.width3 - filesearch_search_template], eax
|
mov [ebx + FileSearch_SearchTemplate.lbl1.x2], eax
|
||||||
@@:
|
@@:
|
||||||
sub eax, aNewSearchLen + aGotoLen + aViewLen + aCancelB2Length - 1
|
sub eax, aNewSearchLen + aGotoLen + aViewLen + aCancelB2Length - 1
|
||||||
cdq
|
cdq
|
||||||
@ -1135,21 +1135,21 @@ filesearch_OnRedraw:
|
|||||||
sar edx, 1
|
sar edx, 1
|
||||||
add edx, eax
|
add edx, eax
|
||||||
inc eax
|
inc eax
|
||||||
mov [ebx + filesearch_search_template.btn1x1 - filesearch_search_template], edx
|
mov [ebx + FileSearch_SearchTemplate.btn1.x1], edx
|
||||||
add edx, aNewSearchLen-1
|
add edx, aNewSearchLen-1
|
||||||
mov [ebx + filesearch_search_template.btn1x2 - filesearch_search_template], edx
|
mov [ebx + FileSearch_SearchTemplate.btn1.x2], edx
|
||||||
add edx, eax
|
add edx, eax
|
||||||
mov [ebx + filesearch_search_template.btn2x1 - filesearch_search_template], edx
|
mov [ebx + FileSearch_SearchTemplate.btn2.x1], edx
|
||||||
add edx, aGotoLen-1
|
add edx, aGotoLen-1
|
||||||
mov [ebx + filesearch_search_template.btn2x2 - filesearch_search_template], edx
|
mov [ebx + FileSearch_SearchTemplate.btn2.x2], edx
|
||||||
add edx, eax
|
add edx, eax
|
||||||
mov [ebx + filesearch_search_template.btn3x1 - filesearch_search_template], edx
|
mov [ebx + FileSearch_SearchTemplate.btn3.x1], edx
|
||||||
add edx, aViewLen-1
|
add edx, aViewLen-1
|
||||||
mov [ebx + filesearch_search_template.btn3x2 - filesearch_search_template], edx
|
mov [ebx + FileSearch_SearchTemplate.btn3.x2], edx
|
||||||
add edx, eax
|
add edx, eax
|
||||||
mov [ebx + filesearch_search_template.btn4x1 - filesearch_search_template], edx
|
mov [ebx + FileSearch_SearchTemplate.btn4.x1], edx
|
||||||
add edx, aCancelB2Length-1
|
add edx, aCancelB2Length-1
|
||||||
mov [ebx + filesearch_search_template.btn4x2 - filesearch_search_template], edx
|
mov [ebx + FileSearch_SearchTemplate.btn4.x2], edx
|
||||||
mov eax, [cur_height]
|
mov eax, [cur_height]
|
||||||
mov edx, eax
|
mov edx, eax
|
||||||
sub eax, 8
|
sub eax, 8
|
||||||
@ -1162,19 +1162,19 @@ filesearch_OnRedraw:
|
|||||||
shr edx, 1
|
shr edx, 1
|
||||||
mov [ebx + dlgtemplate.y], edx
|
mov [ebx + dlgtemplate.y], edx
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx + filesearch_search_template.btn1y - filesearch_search_template], eax
|
mov [ebx + FileSearch_SearchTemplate.btn1.y1], eax
|
||||||
mov [ebx + filesearch_search_template.btn2y - filesearch_search_template], eax
|
mov [ebx + FileSearch_SearchTemplate.btn2.y1], eax
|
||||||
mov [ebx + filesearch_search_template.btn3y - filesearch_search_template], eax
|
mov [ebx + FileSearch_SearchTemplate.btn3.y1], eax
|
||||||
mov [ebx + filesearch_search_template.btn4y - filesearch_search_template], eax
|
mov [ebx + FileSearch_SearchTemplate.btn4.y1], eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx + filesearch_search_template.y5 - filesearch_search_template], eax
|
mov [ebx + FileSearch_SearchTemplate.lin2.y1], eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx + filesearch_search_template.y3 - filesearch_search_template], eax
|
mov [ebx + FileSearch_SearchTemplate.lbl1.y1], eax
|
||||||
mov [ebx + filesearch_search_template.y4 - filesearch_search_template], eax
|
mov [ebx + FileSearch_SearchTemplate.lbl2.y1], eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx + filesearch_search_template.y2 - filesearch_search_template], eax
|
mov [ebx + FileSearch_SearchTemplate.lin1.y1], eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx + filesearch_search_template.height1 - filesearch_search_template], eax
|
mov [ebx + FileSearch_SearchTemplate.list1.y2], eax
|
||||||
.dlg_prepared:
|
.dlg_prepared:
|
||||||
call draw_dialog_shadow
|
call draw_dialog_shadow
|
||||||
push ebx
|
push ebx
|
||||||
@ -1267,13 +1267,13 @@ filesearch_OnKey:
|
|||||||
cmp eax, -1
|
cmp eax, -1
|
||||||
jz .esc
|
jz .esc
|
||||||
sub eax, ebp
|
sub eax, ebp
|
||||||
cmp eax, filesearch_data.query_dlgdata+filesearch_query_template.search_btn-filesearch_query_template
|
cmp eax, filesearch_data.query_dlgdata+FileSearch_QueryTemplate.search
|
||||||
jz .query
|
jz .query
|
||||||
cmp eax, filesearch_data.search_dlgdata+filesearch_search_template.btn1-filesearch_search_template
|
cmp eax, filesearch_data.search_dlgdata+FileSearch_SearchTemplate.btn1
|
||||||
jz .newsearch
|
jz .newsearch
|
||||||
cmp eax, filesearch_data.search_dlgdata+filesearch_search_template.btn2-filesearch_search_template
|
cmp eax, filesearch_data.search_dlgdata+FileSearch_SearchTemplate.btn2
|
||||||
jz .goto
|
jz .goto
|
||||||
cmp eax, filesearch_data.search_dlgdata+filesearch_search_template.btn3-filesearch_search_template
|
cmp eax, filesearch_data.search_dlgdata+FileSearch_SearchTemplate.btn3
|
||||||
jz .view
|
jz .view
|
||||||
.esc:
|
.esc:
|
||||||
cmp dword [ebp+filesearch_data.slot], 0
|
cmp dword [ebp+filesearch_data.slot], 0
|
||||||
@ -1417,7 +1417,7 @@ filesearch_OnKey:
|
|||||||
test al, al
|
test al, al
|
||||||
jnz @b
|
jnz @b
|
||||||
lea edi, [ebp+filesearch_data.statusstr]
|
lea edi, [ebp+filesearch_data.statusstr]
|
||||||
mov dword [ebp+filesearch_data.search_dlgdata+filesearch_search_template.data3-filesearch_search_template], edi
|
mov dword [ebp+filesearch_data.search_dlgdata+FileSearch_SearchTemplate.lbl1.text], edi
|
||||||
mov esi, aSearchingIn
|
mov esi, aSearchingIn
|
||||||
@@:
|
@@:
|
||||||
lodsb
|
lodsb
|
||||||
@ -1451,12 +1451,12 @@ filesearch_OnKey:
|
|||||||
stosb
|
stosb
|
||||||
test al, al
|
test al, al
|
||||||
jnz @b
|
jnz @b
|
||||||
sub edi, dword [ebp+filesearch_data.search_dlgdata+filesearch_search_template.data3-filesearch_search_template]
|
sub edi, dword [ebp +filesearch_data.search_dlgdata +FileSearch_SearchTemplate.lbl1.text]
|
||||||
mov dword [ebp+filesearch_data.search_dlgdata+filesearch_search_template.width3-filesearch_search_template], edi
|
mov dword [ebp+filesearch_data.search_dlgdata+FileSearch_SearchTemplate.lbl1.x2], edi
|
||||||
inc edi
|
inc edi
|
||||||
mov dword [ebp+filesearch_data.search_dlgdata+filesearch_search_template.x4-filesearch_search_template], edi
|
mov dword [ebp+filesearch_data.search_dlgdata+FileSearch_SearchTemplate.lbl2.x1], edi
|
||||||
lea eax, [ebp+filesearch_data.curdir]
|
lea eax, [ebp+filesearch_data.curdir]
|
||||||
mov dword [ebp+filesearch_data.search_dlgdata+filesearch_search_template.data4-filesearch_search_template], eax
|
mov dword [ebp+filesearch_data.search_dlgdata+FileSearch_SearchTemplate.lbl2.text], eax
|
||||||
call filesearch_set_dlgflags ; use it? I think, yes
|
call filesearch_set_dlgflags ; use it? I think, yes
|
||||||
cmp [ebp+filesearch_data.slot], 0
|
cmp [ebp+filesearch_data.slot], 0
|
||||||
jnz @f
|
jnz @f
|
||||||
@ -1469,8 +1469,8 @@ filesearch_done:
|
|||||||
jnz @f
|
jnz @f
|
||||||
or [idle_interval], -1
|
or [idle_interval], -1
|
||||||
@@:
|
@@:
|
||||||
and dword [ebp+filesearch_data.search_dlgdata+filesearch_search_template.data4-filesearch_search_template], 0
|
and dword [ebp+filesearch_data.search_dlgdata+FileSearch_SearchTemplate.lbl2.text], 0
|
||||||
mov edi, dword [ebp+filesearch_data.search_dlgdata+filesearch_search_template.data3-filesearch_search_template]
|
mov edi, dword [ebp+filesearch_data.search_dlgdata+FileSearch_SearchTemplate.lbl1.text]
|
||||||
mov esi, aSearchDone
|
mov esi, aSearchDone
|
||||||
@@:
|
@@:
|
||||||
lodsb
|
lodsb
|
||||||
@ -1560,14 +1560,14 @@ filesearch_IsHandleUsed:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
filesearch_set_dlgflags:
|
filesearch_set_dlgflags:
|
||||||
mov eax, dword [ebp+filesearch_data.query_dlgdata+filesearch_query_template.flags_case-filesearch_query_template]
|
mov eax, dword [ebp+filesearch_data.query_dlgdata+FileSearch_QueryTemplate.case.flags]
|
||||||
and al, 10h
|
and al, 10h
|
||||||
or al, 8
|
or al, 8
|
||||||
mov [find_in_file_dlgdata.flags_case], eax
|
mov [find_in_file_dlgdata.case.flags], eax
|
||||||
mov eax, dword [ebp+filesearch_data.query_dlgdata+filesearch_query_template.flags_whole-filesearch_query_template]
|
mov eax, dword [ebp+filesearch_data.query_dlgdata+FileSearch_QueryTemplate.whole.flags]
|
||||||
and al, 10h
|
and al, 10h
|
||||||
or al, 8
|
or al, 8
|
||||||
mov [find_in_file_dlgdata.flags_whole], eax
|
mov [find_in_file_dlgdata.whole.flags], eax
|
||||||
lea esi, [ebp+filesearch_data.string]
|
lea esi, [ebp+filesearch_data.string]
|
||||||
mov edi, SearchString
|
mov edi, SearchString
|
||||||
and dword [edi-4], 0
|
and dword [edi-4], 0
|
||||||
@ -1608,11 +1608,11 @@ filesearch_thread:
|
|||||||
cmp byte [ebx], dl
|
cmp byte [ebx], dl
|
||||||
jz .noprepare
|
jz .noprepare
|
||||||
mov esi, tolower_table
|
mov esi, tolower_table
|
||||||
test byte [ebp+filesearch_data.query_dlgdata+filesearch_query_template.flags_case-filesearch_query_template], 10h
|
test byte [ebp+filesearch_data.query_dlgdata+FileSearch_QueryTemplate.case.flags], 10h
|
||||||
jz @f
|
jz @f
|
||||||
mov esi, identical_table
|
mov esi, identical_table
|
||||||
@@:
|
@@:
|
||||||
test byte [ebp+filesearch_data.query_dlgdata+filesearch_query_template.flags_whole-filesearch_query_template], 10h
|
test byte [ebp+filesearch_data.query_dlgdata+FileSearch_QueryTemplate.whole.flags], 10h
|
||||||
setnz al
|
setnz al
|
||||||
push eax
|
push eax
|
||||||
push ecx ; force cp866
|
push ecx ; force cp866
|
||||||
@ -1880,7 +1880,7 @@ filesearch_test_file:
|
|||||||
mov [ebx+8], eax
|
mov [ebx+8], eax
|
||||||
mov dword [ebx+12], search_filebuf_size
|
mov dword [ebx+12], search_filebuf_size
|
||||||
mov edi, edx
|
mov edi, edx
|
||||||
test byte [ebp+filesearch_data.query_dlgdata+filesearch_query_template.flags_whole-filesearch_query_template], 10h
|
test byte [ebp+filesearch_data.query_dlgdata+FileSearch_QueryTemplate.whole.flags], 10h
|
||||||
jz .loop
|
jz .loop
|
||||||
add edi, 256
|
add edi, 256
|
||||||
.loop:
|
.loop:
|
||||||
@ -1949,7 +1949,7 @@ filesearch_test_file:
|
|||||||
cmp ebx, search_filebuf_size
|
cmp ebx, search_filebuf_size
|
||||||
jz .loop
|
jz .loop
|
||||||
; EOF, last chance for whole-words-only search
|
; EOF, last chance for whole-words-only search
|
||||||
test byte [ebp+filesearch_data.query_dlgdata+filesearch_query_template.flags_whole-filesearch_query_template], 10h
|
test byte [ebp+filesearch_data.query_dlgdata+FileSearch_QueryTemplate.whole.flags], 10h
|
||||||
jz .ret_failed
|
jz .ret_failed
|
||||||
movzx edi, byte [edi+' ']
|
movzx edi, byte [edi+' ']
|
||||||
cmp edi, ecx
|
cmp edi, ecx
|
||||||
|
@ -61,6 +61,7 @@ ends
|
|||||||
cursor_normal_size = (font_height*15+50)/100
|
cursor_normal_size = (font_height*15+50)/100
|
||||||
cursor_big_size = font_height
|
cursor_big_size = font_height
|
||||||
|
|
||||||
|
align 4
|
||||||
start:
|
start:
|
||||||
mov eax,SF_SET_EVENTS_MASK
|
mov eax,SF_SET_EVENTS_MASK
|
||||||
mov ebx,(11b shl 30) or 100111b
|
mov ebx,(11b shl 30) or 100111b
|
||||||
@ -813,9 +814,9 @@ key:
|
|||||||
|
|
||||||
align 16
|
align 16
|
||||||
mouse:
|
mouse:
|
||||||
cmp dword[active_screen],0
|
cmp dword[active_screen],0
|
||||||
jg event
|
jg event
|
||||||
mov eax,SF_MOUSE_GET
|
mov eax,SF_MOUSE_GET
|
||||||
mov ebx,SSF_BUTTON_EXT
|
mov ebx,SSF_BUTTON_EXT
|
||||||
int 0x40
|
int 0x40
|
||||||
bt eax,8 ;left but. down
|
bt eax,8 ;left but. down
|
||||||
@ -849,34 +850,34 @@ mouse:
|
|||||||
mov ecx, [cur_width]
|
mov ecx, [cur_width]
|
||||||
if font_width & 3
|
if font_width & 3
|
||||||
imul ecx, font_width
|
imul ecx, font_width
|
||||||
shr ecx, 2
|
shr ecx, 2
|
||||||
else
|
else
|
||||||
imul ecx, font_width/4
|
imul ecx, font_width/4
|
||||||
end if
|
end if
|
||||||
xor dx,dx
|
xor dx,dx
|
||||||
sub ax, 5 ;window border
|
sub ax, 5 ;window border
|
||||||
div cx
|
div cx
|
||||||
bt ax, 0
|
bt ax, 0
|
||||||
jnc @f
|
jnc @f
|
||||||
add [esp+4], ebx ;¥á«¨ 2-© á⮫¡¥æ
|
add [esp+4], ebx ;¥á«¨ 2-© á⮫¡¥æ
|
||||||
@@:
|
@@:
|
||||||
pop eax ;edx in stack
|
pop eax ;edx in stack
|
||||||
jmp @f
|
jmp @f
|
||||||
.no_ch_pos:
|
.no_ch_pos:
|
||||||
push -1 ;edx = -1 - no change position
|
push -1 ;edx = -1 - no change position
|
||||||
@@:
|
@@:
|
||||||
|
|
||||||
mov ebx, [cur_width]
|
mov ebx, [cur_width]
|
||||||
imul ebx, font_width/2
|
imul ebx, font_width/2
|
||||||
add ebx, 5 ;window border
|
add ebx, 5 ;window border
|
||||||
cmp eax,ebx
|
cmp eax,ebx
|
||||||
jg @f
|
jg @f
|
||||||
cmp [active_panel], panel1
|
cmp [active_panel], panel1
|
||||||
je .move
|
je .move
|
||||||
jmp .tab
|
jmp .tab
|
||||||
@@:
|
@@:
|
||||||
cmp [active_panel], panel2
|
cmp [active_panel], panel2
|
||||||
je .move
|
je .move
|
||||||
.tab:
|
.tab:
|
||||||
xor [active_panel], panel1 xor panel2
|
xor [active_panel], panel1 xor panel2
|
||||||
call draw_cmdbar
|
call draw_cmdbar
|
||||||
@ -885,45 +886,45 @@ end if
|
|||||||
call draw_panel
|
call draw_panel
|
||||||
.move:
|
.move:
|
||||||
mov ebp, [active_panel]
|
mov ebp, [active_panel]
|
||||||
pop edx
|
pop edx
|
||||||
mov eax, [ebp + PanelData.numfiles]
|
mov eax, [ebp + PanelData.numfiles]
|
||||||
add edx, [ebp + PanelData.start] ;ç¨á«® ¯à®ªàãç¥ëå ä ©«®¢
|
add edx, [ebp + PanelData.start] ;ç¨á«® ¯à®ªàãç¥ëå ä ©«®¢
|
||||||
dec eax
|
dec eax
|
||||||
cmp edx, eax
|
cmp edx, eax
|
||||||
jle @f
|
jle @f
|
||||||
mov edx, eax
|
mov edx, eax
|
||||||
@@:
|
@@:
|
||||||
cmp edx, 0
|
cmp edx, 0
|
||||||
jl @f
|
jl @f
|
||||||
mov [ebp + PanelData.index], edx
|
mov [ebp + PanelData.index], edx
|
||||||
@@:
|
@@:
|
||||||
call draw_panel
|
call draw_panel
|
||||||
jmp event
|
jmp event
|
||||||
.on_panel:
|
.on_panel:
|
||||||
call get_keybar_ind
|
call get_keybar_ind
|
||||||
lea eax, [panels_mouse+4*eax]
|
lea eax, [panels_mouse+4*eax]
|
||||||
cmp dword[eax], 0
|
cmp dword[eax], 0
|
||||||
je event
|
je event
|
||||||
mov ebp, [active_panel]
|
mov ebp, [active_panel]
|
||||||
mov ecx, [ebp + PanelData.index]
|
mov ecx, [ebp + PanelData.index]
|
||||||
call dword[eax]
|
call dword[eax]
|
||||||
@@:
|
@@:
|
||||||
jmp event
|
jmp event
|
||||||
|
|
||||||
;input:
|
;input:
|
||||||
; eax - coord x
|
; eax - coord x
|
||||||
;output:
|
;output:
|
||||||
; eax - key bar index (0 to 35) if press F1 index = 0
|
; eax - key bar index (0 to 95) if press F1 index = 0
|
||||||
align 16
|
align 16
|
||||||
get_keybar_ind:
|
get_keybar_ind:
|
||||||
push ebx ecx edx esi edi
|
push ebx ecx edx esi edi
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
mov ebx, font_width
|
mov ebx, font_width
|
||||||
sub eax, 5 ;border
|
sub eax, 5 ;border
|
||||||
div ebx
|
div ebx
|
||||||
mov edi, eax
|
mov edi, eax
|
||||||
|
|
||||||
xor esi, esi
|
xor esi, esi
|
||||||
test [ctrlstate], 3
|
test [ctrlstate], 3
|
||||||
jz @f
|
jz @f
|
||||||
inc esi
|
inc esi
|
||||||
@ -2533,6 +2534,7 @@ else
|
|||||||
@@:
|
@@:
|
||||||
end if
|
end if
|
||||||
jmp .f5_selected1
|
jmp .f5_selected1
|
||||||
|
|
||||||
.f5_noselected1:
|
.f5_noselected1:
|
||||||
mov al, '"'
|
mov al, '"'
|
||||||
stosb
|
stosb
|
||||||
@ -2577,24 +2579,24 @@ end if
|
|||||||
mov [ebx + dlgtemplate.width], eax
|
mov [ebx + dlgtemplate.width], eax
|
||||||
dec eax
|
dec eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx - copy_dlgdata + copy_dlgdata.width2], eax
|
mov [ebx - copy_dlgdata + copy_dlgdata.lcopy.x2], eax
|
||||||
mov [ebx - copy_dlgdata + copy_dlgdata.width3], eax
|
mov [ebx - copy_dlgdata + copy_dlgdata.ename.x2], eax
|
||||||
shr eax, 1
|
shr eax, 1
|
||||||
dec eax
|
dec eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx - copy_dlgdata + copy_dlgdata.copy_x2], eax
|
mov [ebx - copy_dlgdata + copy_dlgdata.copy.x2], eax
|
||||||
sub eax, aCopyLength-1
|
sub eax, aCopyLength-1
|
||||||
mov [ebx - copy_dlgdata + copy_dlgdata.copy_x1], eax
|
mov [ebx - copy_dlgdata + copy_dlgdata.copy.x1], eax
|
||||||
add eax, aCopyLength+3
|
add eax, aCopyLength+3
|
||||||
mov [ebx - copy_dlgdata + copy_dlgdata.cnl_x1], eax
|
mov [ebx - copy_dlgdata + copy_dlgdata.cnl.x1], eax
|
||||||
add eax, aCancelBLength - 1
|
add eax, aCancelBLength - 1
|
||||||
mov [ebx - copy_dlgdata + copy_dlgdata.cnl_x2], eax
|
mov [ebx - copy_dlgdata + copy_dlgdata.cnl.x2], eax
|
||||||
mov byte [ebx - copy_dlgdata + copy_dlgdata.flags0], 0xC
|
mov byte [ebx - copy_dlgdata + copy_dlgdata.ename.flags], 0xC
|
||||||
and byte [ebx - copy_dlgdata + copy_dlgdata.flags1], not 4
|
and byte [ebx - copy_dlgdata + copy_dlgdata.copy.flags], not 4
|
||||||
and byte [ebx - copy_dlgdata + copy_dlgdata.flags2], not 4
|
and byte [ebx - copy_dlgdata + copy_dlgdata.cnl.flags], not 4
|
||||||
push ebx
|
push ebx
|
||||||
call DialogBox
|
call DialogBox
|
||||||
cmp eax, copy_dlgdata.copy_btn
|
cmp eax, copy_dlgdata.copy
|
||||||
jnz .ret2
|
jnz .ret2
|
||||||
; Š®¯¨à㥬
|
; Š®¯¨à㥬
|
||||||
mov esi, CopyDestEditBuf+12
|
mov esi, CopyDestEditBuf+12
|
||||||
@ -3257,23 +3259,23 @@ end if
|
|||||||
mov [ebx + dlgtemplate.width], eax
|
mov [ebx + dlgtemplate.width], eax
|
||||||
dec eax
|
dec eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx - mkdir_dlgdata + mkdir_dlgdata.width2], eax
|
mov [ebx + MkDir_Dlgdata.dnam.x2], eax
|
||||||
shr eax, 1
|
shr eax, 1
|
||||||
dec eax
|
dec eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [ebx - mkdir_dlgdata + mkdir_dlgdata.cont_x2], eax
|
mov [ebx + MkDir_Dlgdata.cont.x2], eax
|
||||||
sub eax, a_ContinueLength-1
|
sub eax, a_ContinueLength-1
|
||||||
mov [ebx - mkdir_dlgdata + mkdir_dlgdata.cont_x1], eax
|
mov [ebx + MkDir_Dlgdata.cont.x1], eax
|
||||||
add eax, a_ContinueLength+3
|
add eax, a_ContinueLength+3
|
||||||
mov [ebx - mkdir_dlgdata + mkdir_dlgdata.cnl_x1], eax
|
mov [ebx + MkDir_Dlgdata.cnl.x1], eax
|
||||||
add eax, aCancelBLength - 1
|
add eax, aCancelBLength - 1
|
||||||
mov [ebx - mkdir_dlgdata + mkdir_dlgdata.cnl_x2], eax
|
mov [ebx + MkDir_Dlgdata.cnl.x2], eax
|
||||||
mov byte [ebx - mkdir_dlgdata + mkdir_dlgdata.flags0], 0xC
|
mov byte [ebx + MkDir_Dlgdata.dnam.flags], 0xC
|
||||||
and byte [ebx - mkdir_dlgdata + mkdir_dlgdata.flags1], not 4
|
and byte [ebx + MkDir_Dlgdata.cont.flags], not 4
|
||||||
and byte [ebx - mkdir_dlgdata + mkdir_dlgdata.flags2], not 4
|
and byte [ebx + MkDir_Dlgdata.cnl.flags], not 4
|
||||||
push ebx
|
push ebx
|
||||||
call DialogBox
|
call DialogBox
|
||||||
cmp eax, mkdir_dlgdata.cont_btn
|
cmp eax, mkdir_dlgdata.cont
|
||||||
jnz .ret2
|
jnz .ret2
|
||||||
mov esi, CopyDestEditBuf+12
|
mov esi, CopyDestEditBuf+12
|
||||||
cmp byte [esi], 0
|
cmp byte [esi], 0
|
||||||
@ -3364,7 +3366,7 @@ end if
|
|||||||
@@:
|
@@:
|
||||||
mov eax, mark_dlgdata
|
mov eax, mark_dlgdata
|
||||||
mov [eax+mark_dlgdata.title-mark_dlgdata], ecx
|
mov [eax+mark_dlgdata.title-mark_dlgdata], ecx
|
||||||
mov [eax+mark_dlgdata.flags-mark_dlgdata], 0xC
|
mov [eax+mark_dlgdata.edit.flags-mark_dlgdata], 0xC
|
||||||
mov edi, enter_string_buf+12
|
mov edi, enter_string_buf+12
|
||||||
mov dword [edi-12], 512
|
mov dword [edi-12], 512
|
||||||
mov dword [edi-8], 1
|
mov dword [edi-8], 1
|
||||||
@ -3941,6 +3943,7 @@ draw_image.nomem:
|
|||||||
int 40h
|
int 40h
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
align 16
|
||||||
draw_image:
|
draw_image:
|
||||||
mov [bMemForImageValidData], byte 1
|
mov [bMemForImageValidData], byte 1
|
||||||
cmp [MemForImage], 0
|
cmp [MemForImage], 0
|
||||||
@ -7946,15 +7949,9 @@ nomem_dlgdata:
|
|||||||
dd 0
|
dd 0
|
||||||
dd 2
|
dd 2
|
||||||
; áâப "No memory"
|
; áâப "No memory"
|
||||||
dd 1
|
DlgLbl ,1,0,10,0,aNoMemory,1
|
||||||
dd 1,0,10,0
|
|
||||||
dd aNoMemory
|
|
||||||
dd 1
|
|
||||||
; ª®¯ª "Ok"
|
; ª®¯ª "Ok"
|
||||||
dd 2
|
DlgBtn ,4,1,7,1,aOk,0xD
|
||||||
dd 4,1,7,1
|
|
||||||
dd aOk
|
|
||||||
dd 0xD
|
|
||||||
|
|
||||||
; ¤¨ «®£ ª®¯¨à®¢ ¨ï
|
; ¤¨ «®£ ª®¯¨à®¢ ¨ï
|
||||||
copy_dlgdata:
|
copy_dlgdata:
|
||||||
@ -7975,42 +7972,19 @@ copy_dlgdata:
|
|||||||
dd 0
|
dd 0
|
||||||
dd 4
|
dd 4
|
||||||
; áâப 'Š®¯¨à®¢ âì "%s" ¢:'
|
; áâப 'Š®¯¨à®¢ âì "%s" ¢:'
|
||||||
dd 1
|
.lcopy DlgLbl ,1,0,,0,CopySourceTextBuf,0
|
||||||
dd 1,0
|
|
||||||
.width2 dd ?
|
|
||||||
dd 0
|
|
||||||
dd CopySourceTextBuf
|
|
||||||
dd 0
|
|
||||||
; ¯®«¥ । ªâ¨à®¢ ¨ï á ¨¬¥¥¬ ä ©« /¯ ¯ª¨ § 票ï
|
; ¯®«¥ । ªâ¨à®¢ ¨ï á ¨¬¥¥¬ ä ©« /¯ ¯ª¨ § 票ï
|
||||||
dd 3
|
.ename DlgEdit ,1,1,,1,CopyDestEditBuf,0
|
||||||
dd 1,1
|
|
||||||
.width3 dd ?
|
|
||||||
dd 1
|
|
||||||
dd CopyDestEditBuf
|
|
||||||
.flags0 dd 0
|
|
||||||
; ª®¯ª "ª®¯¨à®¢ âì"
|
; ª®¯ª "ª®¯¨à®¢ âì"
|
||||||
.copy_btn:
|
.copy DlgBtn ,,3,,3,aCopy,18h
|
||||||
dd 2
|
|
||||||
.copy_x1 dd ?
|
|
||||||
dd 3
|
|
||||||
.copy_x2 dd ?
|
|
||||||
dd 3
|
|
||||||
dd aCopy
|
|
||||||
.flags1 dd 18h
|
|
||||||
; ª®¯ª "®â¬¥¨âì"
|
; ª®¯ª "®â¬¥¨âì"
|
||||||
dd 2
|
.cnl DlgBtn ,,3,,3,aCancelB,8
|
||||||
.cnl_x1 dd ?
|
|
||||||
dd 3
|
|
||||||
.cnl_x2 dd ?
|
|
||||||
dd 3
|
|
||||||
dd aCancelB
|
|
||||||
.flags2 dd 8
|
|
||||||
|
|
||||||
mkdir_dlgdata:
|
struct MkDir_Dlgdata
|
||||||
dd 1
|
dd 1
|
||||||
dd -1, -1
|
dd -1, -1
|
||||||
.width dd ?
|
width dd ?
|
||||||
.height dd 4
|
height dd 4
|
||||||
dd 4, 2
|
dd 4, 2
|
||||||
dd aMkDirCaption
|
dd aMkDirCaption
|
||||||
dd ?, ?
|
dd ?, ?
|
||||||
@ -8018,34 +7992,16 @@ mkdir_dlgdata:
|
|||||||
dd 0
|
dd 0
|
||||||
dd 4
|
dd 4
|
||||||
; ‘âப "‘®§¤ âì ¯ ¯ªã"
|
; ‘âப "‘®§¤ âì ¯ ¯ªã"
|
||||||
dd 1
|
DlgLbl ,1,0,aMkDirLen,0,aMkDir,0
|
||||||
dd 1,0,aMkDirLen,0
|
|
||||||
dd aMkDir
|
|
||||||
dd 0
|
|
||||||
; ¯®«¥ । ªâ¨à®¢ ¨ï á ¨¬¥¥¬ ᮧ¤ ¢ ¥¬®© ¯ ¯ª¨
|
; ¯®«¥ । ªâ¨à®¢ ¨ï á ¨¬¥¥¬ ᮧ¤ ¢ ¥¬®© ¯ ¯ª¨
|
||||||
dd 3
|
dnam DlgEdit ,1,1,,1,CopyDestEditBuf,0xC
|
||||||
dd 1,1
|
|
||||||
.width2 dd ?
|
|
||||||
dd 1
|
|
||||||
dd CopyDestEditBuf
|
|
||||||
.flags0 dd 0xC
|
|
||||||
; ª®¯ª "<22>த®«¦¨âì"
|
; ª®¯ª "<22>த®«¦¨âì"
|
||||||
.cont_btn:
|
cont DlgBtn ,,3,,3,a_Continue,18h
|
||||||
dd 2
|
|
||||||
.cont_x1 dd ?
|
|
||||||
dd 3
|
|
||||||
.cont_x2 dd ?
|
|
||||||
dd 3
|
|
||||||
dd a_Continue
|
|
||||||
.flags1 dd 18h
|
|
||||||
; ª®¯ª "®â¬¥¨âì"
|
; ª®¯ª "®â¬¥¨âì"
|
||||||
dd 2
|
cnl DlgBtn ,,3,,3,aCancelB,8
|
||||||
.cnl_x1 dd ?
|
ends
|
||||||
dd 3
|
|
||||||
.cnl_x2 dd ?
|
mkdir_dlgdata MkDir_Dlgdata
|
||||||
dd 3
|
|
||||||
dd aCancelB
|
|
||||||
.flags2 dd 8
|
|
||||||
|
|
||||||
; ¤¨ «®£ ¢ë¤¥«¥¨ï/áïâ¨ï
|
; ¤¨ «®£ ¢ë¤¥«¥¨ï/áïâ¨ï
|
||||||
mark_dlgdata:
|
mark_dlgdata:
|
||||||
@ -8058,10 +8014,7 @@ mark_dlgdata:
|
|||||||
dd 0, 0
|
dd 0, 0
|
||||||
dd 1
|
dd 1
|
||||||
; ¯®«¥ । ªâ¨à®¢ ¨ï
|
; ¯®«¥ । ªâ¨à®¢ ¨ï
|
||||||
dd 3
|
.edit DlgEdit ,1, 0, 35, 0, enter_string_buf,
|
||||||
dd 1, 0, 35, 0
|
|
||||||
dd enter_string_buf
|
|
||||||
.flags dd ?
|
|
||||||
|
|
||||||
; ¤¨ «®£ ¡ëáâண® ¯®¨áª ¢ ¯ ¥«¨ (Alt+¡ãª¢ë)
|
; ¤¨ «®£ ¡ëáâண® ¯®¨áª ¢ ¯ ¥«¨ (Alt+¡ãª¢ë)
|
||||||
QuickSearchDlg:
|
QuickSearchDlg:
|
||||||
@ -8075,84 +8028,47 @@ QuickSearchDlg:
|
|||||||
dd 0, 0
|
dd 0, 0
|
||||||
dd 1
|
dd 1
|
||||||
; ¯®«¥ । ªâ¨à®¢ ¨ï
|
; ¯®«¥ । ªâ¨à®¢ ¨ï
|
||||||
dd 3
|
DlgEdit ,1, 0, 18, 0, quick_search_buf, 1Ch
|
||||||
dd 1, 0, 18, 0
|
|
||||||
dd quick_search_buf
|
|
||||||
dd 1Ch
|
|
||||||
|
|
||||||
; ¤¨ «®£ ¯®¨áª ¢ ä ©«¥ ¤«ï ¯à®á¬®âà騪 ¨ । ªâ®à
|
; ¤¨ «®£ ¯®¨áª ¢ ä ©«¥ ¤«ï ¯à®á¬®âà騪 ¨ । ªâ®à
|
||||||
find_in_file_dlgdata:
|
struct FindInFileDlgdata
|
||||||
dd 1
|
dd 1
|
||||||
.x dd -1
|
x dd -1
|
||||||
.y dd -1
|
y dd -1
|
||||||
.width dd ?
|
width dd ?
|
||||||
.height dd 7
|
height dd 7
|
||||||
dd 4, 2
|
dd 4, 2
|
||||||
dd aSearch
|
dd aSearch
|
||||||
dd ?, ?
|
dd ?, ?
|
||||||
dd 0, 0
|
dd 0, 0
|
||||||
dd 8
|
dd 8
|
||||||
; ‘âப "ˆáª âì"
|
; ‘âப "ˆáª âì"
|
||||||
dd 1
|
DlgLbl ,1,0,aSearchForLen,0,aSearchFor,0
|
||||||
dd 1,0,aSearchForLen,0
|
|
||||||
dd aSearchFor
|
|
||||||
dd 0
|
|
||||||
; ¯®«¥ । ªâ¨à®¢ ¨ï á ⥪á⮬ ¤«ï ¯®¨áª
|
; ¯®«¥ । ªâ¨à®¢ ¨ï á ⥪á⮬ ¤«ï ¯®¨áª
|
||||||
dd 3
|
efind DlgEdit ,1,1,,1,SearchStringEditBuf,0xC
|
||||||
dd 1,1
|
|
||||||
.width2 dd ?
|
|
||||||
dd 1
|
|
||||||
dd SearchStringEditBuf
|
|
||||||
.flags0 dd 0xC
|
|
||||||
; £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
; £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
||||||
dd 4
|
DlgLine ,-1,2,-1,2
|
||||||
dd -1,2
|
|
||||||
dd -1,2
|
|
||||||
dd 0
|
|
||||||
dd 0
|
|
||||||
; ä« ¦®ª "“ç¨âë¢ âì ॣ¨áâà"
|
; ä« ¦®ª "“ç¨âë¢ âì ॣ¨áâà"
|
||||||
dd 5
|
case DlgCheck,1,3,-1,3,aCaseSensitive,18h ; default: search is case sensitive
|
||||||
dd 1,3
|
|
||||||
dd -1,3
|
|
||||||
dd aCaseSensitive
|
|
||||||
.flags_case dd 18h ; default: search is case sensitive
|
|
||||||
; ä« ¦®ª "’®«ìª® æ¥«ë¥ á«®¢ "
|
; ä« ¦®ª "’®«ìª® æ¥«ë¥ á«®¢ "
|
||||||
dd 5
|
whole DlgCheck,1,4,-1,4,aWholeWords,8 ; default: do NOT search whole words only
|
||||||
dd 1,4
|
|
||||||
dd -1,4
|
|
||||||
dd aWholeWords
|
|
||||||
.flags_whole dd 8 ; default: do NOT search whole words only
|
|
||||||
; £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
; £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
||||||
dd 4
|
DlgLine ,-1,5,-1,5
|
||||||
dd -1,5
|
|
||||||
dd -1,5
|
|
||||||
dd 0
|
|
||||||
dd 0
|
|
||||||
; ª®¯ª "ˆáª âì"
|
; ª®¯ª "ˆáª âì"
|
||||||
.search_btn:
|
search DlgBtn ,,6,,6,aSearchB,18h
|
||||||
dd 2
|
|
||||||
.search_x1 dd ?
|
|
||||||
dd 6
|
|
||||||
.search_x2 dd ?
|
|
||||||
dd 6
|
|
||||||
dd aSearchB
|
|
||||||
.flags1 dd 18h
|
|
||||||
; ª®¯ª "®â¬¥¨âì"
|
; ª®¯ª "®â¬¥¨âì"
|
||||||
dd 2
|
cnl DlgBtn ,,6,,6,aCancelB,8
|
||||||
.cnl_x1 dd ?
|
ends
|
||||||
dd 6
|
|
||||||
.cnl_x2 dd ?
|
find_in_file_dlgdata FindInFileDlgdata
|
||||||
dd 6
|
|
||||||
dd aCancelB
|
|
||||||
.flags2 dd 8
|
|
||||||
|
|
||||||
; ¯¥à¢ë© ¤¨ «®£ ¯®¨áª ¢ ä ©« å (§ ¯à®á)
|
; ¯¥à¢ë© ¤¨ «®£ ¯®¨áª ¢ ä ©« å (§ ¯à®á)
|
||||||
filesearch_query_template:
|
struct FileSearch_QueryTemplate
|
||||||
dd 1
|
dd 1
|
||||||
.x dd ?
|
x dd ?
|
||||||
.y dd ?
|
y dd ?
|
||||||
.width dd ?
|
width dd ?
|
||||||
.height dd 9
|
height dd 9
|
||||||
dd 4, 2
|
dd 4, 2
|
||||||
dd aFileSearch
|
dd aFileSearch
|
||||||
dd ?
|
dd ?
|
||||||
@ -8160,156 +8076,60 @@ filesearch_query_template:
|
|||||||
dd 0, 0
|
dd 0, 0
|
||||||
dd 10
|
dd 10
|
||||||
; áâப -¯à¨£« 襨¥ ¤«ï ¢¢®¤ ¬ ᪨
|
; áâப -¯à¨£« 襨¥ ¤«ï ¢¢®¤ ¬ ᪨
|
||||||
dd 1
|
DlgLbl ,1,0,aFileMasksLen,0,aFileMasks,0
|
||||||
dd 1,0,aFileMasksLen,0
|
|
||||||
dd aFileMasks
|
|
||||||
dd 0
|
|
||||||
; ¯®«¥ ¢¢®¤ ¤«ï ¬ ᪨
|
; ¯®«¥ ¢¢®¤ ¤«ï ¬ ᪨
|
||||||
dd 3
|
edit1 DlgEdit ,1,1,,1,,0xC
|
||||||
dd 1, 1
|
|
||||||
.width2 dd ?
|
|
||||||
dd 1
|
|
||||||
.editptr1 dd ?
|
|
||||||
dd 0xC
|
|
||||||
; áâப -¯à¨£« 襨¥ ¤«ï ⥪áâ ¯®¨áª
|
; áâப -¯à¨£« 襨¥ ¤«ï ⥪áâ ¯®¨áª
|
||||||
dd 1
|
DlgLbl ,1,2,aContainingTextLen,2,aContainingText,0
|
||||||
dd 1,2,aContainingTextLen,2
|
|
||||||
dd aContainingText
|
|
||||||
dd 0
|
|
||||||
; ¯®«¥ ¢¢®¤ ¤«ï ⥪áâ ¯®¨áª
|
; ¯®«¥ ¢¢®¤ ¤«ï ⥪áâ ¯®¨áª
|
||||||
dd 3
|
edit2 DlgEdit ,1,3,,3,,8
|
||||||
dd 1, 3
|
|
||||||
.width3 dd ?
|
|
||||||
dd 3
|
|
||||||
.editptr2 dd ?
|
|
||||||
dd 8
|
|
||||||
; £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
; £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
||||||
dd 4
|
DlgLine ,-1,4,-1,4
|
||||||
dd -1,4
|
|
||||||
dd -1,4
|
|
||||||
dd 0
|
|
||||||
dd 0
|
|
||||||
; ä« ¦®ª "“ç¨âë¢ âì ॣ¨áâà"
|
; ä« ¦®ª "“ç¨âë¢ âì ॣ¨áâà"
|
||||||
dd 5
|
case DlgCheck,1,5,-1,5,aCaseSensitive, ; will be initialized from find_in_file_dlgdata
|
||||||
dd 1,5
|
|
||||||
dd -1,5
|
|
||||||
dd aCaseSensitive
|
|
||||||
.flags_case dd ? ; will be initialized from find_in_file_dlgdata
|
|
||||||
; ä« ¦®ª "’®«ìª® æ¥«ë¥ á«®¢ "
|
; ä« ¦®ª "’®«ìª® æ¥«ë¥ á«®¢ "
|
||||||
dd 5
|
whole DlgCheck,1,6,-1,6,aWholeWords, ; will be initialized from find_in_file_dlgdata
|
||||||
dd 1,6
|
|
||||||
dd -1,6
|
|
||||||
dd aWholeWords
|
|
||||||
.flags_whole dd ? ; will be initialized from find_in_file_dlgdata
|
|
||||||
; £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
; £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
||||||
dd 4
|
DlgLine ,-1,7,-1,7
|
||||||
dd -1,7
|
|
||||||
dd -1,7
|
|
||||||
dd 0
|
|
||||||
dd 0
|
|
||||||
; ª®¯ª "ˆáª âì"
|
; ª®¯ª "ˆáª âì"
|
||||||
.search_btn:
|
search DlgBtn ,,8,,8,aSearchB,18h
|
||||||
dd 2
|
|
||||||
.search_x1 dd ?
|
|
||||||
dd 8
|
|
||||||
.search_x2 dd ?
|
|
||||||
dd 8
|
|
||||||
dd aSearchB
|
|
||||||
dd 18h
|
|
||||||
; ª®¯ª "®â¬¥¨âì"
|
; ª®¯ª "®â¬¥¨âì"
|
||||||
dd 2
|
cnl DlgBtn ,,8,,8,aCancelB,8
|
||||||
.cnl_x1 dd ?
|
ends
|
||||||
dd 8
|
|
||||||
.cnl_x2 dd ?
|
filesearch_query_template FileSearch_QueryTemplate
|
||||||
dd 8
|
|
||||||
dd aCancelB
|
|
||||||
dd 8
|
|
||||||
.size = $ - filesearch_query_template
|
|
||||||
|
|
||||||
; ¢â®à®© ¤¨ «®£ ¯®¨áª ¢ ä ©« å (᪠¨à®¢ ¨¥)
|
; ¢â®à®© ¤¨ «®£ ¯®¨áª ¢ ä ©« å (᪠¨à®¢ ¨¥)
|
||||||
filesearch_search_template:
|
struct FileSearch_SearchTemplate
|
||||||
dd 1
|
dd 1
|
||||||
.x dd ?
|
x dd ?
|
||||||
.y dd ?
|
y dd ?
|
||||||
.width dd ?
|
width dd ?
|
||||||
.height dd ?
|
height dd ?
|
||||||
dd 4, 2
|
dd 4, 2
|
||||||
.caption dd ?
|
caption dd ?
|
||||||
dd ?
|
dd ?
|
||||||
dd 0
|
dd 0
|
||||||
dd 0, 0
|
dd 0, 0
|
||||||
dd 9
|
dd 9
|
||||||
; ᯨ᮪ ©¤¥ëå ä ©«®¢
|
; ᯨ᮪ ©¤¥ëå ä ©«®¢
|
||||||
dd 6
|
list1 DlgList ,0,0,,,,0
|
||||||
dd 0, 0
|
|
||||||
.width1 dd ?
|
|
||||||
.height1 dd ?
|
|
||||||
.data1 dd ?
|
|
||||||
dd 0
|
|
||||||
; £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
; £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
||||||
dd 4
|
lin1 DlgLine ,-1,,-1,
|
||||||
dd -1
|
|
||||||
.y2 dd ?
|
|
||||||
dd -1
|
|
||||||
dd ?
|
|
||||||
dd 0, 0
|
|
||||||
; áâப "<22>®¨áª <string> ¢:" «¨¡® "<22>®¨áª § ª®ç¥..."
|
; áâப "<22>®¨áª <string> ¢:" «¨¡® "<22>®¨áª § ª®ç¥..."
|
||||||
dd 1
|
lbl1 DlgLbl ,1
|
||||||
dd 1
|
|
||||||
.y3 dd ?
|
|
||||||
.width3 dd ?
|
|
||||||
dd ?
|
|
||||||
.data3 dd ?
|
|
||||||
dd 0
|
|
||||||
; áâப á ⥪ã饩 ¯ ¯ª®©
|
; áâப á ⥪ã饩 ¯ ¯ª®©
|
||||||
dd 1
|
lbl2 DlgLbl
|
||||||
.x4 dd ?
|
|
||||||
.y4 dd ?
|
|
||||||
.width4 dd ?
|
|
||||||
dd ?
|
|
||||||
.data4 dd ?
|
|
||||||
dd 0
|
|
||||||
; £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
; £®à¨§®â «ìë© à §¤¥«¨â¥«ì
|
||||||
dd 4
|
lin2 DlgLine ,-1,,-1,
|
||||||
dd -1
|
|
||||||
.y5 dd ?
|
|
||||||
dd -1
|
|
||||||
dd ?
|
|
||||||
dd 0, 0
|
|
||||||
; ª®¯ª¨
|
; ª®¯ª¨
|
||||||
.btn1:
|
btn1 DlgBtn ,,,,,aNewSearch,8
|
||||||
dd 2
|
btn2 DlgBtn ,,,,,aGoto,1Ch
|
||||||
.btn1x1 dd ?
|
btn3 DlgBtn ,,,,,aView,8
|
||||||
.btn1y dd ?
|
btn4 DlgBtn ,,,,,aCancelB2,8
|
||||||
.btn1x2 dd ?
|
ends
|
||||||
dd ?
|
|
||||||
dd aNewSearch
|
filesearch_search_template FileSearch_SearchTemplate
|
||||||
dd 8
|
|
||||||
.btn2:
|
|
||||||
dd 2
|
|
||||||
.btn2x1 dd ?
|
|
||||||
.btn2y dd ?
|
|
||||||
.btn2x2 dd ?
|
|
||||||
dd ?
|
|
||||||
dd aGoto
|
|
||||||
dd 1Ch
|
|
||||||
.btn3:
|
|
||||||
dd 2
|
|
||||||
.btn3x1 dd ?
|
|
||||||
.btn3y dd ?
|
|
||||||
.btn3x2 dd ?
|
|
||||||
dd ?
|
|
||||||
dd aView
|
|
||||||
dd 8
|
|
||||||
.btn4:
|
|
||||||
dd 2
|
|
||||||
.btn4x1 dd ?
|
|
||||||
.btn4y dd ?
|
|
||||||
.btn4x2 dd ?
|
|
||||||
dd ?
|
|
||||||
dd aCancelB2
|
|
||||||
dd 8
|
|
||||||
.size = $ - filesearch_search_template
|
|
||||||
|
|
||||||
RetryOrCancelBtn:
|
RetryOrCancelBtn:
|
||||||
dd aRetry
|
dd aRetry
|
||||||
|
@ -1657,12 +1657,12 @@ viewer_OnKey:
|
|||||||
call viewer_seek
|
call viewer_seek
|
||||||
call viewer_skip_unicode_marker
|
call viewer_skip_unicode_marker
|
||||||
mov esi, tolower_table
|
mov esi, tolower_table
|
||||||
test [find_in_file_dlgdata.flags_case], 10h
|
test [find_in_file_dlgdata.case.flags], 10h
|
||||||
jz @f
|
jz @f
|
||||||
mov esi, identical_table
|
mov esi, identical_table
|
||||||
@@:
|
@@:
|
||||||
mov ebx, SearchString
|
mov ebx, SearchString
|
||||||
test [find_in_file_dlgdata.flags_whole], 10h
|
test [find_in_file_dlgdata.whole.flags], 10h
|
||||||
setnz al
|
setnz al
|
||||||
push eax
|
push eax
|
||||||
push dword [ebp+viewer_data.encoding]
|
push dword [ebp+viewer_data.encoding]
|
||||||
@ -1684,7 +1684,7 @@ viewer_OnKey:
|
|||||||
lea ebx, [ebp+viewer_data.buf]
|
lea ebx, [ebp+viewer_data.buf]
|
||||||
add ebx, [ebp+viewer_data.buf_size]
|
add ebx, [ebp+viewer_data.buf_size]
|
||||||
@@:
|
@@:
|
||||||
test [find_in_file_dlgdata.flags_whole], 10h
|
test [find_in_file_dlgdata.whole.flags], 10h
|
||||||
jz .search_loop
|
jz .search_loop
|
||||||
cmp dword [ebp+viewer_data.buf_start], 0
|
cmp dword [ebp+viewer_data.buf_start], 0
|
||||||
jnz @f
|
jnz @f
|
||||||
@ -1732,7 +1732,7 @@ viewer_OnKey:
|
|||||||
jmp .search_loop
|
jmp .search_loop
|
||||||
.f7.notfoundt:
|
.f7.notfoundt:
|
||||||
; last chance - if we are looking for a whole word, EOF is ok for last symbol
|
; last chance - if we are looking for a whole word, EOF is ok for last symbol
|
||||||
test [find_in_file_dlgdata.flags_whole], 10h
|
test [find_in_file_dlgdata.whole.flags], 10h
|
||||||
jz .f7.notfound
|
jz .f7.notfound
|
||||||
movzx edi, byte [edi+' ']
|
movzx edi, byte [edi+' ']
|
||||||
inc esi
|
inc esi
|
||||||
@ -1759,7 +1759,7 @@ viewer_OnKey:
|
|||||||
jnz @f
|
jnz @f
|
||||||
inc edx
|
inc edx
|
||||||
@@:
|
@@:
|
||||||
test [find_in_file_dlgdata.flags_whole], 10h
|
test [find_in_file_dlgdata.whole.flags], 10h
|
||||||
jz @f
|
jz @f
|
||||||
sub dword [ebp+viewer_data.selected_len], 2
|
sub dword [ebp+viewer_data.selected_len], 2
|
||||||
sbb dword [ebp+viewer_data.selected_len+4], 0
|
sbb dword [ebp+viewer_data.selected_len+4], 0
|
||||||
|
@ -658,7 +658,7 @@ endp
|
|||||||
;output:
|
;output:
|
||||||
; eax - number
|
; eax - number
|
||||||
align 4
|
align 4
|
||||||
proc conv_str_to_int uses ebx ecx esi, buf:dword
|
proc conv_str_to_int uses ebx esi, buf:dword
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov esi,[buf]
|
mov esi,[buf]
|
||||||
@ -690,11 +690,6 @@ proc conv_str_to_int uses ebx ecx esi, buf:dword
|
|||||||
inc esi
|
inc esi
|
||||||
jmp .cycle_16
|
jmp .cycle_16
|
||||||
@@:
|
@@:
|
||||||
cmp ecx,0 ;if the number is negative
|
|
||||||
jne @f
|
|
||||||
sub ecx,eax
|
|
||||||
mov eax,ecx
|
|
||||||
@@:
|
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user