Subversion Repositories Kolibri OS

Rev

Rev 4332 | Rev 5930 | 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. MAX_OBJECT_SIZE equ (4+SIZE_ONE_FLOAT*3+1)
  9.  
  10. prop_wnd_run db 0 ;¯¥à¥¬¥­­ ï á«¥¤ïé ï §  ⥬ çâ®-¡ë ­¥ § ¯ã᪠âì ¡®«ìè¥ 1-£® ®ª­  ᮠ᢮©á⢠¬¨ ®¤­®¢à¥¬¥­­®
  11.  
  12. txt_q db '?',0
  13. txt_space:
  14.         db SIZE_ONE_FLOAT dup(' ')
  15. .end:
  16.         db 0
  17.  
  18. obj_point: ;¤®¡ ¢«ï¥¬ë© ®¡ê¥ªâ
  19.         dd 0   ;㪠§ â¥«ì
  20. .text:
  21.         rb MAX_OBJECT_SIZE
  22.  
  23.  
  24.  
  25. ;¤ ­®¥ ®ª­® (¯à®æ¥áá) ¢ë§ë¢ ¥âìáï ä㭪樥© but_wnd_coords
  26. align 4
  27. prop_start:
  28. pushad
  29.         mcall 40,0x27 ;¬ áª  ®¦¨¤ ¥¬ëå ᮡë⨩
  30.         inc byte[prop_wnd_run]
  31.  
  32.         stdcall [tl_node_get_data],tree1
  33.         xor edx,edx
  34.         mov dword[capt_p],txt_q
  35.         cmp eax,0
  36.         je .no_points
  37.                 mov ebx,dword[eax] ;¯®«ãç ¥¬ §­ ç¥­¨¥ ᤢ¨£  ¢ë¡à ­­®£® ¡«®ª 
  38.                 add ebx,dword[open_file_lif]
  39.  
  40.                 cmp word[ebx],CHUNK_VERTLIST
  41.                 jne @f
  42.                         movzx edx,word[ebx+6] ;ª®««¨ç¥á⢮ â®ç¥ª
  43.                         add ebx,8
  44.                         mov dword[capt_p],txt_4110
  45.                         jmp .no_points
  46.                 @@:
  47.                 cmp word[ebx],0xb013
  48.                 jne @f
  49.                         inc edx
  50.                         add ebx,6
  51.                         mov dword[capt_p],txt_b013
  52.                         jmp .no_points
  53.                 @@:
  54.                 cmp word[ebx],0xb014
  55.                 jne @f
  56.                         mov edx,2
  57.                         add ebx,6
  58.                         mov dword[capt_p],txt_b014
  59.                         ;jmp .no_points
  60.                 @@:
  61.         .no_points:
  62.  
  63.         ;­ áâனª  ᯨ᪠ ®¡ê¥ªâ®¢
  64.         mov dword[tree3.info_max_count],2
  65.         add dword[tree3.info_max_count],edx ;áâ ¢¨¬ ç¨á«® 㧫®¢, à ¢­®¥ ª®««¨ç¥áâ¢ã â®ç¥ª (+2 ­  ­ ç «® ¨ ª®­¥æ ᯨ᪠)
  66.         stdcall dword[tl_data_init], tree3
  67.         mov eax,dword[icon_tl_sys]
  68.         mov dword[tree3.data_img_sys],eax
  69.         mov eax,dword[icon_toolbar]
  70.         mov dword[tree3.data_img],eax
  71.  
  72.         cmp edx,0
  73.         je .no_object
  74.                 mov word[NumberSymbolsAD],5
  75.                 finit
  76.                 .new_point:
  77.                         mov dword[obj_point],ebx
  78.                         mov dword[obj_point.text],0
  79.                         cld
  80.                         mov ecx,3
  81.                         @@:
  82.                                 fld dword[ebx]
  83.                                 fstp qword[Data_Double]
  84.                                 call DoubleFloat_to_String
  85.                                 add ebx,4
  86.                                 stdcall str_len, Data_String
  87.                                 mov esi,txt_space
  88.                                 add esi,eax
  89.                                 cmp esi,txt_space.end
  90.                                 jl .normal_size
  91.                                         mov esi,txt_space.end-1 ;¬¨­¨¬ã¬ 1 ¯à®¡¥« ­ã¦­® ¤®¡ ¢¨âì, çâ®-¡ë æ¨äàë ­¥ ᫨¯ «¨áì
  92.                                 .normal_size:
  93.                                 stdcall str_cat, obj_point.text,esi
  94.                                 stdcall str_cat, obj_point.text,Data_String
  95.                                 loop @b
  96.                         stdcall dword[tl_node_add], tree3,(ID_ICON_DATA shl 16),obj_point
  97.                         stdcall dword[tl_cur_next], tree3
  98.                         dec edx
  99.                         cmp edx,0
  100.                         jg .new_point
  101.                         stdcall dword[tl_cur_beg], tree3
  102.         .no_object:
  103.         edit_boxes_set_sys_color edit1,editboxes_end,sc ;ãáâ ­®¢ª  á¨á⥬­ëå 梥⮢
  104.         stdcall [edit_box_set_text], edit1, txt_q
  105.         stdcall [edit_box_set_text], edit2, txt_q
  106.         stdcall [edit_box_set_text], edit3, txt_q
  107. popad
  108.  
  109. align 4
  110. prop_red_win:
  111. pushad
  112.         mcall 12,1
  113.  
  114.         xor eax,eax
  115.         mov edi,dword[capt_p] ;children window caption
  116.         mov bx,word[procinfo.box.left]
  117.         add bx,word[buf_0.l]
  118.         shl ebx,16
  119.         mov bx,prop_wnd_width
  120.         mov cx,word[procinfo.box.top]
  121.         add cx,word[buf_0.t]
  122.         shl ecx,16
  123.         mov cx,250
  124.         mov edx,0xffffd0
  125.         or  edx,0x33000000
  126.         int 0x40
  127.  
  128.         mov eax,8
  129.         mov ebx,(5 shl 16)+20
  130.         mov ecx,(195 shl 16)+20
  131.         mov edx,3
  132.         mov esi,[sc.work_button]
  133.         int 0x40
  134.  
  135.         mov ebx,(30 shl 16)+20
  136.         mov ecx,(195 shl 16)+20
  137.         mov edx,4
  138.         int 0x40
  139.  
  140.         mov eax,7
  141.         mov ebx,[image_data_toolbar]
  142.         add ebx,4*IMAGE_TOOLBAR_ICON_SIZE
  143.         mov ecx,(16 shl 16)+16
  144.         mov edx,(7 shl 16)+197 ;load
  145.         int 0x40
  146.  
  147.         sub ebx,IMAGE_TOOLBAR_ICON_SIZE
  148.         mov edx,(32 shl 16)+197 ;save
  149.         int 0x40
  150.  
  151.         mov dword[w_scr_t3.all_redraw],1
  152.         stdcall [scrollbar_ver_draw],dword w_scr_t3
  153.         stdcall [tl_draw], tree3
  154.         stdcall [edit_box_draw], edit1
  155.         stdcall [edit_box_draw], edit2
  156.         stdcall [edit_box_draw], edit3
  157.         mcall 12,2
  158. popad
  159.  
  160. ;­¥ ®âà뢠âì íâã äã­ªæ¨î ®â ¯à¥¤ë¤ã饩
  161. align 4
  162. prop_still:
  163.         pushad
  164.         mcall 10
  165.  
  166.         cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
  167.         jz prop_red_win
  168.         cmp al,2
  169.         jne @f
  170.                 call prop_key
  171.         @@:
  172.         cmp al,3
  173.         jz prop_button
  174.         cmp al,6
  175.         jne @f
  176.                 call prop_mouse
  177.         @@:
  178.         popad
  179.         jmp prop_still
  180.  
  181. align 4
  182. prop_key:
  183. push eax
  184.         mcall 2
  185.         stdcall [edit_box_key], edit1
  186.         stdcall [edit_box_key], edit2
  187.         stdcall [edit_box_key], edit3
  188.         stdcall [tl_key], tree3
  189. pop eax
  190.         ret
  191.  
  192. align 4
  193. prop_mouse:
  194.         ;push ecx edi
  195.         stdcall [tl_mouse], tree3
  196.         stdcall [edit_box_mouse], edit1
  197.         stdcall [edit_box_mouse], edit2
  198.         stdcall [edit_box_mouse], edit3
  199.         ;pop edi ecx
  200.         ret
  201.  
  202. align 4
  203. prop_button:
  204.         mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
  205.  
  206.         cmp ah,3
  207.         jne @f
  208.                 ;§ £à㧪  ª®®à¤¨­ â ¢ editbox-ë
  209.                 push eax ebx
  210.                 stdcall [tl_node_get_data],tree3
  211.                 cmp eax,0
  212.                 je .no_select_0
  213.                         mov ebx,[eax]
  214.                         mov word[NumberSymbolsAD],8
  215.                         finit
  216.                         fld dword[ebx]
  217.                         fstp qword[Data_Double]
  218.                         call DoubleFloat_to_String
  219.                         stdcall [edit_box_set_text], edit1, Data_String
  220.                         fld dword[ebx+4]
  221.                         fstp qword[Data_Double]
  222.                         call DoubleFloat_to_String
  223.                         stdcall [edit_box_set_text], edit2, Data_String
  224.                         fld dword[ebx+8]
  225.                         fstp qword[Data_Double]
  226.                         call DoubleFloat_to_String
  227.                         stdcall [edit_box_set_text], edit3, Data_String
  228.                         stdcall [edit_box_draw], edit1
  229.                         stdcall [edit_box_draw], edit2
  230.                         stdcall [edit_box_draw], edit3
  231.                 .no_select_0:
  232.                 pop ebx eax
  233.                 jmp prop_still
  234.         @@:
  235.         cmp ah,4
  236.         jne @f
  237.                 push eax ebx ecx edi esi
  238.                 stdcall [tl_node_get_data],tree3
  239.                 cmp eax,0
  240.                 je .no_select_1
  241.                         mov ebx,[eax]
  242.                         finit
  243.  
  244.                         mov esi,string1
  245.                         mov edi,Data_String
  246.                         cld
  247.                         mov ecx,32
  248.                         rep movsb
  249.                         call String_to_DoubleFloat
  250.                         fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
  251.                         fstp dword[ebx] ;á®å࠭塞 ª ª float
  252.  
  253.                         mov esi,string2
  254.                         mov edi,Data_String
  255.                         cld
  256.                         mov ecx,32
  257.                         rep movsb
  258.                         call String_to_DoubleFloat
  259.                         fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
  260.                         fstp dword[ebx+4] ;á®å࠭塞 ª ª float
  261.  
  262.                         mov esi,string3
  263.                         mov edi,Data_String
  264.                         cld
  265.                         mov ecx,32
  266.                         rep movsb
  267.                         call String_to_DoubleFloat
  268.                         fld  qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
  269.                         fstp dword[ebx+8] ;á®å࠭塞 ª ª float
  270.  
  271.                         ;®¡­®¢«¥­¨¥ ¨§¬¥­¥­­®£® 㧫  ¢ ᯨ᪥ tree3 ¨ £« ¢­®£® ®ª­  (¯® â ©¬¥àã)
  272.                         mov word[NumberSymbolsAD],5
  273.                         mov dword[obj_point],ebx
  274.                         mov dword[obj_point.text],0
  275.                         cld
  276.                         mov ecx,3
  277.                         .coord:
  278.                                 fld dword[ebx]
  279.                                 fstp qword[Data_Double]
  280.                                 call DoubleFloat_to_String
  281.                                 add ebx,4
  282.                                 stdcall str_len, Data_String
  283.                                 mov esi,txt_space
  284.                                 add esi,eax
  285.                                 cmp esi,txt_space.end
  286.                                 jl .normal_size
  287.                                         mov esi,txt_space.end-1 ;¬¨­¨¬ã¬ 1 ¯à®¡¥« ­ã¦­® ¤®¡ ¢¨âì, çâ®-¡ë æ¨äàë ­¥ ᫨¯ «¨áì
  288.                                 .normal_size:
  289.                                 stdcall str_cat, obj_point.text,esi
  290.                                 stdcall str_cat, obj_point.text,Data_String
  291.                                 loop .coord
  292.                         stdcall dword[tl_node_set_data], tree3,obj_point
  293.                         stdcall dword[tl_draw], tree3
  294.                         mov byte[can_save],1 ;¤«ï ¯®ª §  ª­®¯ª¨ '‘®åà ­¨âì'
  295.                         mov dword[offs_last_timer],0 ;¤«ï ®¡­®¢«¥­¨ï ¡«®ª  ¢ â ©¬¥à¥
  296.                 .no_select_1:
  297.                 pop esi edi ecx ebx eax
  298.                 jmp prop_still
  299.         @@:
  300.  
  301.         cmp ah,1
  302.         jne prop_still
  303. .exit:
  304.         mov dword[tree3.data_img],0 ;ç¨á⨬ 㪠§ â¥«¨ ­  ¨ª®­ª¨ çâ®-¡ë ¨å ­¥ 㤠«¨« ¤¥áâàãªâ®à
  305.         mov dword[tree3.data_img_sys],0 ;â. ª. ®­¨ ¥é¥ ¨á¯®«ì§ãîâìáï ¢ ¤à㣨å í«¥¬¥­â å
  306.         stdcall dword[tl_data_clear], tree3
  307.         mov byte[prop_wnd_run],0 ;®¡­ã«ï¥¬ áç¥â稪 ®ª®­
  308.         mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
  309.  
  310. capt_p dd 0
  311.  
  312. ;¤¥à¥¢® á ®¡ê¥ªâ ¬¨ ¢ ¯®«ì§®¢ â¥«ì᪮¬ ä ©«¥
  313. tree3 tree_list MAX_OBJECT_SIZE,3,\
  314.         tl_key_no_edit+tl_list_box_mode,\
  315.         16,16, 0xffffff,0xb0d0ff,0xd000ff, 5,30,300,160, 16, 4,0, el_focus,\
  316.         w_scr_t3,0
  317.  
  318. edit1 edit_box 80,  70, 200, 0xffffff, 0xff, 0x80ff, 0, 0x8000, 34, string1, mouse_dd, 0
  319. edit2 edit_box 80, 154, 200, 0xffffff, 0xff, 0x80ff, 0, 0x8000, 34, string2, mouse_dd, 0
  320. edit3 edit_box 80, 238, 200, 0xffffff, 0xff, 0x80ff, 0, 0x8000, 34, string3, mouse_dd, 0
  321. editboxes_end:
  322.  
  323. string1 rb 34
  324. string2 rb 34
  325. string3 rb 34
  326.  
  327. align 4
  328. w_scr_t3:
  329. .size_x     dw 16 ;+0
  330. rb 2+2+2
  331. .btn_high   dd 15 ;+8
  332. .type       dd 1  ;+12
  333. .max_area   dd 100  ;+16
  334. rb 4+4
  335. .bckg_col   dd 0xeeeeee ;+28
  336. .frnt_col   dd 0xbbddff ;+32
  337. .line_col   dd 0  ;+36
  338. rb 4+2+2
  339. .run_x:
  340. rb 2+2+2+2+4+4+4+4+4+4
  341. .all_redraw dd 0 ;+80
  342. .ar_offset  dd 1 ;+84
  343.  
  344.