Subversion Repositories Kolibri OS

Rev

Rev 343 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 343 Rev 348
Line -... Line 1...
-
 
1
;  15.02.2007 ã«ãç襭¨¥ á­ïâ¨ï ¢ë¤¥«¥­¨ï ¨ ¯¥à¥à¨á®¢ª¨ ®ç¨é ¥¬®© ®¡« áâ¨, §­ ç¨â¥«ì­® ¯à¨ïâ­¥¥ à ¡®â ¥â ª®¬¯®­¥­â
1
;  13.02.2007 ã¡à « ¯® ¢®§¬®¦­®á⨠¬¥àæ ­¨¥, ã«ãç襭  ®¡à ¡®â ª  ¯¥à¥à¨á®¢ª¨ ä®­ 
2
;  13.02.2007 ã¡à « ¯® ¢®§¬®¦­®á⨠¬¥àæ ­¨¥, ã«ãç襭  ®¡à ¡®âª  ¯¥à¥à¨á®¢ª¨ ä®­ 
2
; ¤®¡ ¢¨« ä¨âçã ¢­¥á¥­¨ï 0å0 ¯®  ¤à¥áã ed_size ¨­ ç¥ ã Maxxx32 ¡ë«¨ ­¥á®áâ몮¢ª¨ ¢ ª®¤¥. à¥ç­¨  ¢ ⮬, çâ® ®¯â¨¬¨§ æ¨ï ¡ë«  ᢥ¤¥­  ª ⮬ã çâ® ï ­¥ ç¨á⨫ ᨬ¢®«ë ¢ ¡ãä¥à¥, ª®£¤  㤠«ï«, ï ¯à®áâ® ¨å ­¥ ¢ë¢®¤¨«, ¨ ¯®â®¬ ª®£¤  ¢­®á¨«áï ­®¢ë© ᨬ¢®«, ®­ ¯® ¯à®áâã § â¨à « 㦥 ¨¬¥î騩áï. …᫨ ¡ë ¯à®£à ¬¬  ®¡à ¡ â뢠«  ª®­¥æ áâப¨ ¯® ed_size, ¯à®¡«¥¬ ¡ë ­¥ ¢®§­¨ª«®. ® ᥩç á íâ®â ­¥¤®áâ â®ª ¨á¯à ¢«¥­.
3
; ¤®¡ ¢¨« ä¨âçã ¢­¥á¥­¨ï 0å0 ¯®  ¤à¥áã ed_size ¨­ ç¥ ã Maxxx32 ¡ë«¨ ­¥á®áâ몮¢ª¨ ¢ ª®¤¥. à¨ç¨­  ¢ ⮬, çâ® ®¯â¨¬¨§ æ¨ï ¡ë«  ᢥ¤¥­  ª ⮬ã, çâ® ï ­¥ ç¨á⨫ ᨬ¢®«ë ¢ ¡ãä¥à¥, ª®£¤  㤠«ï«, ï ¯à®áâ® ¨å ­¥ ¢ë¢®¤¨«, ¨ ¯®â®¬, ª®£¤  ¢­®á¨«áï ­®¢ë© ᨬ¢®«, ®­ ¯®¯à®áâã § â¨à « 㦥 ¨¬¥î騩áï. …᫨ ¡ë, ¯à®£à ¬¬  ®¡à ¡ â뢠«  ª®­¥æ áâப¨ ¯® ed_size, ¯à®¡«¥¬ë ­¥ ¢®§­¨ª«®. ® ᥩç á íâ®â ­¥¤®áâ â®ª ¨á¯à ¢«¥­.
3
;  01.02.2007 ¤®à ¡®âª  edit_box, ¨á¯à ¢¨« ¡ £¨.
4
;  01.02.2007 ¤®à ¡®âª  edit_box, ¨á¯à ¢¨« ¡ £¨.
4
;  26.01.2007 ­®à¬ «ì­ ï à ¡®â  ª®¬¯ ­¥­â  ¨á¯à ¢¨« äãªæ¨î .check_offset
5
;  26.01.2007 ­®à¬ «ì­ ï à ¡®â  ª®¬¯ ­¥­â  ¨á¯à ¢¨« äãªæ¨î .check_offset
5
;  24.01.2007 ¯®ä¨ªá¥« ¡ £¨ ¢ë§¢ ­ë¥ ­¥ ¯à ¢¨«ì­ë¬ ª®¤®¬ )).
6
;  24.01.2007 ¯®ä¨ªá¥« ¡ £¨ ¢ë§¢ ­ë¥ ­¥ ¯à ¢¨«ì­ë¬ ª®¤®¬ )).
6
;  22.01.2007 ¨§¡ ¢¨«áï ®â £«îª®¢ ¯à¨ à ¡®â¥ á ¢ë¤¥«¥­¨¥¬ ¨ 㤠«¥­¨¥, ª®à४⭠ï à ¡®â  ª« ¢¨è¥© del & backspase
7
;  22.01.2007 ¨§¡ ¢¨«áï ®â £«îª®¢ ¯à¨ à ¡®â¥ á ¢ë¤¥«¥­¨¥¬ ¨ 㤠«¥­¨¥, ª®à४⭠ï à ¡®â  ª« ¢¨è¥© del & backspase
7
;  20.01.2007 ॠ«¨§®¢ « ¢ë¤¥«¥­¨¥ ⥪áâ  ¯® shift
8
;  20.01.2007 ॠ«¨§®¢ « ¢ë¤¥«¥­¨¥ ⥪áâ  ¯® shift
Line 412... Line 413...
412
	push	eax
413
	push	eax
413
	mov	edx,ed_size
414
	mov	edx,ed_size
414
	mov	ecx,ed_pos
415
	mov	ecx,ed_pos
415
        call	.del_char
416
        call	.del_char
416
;clear
417
;clear
417
	mov	ebp,ed_size
418
	mov	ebp,ed_color
418
        call	.clear_bg
419
        call	.sh_cl_
419
;;;;
420
;;;;
420
        mov	eax,ed_shift_pos
421
        mov	eax,ed_shift_pos
421
        mov	ebx,ed_size
422
        mov	ebx,ed_size
422
	sub	ebx,eax
423
	sub	ebx,eax
423
	mov	ed_size,ebx
424
	mov	ed_size,ebx
Line 592... Line 593...
592
.nd_k:	call	.check_offset
593
.nd_k:	call	.check_offset
593
	;test	eax,eax
594
	;test	eax,eax
594
	;jz	.draw_bg_cursor_text
595
	;jz	.draw_bg_cursor_text
595
	call	.draw_cursor
596
	call	.draw_cursor
Line 596... Line -...
596
 
-
 
597
 
-
 
598
 
597
 
599
.shift: ;;;;;;;SHIFT
-
 
600
	;test	ed_flags,ed_
-
 
601
 
-
 
602
	;mov	ebp,ed_size
-
 
603
	;call	.clear_bg
598
.shift: ;;;;;;;SHIFT
604
	test      word ed_flags,ed_shift
599
	test      word ed_flags,ed_shift
-
 
600
        je	.f_exit
-
 
601
 
-
 
602
	mov	ebp,shift_color
-
 
603
	call	.sh_cl_
-
 
604
        jmp	.draw_cursor_text
-
 
605
;;;;;;;;;;;;;;;;;;;;;
-
 
606
 
-
 
607
.f_exit: and    word ed_flags,ed_shift_cl
-
 
608
        call	.enable_null
-
 
609
	jmp	.draw_cursor_text
-
 
610
 
605
        je	.f_exit
611
.sh_cl_:
-
 
612
;;;;;;SHIFT end
-
 
613
;¤«ï ®¡à ¡®âª¨ á­ïâ¨ï ¢ë¤¥«¥­¨ï
606
;;;;;;SHIFT end
614
	or	word ed_flags,ed_shift_bac
607
	mov 	eax,dword	ed_pos
615
	mov 	eax,dword	ed_pos
608
	mov	ebx,dword	ed_shift_pos
616
	mov	ebx,dword	ed_shift_pos
609
	cmp	eax,ebx
617
	cmp	eax,ebx
610
	jae	.sh_n
618
	jae	.sh_n
Line 613... Line 621...
613
	jmp	.sh_n1
621
	jmp	.sh_n1
614
	             ;¥á«¨ ¨­ ç¥
622
	             ;¥á«¨ ¨­ ç¥
615
.sh_n: 	push	ebx  
623
.sh_n: 	push	ebx  
616
	push	eax
624
	push	eax
617
.sh_n1: 
625
.sh_n1: 
618
;        jmp	.draw_all2
-
 
619
;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
620
	;call	.clear_cursor
-
 
621
	call	.check_offset
626
	call	.check_offset
622
	call	.get_n
627
	call	.get_n
623
	mov	edx,eax	;size of ed_box
628
	mov	edx,eax	;size of ed_box
624
;	push	eax
629
;	push	eax
625
	mov	ecx,ed_offset
630
	mov	ecx,ed_offset
626
	add	eax,ecx	;eax = w_off= ed_offset+width
631
	add	eax,ecx	;eax = w_off= ed_offset+width
627
	mov	ebp,eax ;save
632
	mov	edx,eax ;save
628
	pop	ebx     ;¡®«ì襥
633
	pop	ebx     ;¡®«ì襥
629
	pop	eax     ;¬¥­ì襥
634
	pop	eax     ;¬¥­ì襥
Line 630... Line 635...
630
 
635
 
631
	
636
	
632
	cmp	eax,ecx         ;áà ¢­¥­¨¥ á ¬¥­ì襣® á offset.
637
	cmp	eax,ecx         ;áà ¢­¥­¨¥ á ¬¥­ì襣® á offset.
633
	jae	.f_f            ;¥á«¨ ¡®«ìè¥
638
	jae	.f_f            ;¥á«¨ ¡®«ìè¥
634
	xor	eax,eax
639
	xor	eax,eax
635
	cmp	ebp,ebx		;cà ¢­¨¬ à §¬¥à w_off á ¡®«ì訬
640
	cmp	edx,ebx		;cà ¢­¨¬ à §¬¥à w_off á ¡®«ì訬
636
	jb	@f
641
	jb	@f
637
	sub	ebx,ecx
642
	sub	ebx,ecx
638
	jmp     .nxt_f
643
	jmp     .nxt_f
639
@@:	mov	ebx,ebp
644
@@:	mov	ebx,edx
Line 640... Line 645...
640
	sub	ebx,ecx	
645
	sub	ebx,ecx	
641
	jmp     .nxt_f
646
	jmp     .nxt_f
642
 
647
 
643
.f_f:	
648
.f_f:	
644
	sub	eax,ecx
649
	sub	eax,ecx
645
	cmp	ebp,ebx		;cà ¢­¨¬ à §¬¥à w_off á ¡®«ì訬
650
	cmp	edx,ebx		;cà ¢­¨¬ à §¬¥à w_off á ¡®«ì訬
646
	jle	@f
651
	jle	@f
647
	sub	ebx,ecx
652
	sub	ebx,ecx
648
	sub	ebx,eax
653
	sub	ebx,eax
649
	jmp     .nxt_f
654
	jmp     .nxt_f
650
@@:
655
@@:
651
	mov	ebx,ebp	
656
	mov	ebx,edx	
652
	sub	ebx,ecx
657
	sub	ebx,ecx
653
	sub	ebx,eax
658
	sub	ebx,eax
Line 659... Line 664...
659
	inc	ebx
664
	inc	ebx
660
	shl	ebx,16
665
	shl	ebx,16
661
	lea	ecx,[edx*2+edx]
666
	lea	ecx,[edx*2+edx]
662
	shl	ecx,1	
667
	shl	ecx,1	
663
	mov	bx,cx
668
	mov	bx,cx
-
 
669
 
664
	mov	edx,shift_color
670
	mov	edx,ebp;shift_color
-
 
671
 
665
	call	.draw_bg_eax
672
	call	.draw_bg_eax
666
	and    word ed_flags,1111111111111011b
673
	and    word ed_flags,1111111111111011b
667
	call	.enable_null
674
	call	.enable_null
668
        jmp	.draw_cursor_text
675
	ret
669
;;;;;;;;;;;;;;;;;;;;;
-
 
Line 670... Line -...
670
 
-
 
671
.f_exit: and    word ed_flags,ed_shift_cl
-
 
672
        call	.enable_null
-
 
Line 673... Line 676...
673
	jmp	.draw_cursor_text
676
 
674
 
677
 
675
;¯à®¢¥àª  á®áâ®ï­¨ï shift ¡ë« «¨ ®­ ­ ¦ â à ­ìè¥?
678
;¯à®¢¥àª  á®áâ®ï­¨ï shift ¡ë« «¨ ®­ ­ ¦ â à ­ìè¥?
676
.sh_enable:
679
.sh_enable:
Line 681... Line 684...
681
       	push	dword ed_pos
684
       	push	dword ed_pos
682
	pop	dword ed_shift_pos
685
	pop	dword ed_shift_pos
683
	or	word ed_flags,ed_shift_on
686
	or	word ed_flags,ed_shift_on
684
	ret
687
	ret
Line -... Line 688...
-
 
688
 
-
 
689
@@:     test    word ed_flags,ed_shift_bac
-
 
690
        je      @f
-
 
691
	mov	ebp,ed_color
685
 
692
	call	.sh_cl_  ;®ç¨á⪠ ¢ë¤¥«¥­®£® äà £¬¥­â 
-
 
693
@@:	and	word ed_flags,ed_shift_cl
-
 
694
;	ret
686
@@:     and	word ed_flags,ed_shift_cl
695
.sh_ext_en:	
687
	ret
-
 
688
.sh_ext_en:	mov	ebp,ed_size
-
 
689
		call	.clear_bg
-
 
690
        	ret
-
 
691
 
696
        	ret
692
;äã­ªæ¨ï ¢­¥á¥­¨ï 0 ¯®  ¤à¥áã ed_size+1
697
;äã­ªæ¨ï ¢­¥á¥­¨ï 0 ¯®  ¤à¥áã ed_size+1
693
.enable_null:
698
.enable_null:
694
        pusha
699
        pusha
695
        mov	eax,ed_size
700
        mov	eax,ed_size
Line 812... Line 817...
812
;----------------------------------------------------------
817
;----------------------------------------------------------
813
;--- ¯à®¢¥à塞 á®áâ®ï­¨¥ ----------------------------------
818
;--- ¯à®¢¥à塞 á®áâ®ï­¨¥ ----------------------------------
814
;----------------------------------------------------------
819
;----------------------------------------------------------
815
	test	eax,1
820
	test	eax,1
816
	jnz	.mouse_left_button
821
	jnz	.mouse_left_button
817
@@:     popa
822
	popa
818
	ret
823
	ret
Line 819... Line 824...
819
 
824
 
820
.mouse_left_button:
825
.mouse_left_button:
821
;----------------------------------------------------------
826
;----------------------------------------------------------
Line 864... Line 869...
864
	call	.draw_cursor
869
	call	.draw_cursor
865
;----------------------------------------------------------
870
;----------------------------------------------------------
866
;--- ¯à®æ¥¤ãà  ãáâ ­®¢ª¨ 䮪ãá  ---------------------------
871
;--- ¯à®æ¥¤ãà  ãáâ ­®¢ª¨ 䮪ãá  ---------------------------
867
;----------------------------------------------------------
872
;----------------------------------------------------------
868
	bts	word ed_flags,1
873
	bts	word ed_flags,1
869
	jc	.mouse_pressed
874
	jc	@f
870
	call	.draw_cursor
875
	call	.draw_cursor
871
	call	.draw_border
876
	jmp	.drc
872
.mouse_pressed:
-
 
873
popa
-
 
874
ret
877
 
875
;.mouse_end_no_focus:
-
 
876
;        call    .blur
-
 
877
;popa
-
 
878
;ret
878
 
879
;.blur:
-
 
880
;pusha
-
 
881
._blur:
879
._blur:
882
	test	word ed_flags,ed_always_focus
880
	test	word ed_flags,ed_always_focus
883
	jne	@f
881
	jne	@f
884
	btr	word ed_flags,1 ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
882
	btr	word ed_flags,1 ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
885
	jnc     @f
883
	jnc     @f
886
	call	.clear_cursor
884
	call	.clear_cursor
887
	call	.draw_border
885
.drc:	call	.draw_border
888
@@:
886
@@:
889
popa
887
popa
890
ret
888
ret
Line 891... Line 889...
891
 
889
 
Line 906... Line 904...
906
ed_figure_only=1000000000000000b
904
ed_figure_only=1000000000000000b
907
ed_always_focus=100000000000000b
905
ed_always_focus=100000000000000b
908
ed_focus=10b
906
ed_focus=10b
909
ed_shift_on=1000b
907
ed_shift_on=1000b
910
ed_shift=100b
908
ed_shift=100b
-
 
909
ed_shift_bac=10000b
911
ed_shift_cl=1111111111110011b
910
ed_shift_cl=1111111111100011b
912
macro draw_edit_boxes start,end
911
macro draw_edit_boxes start,end
913
{
912
{
914
	mov	edi,start
913
	mov	edi,start
915
	mov	ecx,((end-start)/ed_struc_size)
914
	mov	ecx,((end-start)/ed_struc_size)
916
@@:
915
@@: