forked from KolibriOS/kolibrios
upgrade editbox 07.03.2007
git-svn-id: svn://kolibrios.org@396 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ed47d8bf86
commit
ce8943dff7
@ -1,3 +1,4 @@
|
|||||||
|
; <Lrz> 07.03.2007 „®¯¨á « ã¯à ¢«¥¨¥ á shift home + end ãá¯à ¢¨« ¥áª®«ìª® ¡ £®¢
|
||||||
; <Lrz> 06.03.2007 <20>¥à¥¯¨á « ¯®«®áâìî «£®à¨â¬ ã¯à ¢«¥¨ï shift
|
; <Lrz> 06.03.2007 <20>¥à¥¯¨á « ¯®«®áâìî «£®à¨â¬ ã¯à ¢«¥¨ï shift
|
||||||
; <Lrz> 15.02.2007 ã«ãç襨¥ áïâ¨ï ¢ë¤¥«¥¨ï ¨ ¯¥à¥à¨á®¢ª¨ ®ç¨é ¥¬®© ®¡« áâ¨, § ç¨â¥«ì® ¯à¨ï⥥ à ¡®â ¥â ª®¬¯®¥â
|
; <Lrz> 15.02.2007 ã«ãç襨¥ áïâ¨ï ¢ë¤¥«¥¨ï ¨ ¯¥à¥à¨á®¢ª¨ ®ç¨é ¥¬®© ®¡« áâ¨, § ç¨â¥«ì® ¯à¨ï⥥ à ¡®â ¥â ª®¬¯®¥â
|
||||||
; <Lrz> 13.02.2007 ã¡à « ¯® ¢®§¬®¦®á⨠¬¥àæ ¨¥, ã«ãçè¥ ®¡à ¡®âª ¯¥à¥à¨á®¢ª¨ ä®
|
; <Lrz> 13.02.2007 ã¡à « ¯® ¢®§¬®¦®á⨠¬¥àæ ¨¥, ã«ãçè¥ ®¡à ¡®âª ¯¥à¥à¨á®¢ª¨ ä®
|
||||||
@ -69,8 +70,8 @@ ed_pos equ [edi+42] ;
|
|||||||
ed_offset equ [edi+46] ;ᬥ饨¥
|
ed_offset equ [edi+46] ;ᬥ饨¥
|
||||||
cl_curs_x equ [edi+50] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® å
|
cl_curs_x equ [edi+50] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® å
|
||||||
cl_curs_y equ [edi+54] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® ã
|
cl_curs_y equ [edi+54] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® ã
|
||||||
ed_shift_pos equ [edi+58]
|
ed_shift_pos equ [edi+58] ;¯®«®¦¥¨¥ ªãàá®à
|
||||||
ed_shift_pos_old equ [edi+62]
|
ed_shift_pos_old equ [edi+62] ;áâ ஥ ¯®«®¦¥¨¥ ªãàá®à
|
||||||
;==========================================================
|
;==========================================================
|
||||||
;=== ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ =================================
|
;=== ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ =================================
|
||||||
;==========================================================
|
;==========================================================
|
||||||
@ -93,26 +94,6 @@ pusha
|
|||||||
call .draw_text
|
call .draw_text
|
||||||
popa
|
popa
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;.str:
|
|
||||||
; mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬ áç¨á«¥¨ï ¨§¬¥ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤ë¥ ¯ à ¬¥âàë eax - ç¨á«®
|
|
||||||
; ;¯à¥à¥¢®¤ ç¨á« ¢ ASCII áâப㠢§®¤ë¥ ¤ ë¥ ecx=á¨á⥬ áç¨á«¥ï edi ¤à¥á ªã¤ § ¯¨áë¢ âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®¥æ ¯¥à¥¬¥®©
|
|
||||||
; cmp eax,ecx ;áà ¢¨âì ¥á«¨ ¢ eax ¬¥ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ @@-1 â.¥. pop eax
|
|
||||||
; jb @f
|
|
||||||
; xor edx,edx ;®ç¨áâ¨âì edx
|
|
||||||
; div ecx ;à §¤¥«¨âì - ®áâ ⮪ ¢ edx
|
|
||||||
; push edx ;¯®«®¦¨âì ¢ á⥪
|
|
||||||
; ;dec edi ;ᬥ饨¥ ¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®æ áâப¨
|
|
||||||
; call .str;¯¥à¥©â¨ á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥â ¯®ª ¢ eax ¥ á⠥⠬¥ìè¥ ç¥¬ ¢ ecx
|
|
||||||
; pop eax
|
|
||||||
; @@: ;cmp al,10 ;¯à®¢¥à¨âì ¥ ¬¥ìè¥ «¨ § 票¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥ï 10 ¤ ï ª®¬ ¤ - «¨è ï))
|
|
||||||
; ;sbb al,$69 ;- ç¥áâ® ¤ ï ¨áâàãªæ¨ï ¬¥ï § áâ ¢«ï¥â § ¤ã¬ âìáï â.¥. ï ¥ § î ª ª íâ® à ¡®â ¥â
|
|
||||||
; ;das ;¯®á«¥ ¤ ®© ª®¬ ¤ë ª ª ¡ë ¯à®¨á室¨â 㬥ì襨¥ al 66h (¢ ª¨£¥ ¯¨á ® ¤à㣮¥)
|
|
||||||
; or al,0x30 ;¤ ï ª®¬ ¤ ª®à®ç¥ 祬 ¤¢¥ ¢ëè¥
|
|
||||||
; stosb ;§ ¯¨á âì í«¥¬¥â ¨§ ॣ¨áâà al ¢ ï祪㠯 ¬ï⨠es:edi
|
|
||||||
;
|
|
||||||
; ret ;¢¥àãâìáï ç¥ì ¨â¥à¥áë© å®¤ â.ª. ¯®ª ¢ á⥪¥ åà ¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
|
|
||||||
|
|
||||||
;----------------------------------------------------------
|
;----------------------------------------------------------
|
||||||
;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ⥪áâ --------------------------
|
;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ⥪áâ --------------------------
|
||||||
;----------------------------------------------------------
|
;----------------------------------------------------------
|
||||||
@ -172,7 +153,6 @@ ret
|
|||||||
mov ebx,6 ;§ £à㧬¨ ¤¥«¨â¥«ì
|
mov ebx,6 ;§ £à㧬¨ ¤¥«¨â¥«ì
|
||||||
div ebx ;à §¬¤¥«¨¬ 6
|
div ebx ;à §¬¤¥«¨¬ 6
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;----------------------------------------------------------
|
;----------------------------------------------------------
|
||||||
;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï ªãàá®à --------------------------
|
;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï ªãàá®à --------------------------
|
||||||
;----------------------------------------------------------
|
;----------------------------------------------------------
|
||||||
@ -183,9 +163,7 @@ ret
|
|||||||
mov ecx,cl_curs_y
|
mov ecx,cl_curs_y
|
||||||
jmp .draw_curs
|
jmp .draw_curs
|
||||||
.draw_cursor:
|
.draw_cursor:
|
||||||
|
|
||||||
mov edx,ed_text_color
|
mov edx,ed_text_color
|
||||||
;@@:
|
|
||||||
mov ebx,ed_pos
|
mov ebx,ed_pos
|
||||||
mov ecx,ed_offset
|
mov ecx,ed_offset
|
||||||
sub ebx,ecx
|
sub ebx,ecx
|
||||||
@ -212,13 +190,12 @@ ret
|
|||||||
mov eax,38
|
mov eax,38
|
||||||
int 0x40
|
int 0x40
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;----------------------------------------------------------
|
;----------------------------------------------------------
|
||||||
;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï à ¬ª¨ ----------------------------
|
;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï à ¬ª¨ ----------------------------
|
||||||
;----------------------------------------------------------
|
;----------------------------------------------------------
|
||||||
.draw_border:
|
.draw_border:
|
||||||
;--- 梥â à ¬ª¨ ---
|
;--- 梥â à ¬ª¨ ---
|
||||||
test dword ed_flags,ed_focus
|
test word ed_flags,ed_focus
|
||||||
mov edx,ed_focus_border_color
|
mov edx,ed_focus_border_color
|
||||||
jne @f
|
jne @f
|
||||||
mov edx,ed_blur_border_color
|
mov edx,ed_blur_border_color
|
||||||
@ -303,11 +280,11 @@ pusha
|
|||||||
.add_8: add ebx,edx
|
.add_8: add ebx,edx
|
||||||
.chk_d: mov ed_offset,ebx
|
.chk_d: mov ed_offset,ebx
|
||||||
call .draw_bg
|
call .draw_bg
|
||||||
;mov dword [esp+28],-1
|
and word ed_flags,ed_offset_cl
|
||||||
popa
|
popa
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
mov dword [esp+28],0
|
or word ed_flags,ed_offset_fl
|
||||||
popa
|
popa
|
||||||
ret
|
ret
|
||||||
;==========================================================
|
;==========================================================
|
||||||
@ -327,7 +304,6 @@ pusha
|
|||||||
test al,0x03
|
test al,0x03
|
||||||
je @f
|
je @f
|
||||||
or word ed_flags,ed_shift ;ãáâ ®¢¨¬ ä« £
|
or word ed_flags,ed_shift ;ãáâ ®¢¨¬ ä« £
|
||||||
|
|
||||||
@@: pop eax ;¢®ááâ ®¢¨¬ áç¨â ë© á¨¬¢®« á ª« ¢¨ âãàë
|
@@: pop eax ;¢®ááâ ®¢¨¬ áç¨â ë© á¨¬¢®« á ª« ¢¨ âãàë
|
||||||
;----------------------------------------------------------
|
;----------------------------------------------------------
|
||||||
;--- ¯à®¢¥à塞, çâ® ¦ â® --------------------------------
|
;--- ¯à®¢¥à塞, çâ® ¦ â® --------------------------------
|
||||||
@ -362,36 +338,29 @@ pusha
|
|||||||
jb .no_figure
|
jb .no_figure
|
||||||
cmp ah,'9'
|
cmp ah,'9'
|
||||||
ja .no_figure
|
ja .no_figure
|
||||||
|
|
||||||
|
|
||||||
;¯à®¢¥àª shift
|
;¯à®¢¥àª shift
|
||||||
@@: test word ed_flags,ed_shift_on
|
@@: test word ed_flags,ed_shift_on
|
||||||
je @f
|
je @f
|
||||||
;‚å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos
|
;‚å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos
|
||||||
|
|
||||||
push eax
|
push eax
|
||||||
mov edx,ed_size
|
mov edx,ed_size
|
||||||
mov ecx,ed_pos
|
mov ecx,ed_pos
|
||||||
pusha
|
pusha
|
||||||
|
|
||||||
;cmp edx,ecx
|
|
||||||
;jne .sh_cl
|
|
||||||
;clear
|
;clear
|
||||||
mov ebp,edx ;ed_size
|
mov ebp,edx ;ed_size
|
||||||
call .clear_bg
|
call .clear_bg
|
||||||
mov ebp,ed_color
|
mov ebp,ed_color
|
||||||
|
mov ebx,dword ed_shift_pos
|
||||||
call .sh_cl_
|
call .sh_cl_
|
||||||
|
|
||||||
.sh_nxt:popa
|
.sh_nxt:popa
|
||||||
call .del_char
|
call .del_char
|
||||||
|
|
||||||
;;;;
|
;;;;
|
||||||
mov eax,dword ed_shift_pos
|
mov eax,dword ed_shift_pos
|
||||||
mov ebx,ed_size
|
mov ebx,ed_size
|
||||||
sub ebx,eax
|
sub ebx,eax
|
||||||
mov ed_size,ebx
|
mov ed_size,ebx
|
||||||
pop eax
|
pop eax
|
||||||
|
|
||||||
; ¯à®¢¥à塞, 室¨âáï «¨ ªãàá®à ¢ ª®æ¥
|
; ¯à®¢¥à塞, 室¨âáï «¨ ªãàá®à ¢ ª®æ¥
|
||||||
@@: mov ecx,ed_size
|
@@: mov ecx,ed_size
|
||||||
mov edx, ed_max
|
mov edx, ed_max
|
||||||
@ -512,9 +481,7 @@ popa
|
|||||||
call .clear_cursor
|
call .clear_cursor
|
||||||
call .check_offset
|
call .check_offset
|
||||||
call .draw_bg
|
call .draw_bg
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@@: dec dword ed_size
|
@@: dec dword ed_size
|
||||||
|
|
||||||
.draw_all2:
|
.draw_all2:
|
||||||
@ -525,7 +492,6 @@ popa
|
|||||||
mov ebp,ed_size
|
mov ebp,ed_size
|
||||||
call .clear_bg
|
call .clear_bg
|
||||||
ret
|
ret
|
||||||
;jmp .shift
|
|
||||||
;--- ¦ â ª« ¢¨è left ---
|
;--- ¦ â ª« ¢¨è left ---
|
||||||
.left: mov ebx,ed_pos
|
.left: mov ebx,ed_pos
|
||||||
test ebx,ebx
|
test ebx,ebx
|
||||||
@ -557,6 +523,7 @@ popa
|
|||||||
mov ebx,ed_pos
|
mov ebx,ed_pos
|
||||||
cmp ebx,dword ed_size
|
cmp ebx,dword ed_size
|
||||||
je .sh_st_of
|
je .sh_st_of
|
||||||
|
call .sh_first_sh
|
||||||
mov eax,ed_size
|
mov eax,ed_size
|
||||||
mov ed_pos,eax
|
mov ed_pos,eax
|
||||||
call .sh_home_end
|
call .sh_home_end
|
||||||
@ -568,20 +535,21 @@ popa
|
|||||||
|
|
||||||
@@: mov ebp,shift_color
|
@@: mov ebp,shift_color
|
||||||
or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« áâ¨
|
or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« áâ¨
|
||||||
|
mov ebx,dword ed_shift_pos
|
||||||
call .sh_cl_
|
call .sh_cl_
|
||||||
jmp .draw_cursor_text
|
jmp .draw_cursor_text
|
||||||
;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
.f_exit:call .check_offset
|
.f_exit:call .check_offset
|
||||||
and word ed_flags,ed_shift_cl
|
and word ed_flags,ed_shift_cl
|
||||||
call .enable_null
|
call .enable_null
|
||||||
jmp .draw_cursor_text
|
jmp .draw_cursor_text
|
||||||
.sh_cl_:
|
.sh_cl_:
|
||||||
;;;;;;SHIFT end
|
;;;;;;SHIFT end
|
||||||
;®¡à ¡®âª ®ç¨á⪨, ¯à¨ «¥¢®¬ - ¯à ¢®¬ ¤¢¨¦¥¨¨ ¢ë¤¥«¥¨ï
|
;®¡à ¡®âª ®ç¨á⪨, ¯à¨ «¥¢®¬ - ¯à ¢®¬ ¤¢¨¦¥¨¨ ¢ë¤¥«¥¨ï
|
||||||
;¤«ï ®¡à ¡®âª¨ áïâ¨ï ¢ë¤¥«¥¨ï
|
;¤«ï ®¡à ¡®âª¨ áïâ¨ï ¢ë¤¥«¥¨ï
|
||||||
; or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« áâ¨
|
;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos
|
||||||
mov eax,dword ed_pos
|
mov eax,dword ed_pos
|
||||||
mov ebx,dword ed_shift_pos
|
; mov ebx,dword ed_shift_pos
|
||||||
cmp eax,ebx
|
cmp eax,ebx
|
||||||
jae .sh_n
|
jae .sh_n
|
||||||
push eax ;¬¥ì襥 ¢ eax
|
push eax ;¬¥ì襥 ¢ eax
|
||||||
@ -592,11 +560,8 @@ popa
|
|||||||
push eax
|
push eax
|
||||||
.sh_n1:
|
.sh_n1:
|
||||||
call .check_offset
|
call .check_offset
|
||||||
; test eax,eax
|
|
||||||
; jz .drw_sim
|
|
||||||
call .get_n
|
call .get_n
|
||||||
mov edx,eax ;size of ed_box
|
mov edx,eax ;size of ed_box
|
||||||
; push eax
|
|
||||||
mov ecx,ed_offset
|
mov ecx,ed_offset
|
||||||
add eax,ecx ;eax = w_off= ed_offset+width
|
add eax,ecx ;eax = w_off= ed_offset+width
|
||||||
mov edx,eax ;save
|
mov edx,eax ;save
|
||||||
@ -613,7 +578,6 @@ popa
|
|||||||
@@: mov ebx,edx
|
@@: mov ebx,edx
|
||||||
sub ebx,ecx
|
sub ebx,ecx
|
||||||
jmp .nxt_f
|
jmp .nxt_f
|
||||||
|
|
||||||
.f_f:
|
.f_f:
|
||||||
sub eax,ecx
|
sub eax,ecx
|
||||||
cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬
|
cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬
|
||||||
@ -639,9 +603,7 @@ popa
|
|||||||
mov edx,ebp;shift_color
|
mov edx,ebp;shift_color
|
||||||
|
|
||||||
call .draw_bg_eax
|
call .draw_bg_eax
|
||||||
@@: ;and word ed_flags,1111111111111011b
|
@@: call .enable_null
|
||||||
call .enable_null
|
|
||||||
;mov dword ed_shift_pos,0
|
|
||||||
ret
|
ret
|
||||||
;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
;“áâ ®¢ª - áï⨥ ¢ë¤¥«¥¨ï ¢ ®¤¨ ᨬ¢®«
|
;“áâ ®¢ª - áï⨥ ¢ë¤¥«¥¨ï ¢ ®¤¨ ᨬ¢®«
|
||||||
@ -651,8 +613,6 @@ popa
|
|||||||
call .draw_rectangle ; à¨á®¢ âì ¯àאַ㣮«ì¨ª á § ¤ ë¬ æ¢¥â®¬
|
call .draw_rectangle ; à¨á®¢ âì ¯àאַ㣮«ì¨ª á § ¤ ë¬ æ¢¥â®¬
|
||||||
jmp @b
|
jmp @b
|
||||||
;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
;;;;;;;;;;
|
|
||||||
;”ãªæ¨ï ãáâ ®¢ª¨ ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift
|
;”ãªæ¨ï ãáâ ®¢ª¨ ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift
|
||||||
;‹®£¨ª :
|
;‹®£¨ª :
|
||||||
;;;;;;;;;;
|
;;;;;;;;;;
|
||||||
@ -664,11 +624,8 @@ popa
|
|||||||
or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« áâ¨
|
or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« áâ¨
|
||||||
mov ebp,shift_color
|
mov ebp,shift_color
|
||||||
mov eax,dword ed_pos
|
mov eax,dword ed_pos
|
||||||
;mov ebx,dword ed_shift_pos
|
|
||||||
test word ed_flags,ed_left_fl
|
test word ed_flags,ed_left_fl
|
||||||
jz .low
|
jz .low
|
||||||
; sub eax,2
|
|
||||||
;dec eax
|
|
||||||
jmp @f
|
jmp @f
|
||||||
;;;;;;;;;;
|
;;;;;;;;;;
|
||||||
;”ãªæ¨ï 㤠«¥¨ï ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift
|
;”ãªæ¨ï 㤠«¥¨ï ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift
|
||||||
@ -681,7 +638,6 @@ popa
|
|||||||
|
|
||||||
mov ebp,ed_color
|
mov ebp,ed_color
|
||||||
mov eax,dword ed_pos
|
mov eax,dword ed_pos
|
||||||
;mov ebx,dword ed_shift_pos
|
|
||||||
test word ed_flags,ed_left_fl
|
test word ed_flags,ed_left_fl
|
||||||
jz .low
|
jz .low
|
||||||
;dec eax
|
;dec eax
|
||||||
@ -699,7 +655,6 @@ popa
|
|||||||
mov dword ed_shift_pos,ebx
|
mov dword ed_shift_pos,ebx
|
||||||
or word ed_flags,ed_shift_on
|
or word ed_flags,ed_shift_on
|
||||||
@@: ret
|
@@: ret
|
||||||
|
|
||||||
;Ž¡à ¡®âª ªà ©¨å ¯®«®¦¥¨© ¢ editbox ¯à¨ ¦ ⮬ shift
|
;Ž¡à ¡®âª ªà ©¨å ¯®«®¦¥¨© ¢ editbox ¯à¨ ¦ ⮬ shift
|
||||||
;¯à®¨§¢®¤¨â áï⨥ ¢ë¤¥«¥¨¥, ¥á«¨ ¥â shift
|
;¯à®¨§¢®¤¨â áï⨥ ¢ë¤¥«¥¨¥, ¥á«¨ ¥â shift
|
||||||
;¨ ç¥ ¢®®¡é¥ ¢ë室¨â
|
;¨ ç¥ ¢®®¡é¥ ¢ë室¨â
|
||||||
@ -709,32 +664,11 @@ popa
|
|||||||
test word ed_flags,ed_shift_bac
|
test word ed_flags,ed_shift_bac
|
||||||
je @f
|
je @f
|
||||||
mov ebp,ed_color
|
mov ebp,ed_color
|
||||||
|
mov ebx,dword ed_shift_pos
|
||||||
call .sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â
|
call .sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â
|
||||||
call .draw_wigwag_cl
|
|
||||||
and word ed_flags,ed_shift_cl ; ®ç¨á⪠®â ⮣® çâ® ã¡à «¨ ¢ë¤¥«¥¨¥
|
and word ed_flags,ed_shift_cl ; ®ç¨á⪠®â ⮣® çâ® ã¡à «¨ ¢ë¤¥«¥¨¥
|
||||||
jmp .draw_cursor_text
|
jmp .draw_cursor_text
|
||||||
@@:
|
@@:
|
||||||
;----------- ®â« ¤ª
|
|
||||||
; pushad
|
|
||||||
; mov dword [ed_buffer.3],0
|
|
||||||
; mov eax,ebx;word ed_flags
|
|
||||||
; mov edi,ed_buffer.3
|
|
||||||
; call .str
|
|
||||||
; ;à¨á®¢ ¨¥ ä®
|
|
||||||
; mov eax,13
|
|
||||||
; mov ebx,178*65536+70
|
|
||||||
; mov ecx,28*65536+10
|
|
||||||
; xor edx,edx
|
|
||||||
; int 0x40
|
|
||||||
; ;¢ë¢®¤ § 票ï íªà
|
|
||||||
; mov eax,4
|
|
||||||
; mov ebx,180*65536+30
|
|
||||||
; mov ecx,0x10DDBBCC
|
|
||||||
; mov edx,ed_buffer.3
|
|
||||||
; mov esi,8
|
|
||||||
; int 0x40
|
|
||||||
; popad
|
|
||||||
;----------- ®â« ¤ª
|
|
||||||
and word ed_flags,ed_shift_off
|
and word ed_flags,ed_shift_off
|
||||||
popa
|
popa
|
||||||
ret
|
ret
|
||||||
@ -749,6 +683,7 @@ popa
|
|||||||
call .check_offset
|
call .check_offset
|
||||||
|
|
||||||
mov ebp,ed_color
|
mov ebp,ed_color
|
||||||
|
mov ebx,dword ed_shift_pos
|
||||||
call .sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â
|
call .sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â
|
||||||
call .draw_wigwag_cl
|
call .draw_wigwag_cl
|
||||||
and word ed_flags,ed_shift_cl ; 1¢ à ¥ 㦮
|
and word ed_flags,ed_shift_cl ; 1¢ à ¥ 㦮
|
||||||
@ -760,8 +695,8 @@ popa
|
|||||||
ret
|
ret
|
||||||
.sh_ext_en:
|
.sh_ext_en:
|
||||||
call .check_offset
|
call .check_offset
|
||||||
test eax,eax
|
test word ed_flags,ed_offset_fl
|
||||||
jnz @f
|
jne @f
|
||||||
;<3B>¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ®ç¨á⪠¨å
|
;<3B>¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ®ç¨á⪠¨å
|
||||||
mov eax,dword ed_shift_pos
|
mov eax,dword ed_shift_pos
|
||||||
mov ebx,dword ed_pos
|
mov ebx,dword ed_pos
|
||||||
@ -784,6 +719,7 @@ popa
|
|||||||
.sh_e_end: and word ed_flags,ed_shift_off
|
.sh_e_end: and word ed_flags,ed_shift_off
|
||||||
ret
|
ret
|
||||||
@@: mov ebp,shift_color
|
@@: mov ebp,shift_color
|
||||||
|
mov ebx,dword ed_shift_pos
|
||||||
call .sh_cl_
|
call .sh_cl_
|
||||||
jmp .sh_e_end
|
jmp .sh_e_end
|
||||||
;äãªæ¨ï ¤«ï ®¡à ¡®âª¨ shift ¯à¨ ¦ ⨨ home and end
|
;äãªæ¨ï ¤«ï ®¡à ¡®âª¨ shift ¯à¨ ¦ ⨨ home and end
|
||||||
@ -793,29 +729,18 @@ popa
|
|||||||
test word ed_flags,ed_shift_bac
|
test word ed_flags,ed_shift_bac
|
||||||
je @f
|
je @f
|
||||||
mov ebp,ed_color
|
mov ebp,ed_color
|
||||||
|
mov ebx,dword ed_shift_pos_old
|
||||||
call .sh_cl_
|
call .sh_cl_
|
||||||
|
|
||||||
@@: test word ed_flags,ed_shift
|
@@: test word ed_flags,ed_shift
|
||||||
je .sh_exit_ ; à¨á®¢ âì § ªà è¥ë© ¯àאַ㣮«ì¨ª (®¡« áâì)
|
je .sh_exit_ ; à¨á®¢ âì § ªà è¥ë© ¯àאַ㣮«ì¨ª (®¡« áâì)
|
||||||
call .check_offset
|
|
||||||
mov ebp,shift_color
|
mov ebp,shift_color
|
||||||
|
mov ebx,dword ed_shift_pos
|
||||||
call .sh_cl_
|
call .sh_cl_
|
||||||
or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« áâ¨
|
or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« áâ¨
|
||||||
jmp .sh_e_end
|
jmp .sh_e_end
|
||||||
.sh_exit_: ret
|
.sh_exit_: call .check_offset
|
||||||
|
ret
|
||||||
|
|
||||||
; test word ed_flags,ed_shift_bac
|
|
||||||
; je @f
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;äãªæ¨ï ¢¥á¥¨ï 0 ¯® ¤à¥áã ed_size+1
|
;äãªæ¨ï ¢¥á¥¨ï 0 ¯® ¤à¥áã ed_size+1
|
||||||
.enable_null:
|
.enable_null:
|
||||||
pusha
|
pusha
|
||||||
@ -827,9 +752,8 @@ popa
|
|||||||
mov [eax],bl
|
mov [eax],bl
|
||||||
popa
|
popa
|
||||||
ret
|
ret
|
||||||
|
;- 㤠«¥¨¥ ᨬ¢®«
|
||||||
;- 㤠«¥¨¥ ᨬ¢®«
|
;‚å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos
|
||||||
;‚å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos
|
|
||||||
.del_char:
|
.del_char:
|
||||||
mov esi,ed_text
|
mov esi,ed_text
|
||||||
test word ed_flags,ed_shift_on
|
test word ed_flags,ed_shift_on
|
||||||
@ -876,7 +800,6 @@ popa
|
|||||||
|
|
||||||
pop edi
|
pop edi
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;¢ëç¨á«¨âì § ªà 訢 ¥¬ãî ®¡« áâì
|
;¢ëç¨á«¨âì § ªà 訢 ¥¬ãî ®¡« áâì
|
||||||
;ᮣ« 襨¥ ¢ ebp - ¯¥à¥¤ ¥âáï ed_size
|
;ᮣ« 襨¥ ¢ ebp - ¯¥à¥¤ ¥âáï ed_size
|
||||||
.clear_bg:
|
.clear_bg:
|
||||||
@ -930,7 +853,6 @@ popa
|
|||||||
;eax=dword ed_pos
|
;eax=dword ed_pos
|
||||||
;ebp=-梥â ed_color or shift_color
|
;ebp=-梥â ed_color or shift_color
|
||||||
.draw_rectangle:
|
.draw_rectangle:
|
||||||
; mov eax,dword ed_pos
|
|
||||||
mov ecx,dword ed_offset
|
mov ecx,dword ed_offset
|
||||||
sub eax,ecx
|
sub eax,ecx
|
||||||
lea ebx,[eax*2+eax]
|
lea ebx,[eax*2+eax]
|
||||||
@ -1014,8 +936,6 @@ pusha
|
|||||||
jc @f
|
jc @f
|
||||||
call .draw_cursor
|
call .draw_cursor
|
||||||
jmp .drc
|
jmp .drc
|
||||||
|
|
||||||
|
|
||||||
._blur:
|
._blur:
|
||||||
test word ed_flags,ed_always_focus
|
test word ed_flags,ed_always_focus
|
||||||
jne @f
|
jne @f
|
||||||
@ -1042,9 +962,9 @@ ret
|
|||||||
;popa
|
;popa
|
||||||
;ret
|
;ret
|
||||||
}
|
}
|
||||||
ed_figure_only= 1000000000000000b
|
ed_figure_only= 1000000000000000b ;®¤¨ ᨬ¢®«ë
|
||||||
ed_always_focus= 100000000000000b
|
ed_always_focus= 100000000000000b
|
||||||
ed_focus=10b
|
ed_focus= 10b ;䮪ãá ¯à¨«®¦¥¨ï
|
||||||
ed_shift_on= 1000b ;¥á«¨ ¥ ãáâ ®¢«¥ -§ ç¨â ¢¯¥à¢ë¥ ¦ â shift,¥á«¨ ¡ë« ãáâ ®¢«¥, § ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift
|
ed_shift_on= 1000b ;¥á«¨ ¥ ãáâ ®¢«¥ -§ ç¨â ¢¯¥à¢ë¥ ¦ â shift,¥á«¨ ¡ë« ãáâ ®¢«¥, § ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift
|
||||||
ed_shift= 100b ;¢ª«îç ¥âáï ¯à¨ ¦ ⨨ shift â.¥. ¥á«¨ ¦¨¬ î
|
ed_shift= 100b ;¢ª«îç ¥âáï ¯à¨ ¦ ⨨ shift â.¥. ¥á«¨ ¦¨¬ î
|
||||||
ed_shift_off= 1111111111111011b
|
ed_shift_off= 1111111111111011b
|
||||||
@ -1052,6 +972,8 @@ ed_shift_bac= 10000b ;
|
|||||||
ed_shift_cl= 1111111111100011b
|
ed_shift_cl= 1111111111100011b
|
||||||
ed_left_fl= 100000b
|
ed_left_fl= 100000b
|
||||||
ed_right_fl= 1111111111011111b
|
ed_right_fl= 1111111111011111b
|
||||||
|
ed_offset_fl= 1000000b
|
||||||
|
ed_offset_cl= 1111111110111111b
|
||||||
ed_insert= 10000000b
|
ed_insert= 10000000b
|
||||||
ed_insert_cl= 1111111101111111b
|
ed_insert_cl= 1111111101111111b
|
||||||
ed_height=14 ; ¢ëá®â
|
ed_height=14 ; ¢ëá®â
|
||||||
@ -1081,13 +1003,15 @@ macro key_edit_boxes start,end
|
|||||||
mov edi,start
|
mov edi,start
|
||||||
mov ecx,((end-start)/ed_struc_size)
|
mov ecx,((end-start)/ed_struc_size)
|
||||||
@@:
|
@@:
|
||||||
|
; push eax
|
||||||
call edit_box.key
|
call edit_box.key
|
||||||
|
; pop eax
|
||||||
add edi,ed_struc_size
|
add edi,ed_struc_size
|
||||||
loop @b
|
loop @b
|
||||||
}
|
}
|
||||||
ed_struc_size=66
|
ed_struc_size=66
|
||||||
struc edit_box width,left,top,color,focus_border_color,\
|
struc edit_box width,left,top,color,focus_border_color,\
|
||||||
blur_border_color,text_color,max,text,flags,size
|
blur_border_color,text_color,max,text,flags
|
||||||
{
|
{
|
||||||
.width dd width
|
.width dd width
|
||||||
.left dd left
|
.left dd left
|
||||||
@ -1099,7 +1023,7 @@ struc edit_box width,left,top,color,focus_border_color,\
|
|||||||
.max dd max
|
.max dd max
|
||||||
.text dd text
|
.text dd text
|
||||||
.flags dw flags+0
|
.flags dw flags+0
|
||||||
.size dd size+0
|
.size dd 0
|
||||||
.pos dd 0
|
.pos dd 0
|
||||||
.offset dd 0
|
.offset dd 0
|
||||||
.cl_curs_x dd 0
|
.cl_curs_x dd 0
|
||||||
|
@ -81,22 +81,22 @@ draw_window: ;
|
|||||||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||||
;DATA ¤ ë¥
|
;DATA ¤ ë¥
|
||||||
editboxes:
|
editboxes:
|
||||||
edit1 edit_box 168,5,30,0xffffff,0,0,0,512,ed_buffer.1,ed_focus
|
edit1 edit_box 168,5,10,0xffffff,0,0,0,99,ed_buffer.2,ed_figure_only
|
||||||
edit2 edit_box 168,5,10,0xffffff,0,0,0,99,ed_buffer.2,ed_figure_only
|
edit2 edit_box 168,5,30,0xffffff,0,0,0,512,ed_buffer.1,ed_focus
|
||||||
edit3 edit_box 35,5,50,0xffffff,0,0,0,9,ed_buffer.3,ed_figure_only
|
edit3 edit_box 35,5,50,0xffffff,0,0,0,9,ed_buffer.3,ed_figure_only
|
||||||
edit4 edit_box 16,5,70,0xffffff,0,0,0,1,ed_buffer.4,ed_figure_only
|
edit4 edit_box 16,5,70,0xffffff,0,0,0,1,ed_buffer.4,ed_figure_only
|
||||||
editboxes_end:
|
editboxes_end:
|
||||||
;data_of_code dd 0
|
data_of_code dd 0
|
||||||
ed_buffer:
|
ed_buffer:
|
||||||
.1: rb 513;256
|
.1: rb 514;256
|
||||||
.2: rb 100
|
.2: rb 101
|
||||||
.3: rb 10
|
.3: rb 11
|
||||||
.4: rb 2
|
.4: rb 3
|
||||||
|
;¤¢ § ¯ áëå ¡ ©â ¥®¡å®¤¨¬ë ¤«ï ⮣® çâ® ¡ë ¥ ¯¥¯¥à¥¯¨á âì á«¥¤ãî騥© ¡ ©âë, ¢ ª®æ¥ ¡ãä¥à 0
|
||||||
;text_b: db 'Š®«-¢® ᨬ¢®«®¢'
|
;text_b: db 'Š®«-¢® ᨬ¢®«®¢'
|
||||||
;buffer: dd 0
|
;buffer: dd 0
|
||||||
buffer_end:
|
buffer_end:
|
||||||
hed db 'EDITBOX optimization and retype <Lrz> date 06.03.2007',0
|
hed db 'EDITBOX optimization and retype <Lrz> date 07.03.2007',0
|
||||||
i_end1:
|
i_end1:
|
||||||
rb 1024
|
rb 1024
|
||||||
i_end:
|
i_end:
|
||||||
keymap:
|
|
Loading…
Reference in New Issue
Block a user