forked from KolibriOS/kolibrios
change scrollbars sizes
git-svn-id: svn://kolibrios.org@6358 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6f44ae55dd
commit
a18a9cc46b
@ -45,6 +45,15 @@ include '../../../libio.inc'
|
|||||||
|
|
||||||
;---------------------------------------------------------
|
;---------------------------------------------------------
|
||||||
; *** ª®áâ âë ¤«ï ¨â¥à䥩á ***
|
; *** ª®áâ âë ¤«ï ¨â¥à䥩á ***
|
||||||
|
; *** constants for interface ***
|
||||||
|
|
||||||
|
; ª®à४â¨à®¢ª¨ ᪨
|
||||||
|
ci_offs_skin_w equ 0 ; 5 ;ª®à४â¨à®¢ª è¨à¨ã à ¬ª¨ ᪨
|
||||||
|
ci_offs_skin_h equ 0 ;24 ;ª®à४â¨à®¢ª ¢ëá®âã ᪨
|
||||||
|
|
||||||
|
; £« ¢®¥ ®ª®
|
||||||
|
ci_wnd_min_siz_x equ 585 ;minimum size x
|
||||||
|
ci_wnd_min_siz_y equ 400 ;minimum size y
|
||||||
|
|
||||||
; ®ª® । ªâ®à
|
; ®ª® । ªâ®à
|
||||||
ci_edit_wnd_x_pos equ 5 ;ª®®à¤¨ â x ¤«ï ®ª । ªâ®à
|
ci_edit_wnd_x_pos equ 5 ;ª®®à¤¨ â x ¤«ï ®ª । ªâ®à
|
||||||
@ -52,6 +61,7 @@ ci_edit_wnd_y_pos equ 87 ;
|
|||||||
ci_edit_wnd_border equ 3 ;à ¬ª ¢®ªà㣠®ª । ªâ®à
|
ci_edit_wnd_border equ 3 ;à ¬ª ¢®ªà㣠®ª । ªâ®à
|
||||||
|
|
||||||
; áªà®««¨£¨
|
; áªà®««¨£¨
|
||||||
|
ci_scroll_dim equ 22 ;à §¬¥àë áªà®««¨£®¢
|
||||||
ci_scrollh_coord_x_min equ (ci_edit_wnd_x_pos+3) ;¬¨¨¬ «ì ï ¯®§¨æ¨ï ¯®«§ãª
|
ci_scrollh_coord_x_min equ (ci_edit_wnd_x_pos+3) ;¬¨¨¬ «ì ï ¯®§¨æ¨ï ¯®«§ãª
|
||||||
;£®à¨§®â «ì®£® áªà®««¨£
|
;£®à¨§®â «ì®£® áªà®««¨£
|
||||||
ci_scrollv_coord_y_min equ (ci_edit_wnd_y_pos+3) ;¬¨¨¬ «ì ï ¯®§¨æ¨ï ¯®«§ãª
|
ci_scrollv_coord_y_min equ (ci_edit_wnd_y_pos+3) ;¬¨¨¬ «ì ï ¯®§¨æ¨ï ¯®«§ãª
|
||||||
@ -118,11 +128,12 @@ include 'init_data.inc'
|
|||||||
push dword OpenDialog_data
|
push dword OpenDialog_data
|
||||||
call [OpenDialog_Init]
|
call [OpenDialog_Init]
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
red:
|
||||||
|
call drawwin
|
||||||
;----------------------------------------------------------
|
;----------------------------------------------------------
|
||||||
;---------------------MAIN LOOP----------------------------
|
;---------------------MAIN LOOP----------------------------
|
||||||
;----------------------------------------------------------
|
;----------------------------------------------------------
|
||||||
red:
|
align 4
|
||||||
call drawwin
|
|
||||||
still:
|
still:
|
||||||
call event
|
call event
|
||||||
|
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
;-------------interraction MOUSE--------------
|
;-------------interraction MOUSE--------------
|
||||||
;---------------------------------------------
|
;---------------------------------------------
|
||||||
mouse:
|
mouse:
|
||||||
or ecx,-1
|
or ecx,-1
|
||||||
mcall SF_THREAD_INFO,procinfo
|
mcall SF_THREAD_INFO,procinfo
|
||||||
|
|
||||||
mov eax,[procinfo+70] ;staus of window
|
mov eax,[procinfo+70] ;staus of window
|
||||||
test eax,100b
|
test eax,100b
|
||||||
jne still
|
jne still
|
||||||
|
|
||||||
call GetMouseCoordinats
|
call GetMouseCoordinats
|
||||||
;panel
|
;panel
|
||||||
mov edx,[Window_SizeX]
|
mov edx,[Window_SizeX]
|
||||||
sub edx,5
|
sub edx,5
|
||||||
@ -23,10 +23,10 @@ mouse:
|
|||||||
cmp eax,5
|
cmp eax,5
|
||||||
jle no_panel
|
jle no_panel
|
||||||
|
|
||||||
cmp eax,edx ;585
|
cmp eax,edx
|
||||||
jae no_panel
|
jae no_panel
|
||||||
|
|
||||||
call GetMouseCoordinats
|
call GetMouseCoordinats
|
||||||
mov [counter],7
|
mov [counter],7
|
||||||
mov edi,panel_text
|
mov edi,panel_text
|
||||||
jmp panel_interraction
|
jmp panel_interraction
|
||||||
@ -40,7 +40,7 @@ no_panel:
|
|||||||
jmp panel_interraction
|
jmp panel_interraction
|
||||||
|
|
||||||
no_redraw_panel:
|
no_redraw_panel:
|
||||||
call GetMouseCoordinats
|
call GetMouseCoordinats
|
||||||
mov eax,[MouseX]
|
mov eax,[MouseX]
|
||||||
mov ebx,[MouseY]
|
mov ebx,[MouseY]
|
||||||
mov ecx,[WorkScreen_SizeX]
|
mov ecx,[WorkScreen_SizeX]
|
||||||
@ -78,7 +78,7 @@ mouse_scroll:
|
|||||||
mov ebx,[Scroll1CoordinatY]
|
mov ebx,[Scroll1CoordinatY]
|
||||||
mov ecx,[Scroll1MaxSizeX]
|
mov ecx,[Scroll1MaxSizeX]
|
||||||
inc ecx
|
inc ecx
|
||||||
mov edx,14+10
|
mov edx,ci_scroll_dim-6
|
||||||
mov esi,7
|
mov esi,7
|
||||||
call draw_volume_rectangle ; horizontal scrollbar clear
|
call draw_volume_rectangle ; horizontal scrollbar clear
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ no_horizontal:
|
|||||||
|
|
||||||
mov eax,[Scroll2CoordinatX]
|
mov eax,[Scroll2CoordinatX]
|
||||||
mov ebx,ci_scrollv_coord_y_min
|
mov ebx,ci_scrollv_coord_y_min
|
||||||
mov ecx,14+10
|
mov ecx,ci_scroll_dim-6
|
||||||
mov edx,[Scroll2MaxSizeY]
|
mov edx,[Scroll2MaxSizeY]
|
||||||
inc edx
|
inc edx
|
||||||
mov esi,7
|
mov esi,7
|
||||||
|
@ -13,21 +13,22 @@ drawwin:
|
|||||||
mov [Window_CordinatX],eax
|
mov [Window_CordinatX],eax
|
||||||
mov [Window_CordinatY],ebx
|
mov [Window_CordinatY],ebx
|
||||||
|
|
||||||
cmp ecx,585
|
cmp ecx,ci_wnd_min_siz_x
|
||||||
jae @f
|
jge @f
|
||||||
mov ecx,585 ;minimum size x
|
mov ecx,ci_wnd_min_siz_x
|
||||||
@@:
|
@@:
|
||||||
cmp [Window_SizeY],400
|
cmp edx,ci_wnd_min_siz_y
|
||||||
jae @f
|
jge @f
|
||||||
mov edx,400 ;minimum size y
|
mov edx,ci_wnd_min_siz_y
|
||||||
@@:
|
@@:
|
||||||
mov [Window_SizeX],ecx
|
mov [Window_SizeX],ecx
|
||||||
mov [Window_SizeY],edx
|
mov [Window_SizeY],edx
|
||||||
|
|
||||||
mov [MaxWorkScreen_SizeX],ecx
|
mov [MaxWorkScreen_SizeX],ecx
|
||||||
mov [MaxWorkScreen_SizeY],edx
|
mov [MaxWorkScreen_SizeY],edx
|
||||||
sub [MaxWorkScreen_SizeX],ci_edit_wnd_x_pos+2*ci_edit_wnd_border+34
|
sub [MaxWorkScreen_SizeX],ci_edit_wnd_x_pos+2*ci_edit_wnd_border\
|
||||||
sub [MaxWorkScreen_SizeY],ci_edit_wnd_y_pos+2*ci_edit_wnd_border+34
|
+ci_scroll_dim+ci_offs_skin_w+5
|
||||||
|
sub [MaxWorkScreen_SizeY],ci_edit_wnd_y_pos+2*ci_edit_wnd_border\
|
||||||
|
+ci_scroll_dim+ci_offs_skin_h+5
|
||||||
|
|
||||||
cmp [MaxWorkScreen_SizeX],0
|
cmp [MaxWorkScreen_SizeX],0
|
||||||
jns no_znak1
|
jns no_znak1
|
||||||
@ -48,12 +49,12 @@ no_znak2:
|
|||||||
mov ecx,50 ;[Window_CordinatY]
|
mov ecx,50 ;[Window_CordinatY]
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
shl ecx,16
|
shl ecx,16
|
||||||
add ebx,[Window_SizeX]
|
add ebx, [Window_SizeX]
|
||||||
add ecx,[Window_SizeY]
|
add ecx, [Window_SizeY]
|
||||||
mcall SF_CREATE_WINDOW,,,0x53aabbcc,,name_of_program
|
mcall SF_CREATE_WINDOW,,,0x53aabbcc,,name_of_program
|
||||||
|
|
||||||
mov eax,[procinfo+70] ;staus of window
|
mov eax,[procinfo+70] ;staus of window
|
||||||
test eax,100b
|
test eax,100b
|
||||||
jne .end
|
jne .end
|
||||||
|
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
@ -84,12 +85,15 @@ no_znak2:
|
|||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
mov ebx,[WorkScreen_SizeX]
|
mov ebx,[WorkScreen_SizeX]
|
||||||
add ebx,ci_edit_wnd_x_pos+ci_edit_wnd_border
|
add ebx,ci_edit_wnd_x_pos+ci_edit_wnd_border
|
||||||
|
mov edx,[Window_SizeX]
|
||||||
|
sub edx,ebx
|
||||||
|
sub edx,ci_scroll_dim+5-ci_edit_wnd_border
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
mov bx,ci_edit_wnd_border ;è¨à¨ ¡®à¤îà
|
mov bx,dx ;è¨à¨ ¡®à¤îà
|
||||||
|
|
||||||
mov ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border
|
mov ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border
|
||||||
mov edx,[Window_SizeY]
|
mov edx,[Window_SizeY]
|
||||||
sub edx,ci_edit_wnd_y_pos+2*ci_edit_wnd_border+34
|
sub edx,ci_edit_wnd_y_pos+2*ci_edit_wnd_border+ci_scroll_dim+5+ci_offs_skin_h
|
||||||
shl ecx,16
|
shl ecx,16
|
||||||
mov cx,dx ;¢ëá®â ¡®à¤îà
|
mov cx,dx ;¢ëá®â ¡®à¤îà
|
||||||
|
|
||||||
@ -99,14 +103,17 @@ no_znak2:
|
|||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
mov ebx,ci_edit_wnd_x_pos
|
mov ebx,ci_edit_wnd_x_pos
|
||||||
mov edx,[Window_SizeX]
|
mov edx,[Window_SizeX]
|
||||||
sub edx,25+10+ci_edit_wnd_x_pos
|
sub edx,ci_scroll_dim+5+ci_edit_wnd_x_pos
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
mov bx,dx ;è¨à¨ ¡®à¤îà
|
mov bx,dx ;è¨à¨ ¡®à¤îà
|
||||||
|
|
||||||
mov ecx,[WorkScreen_SizeY]
|
mov ecx,[WorkScreen_SizeY]
|
||||||
add ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border
|
add ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border
|
||||||
|
mov edx,[Window_SizeY]
|
||||||
|
sub edx,ecx
|
||||||
|
sub edx,ci_scroll_dim+5+ci_offs_skin_h;ci_edit_wnd_border
|
||||||
shl ecx,16
|
shl ecx,16
|
||||||
mov cx,ci_edit_wnd_border ;¢ëá®â ¡®à¤îà
|
mov cx,dx ;¢ëá®â ¡®à¤îà
|
||||||
|
|
||||||
mcall SF_DRAW_RECT,,,0xc7cbcf ;¡®à¤îà ¯®¤ ®ª®¬ ¨ ¤ áªà®««¨£®¬
|
mcall SF_DRAW_RECT,,,0xc7cbcf ;¡®à¤îà ¯®¤ ®ª®¬ ¨ ¤ áªà®««¨£®¬
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
@ -115,29 +122,29 @@ no_znak2:
|
|||||||
mov eax,ci_edit_wnd_x_pos
|
mov eax,ci_edit_wnd_x_pos
|
||||||
mov ebx,[Window_SizeY]
|
mov ebx,[Window_SizeY]
|
||||||
mov ecx,[Window_SizeX]
|
mov ecx,[Window_SizeX]
|
||||||
mov edx,20+10
|
mov edx,ci_scroll_dim
|
||||||
mov esi,3
|
mov esi,3
|
||||||
sub ecx,35+ci_edit_wnd_x_pos
|
sub ecx,ci_scroll_dim+5+ci_edit_wnd_x_pos+ci_offs_skin_w
|
||||||
sub ebx,25+10
|
sub ebx,ci_scroll_dim+5+ci_offs_skin_h
|
||||||
call draw_volume_rectangle ; horizontal scrollbar border
|
call draw_volume_rectangle ; horizontal scrollbar border
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
mov eax,[Window_SizeX]
|
mov eax,[Window_SizeX]
|
||||||
mov ebx,ci_edit_wnd_y_pos
|
mov ebx,ci_edit_wnd_y_pos
|
||||||
mov ecx,20+10
|
mov ecx,ci_scroll_dim
|
||||||
mov edx,[Window_SizeY]
|
mov edx,[Window_SizeY]
|
||||||
mov esi,3
|
mov esi,3
|
||||||
sub eax,25+10
|
sub eax,ci_scroll_dim+5+ci_offs_skin_w
|
||||||
sub edx,35+ci_edit_wnd_y_pos
|
sub edx,ci_scroll_dim+5+ci_edit_wnd_y_pos+ci_offs_skin_h
|
||||||
call draw_volume_rectangle ; vertical scrollbar border
|
call draw_volume_rectangle ; vertical scrollbar border
|
||||||
call draw_scrollers
|
call draw_scrollers
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
mov eax,[Window_SizeX]
|
mov eax,[Window_SizeX]
|
||||||
mov ebx,[Window_SizeY]
|
mov ebx,[Window_SizeY]
|
||||||
mov ecx,20+10
|
mov ecx,ci_scroll_dim
|
||||||
mov edx,20+10
|
mov edx,ci_scroll_dim
|
||||||
mov esi,6
|
mov esi,6
|
||||||
sub eax,25+10
|
sub eax,ci_scroll_dim+5+ci_offs_skin_w
|
||||||
sub ebx,25+10
|
sub ebx,ci_scroll_dim+5+ci_offs_skin_h
|
||||||
call draw_volume_rectangle ; down and right small area
|
call draw_volume_rectangle ; down and right small area
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
.end:
|
.end:
|
||||||
|
@ -78,7 +78,7 @@ print_panel_menu:
|
|||||||
next_icon_delit1:
|
next_icon_delit1:
|
||||||
mov edx,[counter]
|
mov edx,[counter]
|
||||||
add edx,11100000000000000000000000000000b
|
add edx,11100000000000000000000000000000b
|
||||||
mcall 8
|
mcall SF_DEFINE_BUTTON
|
||||||
inc [counter]
|
inc [counter]
|
||||||
cmp [counter],30
|
cmp [counter],30
|
||||||
jl next_icon_delit1
|
jl next_icon_delit1
|
||||||
@ -89,7 +89,7 @@ next_icon_delit1:
|
|||||||
next_icon_delit2:
|
next_icon_delit2:
|
||||||
mov edx,[counter]
|
mov edx,[counter]
|
||||||
add edx,11100000000000000000000000000000b
|
add edx,11100000000000000000000000000000b
|
||||||
mcall 8
|
mcall SF_DEFINE_BUTTON
|
||||||
inc [counter]
|
inc [counter]
|
||||||
cmp [counter],45
|
cmp [counter],45
|
||||||
jl next_icon_delit2
|
jl next_icon_delit2
|
||||||
@ -100,7 +100,7 @@ next_icon_delit2:
|
|||||||
next_icon_delit3:
|
next_icon_delit3:
|
||||||
mov edx,[counter]
|
mov edx,[counter]
|
||||||
add edx,11100000000000000000000000000000b
|
add edx,11100000000000000000000000000000b
|
||||||
mcall 8
|
mcall SF_DEFINE_BUTTON
|
||||||
inc [counter]
|
inc [counter]
|
||||||
cmp [counter],50
|
cmp [counter],50
|
||||||
jl next_icon_delit3
|
jl next_icon_delit3
|
||||||
@ -108,12 +108,12 @@ next_icon_delit3:
|
|||||||
;delit buttons of palette
|
;delit buttons of palette
|
||||||
mov edx,51
|
mov edx,51
|
||||||
add edx,11100000000000000000000000000000b
|
add edx,11100000000000000000000000000000b
|
||||||
mcall 8
|
mcall SF_DEFINE_BUTTON
|
||||||
|
|
||||||
;delit buttons of color
|
;delit buttons of color
|
||||||
mov edx,52
|
mov edx,52
|
||||||
add edx,11100000000000000000000000000000b
|
add edx,11100000000000000000000000000000b
|
||||||
mcall 8
|
mcall SF_DEFINE_BUTTON
|
||||||
|
|
||||||
pop [counter]
|
pop [counter]
|
||||||
|
|
||||||
@ -196,14 +196,14 @@ no_columnus_menu_text:
|
|||||||
|
|
||||||
|
|
||||||
menu_still:
|
menu_still:
|
||||||
mcall 10
|
mcall SF_WAIT_EVENT
|
||||||
mcall 2
|
mcall SF_GET_KEY
|
||||||
mcall 17
|
mcall SF_GET_BUTTON
|
||||||
call GetMouseClick
|
call GetMouseClick
|
||||||
test eax,eax
|
test eax,eax
|
||||||
jz calculate_counter_menu
|
jz calculate_counter_menu
|
||||||
|
|
||||||
call GetMouseCoordinats
|
call GetMouseCoordinats
|
||||||
;calculate menu counter
|
;calculate menu counter
|
||||||
mov eax,[counter]
|
mov eax,[counter]
|
||||||
dec eax
|
dec eax
|
||||||
@ -243,7 +243,7 @@ no_columnus_menu_text2:
|
|||||||
|
|
||||||
pop edi esi
|
pop edi esi
|
||||||
|
|
||||||
mcall 5,15
|
mcall SF_SLEEP,15
|
||||||
|
|
||||||
push [counter]
|
push [counter]
|
||||||
pusha
|
pusha
|
||||||
@ -300,7 +300,7 @@ PrintMousePos:
|
|||||||
shl edx,16
|
shl edx,16
|
||||||
add edx,20+15+6+6
|
add edx,20+15+6+6
|
||||||
and esi,0
|
and esi,0
|
||||||
mcall 47,<4,0>
|
mcall SF_DRAW_NUMBER,<4,0>
|
||||||
|
|
||||||
mov ecx,[ScreenY]
|
mov ecx,[ScreenY]
|
||||||
add ecx,[PosY]
|
add ecx,[PosY]
|
||||||
@ -342,10 +342,10 @@ draw_scrollers:
|
|||||||
mov edi,[CounterX]
|
mov edi,[CounterX]
|
||||||
mov eax,[Scroll1CoordinatX]
|
mov eax,[Scroll1CoordinatX]
|
||||||
mov ebx,[Window_SizeY]
|
mov ebx,[Window_SizeY]
|
||||||
sub ebx,22+10
|
sub ebx,(ci_scroll_dim-3)+5+ci_offs_skin_h
|
||||||
mov ecx,[Window_SizeX]
|
mov ecx,[Window_SizeX]
|
||||||
sub ecx,39+ci_scrollh_coord_x_min
|
sub ecx,ci_scroll_dim+5+4+ci_scrollh_coord_x_min+ci_offs_skin_w
|
||||||
mov edx,14+10
|
mov edx,ci_scroll_dim-6
|
||||||
mov esi,1
|
mov esi,1
|
||||||
mov [Scroll1CoordinatY],ebx
|
mov [Scroll1CoordinatY],ebx
|
||||||
mov [Scroll1MaxSizeY],edx
|
mov [Scroll1MaxSizeY],edx
|
||||||
@ -365,11 +365,11 @@ draw_scrollers:
|
|||||||
call draw_volume_rectangle ; horizontal scrollbar polzunok
|
call draw_volume_rectangle ; horizontal scrollbar polzunok
|
||||||
|
|
||||||
mov eax,[Window_SizeX]
|
mov eax,[Window_SizeX]
|
||||||
sub eax,22+10
|
sub eax,(ci_scroll_dim-3)+5+ci_offs_skin_w
|
||||||
mov ebx,[Scroll2CoordinatY]
|
mov ebx,[Scroll2CoordinatY]
|
||||||
mov ecx,14+10
|
mov ecx,ci_scroll_dim-6
|
||||||
mov edx,[Window_SizeY]
|
mov edx,[Window_SizeY]
|
||||||
sub edx,39+ci_scrollv_coord_y_min
|
sub edx,ci_scroll_dim+5+4+ci_scrollv_coord_y_min+ci_offs_skin_h
|
||||||
mov esi,1
|
mov esi,1
|
||||||
mov [Scroll2CoordinatX],eax
|
mov [Scroll2CoordinatX],eax
|
||||||
mov [Scroll2MaxSizeX],ecx
|
mov [Scroll2MaxSizeX],ecx
|
||||||
|
Loading…
Reference in New Issue
Block a user