Subversion Repositories Kolibri OS

Rev

Rev 7575 | Rev 7577 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. struct symbol
  2.         c db ?    ; +0 ᨬ¢®«
  3.         col db ?  ; +1 梥â
  4.         perv dd ? ; +2
  5.         next dd ? ; +6 㪠§ â¥«¨
  6.         tc dd ?   ;+10 ¢à¥¬. ᮧ¤ ­¨ï
  7.         td dd ?   ;+14 ¢à¥¬. 㤠«¥­¨ï
  8. ends
  9.  
  10. ID_BUT_0 equ 3 ;¬¨­¨¬ «ì­ë© ID ª­®¯ª¨ ­  ¯ ­¥«¨
  11.  
  12. ID_BUT_NEW equ 3
  13. ID_BUT_OPEN equ 4
  14. ID_BUT_SAVE equ 5
  15. ID_BUT_SAVE_AS equ 6
  16. ID_BUT_SELECT equ 7
  17. ID_BUT_CUT equ 8
  18. ID_BUT_COPY equ 9
  19. ID_BUT_PASTE equ 10
  20. ID_BUT_FIND equ 11
  21. ID_BUT_REPLACE equ 12
  22. ID_BUT_KEY_WORDS equ 13
  23. ID_BUT_UPPER equ 14
  24. ID_BUT_LOWER equ 15
  25. ID_BUT_REVERSE equ 16
  26. ID_BUT_UNDO equ 17
  27. ID_BUT_REDO equ 18
  28. ID_BUT_INVISIBLE equ 19
  29. ID_BUT_SYNTAX_LIST equ 20
  30. ID_BUT_SYNTAX_MODE equ 21
  31. ID_BUT_CONVERT_1251_866 equ 22
  32. ID_BUT_CONVERT_866_1251 equ 23
  33.  
  34. macro ini_panel b_key,b_id
  35. {
  36.         stdcall [ini_get_int],file_name,ini_sec_window,b_key,1
  37.         mov byte[panel_but+b_id-ID_BUT_0],al
  38. }
  39.  
  40. bmp_icon dd 0
  41.  
  42. align 16
  43. button:
  44.         mcall SF_GET_BUTTON
  45.         cmp ah,ID_BUT_NEW
  46.         jne @f
  47.                 call ted_but_new_file
  48.                 jmp still
  49.         @@:
  50.         cmp ah,ID_BUT_OPEN
  51.         jne @f
  52.                 call ted_but_open_file
  53.                 jmp still
  54.         @@:
  55.         cmp ah,ID_BUT_SAVE
  56.         jne @f
  57.                 xor eax,eax
  58.                 call ted_but_save_file ;á®åà ­¥­¨¥ ¡¥§ ¤¨ «®£ 
  59.                 jmp still
  60.         @@:
  61.         cmp ah,ID_BUT_SAVE_AS
  62.         jne @f
  63.                 xor eax,eax
  64.                 inc eax
  65.                 call ted_but_save_file ;á®åà ­¥­¨¥ á ¤¨ «®£®¬
  66.                 jmp still
  67.         @@:
  68.         cmp ah,ID_BUT_SELECT
  69.         jne @f
  70.                 stdcall [ted_but_select_word], tedit0
  71.                 jmp still
  72.         @@:
  73.         cmp ah,ID_BUT_CUT
  74.         jne @f
  75.                 stdcall [ted_but_cut], tedit0
  76.                 jmp still
  77.         @@:
  78.         cmp ah,ID_BUT_COPY
  79.         jne @f
  80.                 stdcall [ted_but_copy], tedit0
  81.                 jmp still
  82.         @@:
  83.         cmp ah,ID_BUT_PASTE
  84.         jne @f
  85.                 stdcall [ted_but_paste], tedit0
  86.                 jmp still
  87.         @@:
  88.         cmp ah,ID_BUT_FIND
  89.         jne @f
  90.                 call but_panel_find
  91.                 jmp still
  92.         @@:
  93.         cmp ah,ID_BUT_REPLACE
  94.         jne @f
  95.                 call but_panel_replace
  96.                 jmp still
  97.         @@:
  98.         cmp ah,ID_BUT_KEY_WORDS
  99.         jne @f
  100.                 call but_find_key_w
  101.                 jmp still
  102.         @@:
  103.         cmp ah,ID_BUT_UPPER
  104.         jne @f
  105.                 stdcall [ted_but_sumb_upper], tedit0
  106.                 jmp still
  107.         @@:
  108.         cmp ah,ID_BUT_LOWER
  109.         jne @f
  110.                 stdcall [ted_but_sumb_lover], tedit0
  111.                 jmp still
  112.         @@:
  113.         cmp ah,ID_BUT_REVERSE
  114.         jne @f
  115.                 stdcall [ted_but_reverse], tedit0
  116.                 jmp still
  117.         @@:
  118.         cmp ah,ID_BUT_UNDO
  119.         jne @f
  120.                 stdcall [ted_but_undo], tedit0
  121.                 jmp still
  122.         @@:
  123.         cmp ah,ID_BUT_REDO
  124.         jne @f
  125.                 stdcall [ted_but_redo], tedit0
  126.                 jmp still
  127.         @@:
  128.         cmp ah,ID_BUT_INVISIBLE
  129.         jne @f
  130.                 stdcall but_sumb_invis, tedit0
  131.                 jmp still
  132.         @@:
  133.         cmp ah,ID_BUT_SYNTAX_LIST
  134.         jne @f
  135.                 stdcall but_use_syntax, tedit0
  136.                 jmp still
  137.         @@:
  138.         cmp ah,ID_BUT_SYNTAX_MODE
  139.         jne @f
  140.                 stdcall but_panel_choose_syntax, tedit0
  141.                 jmp still
  142.         @@:
  143.         cmp ah,ID_BUT_CONVERT_1251_866
  144.         jne @f
  145.                 stdcall [ted_but_convert_by_table],tedit0,tbl_1251_866
  146.                 jmp still
  147.         @@:
  148.         cmp ah,ID_BUT_CONVERT_866_1251
  149.         jne @f
  150.                 stdcall [ted_but_convert_by_table],tedit0,tbl_866_1251
  151.                 jmp still
  152.         @@:
  153.  
  154.         cmp ah,200
  155.         jne @f
  156.                 stdcall ted_but_open_syntax, tedit0
  157.                 jmp still
  158.         @@:
  159.         cmp ah,201 ;§ ¬¥­¨âì
  160.         jne .no_find
  161.                 call get_find_options
  162.                 stdcall [ted_but_find], tedit0, eax
  163.                 jmp still
  164.         .no_find:
  165.         cmp ah,202 ;§ ¬¥­¨âì ¢á¥
  166.         jne .no_change
  167.                 call get_find_options
  168.                 stdcall [ted_but_replace], tedit0, buf_replace, eax, 1
  169.                 or eax,eax
  170.                 jz still
  171.                 stdcall [ted_draw], tedit0
  172.                 jmp still
  173.         .no_change:
  174.         cmp ah,203
  175.         jne .no_change_a
  176.                 call but_replace_all
  177.                 jmp still
  178.         .no_change_a:
  179.  
  180.         cmp ah,1
  181.         jne @f
  182.                 call ted_Exit
  183.                 jmp still
  184.         @@:
  185.  
  186.         cmp ah,199
  187.         jne still
  188.                 call ted_Exit
  189.         jmp still
  190.  
  191. align 4
  192. ted_Exit:
  193.         cmp dword[wnd_k_words_run],0
  194.         je @f
  195.                 push ebx ecx
  196.                 mcall SF_SYSTEM, SSF_TERMINATE_THREAD_ID,[wnd_k_words_run]
  197.                 pop ecx ebx
  198.                 mov dword[wnd_k_words_run],0
  199.                 ;test eax,eax
  200.         @@:
  201.         cmp dword[exit_code],1
  202.         je @f
  203.         stdcall [ted_can_save], tedit0
  204.         cmp al,1
  205.         jne @f
  206.                 stdcall [mb_create],msgbox_2,thread ;message: save buf in file?
  207.                 stdcall [mb_setfunctions],msgbox_2E_funct
  208.                 ret
  209.         @@:
  210.         stdcall mem.Free,[bmp_icon]
  211.         cmp dword[unpac_mem],0
  212.         je @f
  213.                 stdcall mem.Free,[unpac_mem]
  214.         @@:
  215.         stdcall [ted_delete], tedit0
  216.         stdcall [tl_data_clear], tree1
  217.         mcall SF_TERMINATE_PROCESS ;¢ë室 ¨§ ¯à®£à ¬¬ë
  218.         ;ret
  219.  
  220. align 4
  221. get_find_options:
  222.         xor eax,eax
  223.         cmp [opt_gr1],opt1
  224.         je @f
  225.                 inc eax
  226.         cmp [opt_gr1],opt2
  227.         je @f
  228.                 inc eax
  229.         @@:
  230.         ret
  231.  
  232. align 4
  233. proc but_replace_all uses ebx ecx edx
  234.         call get_find_options
  235.         mov ebx,eax
  236.         stdcall [ted_but_replace], tedit0, buf_replace, ebx, 1
  237.         xor edx,edx
  238.         or eax,eax
  239.         jz @f
  240.         inc edx
  241.         mov ecx,0x1000
  242.         .cycle0:
  243.                 stdcall [ted_but_replace], tedit0, buf_replace, ebx, 0
  244.                 or eax,eax
  245.                 jz @f
  246.                 inc edx
  247.                 loop .cycle0
  248.         @@:
  249.         stdcall [ted_draw], tedit0
  250.         mov eax,edx
  251.         ret
  252. endp
  253.  
  254. ;input:
  255. ; al = ª®¤ ®è¨¡ª¨
  256. align 4
  257. ted_on_init_synt_err:
  258.         mov byte[msgbox_3.err],'0'
  259.         add byte[msgbox_3.err],al
  260.         stdcall [mb_create],msgbox_3,thread ;message: Can-t open color options file!
  261.         ret
  262.  
  263. align 4
  264. ted_but_new_file:
  265.         push eax ebx
  266.         stdcall [ted_can_save], tedit0
  267.         cmp al,1
  268.         jne @f
  269.                 stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
  270.                 stdcall [mb_setfunctions],msgbox_2N_funct
  271.                 jmp .ret_f
  272.         @@:
  273.         call On_NewFile
  274.         .ret_f:
  275.                 mov byte[openfile_path],0
  276.                 mcall SF_SET_CAPTION,1,hed
  277.         pop ebx eax
  278.         ret
  279.  
  280. align 4
  281. On_NewFile:
  282.         stdcall [ted_clear], tedit0,1
  283.         call draw_but_toolbar
  284.         stdcall [ted_draw], tedit0
  285.         mov dword[openfile_path],0
  286.         ret
  287.  
  288. align 4
  289. On_SaveAndNewFile:
  290.         push edi
  291.         mov edi, tedit0
  292.  
  293.         call ted_but_save_file
  294.         cmp ted_err_save,0
  295.         jne @f
  296.                 call On_NewFile
  297.         @@:
  298.         pop edi
  299.         ret
  300.  
  301. align 4
  302. On_SaveAndOpenFile:
  303.         push edi
  304.         mov edi, tedit0
  305.  
  306.         call ted_but_save_file
  307.         cmp ted_err_save,0
  308.         jne @f
  309.                 call ted_but_open_file.no_msg
  310.         @@:
  311.         pop edi
  312.         ret
  313.  
  314. align 4
  315. On_SaveAndExit:
  316.         push edi
  317.         mov edi, tedit0
  318.  
  319.         call ted_but_save_file
  320.         cmp ted_err_save,0
  321.         jne @f
  322.                 mov dword[exit_code],1
  323.         @@:
  324.         pop edi
  325.         ret
  326.  
  327. align 4
  328. On_Exit:
  329.         mov dword[exit_code],1
  330.         ret
  331.  
  332. ;description:
  333. ; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  ¡¥§ ®ª­  á®®¡é¥­¨ï
  334. align 4
  335. proc but_no_msg_OpenFile uses eax ebx esi
  336.         stdcall [ted_open_file], tedit0,run_file_70,openfile_path
  337.         call ted_messages_after_open_file
  338.  
  339.         mov esi,openfile_path
  340.         call strlen
  341.         add esi,eax
  342.         @@: ;横« ¤«ï ¯®¨áª  ­ ç «  ¨¬¥­¨ ä ©« 
  343.                 dec esi
  344.                 cmp byte[esi],'/'
  345.                 je @f
  346.                 cmp byte[esi],0x5c ;'\'
  347.                 je @f
  348.                 cmp esi,openfile_path
  349.                 jg @b
  350.         @@:
  351.         inc esi
  352.         call strlen
  353.         cmp eax,255
  354.         jle @f
  355.                 mov eax,255
  356.         @@:
  357.         inc eax ;¤«ï 0 ¢ ª®­æ¥ áâப¨
  358.         stdcall mem_cpy, filename_area,esi,eax ;ª®¯¨à㥬 ¨¬ï ä ©«  ¢ ¤¨ «®£ á®åà ­¥­¨ï
  359.         ret
  360. endp
  361.  
  362. ;description:
  363. ; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  á ¢®§¬®¦­ë¬ ®ª­®¬ á®®¡é¥­¨ï (® ¢®§¬®¦­®á⨠®â¬¥­¨âì ®âªàë⨥)
  364. align 4
  365. ted_but_open_file:
  366.         pushad
  367.  
  368.         stdcall [ted_can_save], tedit0
  369.         cmp al,1
  370.         jne @f
  371.                 stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
  372.                 stdcall [mb_setfunctions],msgbox_2O_funct
  373.                 jmp .ret_f
  374.         .no_msg: ;¬¥âª  ¤«ï ¢ë§®¢  ä㭪樨 ç¥à¥§ ª­®¯ªã ¢ á®®¡é¥­¨¨ msgbox_5
  375.                 pushad
  376.         @@:
  377.  
  378.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  379.         mov [OpenDialog_data.type],0
  380.         stdcall [OpenDialog_Start],OpenDialog_data
  381.         cmp [OpenDialog_data.status],2
  382.         jne @f
  383.                 stdcall mem_spac, msgbox_9.fdp,100
  384.                 mov esi,file_name
  385.                 call strlen
  386.                 cmp eax,100
  387.                 jle .no_crop
  388.                         mov eax,100
  389.                 .no_crop:
  390.                 stdcall mem_cpy, msgbox_9.fdp,esi,eax
  391.                 stdcall [mb_create],msgbox_9,thread ;message: error run 'open file dialog'
  392.                 jmp .ret_f
  393.         @@:
  394.         cmp [OpenDialog_data.status],1
  395.         jne .ret_f
  396.                 stdcall auto_open_syntax,[OpenDialog_data.openfile_path]
  397.                 stdcall [ted_open_file], tedit0,run_file_70,openfile_path
  398.                 call ted_messages_after_open_file
  399.         .ret_f:
  400.         popad
  401.         ret
  402.  
  403. proc auto_open_syntax, of_path:dword
  404. pushad
  405.         ;¨é¥¬ ¥áâì «¨ ä ©« ¯®¤á¢¥âª¨ ¤«ï ®âªà뢠¥¬®£® ⥪á⮢®£® ä ©« 
  406.         mov esi,[of_path]
  407.         call strlen
  408.         mov edx,[of_path]
  409.         add edx,eax
  410.         .f_beg:
  411.         cmp byte[edx],'.'
  412.         je .found
  413.                 dec edx
  414.                 cmp edx,[of_path]
  415.                 jg .f_beg
  416.         .found:
  417.         inc edx ;edx - 㪠§ â¥«ì ­  à áè¨à¥­¨¥ ®âªàë⮣® ä ©« 
  418.  
  419.         mov ebx,synt_auto_open
  420.         .cycle_0:
  421.                 add ebx,32
  422.                 stdcall strcmp,ebx,edx ;áà ¢­¨¢ ¥¬ à áè¨à¥­¨¥ ®âªàë⮣® ä ©«  á® §­ ç¥­¨ï¬¨ ®âªàëâ묨 á ini ä ©« 
  423.                 test eax,eax
  424.                 jz .ok
  425.                 add ebx,32
  426.                 cmp byte[ebx],0
  427.                 jne .cycle_0
  428.         jmp .end_0
  429.         .ok: ;®âªàë⨥ ä ©«  ¯®¤á¢¥âª¨ ¢ § ¢¨á¨¬®á⨠®â ­ ©¤¥­­®£® à áè¨à¥­¨ï
  430.                 sub ebx,32
  431.                 stdcall open_unpac_synt_file,ebx
  432.         .end_0:
  433. popad
  434.         ret
  435. endp
  436.  
  437. ;input:
  438. ; eax ¥á«¨ à ¢¥­: 0 - á®åà ­¥­¨¥ ¡¥§ ¤¨ «®£ , 1 - á®åà ­¥­¨¥ á ¤¨ «®£®¬
  439. ;description:
  440. ; äã­ªæ¨ï á®åà ­¥­¨ï ä ©« 
  441. align 4
  442. proc ted_but_save_file
  443.         or eax,eax
  444.         jnz .init_dlg
  445.                 ; á®å࠭塞 ¡¥§ ¢ë§®¢  ¤¨ «®£®¢®£® ®ª­ 
  446.                 cmp byte[openfile_path],0
  447.                 jne @f
  448.         .init_dlg:
  449.                 ; ¢ë§®¢ ¤¨ «®£®¢®£® ®ª­  ¤«ï á®åà ­¥­¨ï ä ©« 
  450.                 copy_path open_dialog_name,communication_area_default_path,file_name,0
  451.                 mov [OpenDialog_data.type],1
  452.                 stdcall [OpenDialog_Start],OpenDialog_data
  453.                 cmp [OpenDialog_data.status],1 ;if status==1 then save
  454.                 jne .end_save
  455.         @@:
  456.                 stdcall [ted_save_file],tedit0,run_file_70,openfile_path
  457.         .end_save:
  458.         ret
  459. endp
  460.  
  461. ;description:
  462. ; ª®¯¨à®¢ ­¨¥ ¯ ¬ïâ¨
  463. align 4
  464. proc mem_cpy uses ecx esi edi, destination:dword, source:dword, len:dword
  465.         cld
  466.         mov esi,[source]
  467.         mov edi,[destination]
  468.         mov ecx,[len]
  469.         rep movsb
  470.         ret
  471. endp
  472.  
  473. ;description:
  474. ; § ¯®«­¥­¨¥ ¯ ¬ï⨠¯à®¡¥« ¬¨
  475. align 4
  476. proc mem_spac uses eax ecx edi, mem:dword, len:dword
  477.         cld
  478.         mov al,' '
  479.         mov edi,[mem]
  480.         mov ecx,[len]
  481.         repne stosb
  482.         ret
  483. endp
  484.  
  485. ;input:
  486. ; eax = ª®¤ ®è¨¡ª¨
  487. ; ebx = ª®««¨ç¥á⢮ ¯à®ç¨â ­­ëå ¡ ©â
  488. align 4
  489. ted_messages_after_open_file:
  490.         push ecx edi
  491.         cmp eax,0
  492.         je @f
  493.                 cmp ax,10
  494.                 jl .zifra_0_9
  495.                         mov al,'?'
  496.                         sub ax,48
  497.                 .zifra_0_9:
  498.                 add ax,48
  499.  
  500.                 mov byte[msgbox_4.err],al
  501.                 stdcall [mb_create],msgbox_4,thread ;message: Can-t open text file!
  502.                 jmp .ret_f
  503.         @@:
  504.         cmp ebx,-1
  505.         je .ret_f
  506.                 ;if open file
  507.                 mov edi,tedit0
  508.                 mov ecx,ted_max_chars
  509.                 sub ecx,2 ;ecx = ¬ ªá¨¬ «ì­®¥ ç¨á«® ¡ ©â, ¤«ï ª®â®àëå ¡ë«  ¢ë¤¥«¥­  ¯ ¬ïâì
  510.                 cmp ebx,ecx
  511.                 jl .ret_f
  512.                         stdcall [mb_create],msgbox_1,thread
  513.         .ret_f:
  514.         pop edi ecx
  515.         ret
  516.  
  517. align 4
  518. ted_save_err_msg:
  519.         mov byte[msgbox_6.err],al
  520.         stdcall [mb_create],msgbox_6,thread ;message: Can-t save text file!
  521.         ret
  522.  
  523. ;description:
  524. ; äã­ªæ¨ï ­ ¦ â¨ï ­  ª­®¯ªã [à¨¬¥­¨âì] ¢ ¯ ­¥«¨ ᨭ⠪á¨á 
  525. align 4
  526. proc ted_but_open_syntax uses eax ebx ecx edi, edit:dword
  527.         mov edi,dword[edit]
  528.         cmp ted_panel_id,TED_PANEL_SYNTAX
  529.         jne @f
  530.                 stdcall dword[tl_node_get_data], tree1
  531.                 mov [fn_col_option],eax
  532.                 stdcall open_unpac_synt_file,eax
  533.                 cmp ebx,-1
  534.                 je @f
  535.  
  536.                 call [ted_text_colored]
  537.                 stdcall [ted_draw],edi
  538.         @@:
  539.         ret
  540. endp
  541.  
  542. ;®âªàë⨥ ¨ à á¯ ª®¢ª  ä ©«  ¯®¤á¢¥âª¨ ᨭ⠪á¨á 
  543. ;input:
  544. ; f_name - 㪠§ â¥«ì ­  ¨¬ï ®âªà뢠¥¬®£® ä ©«  ᨭ⠪á¨á  (¡¥§ ¯ã⨠¨ ¯ ¯ª¨ info)
  545. ;output:
  546. ; ebx - ç¨á«® ¯à®ç¨â ­­ëå ¡ ©â ¨§ ä ©« 
  547. ; ecx - à §àãè ¥âáï
  548. align 4
  549. proc open_unpac_synt_file uses eax edi esi, f_name:dword
  550.         mov ebx,[f_name]
  551.         mov edi,last_open_synt_file
  552.         stdcall strcmp,ebx,edi ;áà ¢­¨¢ ¥¬ ¨¬ï ¯®¤ª«î祭­®£® ä ©«  á ¯®¤ª«î祭­ë¬ à ­¥¥ ä ©«®¬
  553.         test eax,eax
  554.         jz @f
  555.  
  556.         ;ª®¯¨à㥬 ¨¬ï ¯®¤ª«î祭­®£® ä ©«  (¤«ï ¨§¡¥¦ ­¨ï ¯®¢â®à­ëå ¯®¤ª«î祭¨©)
  557.         mov esi,ebx
  558.         mov ecx,32/4
  559.         cld
  560.         rep movsd
  561.  
  562.         copy_path ebx,fn_syntax_dir,syntax_path,0
  563.         copy_path syntax_path,sys_path,file_name,0
  564.         mov edi, tedit0
  565.         mov [run_file_70.Function], SSF_READ_FILE
  566.         mov [run_file_70.Position], 0
  567.         mov [run_file_70.Flags], 0
  568.         mov ecx, ted_syntax_file_size
  569.         mov dword[run_file_70.Count], ecx
  570.         m2m dword[run_file_70.Buffer], ted_syntax_file
  571.         mov byte[run_file_70+20], 0
  572.         mov [run_file_70.FileName], file_name
  573.         mcall SF_FILE, run_file_70
  574.         cmp ebx,-1
  575.         jne .end_0
  576.                 call ted_on_init_synt_err
  577.                 jmp @f
  578.         .end_0:
  579.                 mov eax,ted_syntax_file
  580.                 cmp dword[eax],'KPCK'
  581.                 jne .end_unpack
  582.                 cmp dword[eax+4],ecx
  583.                 jg @f ;¥á«¨ ¤«ï à á¯ ª®¢ ­®£® ä ©«  ­¥ 墠⠥⠢뤥«¥­­®© ¯ ¬ïâ¨
  584.                 cmp dword[unpac_mem],0
  585.                 jne .end_1
  586.                         ;¢ë¤¥«¥­¨¥ ¯ ¬ï⨠¤«ï à á¯ ª®¢ª¨ ä ©« 
  587.                         stdcall mem.Alloc,ecx
  588.                         mov [unpac_mem],eax
  589.                 .end_1:
  590.                 stdcall unpack,ted_syntax_file,[unpac_mem]
  591.                 mov edi,ted_syntax_file
  592.                 mov esi,[unpac_mem]
  593.                 mov ecx,[edi+4]
  594.                 cld
  595.                 rep movsb
  596.                 .end_unpack:
  597.                 stdcall [ted_init_syntax_file], tedit0
  598.         @@:
  599.         ret
  600. endp
  601.  
  602. ;description:
  603. ; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ ¯®¨áª 
  604. align 4
  605. proc but_panel_find uses edi
  606.         mov edi,tedit0
  607.  
  608.         cmp ted_panel_id,TED_PANEL_NULL
  609.         je @f
  610.                 mov ted_panel_id,TED_PANEL_NULL
  611.                 mov ted_wnd_l,0
  612.                 jmp .e_if
  613.         @@:
  614.                 mov ted_panel_id,TED_PANEL_FIND
  615.                 mov ted_wnd_l,TED_PANEL_WIDTH
  616.         .e_if:
  617.         call EvSize
  618.         stdcall [ted_draw],edi
  619.         ret
  620. endp
  621.  
  622. ;description:
  623. ; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ § ¬¥­ë
  624. align 4
  625. proc but_panel_replace uses edi
  626.         mov edi,tedit0
  627.  
  628.         cmp ted_panel_id,TED_PANEL_NULL
  629.         je @f
  630.                 mov ted_panel_id,TED_PANEL_NULL
  631.                 mov ted_wnd_l,0
  632.                 jmp .e_if
  633.         @@:
  634.                 mov ted_panel_id,TED_PANEL_REPLACE
  635.                 mov ted_wnd_l,TED_PANEL_WIDTH
  636.         .e_if:
  637.         call EvSize
  638.         stdcall [ted_draw],edi
  639.         ret
  640. endp
  641.  
  642. ;description:
  643. ; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ á ä ©« ¬¨ ᨭ⠪á¨á 
  644. align 4
  645. proc but_panel_choose_syntax uses edi, edit:dword
  646.         mov edi,[edit]
  647.  
  648.         cmp ted_panel_id,TED_PANEL_NULL
  649.         je @f
  650.                 mov ted_panel_id,TED_PANEL_NULL
  651.                 mov ted_wnd_l,0
  652.                 jmp .e_if
  653.         @@:
  654.                 mov ted_panel_id,TED_PANEL_SYNTAX
  655.                 mov ted_wnd_l,TED_PANEL_WIDTH
  656.         .e_if:
  657.         call EvSize
  658.         stdcall [ted_draw],edi
  659.         ret
  660. endp
  661.  
  662. align 4
  663. tbl_1251_866:
  664. rb 128
  665. db   0,  0,  0,  0,  0,  0,  0,  0,  0,0,0,0,0,0,0,0 ;128
  666. db   0,  0,  0,  0,  0,  0,  0,  0,  0,0,0,0,0,0,0,0 ;144
  667. db   0,  0,  0,  0,  0,  0,  0,  0,240,0,0,0,0,0,0,0 ;160
  668. db   0,  0,  0,  0,  0,  0,  0,  0,241,0,0,0,0,0,0,0 ;176
  669. db 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143 ;192
  670. db 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159 ;208
  671. db 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175 ;224
  672. db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;240
  673.  
  674. align 4
  675. tbl_866_1251:
  676. rb 128
  677. db 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207 ;128
  678. db 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223 ;144
  679. db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;160
  680. db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;176
  681. db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;192
  682. db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;208
  683. db 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 ;224
  684. db 168,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;240
  685.  
  686. align 4
  687. ted_on_find_err:
  688.         stdcall [mb_create],msgbox_7,thread ;message: Can not find text
  689.         ret
  690.  
  691. ;description:
  692. ; äã­ªæ¨ï ¯®¨áª  ¨­ä®à¬ æ¨¨ ¢ ᯨ᪥ ª«î祢ëå á«®¢
  693. align 4
  694. but_find_key_w:
  695.         cmp dword[wnd_k_words_run],0
  696.         jne @f
  697.                 pushad
  698.                 mcall SF_CREATE_THREAD,1,prop_start,thread_coords
  699.                 mov dword[wnd_k_words_run],eax
  700.                 popad
  701.         @@:
  702.         ret
  703.  
  704. ;description:
  705. ; ¢ë¤¥«¥­¨¥/áªàë⨥ ­¥¯¥ç â ¥¬ëå ᨬ¢®«®¢
  706. align 4
  707. proc but_sumb_invis uses edi, edit:dword
  708.         mov edi,dword[edit]
  709.  
  710.         xor ted_mode_invis,1
  711.         call draw_but_toolbar
  712.         stdcall [ted_draw],edi
  713.         ret
  714. endp
  715.  
  716. ;description:
  717. ; ¢ë¤¥«¥­¨¥/áªàë⨥ ª«î祢ëå á«®¢
  718. align 4
  719. proc but_use_syntax uses edi, edit:dword
  720.         mov edi,dword[edit]
  721.  
  722.         xor ted_mode_color,1
  723.         cmp ted_mode_color,0
  724.         je @f
  725.                 call [ted_text_colored]
  726.         @@:
  727.         call draw_but_toolbar
  728.         stdcall [ted_draw],edi
  729.         ret
  730. endp
  731.  
  732.