Rev 1390 | Rev 1456 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1390 | Rev 1449 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;Îãðîìíàÿ áëàãîäàðíîñòü Maxxxx32, Diamond, Heavyiron |
1 | ;£à®¬ ï ¡« £®¤ à®áâì Maxxxx32, Diamond, Heavyiron |
2 | ;è äðóãèì ïðîãðàììèñòàì, à òàêæå |
2 | ;¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬, â ª¦¥ |
3 | ;Òåïëîâó Àëåêñåþ ( |
3 | ;¥¯«®¢ã «¥ªá¥î ( |
Line 4... | Line 4... | ||
4 | 4 | ||
5 | 5 | ||
6 | use32 |
6 | use32 |
7 | org 0x0 |
7 | org 0x0 |
8 | db 'MENUET01' ;èäåíòèô. èñïîëíÿåìîãî ôàéëà âñåãäà 8 áàéò |
8 | db 'MENUET01' ;¨¤¥â¨ä. ¨á¯®«ï¥¬®£® ä ©« ¢á¥£¤ 8 ¡ ©â |
9 | dd 0x01 |
9 | dd 0x01 |
10 | dd start |
10 | dd start |
11 | dd i_end ; ðàçìåð ïðèëîæåíèÿ |
11 | dd i_end ; à §¬¥à ¯à¨«®¦¥¨ï |
12 | dd mem |
12 | dd mem |
13 | dd stacktop |
13 | dd stacktop |
Line 14... | Line 14... | ||
14 | dd file_name;buf_cmd_lin |
14 | dd file_name ; command line |
15 | dd sys_path |
15 | dd sys_path |
16 | 16 | ||
17 | MAX_COLOR_WORD_LEN equ 40 |
17 | MAX_COLOR_WORD_LEN equ 40 |
Line 18... | Line -... | ||
18 | maxChars equ 100002 ;(...+2) |
- | |
- | 18 | maxChars equ 100002 ;(...+2) |
|
19 | BUF_SIZE equ 1000 ;bufer for copy|paste |
19 | BUF_SIZE equ 1000 ;bufer for copy|paste |
20 | maxColWords equ 10000 |
20 | maxColWords equ 10000 |
21 | 21 | ||
22 | - | ||
Line 23... | Line 22... | ||
23 | include '../../macros.inc' |
22 | include '../../proc32.inc' |
24 | include '../../develop/libraries/box_lib/load_lib.mac' |
23 | include '../../macros.inc' |
25 | include '../../develop/libraries/box_lib/trunk/tree_list.mac' |
24 | include '../../develop/libraries/box_lib/load_lib.mac' |
26 | include '../../develop/libraries/box_lib/trunk/editbox.mac' |
25 | include '../../develop/libraries/box_lib/trunk/box_lib.mac' |
Line 126... | Line 125... | ||
126 | 125 | ||
127 | ;--------------------------------------------------------------------- |
126 | ;--------------------------------------------------------------------- |
128 | push dword tree1 |
127 | push dword tree1 |
129 | call dword[tl_data_init] |
128 | call dword[tl_data_init] |
130 | ;--------------------------------------------------------------------- |
129 | ;--------------------------------------------------------------------- |
131 | ; ÷èòàåì bmp ôàéë ñ êóðñîðàìè è ëèíèÿìè |
130 | ; ç¨â ¥¬ bmp ä ©« á ªãàá®à ¬¨ ¨ «¨¨ï¬¨ |
Line 132... | Line 131... | ||
132 | copy_path fn_icon_tl_sys,sys_path,file_name,0x0 |
131 | copy_path fn_icon_tl_sys,sys_path,file_name,0x0 |
133 | 132 | ||
134 | mov ecx,3*256*13 |
133 | mov ecx,3*256*13 |
Line 149... | Line 148... | ||
149 | cmp ebx,0 |
148 | cmp ebx,0 |
150 | jg @f |
149 | jg @f |
151 | mov dword[tree1.data_img_sys],0 |
150 | mov dword[tree1.data_img_sys],0 |
152 | @@: |
151 | @@: |
153 | ;--------------------------------------------------------------------- |
152 | ;--------------------------------------------------------------------- |
154 | ; ÷èòàåì bmp ôàéë ñ èêîíêàìè óçëîâ |
153 | ; ç¨â ¥¬ bmp ä ©« á ¨ª®ª ¬¨ 㧫®¢ |
155 | copy_path fn_icon_tl_nod,sys_path,file_name,0x0 |
154 | copy_path fn_icon_tl_nod,sys_path,file_name,0x0 |
Line 156... | Line 155... | ||
156 | 155 | ||
157 | mov ecx,3*256*2 |
156 | mov ecx,3*256*2 |
158 | call mem_Alloc |
157 | call mem_Alloc |
Line 172... | Line 171... | ||
172 | cmp ebx,0 |
171 | cmp ebx,0 |
173 | jg @f |
172 | jg @f |
174 | mov dword[tree1.data_img],0 |
173 | mov dword[tree1.data_img],0 |
175 | @@: |
174 | @@: |
176 | ;------------------------------------------------------------------------------ |
175 | ;------------------------------------------------------------------------------ |
177 | copy_path fn_syntax_dir,sys_path,file_name,0x0 ;áåðåì ïóòü ê ïàïêå ñ ôàéëàìè ñèíòàêñèñà |
176 | copy_path fn_syntax_dir,sys_path,file_name,0x0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ á¨â ªá¨á |
178 | mov eax,70 |
177 | mov eax,70 |
179 | mov ebx,tree_file_struct |
178 | mov ebx,tree_file_struct |
180 | int 0x40 |
179 | int 0x40 |
Line 181... | Line 180... | ||
181 | 180 | ||
Line 184... | Line 183... | ||
184 | 183 | ||
185 | mov eax,dir_mem |
184 | mov eax,dir_mem |
186 | add eax,32+4+1+3+4*6+8 |
185 | add eax,32+4+1+3+4*6+8 |
187 | mov ecx,ebx |
186 | mov ecx,ebx |
188 | @@: |
187 | @@: |
189 | cmp byte[eax],'.' ;ôèëüòðóåì ôàéëû ñ èìåíàìè '.' è '..' |
188 | cmp byte[eax],'.' ;䨫ìâà㥬 ä ©«ë á ¨¬¥ ¬¨ '.' ¨ '..' |
190 | je .filter |
189 | je .filter |
191 | push dword tree1 |
190 | push dword tree1 |
192 | push dword 0x10000 ;1*2^16 - ãäå 1 íîìåð èêîíêè ñ êíèãîé |
191 | push dword 0x10000 ;1*2^16 - £¤¥ 1 ®¬¥à ¨ª®ª¨ á ª¨£®© |
193 | push dword eax |
192 | push dword eax |
Line 194... | Line 193... | ||
194 | call dword[tl_node_add] |
193 | call dword[tl_node_add] |
195 | 194 | ||
Line 226... | Line 225... | ||
226 | mov ebx,10*65536+485 |
225 | mov ebx,10*65536+485 |
227 | mov ecx,10*65536+280 |
226 | mov ecx,10*65536+280 |
228 | mov edx,[sc.work] |
227 | mov edx,[sc.work] |
229 | or edx,0x73000000 |
228 | or edx,0x73000000 |
230 | mov edi,hed |
229 | mov edi,hed |
231 | mcall |
230 | int 0x40 |
- | 231 | ||
- | 232 | mov edi,tedit0 |
|
Line 232... | Line 233... | ||
232 | 233 | ||
233 | mcall 9,procinfo,-1 |
234 | mcall 9,procinfo,-1 |
Line 234... | Line 235... | ||
234 | call EvSize |
235 | stdcall EvSize,edi |
235 | 236 | ||
236 | mov eax,13 ;rect |
237 | mov eax,13 ;âåðõíèé ïðÿìîóãîëüíèê, äëÿ î÷èñòêè âåðõíåé ïàíåëè |
237 | xor ebx,ebx |
238 | xor ebx,ebx |
238 | xor ecx,ecx |
239 | mov ecx,ted_wnd_t |
239 | mov bx,word [procinfo.client_box.width] |
- | |
240 | inc bx |
240 | mov bx,word [procinfo.client_box.width] |
241 | mov cx,word [wndMain.top] |
- | |
242 | mcall |
- | |
243 | - | ||
Line 244... | Line -... | ||
244 | push dword edit1 |
- | |
245 | call [edit_box_draw] |
241 | inc bx |
246 | 242 | int 0x40 |
|
Line 247... | Line 243... | ||
247 | ; draw for Menu 1 |
243 | |
Line 248... | Line 244... | ||
248 | push dword menu_data_1 |
244 | stdcall [edit_box_draw], dword edit1 |
249 | call [menu_bar_draw] |
245 | stdcall [menu_bar_draw], dword menu_data_1 |
250 | 246 | ||
251 | call draw_but_toolbar |
247 | call draw_but_toolbar |
252 | 248 | ||
253 | cmp [err_ini0],1 |
249 | cmp [err_ini0],1 |
254 | jne @f |
250 | jne @f |
255 | mov eax,4 |
251 | mov eax,4 |
256 | mov ebx,[wndMain.left] |
252 | mov ebx,ted_wnd_l |
257 | add ebx,[recMain.left] |
253 | add ebx,ted_rec_l |
258 | shl ebx,16 |
254 | shl ebx,16 |
Line 259... | Line 255... | ||
259 | add ebx,[wndMain.top] |
255 | add ebx,ted_wnd_t |
Line 268... | Line 264... | ||
268 | int 0x40 |
264 | int 0x40 |
269 | @@: |
265 | @@: |
Line 270... | Line 266... | ||
270 | 266 | ||
271 | cmp [err_ini0],1 |
267 | cmp [err_ini0],1 |
272 | je @f |
268 | je @f |
273 | call draw_main_win |
- | |
274 | @@: |
- | |
275 | - | ||
276 | cmp [err_opn],1 |
- | |
277 | jne @f |
- | |
278 | ;mov eax,4 |
- | |
279 | mov ebx,10*65536+35 |
- | |
280 | mov ecx,0x80ff0000 |
- | |
281 | mov edx,txtErrOpen |
- | |
282 | mcall |
269 | stdcall draw_main_win, tedit0 |
Line 283... | Line 270... | ||
283 | @@: |
270 | @@: |
Line 284... | Line 271... | ||
284 | 271 | ||
285 | mcall 12,2 |
272 | mcall 12,2 |
286 | 273 | ||
Line 287... | Line 274... | ||
287 | still: |
274 | still: |
288 | mov eax,10 |
275 | mov eax,10 |
289 | mcall |
276 | mcall |
290 | 277 | ||
291 | cmp al,1 ;èçì. ïîëîæåíèå îêíà |
278 | cmp al,1 ;¨§¬. ¯®«®¦¥¨¥ ®ª |
292 | jz red_win |
279 | jz red_win |
Line 300... | Line 287... | ||
300 | jmp still |
287 | jmp still |
Line 301... | Line 288... | ||
301 | 288 | ||
302 | - | ||
303 | 289 | ||
Line 304... | Line 290... | ||
304 | mouse: |
290 | |
305 | push dword edit1 |
291 | mouse: |
Line 306... | Line 292... | ||
306 | call [edit_box_mouse] |
292 | stdcall [edit_box_mouse], dword edit1 |
Line 314... | Line 300... | ||
314 | .vertical: |
300 | .vertical: |
315 | mov eax,[wScr.max_area] |
301 | mov eax,[wScr.max_area] |
316 | cmp eax,[wScr.cur_area] |
302 | cmp eax,[wScr.cur_area] |
317 | jbe .horizontal |
303 | jbe .horizontal |
318 | ; mouse event for Vertical ScrollBar |
304 | ; mouse event for Vertical ScrollBar |
319 | push dword wScr |
- | |
320 | call [scrollbar_ver_mouse] |
305 | stdcall [scrollbar_ver_mouse], dword wScr |
321 | mov eax,wScr.redraw |
306 | mov eax,wScr.redraw |
322 | xor ebx,ebx |
307 | xor ebx,ebx |
323 | cmp [eax],ebx |
308 | cmp [eax],ebx |
324 | je @f |
309 | je @f |
325 | mov [eax],ebx |
310 | mov [eax],ebx |
Line 326... | Line 311... | ||
326 | 311 | ||
327 | call draw_main_win |
- | |
328 | ;call mouse_wnd_main |
312 | stdcall draw_main_win, tedit0 |
329 | jmp still |
313 | jmp still |
330 | @@: |
314 | @@: |
331 | cmp [wScr.delta2],0 |
315 | cmp [wScr.delta2],0 |
332 | jne still |
316 | jne still |
Line 340... | Line 324... | ||
340 | mov eax,hScr.redraw |
324 | mov eax,hScr.redraw |
341 | xor ebx,ebx |
325 | xor ebx,ebx |
342 | cmp [eax],ebx |
326 | cmp [eax],ebx |
343 | je .other |
327 | je .other |
344 | mov [eax],ebx |
328 | mov [eax],ebx |
345 | call draw_main_win |
329 | stdcall draw_main_win, tedit0 |
346 | jmp still |
330 | jmp still |
347 | .other: |
331 | .other: |
348 | cmp [wScr.delta2],0 |
332 | cmp [wScr.delta2],0 |
349 | jne still |
333 | jne still |
350 | cmp [hScr.delta2],0 |
334 | cmp [hScr.delta2],0 |
351 | jne still |
335 | jne still |
Line 352... | Line 336... | ||
352 | 336 | ||
Line 353... | Line 337... | ||
353 | call mouse_wnd_main |
337 | stdcall mouse_wnd_main, tedit0 |
354 | 338 | ||
355 | cmp byte[panel_id],TE_PANEL_FIND ;if not panel |
339 | cmp byte[panel_id],TE_PANEL_FIND ;if not panel |
356 | jne @f |
340 | jne @f |
Line 466... | Line 450... | ||
466 | je still |
450 | je still |
467 | ; cmp [keyUpr],0 |
451 | ; cmp [keyUpr],0 |
468 | ; jne still |
452 | ; jne still |
Line 469... | Line 453... | ||
469 | 453 | ||
470 | call KeyConvertToASCII |
- | |
471 | push dword edit2 |
454 | call KeyConvertToASCII |
472 | call [edit_box_key] |
455 | stdcall [edit_box_key], dword edit2 |
473 | jmp still |
456 | jmp still |
Line 474... | Line 457... | ||
474 | @@: |
457 | @@: |
475 | 458 | ||
Line 493... | Line 476... | ||
493 | @@: |
476 | @@: |
494 | cmp ah,33 ;Ctrl+F |
477 | cmp ah,33 ;Ctrl+F |
495 | jne @f |
478 | jne @f |
496 | cmp byte[panel_id],TE_PANEL_FIND |
479 | cmp byte[panel_id],TE_PANEL_FIND |
497 | je @f |
480 | je @f |
498 | call but_find |
481 | stdcall but_find, tedit0 |
499 | @@: |
482 | @@: |
500 | cmp ah,44 ;Ctrl+Z |
483 | cmp ah,44 ;Ctrl+Z |
501 | je but_undo |
484 | je but_undo |
502 | cmp ah,46 ;Ctrl+C |
485 | cmp ah,46 ;Ctrl+C |
503 | jne @f |
486 | jne @f |
Line 532... | Line 515... | ||
532 | @@: |
515 | @@: |
533 | cmp ah,80 ;Shift+Down |
516 | cmp ah,80 ;Shift+Down |
534 | jne @f |
517 | jne @f |
535 | call sel_KeyDown |
518 | call sel_KeyDown |
536 | @@: |
519 | @@: |
537 | ;mov [dragk],1 ;íà÷èíàåì âûäåëåíèå îò êëàâèàòóðû |
520 | ;mov [dragk],1 ; ç¨ ¥¬ ¢ë¤¥«¥¨¥ ®â ª« ¢¨ âãàë |
538 | jmp .key_MoveCur |
521 | jmp .key_MoveCur |
539 | .key_Shift: |
522 | .key_Shift: |
540 | ;------------------------------------------------- |
523 | ;------------------------------------------------- |
541 | cmp ah,72 ;178 ;Up |
524 | cmp ah,72 ;178 ;Up |
542 | jne @f |
525 | jne @f |
543 | push dx |
526 | push dx |
544 | call draw_cursor_sumb |
527 | stdcall draw_cursor_sumb, tedit0 |
545 | call CurMoveUp |
528 | call CurMoveUp |
546 | cmp dl,8 |
529 | cmp dl,8 |
547 | jne .no_red_0 |
530 | jne .no_red_0 |
548 | call OnInitialUpdate |
531 | call OnInitialUpdate |
549 | call draw_main_win |
532 | stdcall draw_main_win, tedit0 |
550 | pop dx |
533 | pop dx |
551 | jmp @f |
534 | jmp @f |
552 | .no_red_0: |
535 | .no_red_0: |
553 | call draw_main_cursor |
536 | stdcall draw_main_cursor, tedit0 |
554 | pop dx |
537 | pop dx |
555 | mov [dragk],0 ;çàêàí÷èâàåì âûäåëåíèå îò êëàâèàòóðû |
538 | mov [dragk],0 ;§ ª 稢 ¥¬ ¢ë¤¥«¥¨¥ ®â ª« ¢¨ âãàë |
556 | @@: |
539 | @@: |
557 | cmp ah,80 ;177 ;Down |
540 | cmp ah,80 ;177 ;Down |
558 | jne @f |
541 | jne @f |
559 | push dx |
542 | push dx |
560 | call draw_cursor_sumb |
543 | stdcall draw_cursor_sumb, tedit0 |
561 | call CurMoveDown |
544 | call CurMoveDown |
562 | cmp dl,8 |
545 | cmp dl,8 |
563 | jne .no_red_1 |
546 | jne .no_red_1 |
564 | call OnInitialUpdate |
547 | call OnInitialUpdate |
565 | call draw_main_win |
548 | stdcall draw_main_win, tedit0 |
566 | pop dx |
549 | pop dx |
567 | jmp @f |
550 | jmp @f |
568 | .no_red_1: |
551 | .no_red_1: |
569 | call draw_main_cursor |
552 | stdcall draw_main_cursor, tedit0 |
570 | pop dx |
553 | pop dx |
571 | mov [dragk],0 ;çàêàí÷èâàåì âûäåëåíèå îò êëàâèàòóðû |
554 | mov [dragk],0 ;§ ª 稢 ¥¬ ¢ë¤¥«¥¨¥ ®â ª« ¢¨ âãàë |
572 | @@: |
555 | @@: |
573 | cmp ah,75 ;176 ;Left |
556 | cmp ah,75 ;176 ;Left |
574 | jne @f |
557 | jne @f |
575 | push dx |
558 | push dx |
576 | call draw_cursor_sumb |
559 | stdcall draw_cursor_sumb, tedit0 |
577 | call CurMoveLeft |
560 | call CurMoveLeft |
578 | cmp dl,8 |
561 | cmp dl,8 |
579 | jne .no_red_2 |
562 | jne .no_red_2 |
580 | call OnInitialUpdate |
563 | call OnInitialUpdate |
581 | call draw_main_win |
564 | stdcall draw_main_win, tedit0 |
582 | pop dx |
565 | pop dx |
583 | jmp @f |
566 | jmp @f |
584 | .no_red_2: |
567 | .no_red_2: |
585 | call draw_main_cursor |
568 | stdcall draw_main_cursor, tedit0 |
586 | pop dx |
569 | pop dx |
587 | mov [dragk],0 ;çàêàí÷èâàåì âûäåëåíèå îò êëàâèàòóðû |
570 | mov [dragk],0 ;§ ª 稢 ¥¬ ¢ë¤¥«¥¨¥ ®â ª« ¢¨ âãàë |
588 | @@: |
571 | @@: |
589 | cmp ah,77 ;179 ;Right |
572 | cmp ah,77 ;179 ;Right |
590 | jne @f |
573 | jne @f |
591 | push dx |
574 | push dx |
592 | call draw_cursor_sumb |
575 | stdcall draw_cursor_sumb, tedit0 |
593 | call CurMoveRight |
576 | call CurMoveRight |
594 | cmp dl,8 |
577 | cmp dl,8 |
595 | jne .no_red_3 |
578 | jne .no_red_3 |
596 | call OnInitialUpdate |
579 | call OnInitialUpdate |
597 | call draw_main_win |
580 | stdcall draw_main_win, tedit0 |
598 | pop dx |
581 | pop dx |
599 | jmp @f |
582 | jmp @f |
600 | .no_red_3: |
583 | .no_red_3: |
601 | call draw_main_cursor |
584 | stdcall draw_main_cursor, tedit0 |
602 | pop dx |
585 | pop dx |
603 | mov [dragk],0 ;çàêàí÷èâàåì âûäåëåíèå îò êëàâèàòóðû |
586 | mov [dragk],0 ;§ ª 稢 ¥¬ ¢ë¤¥«¥¨¥ ®â ª« ¢¨ âãàë |
604 | @@: |
587 | @@: |
605 | cmp ah,71 ;180 ;Home |
588 | cmp ah,71 ;180 ;Home |
606 | jne @f |
589 | jne @f |
607 | push dx |
590 | push dx |
608 | call draw_cursor_sumb |
591 | stdcall draw_cursor_sumb, tedit0 |
609 | call CurMoveX_FirstChar |
592 | call CurMoveX_FirstChar |
610 | cmp dl,8 |
593 | cmp dl,8 |
611 | jne .no_red_4 |
594 | jne .no_red_4 |
612 | call OnInitialUpdate |
595 | call OnInitialUpdate |
613 | call draw_main_win |
596 | stdcall draw_main_win, tedit0 |
614 | pop dx |
597 | pop dx |
615 | jmp @f |
598 | jmp @f |
616 | .no_red_4: |
599 | .no_red_4: |
617 | call draw_main_cursor |
600 | stdcall draw_main_cursor, tedit0 |
618 | pop dx |
601 | pop dx |
619 | mov [dragk],0 ;çàêàí÷èâàåì âûäåëåíèå îò êëàâèàòóðû |
602 | mov [dragk],0 ;§ ª 稢 ¥¬ ¢ë¤¥«¥¨¥ ®â ª« ¢¨ âãàë |
620 | @@: |
603 | @@: |
621 | cmp ah,79 ;181 ;End |
604 | cmp ah,79 ;181 ;End |
622 | jne @f |
605 | jne @f |
623 | push dx |
606 | push dx |
624 | call draw_cursor_sumb |
607 | stdcall draw_cursor_sumb, tedit0 |
625 | call CurMoveX_LastChar |
608 | call CurMoveX_LastChar |
626 | cmp dl,8 |
609 | cmp dl,8 |
627 | jne .no_red_5 |
610 | jne .no_red_5 |
628 | call OnInitialUpdate |
611 | call OnInitialUpdate |
629 | call draw_main_win |
612 | stdcall draw_main_win, tedit0 |
630 | pop dx |
613 | pop dx |
631 | jmp @f |
614 | jmp @f |
632 | .no_red_5: |
615 | .no_red_5: |
633 | call draw_main_cursor |
616 | stdcall draw_main_cursor, tedit0 |
634 | pop dx |
617 | pop dx |
635 | mov [dragk],0 ;çàêàí÷èâàåì âûäåëåíèå îò êëàâèàòóðû |
618 | mov [dragk],0 ;§ ª 稢 ¥¬ ¢ë¤¥«¥¨¥ ®â ª« ¢¨ âãàë |
636 | @@: |
619 | @@: |
637 | cmp ah,73 ;184 ;PageUp |
620 | cmp ah,73 ;184 ;PageUp |
638 | jne @f |
621 | jne @f |
639 | push dx |
622 | push dx |
640 | call CurMovePageUp |
623 | call CurMovePageUp |
641 | cmp dl,0 |
624 | cmp dl,0 |
642 | pop dx |
625 | pop dx |
643 | je @f |
626 | je @f |
644 | call OnInitialUpdate |
627 | call OnInitialUpdate |
645 | call draw_main_win |
628 | stdcall draw_main_win, tedit0 |
646 | @@: |
629 | @@: |
647 | cmp ah,81 ;183 ;PageDown |
630 | cmp ah,81 ;183 ;PageDown |
648 | jne @f |
631 | jne @f |
649 | push dx |
632 | push dx |
650 | call CurMovePageDown |
633 | call CurMovePageDown |
651 | cmp dl,0 |
634 | cmp dl,0 |
652 | pop dx |
635 | pop dx |
653 | je @f |
636 | je @f |
654 | call OnInitialUpdate |
637 | call OnInitialUpdate |
655 | call draw_main_win |
638 | stdcall draw_main_win, tedit0 |
656 | mov [dragk],0 ;çàêàí÷èâàåì âûäåëåíèå îò êëàâèàòóðû |
639 | mov [dragk],0 ;§ ª 稢 ¥¬ ¢ë¤¥«¥¨¥ ®â ª« ¢¨ âãàë |
657 | @@: |
640 | @@: |
658 | ;------------------------------------------------- |
641 | ;------------------------------------------------- |
659 | cmp [keyUpr],0 |
642 | cmp [keyUpr],0 |
660 | jne still |
643 | jne still |
661 | .key_MoveCur: |
644 | .key_MoveCur: |
Line 666... | Line 649... | ||
666 | je still |
649 | je still |
667 | cmp ah,0x80 ;if key up |
650 | cmp ah,0x80 ;if key up |
668 | ja still |
651 | ja still |
669 | call KeyConvertToASCII |
652 | call KeyConvertToASCII |
Line 670... | Line 653... | ||
670 | 653 | ||
Line 671... | Line 654... | ||
671 | ;mov [dragk],0 ;çàêàí÷èâàåì âûäåëåíèå îò êëàâèàòóðû |
654 | ;mov [dragk],0 ;§ ª 稢 ¥¬ ¢ë¤¥«¥¨¥ ®â ª« ¢¨ âãàë |
672 | 655 | ||
673 | push ebx |
656 | push ebx |
674 | xor ebx,ebx |
657 | xor ebx,ebx |
Line 690... | Line 673... | ||
690 | .no_ins_mod: |
673 | .no_ins_mod: |
691 | call TextAdd |
674 | call TextAdd |
692 | call draw_but_toolbar |
675 | call draw_but_toolbar |
693 | cmp byte [key_new],13 |
676 | cmp byte [key_new],13 |
694 | jne .dr_m_win |
677 | jne .dr_m_win |
695 | call draw_main_win |
678 | stdcall draw_main_win, tedit0 |
696 | jmp .dr_cur_l |
679 | jmp .dr_cur_l |
697 | .dr_m_win: |
680 | .dr_m_win: |
698 | call draw_cur_line |
681 | stdcall draw_cur_line, tedit0 |
699 | .dr_cur_l: |
682 | .dr_cur_l: |
700 | pop edi esi |
683 | pop edi esi |
701 | @@: |
684 | @@: |
702 | pop ebx |
685 | pop ebx |
Line 711... | Line 694... | ||
711 | cmp al,1 |
694 | cmp al,1 |
712 | je .del_one_b |
695 | je .del_one_b |
713 | call TextDel |
696 | call TextDel |
714 | .del_one_b: |
697 | .del_one_b: |
715 | call draw_but_toolbar |
698 | call draw_but_toolbar |
716 | call draw_main_win |
699 | stdcall draw_main_win, tedit0 |
717 | pop bx ax |
700 | pop bx ax |
718 | @@: |
701 | @@: |
Line 719... | Line 702... | ||
719 | 702 | ||
720 | cmp ah,182 ;Delete |
703 | cmp ah,182 ;Delete |
Line 727... | Line 710... | ||
727 | cmp al,1 |
710 | cmp al,1 |
728 | je .del_one_d |
711 | je .del_one_d |
729 | call TextDel |
712 | call TextDel |
730 | .del_one_d: |
713 | .del_one_d: |
731 | call draw_but_toolbar |
714 | call draw_but_toolbar |
732 | call draw_main_win |
715 | stdcall draw_main_win, tedit0 |
733 | pop bx ax |
716 | pop bx ax |
734 | @@: |
717 | @@: |
Line 735... | Line 718... | ||
735 | 718 | ||
736 | cmp ah,185 ;Ins |
719 | cmp ah,185 ;Ins |
737 | jne @f |
720 | jne @f |
738 | call draw_cursor_sumb |
721 | stdcall draw_cursor_sumb, tedit0 |
739 | xor [curMod],1 |
722 | xor [curMod],1 |
740 | call draw_main_cursor |
723 | stdcall draw_main_cursor, tedit0 |
Line 741... | Line 724... | ||
741 | @@: |
724 | @@: |
Line 742... | Line 725... | ||
742 | 725 | ||
743 | jmp still |
726 | jmp still |
744 | 727 | ||
745 | button: |
728 | button: |
746 | ; cmp [menu_active],1 ;åñëè íàæàëè ìåíþ, òî ñíà÷àëà ðåàêöèÿ íà ìåíþ |
729 | ; cmp [menu_active],1 ;¥á«¨ ¦ «¨ ¬¥î, â® á ç « ॠªæ¨ï ¬¥î |
747 | ; jne @f ;mouse.menu_bar_1 |
730 | ; jne @f ;mouse.menu_bar_1 |
Line 748... | Line 731... | ||
748 | ; mov [menu_active],0 |
731 | ; mov [menu_active],0 |
749 | ; jmp still |
732 | ; jmp still |
750 | ; @@: |
733 | ; @@: |
751 | 734 | ||
752 | mcall 17 ;ïîëó÷èòü êîä íàæàòîé êíîïêè |
735 | mcall 17 ;¯®«ãç¨âì ª®¤ ¦ ⮩ ª®¯ª¨ |
753 | cmp ah,3 |
736 | cmp ah,3 |
Line 771... | Line 754... | ||
771 | call but_Copy |
754 | call but_Copy |
772 | @@: |
755 | @@: |
773 | cmp ah,9 |
756 | cmp ah,9 |
774 | jz but_paste |
757 | jz but_paste |
775 | cmp ah,10 |
758 | cmp ah,10 |
776 | jz but_find |
759 | jne @f |
- | 760 | stdcall but_find, tedit0 |
|
- | 761 | @@: |
|
777 | cmp ah,11 |
762 | cmp ah,11 |
778 | jz but_replace |
763 | jz but_replace |
779 | cmp ah,12 |
764 | cmp ah,12 |
780 | jz but_find_key_w |
765 | jz but_find_key_w |
781 | cmp ah,13 |
766 | cmp ah,13 |
Line 791... | Line 776... | ||
791 | cmp ah,18 |
776 | cmp ah,18 |
792 | jz but_sumb_invis |
777 | jz but_sumb_invis |
793 | cmp ah,19 |
778 | cmp ah,19 |
794 | jz but_k_words_show |
779 | jz but_k_words_show |
795 | cmp ah,20 |
780 | cmp ah,20 |
- | 781 | jne @f |
|
796 | jz but_synt_show |
782 | stdcall but_synt_show, tedit0 |
- | 783 | @@: |
|
Line 797... | Line 784... | ||
797 | 784 | ||
798 | cmp ah,200 |
785 | cmp ah,200 |
799 | jne @f |
786 | jne @f |
800 | call but_OpenSyntax |
787 | call but_OpenSyntax |
Line 822... | Line 809... | ||
822 | call mem_Free |
809 | call mem_Free |
823 | mov ecx,[options_file] |
810 | mov ecx,[options_file] |
824 | call mem_Free |
811 | call mem_Free |
825 | push dword tree1 |
812 | push dword tree1 |
826 | call dword[tl_data_clear] |
813 | call dword[tl_data_clear] |
827 | mcall -1 ;âûõîä èç ïðîãðàììû |
814 | mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë |
Line 828... | Line -... | ||
828 | - | ||
829 | 815 | ||
830 | 816 | ||
Line 831... | Line 817... | ||
831 | txtErrOpen db '¥ ©¤¥ ä ©«, ¯à®¢¥àì⥠¯à ¢¨«ì®áâì ¨¬¥¨',0 |
817 | |
832 | txtErrIni0 db '¥ ®âªàë«áï ä ©« á ¨ª®ª ¬¨',0 |
818 | txtErrIni0 db '¥ ®âªàë«áï ä ©« á ¨ª®ª ¬¨',0 |