Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 403 → Rev 404

/programs/develop/examples/editbox/trunk/EDITBOX.INC
1,3 → 1,4
; <Lrz> 09.03.2007 „®¯¨á « ã¯à ¢«¥­¨¥ mouse + shift ¢ë¤¥«¥­¨¥ ¨ ¯¥à¥¬¥é¥­¨¥
; <Lrz> 07.03.2007 „®¯¨á « ã¯à ¢«¥­¨¥ á shift home + end ãá¯à ¢¨« ­¥áª®«ìª® ¡ £®¢
; <Lrz> 06.03.2007 ¥à¥¯¨á « ¯®«­®áâìî  «£®à¨â¬ ã¯à ¢«¥­¨ï shift
; <Lrz> 15.02.2007 ã«ãç襭¨¥ á­ïâ¨ï ¢ë¤¥«¥­¨ï ¨ ¯¥à¥à¨á®¢ª¨ ®ç¨é ¥¬®© ®¡« áâ¨, §­ ç¨â¥«ì­® ¯à¨ïâ­¥¥ à ¡®â ¥â ª®¬¯®­¥­â
309,16 → 310,7
test word ed_flags,ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
je @b
;à®¢¥àª  ­  ­ ¦ âë shift
xor ecx,ecx
push eax
inc ecx
mov eax,66
mov ebx,3
int 0x40
test al,0x03
je @f
or word ed_flags,ed_shift ;ãáâ ­®¢¨¬ ä« £
@@: pop eax ;¢®ááâ ­®¢¨¬ áç¨â ­ë© ᨬ¢®« á ª« ¢¨ âãàë
call .check_shift
;----------------------------------------------------------
;--- ¯à®¢¥à塞, çâ® ­ ¦ â® --------------------------------
;----------------------------------------------------------
875,6 → 867,22
mov edx,ebp
call .draw_bg_eax
ret
;;;;;;;;;;;;;;;;;;
;;à®¢¥àª  ­ ¦ â «¨ shift
;;;;;;;;;;;;;;;;;;
.check_shift:
pusha ;á®åà ­¨¬ ¢á¥ ॣ¨áâàë
xor ecx,ecx
inc ecx
mov eax,66
mov ebx,3
int 0x40
test al,0x03
je @f
or word ed_flags,ed_shift ;ãáâ ­®¢¨¬ ä« £
@@: popa ;¢®ááâ ­®¢¨¬ ॣ¨áâàë
ret
 
;==========================================================
;=== ®¡à ¡®âª  ¬ëè¨ =======================================
;==========================================================
937,6 → 945,9
jna @f
mov ax,ed_size
@@:
;;;;;;;
;;‘¥ªæ¨ï ®¡à ¡®âª¨ shift ¨ ¢ë¤¥«¥­¨ï ¯® shift
;;;;;;;
test word ed_flags,ed_shift_bac
je @f
mov ebp,dword ed_color
943,26 → 954,35
mov ebx,dword ed_shift_pos
push eax
call .sh_cl_
and word ed_flags,ed_shift_cl
and word ed_flags,ed_shift_bac_cl
pop eax
 
@@:
@@: call .check_shift ;¯à®¢¥à¨¬ ­ ¦ â «¨ shift
 
test word ed_flags,ed_shift
je @f
mov ebx,ed_pos
mov ed_shift_pos,ebx
je ._msh_exit
test word ed_flags,ed_shift_on
jne @f
 
push dword ed_pos
pop dword ed_shift_pos
or word ed_flags,ed_shift_on
@@:
mov ed_pos,eax
mov ebp,dword shift_color
 
mov ebx,dword ed_shift_pos
call .sh_cl_
or word ed_flags,ed_shift_bac ;ãáâ ­®¢¨¬ ¡¨â çâ® ¬ë ¢ë¤¥«¨«¨
and word ed_flags,ed_shift_off
jmp .m_sh
@@:
mov ed_pos,ax
._msh_exit:
mov ed_pos,eax
mov dword ed_shift_pos,eax
 
.m_sh: call .draw_text
call .draw_cursor
 
 
and word ed_flags,ed_shift_off ;¢ëª«î稬 ¢ «î¡®¬ á«ãç ¥ shift
;----------------------------------------------------------
;--- ¯à®æ¥¤ãà  ãáâ ­®¢ª¨ 䮪ãá  ---------------------------
;----------------------------------------------------------
1004,6 → 1024,7
ed_shift= 100b ;¢ª«îç ¥âáï ¯à¨ ­ ¦ â¨¨ ­  shift â.¥. ¥á«¨ ­ ¦¨¬ î
ed_shift_off= 1111111111111011b
ed_shift_bac= 10000b ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥­®£® shift â.¥. ¯à¨ ãáâ ­®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥­¨¥
ed_shift_bac_cl=1111111111101111b ;®ç¨á⪠ ¯à¨ 㤠«¥­¨¨ ¢ë¤¥«¥­¨ï
ed_shift_cl= 1111111111100011b
ed_left_fl= 100000b
ed_right_fl= 1111111111011111b
1038,15 → 1059,13
mov edi,start
mov ecx,((end-start)/ed_struc_size)
@@:
; push eax
call edit_box.key
; pop eax
add edi,ed_struc_size
loop @b
}
ed_struc_size=66
struc edit_box width,left,top,color,focus_border_color,\
blur_border_color,text_color,max,text,flags
blur_border_color,text_color,max,text,flags,size
{
.width dd width
.left dd left
/programs/develop/examples/editbox/trunk/editbox.asm
88,7 → 88,7
editboxes_end:
data_of_code dd 0
ed_buffer:
.1: rb 514;256
;.1: rb 514;256
.2: rb 101
.3: rb 11
.4: rb 3
96,7 → 96,7
;text_b: db 'Š®«-¢® ᨬ¢®«®¢'
;buffer: dd 0
buffer_end:
hed db 'EDITBOX optimization and retype <Lrz> date 07.03.2007',0
hed db 'EDITBOX optimization and retype <Lrz> date 09.03.2007',0
rb 256
i_end1:
rb 1024