Subversion Repositories Kolibri OS

Rev

Rev 7571 | Rev 7575 | 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 ted_but_find
  91.                 jmp still
  92.         @@:
  93.         cmp ah,ID_BUT_REPLACE
  94.         jne @f
  95.                 call but_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_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 @f
  161.                 stdcall [ted_but_find_next], tedit0
  162.                 jmp still
  163.         @@:
  164.  
  165.         cmp ah,1
  166.         je .exit
  167.  
  168.         cmp ah,199
  169.         je .exit
  170.  
  171.         jmp still
  172. .exit:
  173.         cmp dword[wnd_k_words_run],0
  174.         je @f
  175.                 push ebx ecx
  176.                 mcall SF_SYSTEM, SSF_TERMINATE_THREAD_ID,[wnd_k_words_run]
  177.                 pop ecx ebx
  178.                 test eax,eax
  179.                 jnz still
  180.         @@:
  181.         cmp dword[exit_code],1
  182.         je @f
  183.         stdcall [ted_can_save], tedit0
  184.         cmp al,1
  185.         jne @f
  186.                 stdcall [mb_create],msgbox_2,thread ;message: save buf in file?
  187.                 stdcall [mb_setfunctions],msgbox_2E_funct
  188.                 jmp still
  189.         @@:
  190.         stdcall mem.Free,[bmp_icon]
  191.         cmp dword[unpac_mem],0
  192.         je @f
  193.                 stdcall mem.Free,[unpac_mem]
  194.         @@:
  195.  
  196.         stdcall [ted_delete], tedit0
  197.         stdcall [tl_data_clear], tree1
  198.         mcall SF_TERMINATE_PROCESS ;¢ë室 ¨§ ¯à®£à ¬¬ë
  199.  
  200. ;input:
  201. ; al = ª®¤ ®è¨¡ª¨
  202. align 4
  203. ted_on_init_synt_err:
  204.         mov byte[msgbox_3.err],'0'
  205.         add byte[msgbox_3.err],al
  206.         stdcall [mb_create],msgbox_3,thread ;message: Can-t open color options file!
  207.         ret
  208.  
  209. align 4
  210. ted_but_new_file:
  211.         push eax ebx
  212.         stdcall [ted_can_save], tedit0
  213.         cmp al,1
  214.         jne @f
  215.                 stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
  216.                 stdcall [mb_setfunctions],msgbox_2N_funct
  217.                 jmp .ret_f
  218.         @@:
  219.         call On_NewFile
  220.         .ret_f:
  221.                 mov byte[openfile_path],0
  222.                 mcall SF_SET_CAPTION,1,hed
  223.         pop ebx eax
  224.         ret
  225.  
  226. align 4
  227. On_NewFile:
  228.         stdcall [ted_clear], tedit0,1
  229.         call draw_but_toolbar
  230.         stdcall [ted_draw], tedit0
  231.         mov dword[openfile_path],0
  232.         ret
  233.  
  234. align 4
  235. On_SaveAndNewFile:
  236.         push edi
  237.         mov edi, tedit0
  238.  
  239.         call ted_but_save_file
  240.         cmp ted_err_save,0
  241.         jne @f
  242.                 call On_NewFile
  243.         @@:
  244.         pop edi
  245.         ret
  246.  
  247. align 4
  248. On_SaveAndOpenFile:
  249.         push edi
  250.         mov edi, tedit0
  251.  
  252.         call ted_but_save_file
  253.         cmp ted_err_save,0
  254.         jne @f
  255.                 call ted_but_open_file.no_msg
  256.         @@:
  257.         pop edi
  258.         ret
  259.  
  260. align 4
  261. On_SaveAndExit:
  262.         push edi
  263.         mov edi, tedit0
  264.  
  265.         call ted_but_save_file
  266.         cmp ted_err_save,0
  267.         jne @f
  268.                 mov dword[exit_code],1
  269.         @@:
  270.         pop edi
  271.         ret
  272.  
  273. align 4
  274. On_Exit:
  275.         mov dword[exit_code],1
  276.         ret
  277.  
  278. ;description:
  279. ; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  ¡¥§ ®ª­  á®®¡é¥­¨ï
  280. align 4
  281. proc but_no_msg_OpenFile uses eax ebx esi
  282.         stdcall [ted_open_file], tedit0,run_file_70,openfile_path
  283.         call ted_messages_after_open_file
  284.  
  285.         mov esi,openfile_path
  286.         call strlen
  287.         add esi,eax
  288.         @@: ;横« ¤«ï ¯®¨áª  ­ ç «  ¨¬¥­¨ ä ©« 
  289.                 dec esi
  290.                 cmp byte[esi],'/'
  291.                 je @f
  292.                 cmp byte[esi],0x5c ;'\'
  293.                 je @f
  294.                 cmp esi,openfile_path
  295.                 jg @b
  296.         @@:
  297.         inc esi
  298.         call strlen
  299.         cmp eax,255
  300.         jle @f
  301.                 mov eax,255
  302.         @@:
  303.         inc eax ;¤«ï 0 ¢ ª®­æ¥ áâப¨
  304.         stdcall mem_cpy, filename_area,esi,eax ;ª®¯¨à㥬 ¨¬ï ä ©«  ¢ ¤¨ «®£ á®åà ­¥­¨ï
  305.         ret
  306. endp
  307.  
  308. ;description:
  309. ; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  á ¢®§¬®¦­ë¬ ®ª­®¬ á®®¡é¥­¨ï (® ¢®§¬®¦­®á⨠®â¬¥­¨âì ®âªàë⨥)
  310. align 4
  311. ted_but_open_file:
  312.         pushad
  313.  
  314.         stdcall [ted_can_save], tedit0
  315.         cmp al,1
  316.         jne @f
  317.                 stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
  318.                 stdcall [mb_setfunctions],msgbox_2O_funct
  319.                 jmp .ret_f
  320.         .no_msg: ;¬¥âª  ¤«ï ¢ë§®¢  ä㭪樨 ç¥à¥§ ª­®¯ªã ¢ á®®¡é¥­¨¨ msgbox_5
  321.                 pushad
  322.         @@:
  323.  
  324.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  325.         mov [OpenDialog_data.type],0
  326.         stdcall [OpenDialog_Start],OpenDialog_data
  327.         cmp [OpenDialog_data.status],2
  328.         jne @f
  329.                 stdcall mem_spac, msgbox_9.fdp,100
  330.                 mov esi,file_name
  331.                 call strlen
  332.                 cmp eax,100
  333.                 jle .no_crop
  334.                         mov eax,100
  335.                 .no_crop:
  336.                 stdcall mem_cpy, msgbox_9.fdp,esi,eax
  337.                 stdcall [mb_create],msgbox_9,thread ;message: error run 'open file dialog'
  338.                 jmp .ret_f
  339.         @@:
  340.         cmp [OpenDialog_data.status],1
  341.         jne .ret_f
  342.                 stdcall auto_open_syntax,[OpenDialog_data.openfile_path]
  343.                 stdcall [ted_open_file], tedit0,run_file_70,openfile_path
  344.                 call ted_messages_after_open_file
  345.         .ret_f:
  346.         popad
  347.         ret
  348.  
  349. proc auto_open_syntax, of_path:dword
  350. pushad
  351.         ;¨é¥¬ ¥áâì «¨ ä ©« ¯®¤á¢¥âª¨ ¤«ï ®âªà뢠¥¬®£® ⥪á⮢®£® ä ©« 
  352.         mov esi,[of_path]
  353.         call strlen
  354.         mov edx,[of_path]
  355.         add edx,eax
  356.         .f_beg:
  357.         cmp byte[edx],'.'
  358.         je .found
  359.                 dec edx
  360.                 cmp edx,[of_path]
  361.                 jg .f_beg
  362.         .found:
  363.         inc edx ;edx - 㪠§ â¥«ì ­  à áè¨à¥­¨¥ ®âªàë⮣® ä ©« 
  364.  
  365.         mov ebx,synt_auto_open
  366.         .cycle_0:
  367.                 add ebx,32
  368.                 stdcall strcmp,ebx,edx ;áà ¢­¨¢ ¥¬ à áè¨à¥­¨¥ ®âªàë⮣® ä ©«  á® §­ ç¥­¨ï¬¨ ®âªàëâ묨 á ini ä ©« 
  369.                 test eax,eax
  370.                 jz .ok
  371.                 add ebx,32
  372.                 cmp byte[ebx],0
  373.                 jne .cycle_0
  374.         jmp .end_0
  375.         .ok: ;®âªàë⨥ ä ©«  ¯®¤á¢¥âª¨ ¢ § ¢¨á¨¬®á⨠®â ­ ©¤¥­­®£® à áè¨à¥­¨ï
  376.                 sub ebx,32
  377.                 stdcall open_unpac_synt_file,ebx
  378.         .end_0:
  379. popad
  380.         ret
  381. endp
  382.  
  383. ;input:
  384. ; eax ¥á«¨ à ¢¥­: 0 - á®åà ­¥­¨¥ ¡¥§ ¤¨ «®£ , 1 - á®åà ­¥­¨¥ á ¤¨ «®£®¬
  385. ;description:
  386. ; äã­ªæ¨ï á®åà ­¥­¨ï ä ©« 
  387. align 4
  388. proc ted_but_save_file
  389.         or eax,eax
  390.         jnz .init_dlg
  391.                 ; á®å࠭塞 ¡¥§ ¢ë§®¢  ¤¨ «®£®¢®£® ®ª­ 
  392.                 cmp byte[openfile_path],0
  393.                 jne @f
  394.         .init_dlg:
  395.                 ; ¢ë§®¢ ¤¨ «®£®¢®£® ®ª­  ¤«ï á®åà ­¥­¨ï ä ©« 
  396.                 copy_path open_dialog_name,communication_area_default_path,file_name,0
  397.                 mov [OpenDialog_data.type],1
  398.                 stdcall [OpenDialog_Start],OpenDialog_data
  399.                 cmp [OpenDialog_data.status],1 ;if status==1 then save
  400.                 jne .end_save
  401.         @@:
  402.                 stdcall [ted_save_file],tedit0,run_file_70,openfile_path
  403.         .end_save:
  404.         ret
  405. endp
  406.  
  407. ;description:
  408. ; ª®¯¨à®¢ ­¨¥ ¯ ¬ïâ¨
  409. align 4
  410. proc mem_cpy uses ecx esi edi, destination:dword, source:dword, len:dword
  411.         cld
  412.         mov esi,[source]
  413.         mov edi,[destination]
  414.         mov ecx,[len]
  415.         rep movsb
  416.         ret
  417. endp
  418.  
  419. ;description:
  420. ; § ¯®«­¥­¨¥ ¯ ¬ï⨠¯à®¡¥« ¬¨
  421. align 4
  422. proc mem_spac uses eax ecx edi, mem:dword, len:dword
  423.         cld
  424.         mov al,' '
  425.         mov edi,[mem]
  426.         mov ecx,[len]
  427.         repne stosb
  428.         ret
  429. endp
  430.  
  431. ;input:
  432. ; eax = ª®¤ ®è¨¡ª¨
  433. ; ebx = ª®««¨ç¥á⢮ ¯à®ç¨â ­­ëå ¡ ©â
  434. align 4
  435. ted_messages_after_open_file:
  436.         push ecx edi
  437.         cmp eax,0
  438.         je @f
  439.                 cmp ax,10
  440.                 jl .zifra_0_9
  441.                         mov al,'?'
  442.                         sub ax,48
  443.                 .zifra_0_9:
  444.                 add ax,48
  445.  
  446.                 mov byte[msgbox_4.err],al
  447.                 stdcall [mb_create],msgbox_4,thread ;message: Can-t open text file!
  448.                 jmp .ret_f
  449.         @@:
  450.         cmp ebx,-1
  451.         je .ret_f
  452.                 ;if open file
  453.                 mov edi,tedit0
  454.                 mov ecx,ted_max_chars
  455.                 sub ecx,2 ;ecx = ¬ ªá¨¬ «ì­®¥ ç¨á«® ¡ ©â, ¤«ï ª®â®àëå ¡ë«  ¢ë¤¥«¥­  ¯ ¬ïâì
  456.                 cmp ebx,ecx
  457.                 jl .ret_f
  458.                         stdcall [mb_create],msgbox_1,thread
  459.         .ret_f:
  460.         pop edi ecx
  461.         ret
  462.  
  463. align 4
  464. ted_save_err_msg:
  465.         mov byte[msgbox_6.err],al
  466.         stdcall [mb_create],msgbox_6,thread ;message: Can-t save text file!
  467.         ret
  468.  
  469. ;description:
  470. ; äã­ªæ¨ï ­ ¦ â¨ï ­  ª­®¯ªã [à¨¬¥­¨âì] ¢ ¯ ­¥«¨ ᨭ⠪á¨á 
  471. align 4
  472. proc ted_but_open_syntax uses eax ebx ecx edi, edit:dword
  473.         mov edi,dword[edit]
  474.         cmp ted_panel_id,TED_PANEL_SYNTAX
  475.         jne @f
  476.                 stdcall dword[tl_node_get_data], tree1
  477.                 mov [fn_col_option],eax
  478.                 stdcall open_unpac_synt_file,eax
  479.                 cmp ebx,-1
  480.                 je @f
  481.  
  482.                 call [ted_text_colored]
  483.                 stdcall [ted_draw],edi
  484.         @@:
  485.         ret
  486. endp
  487.  
  488. ;®âªàë⨥ ¨ à á¯ ª®¢ª  ä ©«  ¯®¤á¢¥âª¨ ᨭ⠪á¨á 
  489. ;input:
  490. ; f_name - 㪠§ â¥«ì ­  ¨¬ï ®âªà뢠¥¬®£® ä ©«  ᨭ⠪á¨á  (¡¥§ ¯ã⨠¨ ¯ ¯ª¨ info)
  491. ;output:
  492. ; ebx - ç¨á«® ¯à®ç¨â ­­ëå ¡ ©â ¨§ ä ©« 
  493. ; ecx - à §àãè ¥âáï
  494. align 4
  495. proc open_unpac_synt_file uses eax edi esi, f_name:dword
  496.         mov ebx,[f_name]
  497.         mov edi,last_open_synt_file
  498.         stdcall strcmp,ebx,edi ;áà ¢­¨¢ ¥¬ ¨¬ï ¯®¤ª«î祭­®£® ä ©«  á ¯®¤ª«î祭­ë¬ à ­¥¥ ä ©«®¬
  499.         test eax,eax
  500.         jz @f
  501.  
  502.         ;ª®¯¨à㥬 ¨¬ï ¯®¤ª«î祭­®£® ä ©«  (¤«ï ¨§¡¥¦ ­¨ï ¯®¢â®à­ëå ¯®¤ª«î祭¨©)
  503.         mov esi,ebx
  504.         mov ecx,32/4
  505.         cld
  506.         rep movsd
  507.  
  508.         copy_path ebx,fn_syntax_dir,syntax_path,0
  509.         copy_path syntax_path,sys_path,file_name,0
  510.         mov edi, tedit0
  511.         mov [run_file_70.Function], SSF_READ_FILE
  512.         mov [run_file_70.Position], 0
  513.         mov [run_file_70.Flags], 0
  514.         mov ecx, ted_syntax_file_size
  515.         mov dword[run_file_70.Count], ecx
  516.         m2m dword[run_file_70.Buffer], ted_syntax_file
  517.         mov byte[run_file_70+20], 0
  518.         mov [run_file_70.FileName], file_name
  519.         mcall SF_FILE, run_file_70
  520.         cmp ebx,-1
  521.         jne .end_0
  522.                 call ted_on_init_synt_err
  523.                 jmp @f
  524.         .end_0:
  525.                 mov eax,ted_syntax_file
  526.                 cmp dword[eax],'KPCK'
  527.                 jne .end_unpack
  528.                 cmp dword[eax+4],ecx
  529.                 jg @f ;¥á«¨ ¤«ï à á¯ ª®¢ ­®£® ä ©«  ­¥ 墠⠥⠢뤥«¥­­®© ¯ ¬ïâ¨
  530.                 cmp dword[unpac_mem],0
  531.                 jne .end_1
  532.                         ;¢ë¤¥«¥­¨¥ ¯ ¬ï⨠¤«ï à á¯ ª®¢ª¨ ä ©« 
  533.                         stdcall mem.Alloc,ecx
  534.                         mov [unpac_mem],eax
  535.                 .end_1:
  536.                 stdcall unpack,ted_syntax_file,[unpac_mem]
  537.                 mov edi,ted_syntax_file
  538.                 mov esi,[unpac_mem]
  539.                 mov ecx,[edi+4]
  540.                 cld
  541.                 rep movsb
  542.                 .end_unpack:
  543.                 stdcall [ted_init_syntax_file], tedit0
  544.         @@:
  545.         ret
  546. endp
  547.  
  548. ;description:
  549. ; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ ¯®¨áª 
  550. align 4
  551. proc ted_but_find uses edi
  552.         mov edi,tedit0
  553.  
  554.         cmp ted_panel_id,TED_PANEL_NULL
  555.         je @f
  556.                 mov ted_panel_id,TED_PANEL_NULL
  557.                 mov ted_wnd_l,0
  558.                 jmp .e_if
  559.         @@:
  560.                 mov ted_panel_id,TED_PANEL_FIND
  561.                 mov ted_wnd_l,TED_PANEL_WIDTH
  562.         .e_if:
  563.         call EvSize
  564.         stdcall [ted_draw],edi
  565.         ret
  566. endp
  567.  
  568. align 4
  569. tbl_1251_866:
  570. rb 128
  571. db   0,  0,  0,  0,  0,  0,  0,  0,  0,0,0,0,0,0,0,0 ;128
  572. db   0,  0,  0,  0,  0,  0,  0,  0,  0,0,0,0,0,0,0,0 ;144
  573. db   0,  0,  0,  0,  0,  0,  0,  0,240,0,0,0,0,0,0,0 ;160
  574. db   0,  0,  0,  0,  0,  0,  0,  0,241,0,0,0,0,0,0,0 ;176
  575. db 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143 ;192
  576. db 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159 ;208
  577. db 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175 ;224
  578. db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;240
  579.  
  580. align 4
  581. tbl_866_1251:
  582. rb 128
  583. db 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207 ;128
  584. db 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223 ;144
  585. db 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 ;160
  586. db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;176
  587. db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;192
  588. db   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;208
  589. db 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 ;224
  590. db 168,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;240
  591.  
  592. align 4
  593. ted_on_find_err:
  594.         stdcall [mb_create],msgbox_7,thread ;message: Can not find text
  595.         ret
  596.  
  597. ;description:
  598. ; ª­®¯ª  [‡ ¬¥­¨âì] ­  ¯ ­¥«¨
  599. align 4
  600. but_replace:
  601.         ; ¯®ª  ­¥ ᤥ« ­®
  602.         ret
  603.  
  604. ;description:
  605. ; äã­ªæ¨ï ¯®¨áª  ¨­ä®à¬ æ¨¨ ¢ ᯨ᪥ ª«î祢ëå á«®¢
  606. align 4
  607. but_find_key_w:
  608.         cmp dword[wnd_k_words_run],0
  609.         jne @f
  610.                 pushad
  611.                 mcall SF_CREATE_THREAD,1,prop_start,thread_coords
  612.                 mov dword[wnd_k_words_run],eax
  613.                 popad
  614.         @@:
  615.         ret
  616.  
  617. ;description:
  618. ; ¢ë¤¥«¥­¨¥/áªàë⨥ ­¥¯¥ç â ¥¬ëå ᨬ¢®«®¢
  619. align 4
  620. proc but_sumb_invis uses edi, edit:dword
  621.         mov edi,dword[edit]
  622.  
  623.         xor ted_mode_invis,1
  624.         call draw_but_toolbar
  625.         stdcall [ted_draw],edi
  626.         ret
  627. endp
  628.  
  629. ;description:
  630. ; ¢ë¤¥«¥­¨¥/áªàë⨥ ª«î祢ëå á«®¢
  631. align 4
  632. proc but_use_syntax uses edi, edit:dword
  633.         mov edi,dword[edit]
  634.  
  635.         xor ted_mode_color,1
  636.         cmp ted_mode_color,0
  637.         je @f
  638.                 call [ted_text_colored]
  639.         @@:
  640.         call draw_but_toolbar
  641.         stdcall [ted_draw],edi
  642.         ret
  643. endp
  644.  
  645. ;description:
  646. ; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ á ä ©« ¬¨ ᨭ⠪á¨á 
  647. align 4
  648. proc but_choose_syntax uses edi, edit:dword
  649.         mov edi,[edit]
  650.  
  651.         cmp ted_panel_id,TED_PANEL_NULL
  652.         je @f
  653.                 mov ted_panel_id,TED_PANEL_NULL
  654.                 mov ted_wnd_l,0
  655.                 jmp .e_if
  656.         @@:
  657.                 mov ted_panel_id,TED_PANEL_SYNTAX
  658.                 mov ted_wnd_l,TED_PANEL_WIDTH
  659.         .e_if:
  660.         call EvSize
  661.         stdcall [ted_draw],edi
  662.         ret
  663. endp
  664.