Subversion Repositories Kolibri OS

Rev

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