new option in function 'ted_init_scroll_bars'

git-svn-id: svn://kolibrios.org@1459 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA
2010-05-05 19:38:25 +00:00
parent 16c8c37422
commit 2accd7bab7
4 changed files with 33 additions and 8 deletions
@@ -1,6 +1,6 @@
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
; í«¥¬¥­â TextEditor ¤«ï Kolibri OS
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 03.05.2010 IgorA
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 05.05.2010 IgorA
; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï
;input:
@@ -178,10 +178,12 @@ endp
MIN_W_SCRL_ARE equ 3 ;¬¨­¨¬ «ì­ ï ®â®¡à ¦ ¥¬ ï ®¡« áâì ¤«ï ¢¥àâ. áªà®««¨­£ 
MIN_H_SCRL_ARE equ 3 ;¬¨­¨¬ «ì­ ï ®â®¡à ¦ ¥¬ ï ®¡« áâì ¤«ï £®à¨§. áªà®««¨­£ 
;input:
; opt = 1 - ¬¥­ïâì æ¢¥â áªà®««¨­£®¢, 2 - ¬¥­ïâì ¢­¥è­¨¥ à §¬¥àë
; opt = 1 - ¬¥­ïâì æ¢¥â áªà®««¨­£®¢, 2 - ¨§¬¥­¨«¨áì à §¬¥àë ®ª­ ,
; 4 - ¨§¬¥­¨«¨áì à §¬¥àë ¤®ªã¬¥­â 
align 4
proc ted_init_scroll_bars, edit:dword, opt:dword
pushad
mov edi,dword[edit]
mov esi,ted_scr_w
mov ebx,ted_scr_h
bt dword[opt],0
@@ -196,7 +198,16 @@ proc ted_init_scroll_bars, edit:dword, opt:dword
mov dword[esi+sb_offs_line_col],ecx
mov dword[ebx+sb_offs_line_col],ecx
@@:
bt dword[opt],1
bt dword[opt],2 ; ¨§¬¥­¨«¨áì à §¬¥àë ¤®ªã¬¥­â  ?
jae .doc_resize
call ted_get_num_lines
cmp eax,100
jge @f
mov eax,100
@@:
mov dword[esi+sb_offs_max_area],eax
.doc_resize:
bt dword[opt],1 ; ¨§¬¥­¨«¨áì à §¬¥àë ®ª­  ?
jae .no_size
mov edx,ted_wnd_l
add edx,ted_rec_l