/programs/other/t_edit/t_button.inc |
---|
87,12 → 87,12 |
@@: |
cmp ah,ID_BUT_FIND |
jne @f |
call ted_but_find |
call but_panel_find |
jmp still |
@@: |
cmp ah,ID_BUT_REPLACE |
jne @f |
call but_replace |
call but_panel_replace |
jmp still |
@@: |
cmp ah,ID_BUT_KEY_WORDS |
137,7 → 137,7 |
@@: |
cmp ah,ID_BUT_SYNTAX_MODE |
jne @f |
stdcall but_choose_syntax, tedit0 |
stdcall but_panel_choose_syntax, tedit0 |
jmp still |
@@: |
cmp ah,ID_BUT_CONVERT_1251_866 |
156,11 → 156,26 |
stdcall ted_but_open_syntax, tedit0 |
jmp still |
@@: |
cmp ah,201 |
jne @f |
stdcall [ted_but_find_next], tedit0 |
cmp ah,201 ;§ ¬¥¨âì |
jne .no_find |
call get_find_options |
stdcall [ted_but_find], tedit0, eax |
jmp still |
@@: |
.no_find: |
cmp ah,202 ;§ ¬¥¨âì ¢á¥ |
jne .no_change |
call get_find_options |
stdcall [ted_but_replace], tedit0, buf_replace, eax, 1 |
or eax,eax |
jz still |
stdcall [ted_draw], tedit0 |
jmp still |
.no_change: |
cmp ah,203 |
jne .no_change_a |
call but_replace_all |
jmp still |
.no_change_a: |
cmp ah,1 |
jne @f |
202,6 → 217,40 |
mcall SF_TERMINATE_PROCESS ;¢ë室 ¨§ ¯à®£à ¬¬ë |
;ret |
align 4 |
get_find_options: |
xor eax,eax |
cmp [opt_gr1],opt1 |
je @f |
inc eax |
cmp [opt_gr1],opt2 |
je @f |
inc eax |
@@: |
ret |
align 4 |
proc but_replace_all uses ebx ecx edx |
call get_find_options |
mov ebx,eax |
stdcall [ted_but_replace], tedit0, buf_replace, ebx, 1 |
xor edx,edx |
or eax,eax |
jz @f |
inc edx |
mov ecx,0x1000 |
.cycle0: |
stdcall [ted_but_replace], tedit0, buf_replace, ebx, 0 |
or eax,eax |
jz @f |
inc edx |
loop .cycle0 |
@@: |
stdcall [ted_draw], tedit0 |
mov eax,edx |
ret |
endp |
;input: |
; al = ª®¤ ®è¨¡ª¨ |
align 4 |
553,7 → 602,7 |
;description: |
; ¢ë§®¢/áªàë⨥ ¯ ¥«¨ ¯®¨áª |
align 4 |
proc ted_but_find uses edi |
proc but_panel_find uses edi |
mov edi,tedit0 |
cmp ted_panel_id,TED_PANEL_NULL |
570,7 → 619,47 |
ret |
endp |
;description: |
; ¢ë§®¢/áªàë⨥ ¯ ¥«¨ § ¬¥ë |
align 4 |
proc but_panel_replace uses edi |
mov edi,tedit0 |
cmp ted_panel_id,TED_PANEL_NULL |
je @f |
mov ted_panel_id,TED_PANEL_NULL |
mov ted_wnd_l,0 |
jmp .e_if |
@@: |
mov ted_panel_id,TED_PANEL_REPLACE |
mov ted_wnd_l,TED_PANEL_WIDTH |
.e_if: |
call EvSize |
stdcall [ted_draw],edi |
ret |
endp |
;description: |
; ¢ë§®¢/áªàë⨥ ¯ ¥«¨ á ä ©« ¬¨ á¨â ªá¨á |
align 4 |
proc but_panel_choose_syntax uses edi, edit:dword |
mov edi,[edit] |
cmp ted_panel_id,TED_PANEL_NULL |
je @f |
mov ted_panel_id,TED_PANEL_NULL |
mov ted_wnd_l,0 |
jmp .e_if |
@@: |
mov ted_panel_id,TED_PANEL_SYNTAX |
mov ted_wnd_l,TED_PANEL_WIDTH |
.e_if: |
call EvSize |
stdcall [ted_draw],edi |
ret |
endp |
align 4 |
tbl_1251_866: |
rb 128 |
db 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0 ;128 |
600,13 → 689,6 |
ret |
;description: |
; ª®¯ª [ ¬¥¨âì] ¯ ¥«¨ |
align 4 |
but_replace: |
; ¯®ª ¥ ᤥ« ® |
ret |
;description: |
; äãªæ¨ï ¯®¨áª ¨ä®à¬ 樨 ¢ ᯨ᪥ ª«î祢ëå á«®¢ |
align 4 |
but_find_key_w: |
647,22 → 729,3 |
ret |
endp |
;description: |
; ¢ë§®¢/áªàë⨥ ¯ ¥«¨ á ä ©« ¬¨ á¨â ªá¨á |
align 4 |
proc but_choose_syntax uses edi, edit:dword |
mov edi,[edit] |
cmp ted_panel_id,TED_PANEL_NULL |
je @f |
mov ted_panel_id,TED_PANEL_NULL |
mov ted_wnd_l,0 |
jmp .e_if |
@@: |
mov ted_panel_id,TED_PANEL_SYNTAX |
mov ted_wnd_l,TED_PANEL_WIDTH |
.e_if: |
call EvSize |
stdcall [ted_draw],edi |
ret |
endp |
/programs/other/t_edit/t_data.inc |
---|
@@ -139,7 +143,9 @@ |
@@ -152,6 +158,10 @@ |
@@ -200,7 +210,9 @@ |
@@ -339,6 +351,7 @@ |
@@ -399,7 +412,7 @@ |
@@ -424,15 +437,23 @@ |
@@ -482,9 +503,7 @@ |
@@ -497,10 +516,21 @@ |
@@ -553,9 +583,7 @@ |
@@ -568,10 +596,21 @@ |
/programs/other/t_edit/t_draw.inc |
---|
220,8 → 220,27 |
; edi = pointer to tedit struct |
align 4 |
proc draw_panel_find |
cmp ted_panel_id,TED_PANEL_FIND ;if not panel |
cmp ted_panel_id,TED_PANEL_FIND |
jne @f |
call p_find |
jmp .end_f |
@@: |
cmp ted_panel_id,TED_PANEL_REPLACE |
jne @f |
call p_replace |
jmp .end_f |
@@: |
push eax edx |
mcall SF_DEFINE_BUTTON,,,0x80000000+201 |
mcall ,,,0x80000000+202 |
mcall ,,,0x80000000+203 |
pop edx eax |
.end_f: |
ret |
endp |
align 4 |
p_find: |
push eax ebx ecx edx |
mov ecx,ted_wnd_t |
shl ecx,16 |
228,15 → 247,47 |
mov cx,20 |
mcall SF_DRAW_RECT,TED_PANEL_WIDTH,,[sc.work] |
mov ebx,(30 shl 16)+25 |
mov ecx,ted_wnd_t |
add cx,20+15 ; 15 - height text box |
shl ecx,16 |
add ecx,ted_wnd_h |
mov edx,ted_scr_h |
add cx,word[edx+sb_offs_size_y] |
sub cx,20+15-1 ; 15 - height text box |
mcall ,,,[sc.work] |
stdcall [edit_box_draw], edit2 |
mov ecx,ted_wnd_t |
shl ecx,16 |
add ecx,(93 shl 16)+20 |
mcall SF_DEFINE_BUTTON,(5 shl 16)+85,,201,[sc.work_button] ;201 - button id |
mov ebx,(23 shl 16)+7 |
add ebx,ted_wnd_t |
mov ecx,[sc.work_text] |
or ecx,0x80000000 |
mcall SF_DRAW_TEXT,,,txtFindCapt |
stdcall [edit_box_draw], edit2 |
mov ecx,[sc.work_button_text] |
or ecx,0x80000000 |
mov ebx,(15 shl 16)+100 |
add ebx,ted_wnd_t |
mcall ,,,txtFindNext |
stdcall [option_box_draw], opt_grlist1 |
pop edx ecx ebx eax |
ret |
align 4 |
p_replace: |
push eax ebx ecx edx |
mov ecx,ted_wnd_t |
shl ecx,16 |
mov cx,20 |
mcall SF_DRAW_RECT,TED_PANEL_WIDTH,,[sc.work] |
mov ecx,ted_wnd_t |
add cx,20+15 ; 15 - height text box |
shl ecx,16 |
add ecx,ted_wnd_h |
243,30 → 294,38 |
mov edx,ted_scr_h |
add cx,word[edx+sb_offs_size_y] |
sub cx,20+15-1 ; 15 - height text box |
mcall SF_DRAW_RECT,TED_PANEL_WIDTH,,[sc.work] |
mcall ,,,[sc.work] |
stdcall [edit_box_draw], edit1 |
stdcall [edit_box_draw], edit2 |
mov ecx,ted_wnd_t |
add cx,20+15+5 |
shl ecx,16 |
mov cx,20 |
mcall SF_DEFINE_BUTTON,(5 shl 16)+85,,201,[sc.work_button] ;201 - button id |
add ecx,(133 shl 16)+20 |
mcall SF_DEFINE_BUTTON,(5 shl 16)+95,,202,[sc.work_button] ;replace next |
mov ebx,(15 shl 16)+(20+15+10) |
add ebx,ted_wnd_t |
add ecx,(26 shl 16) |
mcall ,,,203 ;replace all |
mov ebx,ted_wnd_t |
add ebx,(23 shl 16)+7 |
mov ecx,[sc.work_text] |
or ecx,0x80000000 |
mcall SF_DRAW_TEXT,,,txtFindNext |
mcall SF_DRAW_TEXT,,,txtFindCapt |
add ebx,93 |
mcall SF_DRAW_TEXT,,,txtRerlaceCapt |
mov ecx,[sc.work_button_text] |
or ecx,0x80000000 |
mov ebx,ted_wnd_t |
add ebx,(15 shl 16)+140 |
mcall ,,,txtRerlace |
add ebx,26 |
mcall ,,,txtRerlaceAll |
stdcall [option_box_draw], opt_grlist1 |
pop edx ecx ebx eax |
jmp .end_f |
@@: |
push eax edx |
mov edx,201 |
or edx,0x80000000 |
mcall SF_DEFINE_BUTTON |
pop edx eax |
.end_f: |
ret |
endp |
;input: |
; edi = pointer to tedit struct |
357,13 → 416,14 |
stdcall [ted_init_scroll_bars], tedit0,2 |
mov eax,ted_wnd_t |
mov edi,dword tree1 |
mov edi,tree1 |
mov tl_box_top,eax ;=ted_wnd_t |
add tl_box_top,20 |
mov [edit2.top],eax ;=ted_wnd_t |
add dword[edit2.top],20 |
mov [edit1.top],eax ;=ted_wnd_t |
add dword[edit1.top],113 |
popad |
ret |
/programs/other/t_edit/t_edit.asm |
---|
69,6 → 69,7 |
;--------------------------------------------------------------------- |
stdcall [ted_init], tedit0 |
stdcall [tl_data_init], tree1 |
option_boxes_set_sys_color sc,opt_grlist1 |
; OpenDialog initialisation |
stdcall [OpenDialog_Init],OpenDialog_data |
238,12 → 239,20 |
stdcall [ted_mouse], tedit0 |
.no_edit: |
cmp byte[tedit0.panel_id],TED_PANEL_FIND ;if not panel |
;¯à®¢¥àª ¡®ª®¢ëå ¯ ¥«¥© |
cmp byte[tedit0.panel_id],TED_PANEL_FIND |
jne @f |
stdcall [edit_box_mouse], edit2 |
stdcall [option_box_mouse], opt_grlist1 |
@@: |
cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX ;if not panel |
cmp byte[tedit0.panel_id],TED_PANEL_REPLACE |
jne @f |
stdcall [edit_box_mouse], edit2 |
stdcall [edit_box_mouse], edit1 |
stdcall [option_box_mouse], opt_grlist1 |
@@: |
cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX |
jne @f |
stdcall [tl_mouse], tree1 |
@@: |
ret |
289,6 → 298,25 |
mcall SF_GET_KEY |
stdcall [tl_key], tree1 |
test word [edit1.flags],10b ;ed_focus ;¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
je @f |
cmp ah,0x80 ;if key up |
ja still |
cmp ah,42 ;[Shift] (left) |
je still |
cmp ah,54 ;[Shift] (right) |
je still |
cmp ah,56 ;[Alt] |
je still |
cmp ah,29 ;[Ctrl] |
je still |
cmp ah,69 ;[Pause Break] |
je still |
stdcall KeyConvertToASCII, conv_tabl |
stdcall [edit_box_key], edit1 |
jmp still |
@@: |
test word [edit2.flags],10b;ed_focus ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
je @f |
cmp ah,0x80 ;if key up |
313,6 → 341,7 |
jmp still |
align 4 |
edit1 edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_replace, mouse_dd, 0 |
edit2 edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0 |
unpac_mem dd 0 |
376,6 → 405,7 |
last_open_synt_file rb 32 ;¨¬ï ¯®á«¥¤¥£® ¯®¤ª«î祮£® ä ©« á¨â ªá¨á |
buf rb BUF_SIZE ;¡ãä¥à ¤«ï ª®¯¨à®¢ ¨ï ¨ ¢áâ ¢ª¨ |
buf_find rb 302 ;¡ãä¥à ¤«ï ¯®¨áª ⥪áâ |
buf_replace rb 302 ;¡ãä¥à ¤«ï § ¬¥ë ⥪áâ |
sc system_colors |
IncludeUGlobals |
align 16 |