Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5691 → Rev 5692

/programs/develop/libraries/box_lib/trunk/editbox.mac
11,23 → 11,21
.draw_1:
;--- à¨á㥬 à ¬ªã ---
mov edi,dword [esp+36]
call .draw_border ; ”ã­ªæ¨ï áâ ¡¨«ì­ 
call .draw_border
.draw_bg_cursor_text:
;--- ¨§¬¥­ï¥¬ ᬥ饭¨¥, ¥á«¨ ­ ¤® ---
call .check_offset ;¢ëç¨á«¥­¨¥ ¯®§¨æ¨¨ ªãàá®à  áâ ¡¨«ì­ 
call .check_offset
;--- à¨á㥬 ¢­ãâ७­îî ®¡« áâì ---
call .draw_bg ;­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª à ¡®ç¥© ®¡« áâ¨
;---- à¨á㥬 ¢ë¤¥«¥­¨¥, ¯® shift ¥á«¨ ¥áâì
call .draw_bg
;--- à¨á㥬 ¢ë¤¥«¥­¨¥, ¯® shift ¥á«¨ ¥áâì ---
call .draw_shift
.draw_cursor_text:
call .draw_text
;--- à¨á㥬 ªãàá®à ---
;--- ¬®¦¥â ¥£® ­¥ ­ ¤® à¨á®¢ âì ----
;--- ¬®¦¥â ¥£® ­¥ ­ ¤® à¨á®¢ âì ---
test word ed_flags,ed_focus
jz @f
jz .editbox_exit
call .draw_cursor
@@:
call .draw_text
; ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Ž¡é¨© ¢ë室 ¨§ editbox ¤«ï ¢á¥å ä㭪権 ¨ ¯®áâ ®¡à ¡®â稪®¢;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
194,7 → 192,7
{
;debug_func
;----------------------------------------------------------
;--- ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ ¢ë¤¥«¥­­®© ç á⨠-----------------
;--- ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ ¢ë¤¥«¥­­®© ç á⨠----------------
;----------------------------------------------------------
edit_box.draw_shift:
test word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« áâ¨
208,7 → 206,6
;----------------------------------------------------------
edit_box.draw_text:
;--- ¢ëç¨á«ï¥¬, ᪮«ìª® ¯®¬¥é ¥âáï ᨬ¢®«®¢ ---
;--- çâ®¡ë ¬ãá®à ­¥ à¨á®¢ âì ---
call edit_box.get_n
mov esi,ed_size
mov ebx,ed_offset
215,7 → 212,7
sub esi,ebx
cmp eax,esi
jae @F
mov esi,eax ;çâ®¡ë ­¥ ¢ë室¨âì §  ¯à¥¤¥«ë íªà ­ 
mov esi,eax
;--- à¨á㥬 ⥪áâ ---
@@: mov eax,4
mov ebx,ed_left
227,16 → 224,10
add ebx,4
add edx,ed_text
test word ed_flags,ed_pass
jz @f
call edit_box.draw_password
jmp .end_f
@@:
jnz edit_box.draw_password
mcall
.end_f:
ret
 
txt_pass db '*',0
 
proc edit_box.draw_password
locals
s_len dw ? ;¤«¨­  ¢ë¢®¤¨¬®£® ⥪áâ 
458,10 → 449,11
{
;Ž¡à ¡®âª  Shift ¤«ï á­ïâ¨ï ¢ë¤¥«¥­¨ï ­¥¨§¢¥áâ­®© ®¡« áâ¨
edit_box_key.shift: ;;;;;;;SHIFT
call edit_box.draw_bg
test word ed_flags,ed_shift
je edit_box_key.f_exit
 
@@: mov ebp,shift_color
mov ebp,shift_color
or word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« áâ¨
mov ebx,dword ed_shift_pos
call edit_box_key.sh_cl_
592,6 → 584,7
jne @f
test word ed_flags,ed_shift_bac
je @f
call edit_box.draw_bg
mov ebp,ed_color
mov ebx,dword ed_shift_pos
call edit_box_key.sh_cl_ ;®ç¨á⪠ ¢ë¤¥«¥­®£® äà £¬¥­â 
1047,6 → 1040,8
or word ed_flags,ed_left_fl
call edit_box_key.sh_first_sh
dec dword ed_pos
call edit_box.draw_bg
call edit_box.draw_shift
call edit_box_key.sh_enable
jmp edit_box.draw_cursor_text
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1058,6 → 1053,8
and word ed_flags,ed_right_fl
call edit_box_key.sh_first_sh
inc dword ed_pos
call edit_box.draw_bg
call edit_box.draw_shift
call edit_box_key.sh_enable
jmp edit_box.draw_cursor_text
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1068,6 → 1065,8
call edit_box_key.sh_first_sh
xor eax,eax
mov ed_pos,eax
call edit_box.draw_bg
call edit_box.draw_shift
call edit_box_key.sh_home_end
jmp edit_box.draw_cursor_text
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1078,6 → 1077,8
call edit_box_key.sh_first_sh
mov eax,ed_size
mov ed_pos,eax
call edit_box.draw_bg
call edit_box.draw_shift
call edit_box_key.sh_home_end
jmp edit_box.draw_cursor_text
;-----------------------------------------------------------------------------
1194,6 → 1195,10
;--- Ž¡à ¡®âª  .mouse_wigwag
;----------------------------------------------------------
edit_box_mouse.mouse_wigwag:
push eax
call edit_box.draw_bg
call edit_box.draw_shift
pop eax
shr eax,16
or word ed_flags,ed_shift_bac+ed_shift_on+ed_shift
;;;;;;;;;;;;;;;;;;
1258,8 → 1263,6
edit_box_mouse.mwigvag:
and word ed_flags,ed_shift_mcl
jmp edit_box.draw_cursor_text
; popa
; ret
edit_box_mouse.mleft:
mov eax,ed_pos
cmp eax,0
1347,26 → 1350,20
@@:
test word ed_flags,ed_mouse_on
jne @f
 
mov dword ed_shift_pos,eax
or word ed_flags,ed_mouse_on
mov dword ed_pos,eax
 
; mov dword [mouse_flag],edi ;ãáâ ­®¢¨¬ ¨¤¥­â¨ä¨ª â®à
 
mov ebx,dword ed_mouse_variable
push edi
pop dword [ebx]
 
 
 
 
bts word ed_flags,1 ;ãáâ ­®¢ª  䮪ãá 
call edit_box.draw_bg
jmp edit_box_mouse.m_sh
@@:
cmp eax,dword ed_shift_pos ;¥á«¨ ¯®§¨æ¨¨ ­¥ ¨§¬¥­¨«¨áì
je edit_box.editbox_exit
mov ed_pos,eax
call edit_box.draw_bg
mov ebp,dword shift_color
mov ebx,dword ed_shift_pos
call edit_box_key.sh_cl_