Subversion Repositories Kolibri OS

Rev

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

  1. ;
  2. ; ¢ í⮬ ä ©«¥ ᮡ࠭ë ä㭪樨 ­ã¦­ë¥ ¤«ï ᮧ¤ ­¨ï ¨
  3. ; à ¡®âë ®ª­  á ¯®¨áª®¬ ¢ ª«î祢ëå á«®¢ å
  4. ;
  5.  
  6. prop_wnd_width equ 350 ;è¨à¨­  ®ª­  á ¯®¨áª®¬
  7. SIZE_ONE_FLOAT equ 14
  8.  
  9. IMAGE_TOOLBAR_ICON_SIZE equ 20*20*3
  10.  
  11. wnd_k_words_run dd 0 ;¯¥à¥¬¥­­ ï á«¥¤ïé ï §  ⥬ çâ®-¡ë ­¥ § ¯ã᪠âì ¡®«ìè¥ 1-£® ®ª­  ®¤­®¢à¥¬¥­­®
  12.  
  13. if lang eq ru
  14. txt_caption db '®¨áª ¢ ª«î祢ëå á«®¢ å',0
  15. else
  16. txt_caption db 'Search in keywords',0
  17. end if
  18.  
  19. ;¤ ­®¥ ®ª­® (¯à®æ¥áá) ¢ë§ë¢ ¥âìáï ä㭪樥© but_wnd_coords
  20. align 4
  21. prop_start:
  22. pushad
  23.         mcall SF_SET_EVENTS_MASK,0xC0000027 ;¬ áª  ®¦¨¤ ¥¬ëå ᮡë⨩
  24.  
  25.         ;­ áâனª  ᯨ᪠ ®¡ê¥ªâ®¢
  26.         mov dword[tree3.info_max_count],2
  27.         mov edi,tedit0
  28.         mov edx,ted_key_words_count
  29.         add dword[tree3.info_max_count],edx ;áâ ¢¨¬ ç¨á«® 㧫®¢, à ¢­®¥ ª®««¨ç¥áâ¢ã ª«î祢ëå á«®¢ ¢ ä ©«¥ ¯®¤á¢¥âª¨ (+2 ­  ­ ç «® ¨ ª®­¥æ ᯨ᪠)
  30.         stdcall dword[tl_data_init], tree3
  31.         mov eax,dword[icon_tl_sys]
  32.         mov dword[tree3.data_img],eax
  33.         mov eax,dword[tree1.data_img_sys]
  34.         mov dword[tree3.data_img_sys],eax
  35.  
  36.         edit_boxes_set_sys_color edit3,editboxes_end,sc ;ãáâ ­®¢ª  á¨á⥬­ëå 梥⮢
  37. popad
  38.  
  39. align 4
  40. prop_red_win:
  41. pushad
  42.         mcall SF_REDRAW,SSF_BEGIN_DRAW
  43.  
  44.         mov bx,word[procinfo.box.left]
  45.         add bx,5 ;word[buf_0.l]
  46.         shl ebx,16
  47.         mov bx,prop_wnd_width
  48.         mov cx,word[procinfo.box.top]
  49.         add cx,42 ;word[buf_0.t]
  50.         shl ecx,16
  51.         mov cx,250
  52.         mcall SF_CREATE_WINDOW,,,0x33ffffd0,,txt_caption
  53.  
  54.         mcall SF_DEFINE_BUTTON,(5 shl 16)+19,(5 shl 16)+19,3,[sc.work_button]
  55.         add ebx,(25 shl 16)
  56.         mcall ,,,4
  57.  
  58.         mov ebx,[bmp_icon]
  59.         add ebx,7*IMAGE_TOOLBAR_ICON_SIZE
  60.         mcall SF_PUT_IMAGE,,(20 shl 16)+20,(5 shl 16)+5 ;­ ©â¨
  61.  
  62.         sub ebx,2*IMAGE_TOOLBAR_ICON_SIZE
  63.         mov edx,(30 shl 16)+5 ;ª®¯¨à®¢ âì
  64.         int 0x40
  65.  
  66.         mov dword[w_scr_t3.all_redraw],1
  67.         stdcall [scrollbar_ver_draw], w_scr_t3
  68.         stdcall [tl_draw], tree3
  69.         stdcall [edit_box_draw], edit3
  70.         mcall SF_REDRAW,SSF_END_DRAW
  71. popad
  72.  
  73. ;­¥ ®âà뢠âì íâã äã­ªæ¨î ®â ¯à¥¤ë¤ã饩
  74. align 4
  75. prop_still:
  76.         mcall SF_WAIT_EVENT
  77.  
  78.         cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
  79.         jz prop_red_win
  80.         cmp al,2
  81.         jne @f
  82.                 call prop_key
  83.         @@:
  84.         cmp al,3
  85.         jne @f
  86.                 call prop_button
  87.         @@:
  88.         cmp al,6
  89.         jne @f
  90.                 call prop_mouse
  91.         @@:
  92.         jmp prop_still
  93. .exit:
  94.         mov dword[tree3.data_img],0 ;ç¨á⨬ 㪠§ â¥«¨ ­  ¨ª®­ª¨ çâ®-¡ë ¨å ­¥ 㤠«¨« ¤¥áâàãªâ®à
  95.         mov dword[tree3.data_img_sys],0 ;â. ª. ®­¨ ¥é¥ ¨á¯®«ì§ãîâìáï ¢ ¤à㣨å í«¥¬¥­â å
  96.         stdcall dword[tl_data_clear], tree3
  97.         mov dword[wnd_k_words_run],0 ;®¡­ã«ï¥¬ ID ®ª­ 
  98.         mcall SF_TERMINATE_PROCESS
  99.  
  100. align 4
  101. prop_key:
  102. push eax
  103.         mcall SF_GET_KEY
  104.         stdcall [edit_box_key], edit3
  105.         stdcall [tl_key], tree3
  106. pop eax
  107.         ret
  108.  
  109. align 4
  110. prop_mouse:
  111.         ;push ecx edi
  112.         stdcall [tl_mouse], tree3
  113.         stdcall [edit_box_mouse], edit3
  114.         ;pop edi ecx
  115.         ret
  116.  
  117. align 4
  118. prop_button:
  119.         pushad
  120.         mcall SF_GET_BUTTON
  121.  
  122.         cmp ah,1
  123.         je prop_still.exit
  124.  
  125.         cmp ah,3
  126.         jne @f
  127.                 ;­ ©â¨ á«®¢ 
  128.                 mov edi,tedit0
  129.                 cmp ted_syntax_file,0
  130.                 je @f
  131.                 stdcall dword[tl_info_clear], tree3
  132.  
  133.                 mov ebx,ted_key_words_data
  134.                 mov ecx,ted_key_words_count
  135.                 cld
  136.                 .cycle_0:
  137.                 stdcall str_instr, ebx,[edit3.text]
  138.                 test al,al
  139.                 jnz .end_add
  140.                         ;ª«î祢®¥ á«®¢®
  141.                         stdcall dword[tl_node_add], tree3, (1 shl 16), ebx
  142.                         stdcall dword[tl_cur_next], tree3
  143.                         mov edx,[ebx+MAX_COLOR_WORD_LEN]
  144.                         or edx,edx
  145.                         jz .end_add
  146.                                 ;á¯à ¢ª  ¯® ª«î祢®¬ã á«®¢ã
  147.                                 add edx,ted_help_text_f1
  148.                                 stdcall dword[tl_node_add], tree3, 1, edx
  149.                                 stdcall dword[tl_cur_next], tree3
  150.                 .end_add:
  151.                 add ebx,MAX_COLOR_WORD_LEN+8 ;sizeof.TexColViv
  152.                 loop .cycle_0
  153.  
  154.                 stdcall dword[tl_cur_beg], tree3
  155.                 stdcall dword[tl_draw], tree3
  156.                 jmp .no_select_0
  157.         @@:
  158.         cmp ah,4
  159.         jne @f
  160.                 ;ª®¯¨à®¢ âì ¢ ¡ãä¥à
  161.                 stdcall [tl_node_get_data],tree3
  162.                 or eax,eax
  163.                 jz .no_select_0
  164.                         mov esi,eax
  165.                         mov edi,[tedit0.buffer]
  166.                         mov dword[edi],MAX_COLOR_WORD_LEN
  167.                         mov dword[edi+4],0 ;text data
  168.                         mov dword[edi+8],1 ;code 866
  169.                         add edi,12 ;system buffer header size
  170.                         mov byte[edi+MAX_COLOR_WORD_LEN],0
  171.                         mov ecx,MAX_COLOR_WORD_LEN
  172.                         cld
  173.                         rep movsb
  174.                         mcall SF_CLIPBOARD,SSF_WRITE_CB,12+MAX_COLOR_WORD_LEN,[tedit0.buffer]
  175.                 .no_select_0:
  176.         @@:
  177.  
  178.         popad
  179.         ret
  180.  
  181. ;¤¥à¥¢® á ®¡ê¥ªâ ¬¨ ¢ ¯®«ì§®¢ â¥«ì᪮¬ ä ©«¥
  182. align 4
  183. tree3 tree_list MAX_COLOR_WORD_LEN,3,tl_key_no_edit,\
  184.         16,16, 0x8080ff,0x0000ff,0xffffff, 5,30,300,160, 16, 0,0, el_focus, w_scr_t3,0
  185.  
  186. align 4
  187. edit3 edit_box 80, 70, 8, 0xffffff, 0xff, 0x80ff, 0, 0x8000, MAX_COLOR_WORD_LEN+2, string1, mouse_dd, ed_focus
  188. editboxes_end:
  189.  
  190. string1 rb MAX_COLOR_WORD_LEN
  191.  
  192. align 4
  193. w_scr_t3 scrollbar 16,0, 3,0, 15, 100, 0,0, 0xeeeeee, 0xbbddff, 0, 1