Subversion Repositories Kolibri OS

Rev

Rev 2317 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2317 Rev 2354
Line 1... Line 1...
1
;**************************************************************
1
;**************************************************************
2
; ScrollBar Macro for Kolibri OS
2
; ScrollBar Macro for Kolibri OS
3
; Copyright (c) 2009, Marat Zakiyanov aka Mario79, aka Mario
3
; Copyright (c) 2009-2012, Marat Zakiyanov aka Mario79, aka Mario
4
; All rights reserved.
4
; All rights reserved.
5
;
5
;
6
; Redistribution and use in source and binary forms, with or without
6
; Redistribution and use in source and binary forms, with or without
7
; modification, are permitted provided that the following conditions are met:
7
; modification, are permitted provided that the following conditions are met:
8
;	 * Redistributions of source code must retain the above copyright
8
;	 * Redistributions of source code must retain the above copyright
Line 23... Line 23...
23
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
;*****************************************************************************
27
;*****************************************************************************
-
 
28
; 15.11.2011 add scroll type 1 by IgorA
-
 
29
;*****************************************************************************
28
macro scroll_bar_exit
30
macro scroll_bar_exit
29
{
31
{
30
popa
32
popa
31
ret 4
33
ret 4
32
}
34
}
Line 66... Line 68...
66
	mov   bx,1
68
	mov	bx,1
67
	int   0x40
69
	int	0x40
68
	pop   ebx
70
	pop	ebx
69
}
71
}
70
;*****************************************************************************
72
;*****************************************************************************
-
 
73
macro draw_up_arrow_vertical_type2
-
 
74
{
-
 
75
	push	ebx
-
 
76
	
-
 
77
	mov	bx,sb_size_x
-
 
78
	shr	bx,1
-
 
79
	add	bx,sb_start_x
-
 
80
 
-
 
81
	mov	cx,sb_btn_high
-
 
82
	shr	cx,1
-
 
83
	add	cx,sb_start_y
-
 
84
	
-
 
85
	mov	ax,bx
-
 
86
	shl	eax,16
-
 
87
	mov	ax,cx
-
 
88
	
-
 
89
	sub	cx,2
-
 
90
	
-
 
91
	shl	ebx,16
-
 
92
	shl	ecx,16
-
 
93
	
-
 
94
	mov	cx,ax
-
 
95
	shr	eax,16
-
 
96
	mov	bx,ax
-
 
97
	
-
 
98
	add	cx,1
-
 
99
	sub	bx,3
-
 
100
 
-
 
101
	mcall	38,,,sb_line_col
-
 
102
 
-
 
103
	add	bx,6
-
 
104
	
-
 
105
	mcall
-
 
106
	pop	ebx
-
 
107
}
-
 
108
;*****************************************************************************
71
macro draw_down_arrow_vertical
109
macro draw_down_arrow_vertical
72
{
110
{
73
	push  ebx
111
	push	ebx
Line 74... Line 112...
74
	
112
	
Line 104... Line 142...
104
	mov   bx,1
142
	mov	bx,1
105
	int   0x40
143
	int	0x40
106
	pop   ebx
144
	pop	ebx
107
}
145
}
108
;*****************************************************************************
146
;*****************************************************************************
-
 
147
macro draw_down_arrow_vertical_type2
-
 
148
{
-
 
149
	push	ebx
-
 
150
	
-
 
151
	mov	bx,sb_size_x
-
 
152
	shr	bx,1
-
 
153
	add	bx,sb_start_x
-
 
154
 
-
 
155
	mov	ax,sb_btn_high
-
 
156
	shr	ax,1
-
 
157
	mov	cx,sb_start_y
-
 
158
	add	cx,sb_size_y
-
 
159
	sub	cx,ax
-
 
160
	
-
 
161
	mov	ax,bx
-
 
162
	shl	eax,16
-
 
163
	mov	ax,cx
-
 
164
	
-
 
165
	add	cx,1
-
 
166
	
-
 
167
	shl	ebx,16
-
 
168
	shl	ecx,16
-
 
169
	
-
 
170
	mov	cx,ax
-
 
171
	shr	eax,16
-
 
172
	mov	bx,ax
-
 
173
	
-
 
174
	sub	cx,2
-
 
175
	sub	bx,3
-
 
176
 
-
 
177
	mcall	38,,,sb_line_col
-
 
178
 
-
 
179
	add	bx,6
-
 
180
	
-
 
181
	mcall
-
 
182
	pop	ebx
-
 
183
}
-
 
184
;*****************************************************************************
109
macro draw_runner_center_vertical
185
macro draw_runner_center_vertical
110
{
186
{
111
	push  ebx
187
	push	ebx
112
	push  ecx
188
	push	ecx
Line 177... Line 253...
177
	mov   cx,1
253
	mov	cx,1
178
	int   0x40
254
	int	0x40
179
	pop   ecx
255
	pop	ecx
180
}
256
}
181
;*****************************************************************************
257
;*****************************************************************************
-
 
258
macro draw_up_arrow_horizontal_type2
-
 
259
{
-
 
260
	push	ebx ecx
-
 
261
	
-
 
262
	mov	bx,sb_btn_high
-
 
263
	shr	bx,1
-
 
264
	add	bx,sb_start_x
-
 
265
 
-
 
266
	mov	cx,sb_size_y
-
 
267
	shr	cx,1
-
 
268
	add	cx,sb_start_y
-
 
269
	
-
 
270
	mov	ax,bx
-
 
271
	shl	eax,16
-
 
272
	mov	ax,cx
-
 
273
	
-
 
274
	sub	bx,2
-
 
275
	
-
 
276
	shl	ebx,16
-
 
277
	shl	ecx,16
-
 
278
	
-
 
279
	mov	cx,ax
-
 
280
	shr	eax,16
-
 
281
	mov	bx,ax
-
 
282
	
-
 
283
	add	bx,1
-
 
284
	sub	cx,3
-
 
285
 
-
 
286
	mcall	38,,,sb_line_col
-
 
287
 
-
 
288
	add	cx,6
-
 
289
	
-
 
290
	mcall
-
 
291
	pop	ecx ebx
-
 
292
}
-
 
293
;*****************************************************************************
182
macro draw_down_arrow_horizontal
294
macro draw_down_arrow_horizontal
183
{
295
{
184
	push  ecx
296
	push	ecx
Line 185... Line 297...
185
	
297
	
Line 215... Line 327...
215
	mov   cx,1
327
	mov	cx,1
216
	int   0x40
328
	int	0x40
217
	pop   ecx
329
	pop	ecx
218
}
330
}
219
;*****************************************************************************
331
;*****************************************************************************
-
 
332
macro draw_down_arrow_horizontal_type2
-
 
333
{
-
 
334
	push	ebx ecx
-
 
335
	
-
 
336
	mov	ax,sb_btn_high
-
 
337
	shr	ax,1
-
 
338
	mov	bx,sb_start_x
-
 
339
	add	bx,sb_size_x
-
 
340
	sub	bx,ax
-
 
341
	
-
 
342
	mov	cx,sb_size_y
-
 
343
	shr	cx,1
-
 
344
	add	cx,sb_start_y
-
 
345
	
-
 
346
	mov	ax,bx
-
 
347
	shl	eax,16
-
 
348
	mov	ax,cx
-
 
349
	
-
 
350
	add	cx,1
-
 
351
	
-
 
352
	shl	ebx,16
-
 
353
	shl	ecx,16
-
 
354
	
-
 
355
	mov	cx,ax
-
 
356
	shr	eax,16
-
 
357
	mov	bx,ax
-
 
358
	
-
 
359
	sub	cx,2
-
 
360
	sub	bx,3
-
 
361
 
-
 
362
	mcall	38,,,sb_line_col
-
 
363
 
-
 
364
	add	cx,6
-
 
365
	
-
 
366
	mcall
-
 
367
	pop	ecx ebx
-
 
368
}
-
 
369
;*****************************************************************************
220
macro draw_runner_center_horizontal
370
macro draw_runner_center_horizontal
221
{
371
{
222
	push  ebx
372
	push	ebx
223
	push  ecx
373
	push	ecx
Line 310... Line 460...
310
;*********************************
460
;*********************************
311
	mov   eax,sb_work_size
461
	mov	eax,sb_work_size
312
	mov   ebx,sb_max_area
462
	mov	ebx,sb_max_area
313
	cmp   ebx,sb_cur_area
463
	cmp	ebx,sb_cur_area
314
	ja	@f
464
	ja	@f
315
 
-
 
316
	jmp   .no_size
465
	jmp	.no_size
Line 317... Line 466...
317
 
466
 
318
@@: 
467
@@: 
319
	imul  eax,sb_cur_area
468
	imul	eax,sb_cur_area
Line 386... Line 535...
386
	add   ecx,1 shl 16
535
	add	ecx,1 shl 16
387
	add   ecx,sb_btn_high
536
	add	ecx,sb_btn_high
388
	sub   ecx,2
537
	sub	ecx,2
389
	mov   edx,sb_frnt_col
538
	mov	edx,sb_frnt_col
390
	cmp  dword sb_all_redraw,0
539
	cmp	dword sb_all_redraw,0
391
	je   @f
540
	je	.no_draw_top_button
392
	int   0x40   ; top button filling
541
	int	0x40	; top button filling
-
 
542
;-----------------------------------------------------------------------------
-
 
543
; scrollbar type 2
-
 
544
	cmp	word sb_type,2
-
 
545
	jne	.no_type2
-
 
546
;*********************************
-
 
547
draw_up_arrow_vertical_type2
-
 
548
;*********************************
-
 
549
	jmp	.no_draw_top_button
-
 
550
.no_type2:
393
;*********************************	
551
;*********************************
394
draw_up_arrow_vertical
552
draw_up_arrow_vertical
395
;********************************* 
553
;*********************************
396
@@:
554
.no_draw_top_button:
397
	pop   ecx
555
	pop	ecx
Line 398... Line 556...
398
	
556
	
399
	ror   ecx,16
557
	ror	ecx,16
400
	add   ecx,sb_btn_high  ;14 shl 16
558
	add	ecx,sb_btn_high  ;14 shl 16
401
	rol   ecx,16
559
	rol	ecx,16
402
	mov   edx,sb_line_col
560
	mov	edx,sb_line_col
403
	cmp  dword sb_all_redraw,0
561
	cmp	dword sb_all_redraw,0
404
	je   @f
562
	je	@f
405
	int   0x40   ;  top button - bottom line
563
	mcall	13	;  top button - bottom line
406
@@:
564
@@:
407
	pop   ecx
565
	pop	ecx
408
;********************************* 
566
;********************************* 
409
	ror   ecx,16	
567
	ror	ecx,16	
Line 437... Line 595...
437
	mov   sb_r_size_x,ebx
595
	mov	sb_r_size_x,ebx
438
	mov   sb_r_size_y,ecx
596
	mov	sb_r_size_y,ecx
439
	sub   ecx,2
597
	sub	ecx,2
440
	mov   edx,sb_frnt_col
598
	mov	edx,sb_frnt_col
441
	int   0x40   ; runner filling
599
	int	0x40	; runner filling
-
 
600
;-----------------------------------------------------------------------------
-
 
601
; scrollbar type 2
-
 
602
	cmp	word sb_type,2
-
 
603
	je	@f
442
;********************************* 
604
;*********************************
443
draw_runner_center_vertical
605
draw_runner_center_vertical
444
;********************************* 
606
;********************************* 
-
 
607
@@:
-
 
608
;-----------------------------------------------------------------------------
-
 
609
; scrollbar type 1 - stylish frame
445
	cmp word sb_type,1
610
	cmp	word sb_type,1
446
	jne @f
611
	jne	@f
447
		push eax ebx ecx edx
612
	push	eax ebx ecx edx
448
		movzx eax,word sb_start_x
613
	movzx	eax,word sb_start_x
449
		xor ebx,ebx
614
	xor	ebx,ebx
450
		add bx,sb_r_start_y
615
	add	bx,sb_r_start_y
451
		dec ebx
616
	dec	ebx
452
		movzx ecx,word sb_size_x
617
	movzx	ecx,word sb_size_x
453
		mov edx,sb_run_size
618
	mov	edx,sb_run_size
454
		dec edx
619
	dec	edx
455
		;à¨á®¢ ­¨¥ á⨫쭮© à ¬ª¨ ­  ¯®«§ã­ª¥
620
	; drawing a stylish frame on the slider
456
		stdcall draw_edge, eax,ebx,ecx,edx, sb_bckg_col, sb_frnt_col, sb_line_col
621
	stdcall draw_edge,eax,ebx,ecx,edx,sb_bckg_col,sb_frnt_col,sb_line_col
457
		pop edx ecx ebx eax
622
	pop	edx ecx ebx eax
458
	@@:
623
@@:
-
 
624
;-----------------------------------------------------------------------------
459
	shr   ecx,16
625
	shr	ecx,16
460
	add   ecx,sb_run_size
626
	add	ecx,sb_run_size
461
	sub   ecx,2
627
	sub	ecx,2
462
	shl   ecx,16  
628
	shl	ecx,16  
463
	inc   ecx
629
	inc	ecx
Line 496... Line 662...
496
	add   ecx,1 shl 16
662
	add	ecx,1 shl 16
497
	add   cx,sb_btn_high
663
	add	cx,sb_btn_high
498
	sub   ecx,2
664
	sub	ecx,2
499
	mov   edx,sb_frnt_col
665
	mov	edx,sb_frnt_col
500
	cmp  dword sb_all_redraw,0
666
	cmp	dword sb_all_redraw,0
501
	je   @f
667
	je	.no_draw_bottom_button
502
	int   0x40   ; bottom button filling
668
	int	0x40	; bottom button filling
-
 
669
;-----------------------------------------------------------------------------
-
 
670
; scrollbar type 2
-
 
671
	cmp	word sb_type,2
-
 
672
	jne	.no_type2_1
-
 
673
;*********************************
-
 
674
draw_down_arrow_vertical_type2
-
 
675
;*********************************
-
 
676
	jmp	.no_draw_bottom_button
-
 
677
.no_type2_1:
503
;********************************* 
678
;********************************* 
504
draw_down_arrow_vertical
679
draw_down_arrow_vertical
505
;********************************* 
680
;********************************* 
506
@@:
681
.no_draw_bottom_button:
507
	pop   ecx
682
	pop	ecx
Line 508... Line 683...
508
	
683
	
509
	ror   ecx,16
684
	ror	ecx,16
510
	add   ecx,sb_btn_high
685
	add	ecx,sb_btn_high
Line 511... Line 686...
511
	rol   ecx,16
686
	rol	ecx,16
512
	
687
	
513
	mov   edx,sb_line_col
688
	mov	edx,sb_line_col
514
	mov   cx,1
689
	mov	cx,1
515
	cmp  dword sb_all_redraw,0
690
	cmp	dword sb_all_redraw,0
-
 
691
	je	@f
-
 
692
	mcall	13	; bottom button - extreme line
516
	je   @f
693
;-----------------------------------------------------------------------------
517
	int   0x40   ; bottom button - extreme line
694
; scrollbar type 1 - stylish frame
518
	cmp word sb_type,1
695
	cmp	word sb_type,1
519
	jne @f
696
	jne	@f
520
		movzx eax,word sb_start_x
697
	movzx	eax,word sb_start_x
521
		movzx ebx,word sb_start_y
698
	movzx	ebx,word sb_start_y
522
		movzx ecx,word sb_size_x
699
	movzx	ecx,word sb_size_x
523
		;à¨á®¢ ­¨¥ á⨫쭮© à ¬ª¨ ­  ¢¥àå­¥© ª­®¯ª¥
700
	; drawing a stylish frame on the top button
524
		stdcall draw_edge, eax,ebx,ecx,sb_btn_high,\
-
 
525
			sb_bckg_col, sb_frnt_col, sb_line_col
701
	stdcall	draw_edge,eax,ebx,ecx,sb_btn_high,\
526
 
702
		sb_bckg_col,sb_frnt_col,sb_line_col
527
		add bx,sb_size_y
703
	add	bx,sb_size_y
528
		sub ebx,sb_btn_high
704
	sub	ebx,sb_btn_high
529
		dec ebx
705
	dec	ebx
530
		;à¨á®¢ ­¨¥ á⨫쭮© à ¬ª¨ ­  ­¨¦­¥© ª­®¯ª¥
706
	; drawing a stylish frame on the bottom  button
531
		stdcall draw_edge, eax,ebx,ecx,sb_btn_high,\
707
	stdcall	draw_edge,eax,ebx,ecx,sb_btn_high,\
-
 
708
		sb_bckg_col,sb_frnt_col,sb_line_col
532
			sb_bckg_col, sb_frnt_col, sb_line_col
709
@@:
533
@@:
710
;-----------------------------------------------------------------------------
534
	popa
711
	popa
535
	ret
712
	ret
536
;*****************************************************************************
713
;*****************************************************************************
Line 553... Line 730...
553
 
730
 
554
	cmp   sb_m_keys,eax
731
	cmp	sb_m_keys,eax
Line 555... Line 732...
555
	je	  @f
732
	je	@f
556
	
-
 
557
	mov   sb_m_keys,eax
733
	
558
 
-
 
559
	mov   sb_delta,dword 0
734
	mov	sb_m_keys,eax
560
 
735
	mov	sb_delta,dword 0
561
	mov   eax,sb_m_pos
736
	mov	eax,sb_m_pos
562
	mov   sb_m_pos_2,eax
-
 
563
	jmp   .continue_2
737
	mov	sb_m_pos_2,eax
564
	
738
	jmp	.continue_2
565
@@:
739
@@:
566
	cmp   dword sb_m_keys,0
740
	cmp	dword sb_m_keys,0
567
	jne	 @f
741
	jne	 @f
Line 939... Line 1113...
939
	add   ebx,1 shl 16
1113
	add	ebx,1 shl 16
940
	add   ebx,sb_btn_high
1114
	add	ebx,sb_btn_high
941
	sub   ebx,2
1115
	sub	ebx,2
942
	mov   edx,sb_frnt_col
1116
	mov	edx,sb_frnt_col
943
	cmp  dword sb_all_redraw,0
1117
	cmp	dword sb_all_redraw,0
944
	je   @f
1118
	je	.no_draw_top_button
945
	int   0x40   ; left  button filling
1119
	int	0x40	; left  button filling
-
 
1120
;-----------------------------------------------------------------------------
-
 
1121
; scrollbar type 2
-
 
1122
	cmp	word sb_type,2
-
 
1123
	jne	.no_type2
-
 
1124
;*********************************
-
 
1125
draw_up_arrow_horizontal_type2
-
 
1126
;*********************************
-
 
1127
	jmp	.no_draw_top_button
-
 
1128
.no_type2:
946
;*********************************	
1129
;*********************************	
947
draw_up_arrow_horizontal
1130
draw_up_arrow_horizontal
948
;********************************* 
1131
;********************************* 
949
@@:
1132
.no_draw_top_button:
950
	pop   ebx
1133
	pop	ebx
Line 951... Line 1134...
951
	
1134
	
952
	ror   ebx,16
1135
	ror	ebx,16
953
	add   ebx,sb_btn_high  ;14 shl 16
1136
	add	ebx,sb_btn_high  ;14 shl 16
954
	rol   ebx,16
1137
	rol	ebx,16
955
	mov   edx,sb_line_col
1138
	mov	edx,sb_line_col
956
	cmp  dword sb_all_redraw,0
1139
	cmp	dword sb_all_redraw,0
957
	je   @f
1140
	je	@f
958
	int   0x40   ;  left  button - right line
1141
	mcall	13	;  left  button - right line
959
@@:
1142
@@:
960
	pop   ebx
1143
	pop	ebx
961
;********************************* 
1144
;********************************* 
962
	ror   ebx,16	
1145
	ror	ebx,16	
Line 990... Line 1173...
990
	mov   sb_r_size_x,ebx
1173
	mov	sb_r_size_x,ebx
991
	mov   sb_r_size_y,ecx
1174
	mov	sb_r_size_y,ecx
992
	sub   ebx,2
1175
	sub	ebx,2
993
	mov   edx,sb_frnt_col
1176
	mov	edx,sb_frnt_col
994
	int   0x40   ; runner filling
1177
	int	0x40	; runner filling
-
 
1178
;-----------------------------------------------------------------------------
-
 
1179
; scrollbar type 2
-
 
1180
	cmp	word sb_type,2
-
 
1181
	je	@f
995
;********************************* 
1182
;*********************************
996
draw_runner_center_horizontal
1183
draw_runner_center_horizontal
997
;********************************* 
1184
;********************************* 
-
 
1185
@@:	
-
 
1186
;-----------------------------------------------------------------------------
-
 
1187
; scrollbar type 1 - stylish frame
998
	cmp word sb_type,1
1188
	cmp	word sb_type,1
999
	jne @f
1189
	jne	@f
1000
		push eax ebx ecx edx
1190
	push	eax ebx ecx edx
1001
		xor eax,eax
1191
	xor	eax,eax
1002
		add ax,sb_r_start_x
1192
	add	ax,sb_r_start_x
1003
		dec eax
1193
	dec	eax
1004
		movzx ebx,word sb_start_y
1194
	movzx	ebx,word sb_start_y
1005
		mov ecx,sb_run_size
1195
	mov	ecx,sb_run_size
1006
		dec ecx
1196
	dec	ecx
1007
		movzx edx,word sb_size_y
1197
	movzx	edx,word sb_size_y
1008
		;à¨á®¢ ­¨¥ á⨫쭮© à ¬ª¨ ­  ¯®«§ã­ª¥
1198
	; drawing a stylish frame on the slider
1009
		stdcall draw_edge, eax,ebx,ecx,edx,\
1199
	stdcall	draw_edge,eax,ebx,ecx,edx,\
1010
			sb_bckg_col, sb_frnt_col, sb_line_col
1200
		sb_bckg_col,sb_frnt_col,sb_line_col
1011
		pop edx ecx ebx eax
1201
	pop	edx ecx ebx eax
1012
	@@:
1202
@@:
1013
 
-
 
-
 
1203
;-----------------------------------------------------------------------------
1014
	shr   ebx,16
1204
	shr	ebx,16
1015
	add   ebx,sb_run_size
1205
	add	ebx,sb_run_size
1016
	sub   ebx,2
1206
	sub	ebx,2
1017
	shl   ebx,16  
1207
	shl	ebx,16  
1018
	inc   ebx
1208
	inc	ebx
Line 1051... Line 1241...
1051
	add   ebx,1 shl 16
1241
	add	ebx,1 shl 16
1052
	add   bx,sb_btn_high
1242
	add	bx,sb_btn_high
1053
	sub   ebx,2
1243
	sub	ebx,2
1054
	mov   edx,sb_frnt_col
1244
	mov	edx,sb_frnt_col
1055
	cmp  dword sb_all_redraw,0
1245
	cmp	dword sb_all_redraw,0
1056
	je   @f
1246
	je	.no_draw_bottom_button
1057
	int   0x40   ; bottom button filling
1247
	int	0x40	; bottom button filling
-
 
1248
;-----------------------------------------------------------------------------
-
 
1249
; scrollbar type 2
-
 
1250
	cmp	word sb_type,2
-
 
1251
	jne	.no_type2_1
-
 
1252
;*********************************
-
 
1253
draw_down_arrow_horizontal_type2
-
 
1254
;*********************************
-
 
1255
	jmp	.no_draw_bottom_button
-
 
1256
.no_type2_1:
1058
;********************************* 
1257
;********************************* 
1059
draw_down_arrow_horizontal
1258
draw_down_arrow_horizontal
1060
;*********************************
1259
;*********************************
1061
@@: 
1260
.no_draw_bottom_button: 
1062
	pop   ebx
1261
	pop	ebx
Line 1063... Line 1262...
1063
	
1262
	
1064
	ror   ebx,16
1263
	ror	ebx,16
1065
	add   ebx,sb_btn_high  ;14 shl 16
1264
	add	ebx,sb_btn_high  ;14 shl 16
Line 1066... Line 1265...
1066
	rol   ebx,16
1265
	rol	ebx,16
1067
	
1266
	
1068
	mov   edx,sb_line_col
1267
	mov	edx,sb_line_col
1069
	mov   bx,1
1268
	mov	bx,1
1070
	cmp  dword sb_all_redraw,0
1269
	cmp	dword sb_all_redraw,0
-
 
1270
	je	@f
-
 
1271
	mcall	13	; bottom button - extreme line
1071
	je   @f
1272
;-----------------------------------------------------------------------------
1072
	int   0x40   ; bottom button - extreme line
1273
; scrollbar type 1 - stylish frame
1073
	cmp word sb_type,1
1274
	cmp	word sb_type,1
1074
	jne @f
1275
	jne	@f
1075
		;à¨á®¢ ­¨¥ á⨫쭮© à ¬ª¨ ­  «¥¢®© ª­®¯ª¥
1276
	; drawing a stylish frame on the left button
1076
		movzx eax,word sb_start_x
1277
	movzx	eax,word sb_start_x
1077
		movzx ebx,word sb_start_y
1278
	movzx	ebx,word sb_start_y
1078
		movzx edx,word sb_size_y
1279
	movzx	edx,word sb_size_y
Line 1079... Line 1280...
1079
		stdcall draw_edge, eax,ebx,sb_btn_high,edx,\
1280
	stdcall	draw_edge,eax,ebx,sb_btn_high,edx,\
1080
			sb_bckg_col, sb_frnt_col, sb_line_col
1281
		sb_bckg_col,sb_frnt_col,sb_line_col
1081
 
1282
	
1082
		movzx eax,word sb_start_x
1283
	movzx	eax,word sb_start_x
1083
		add ax,sb_size_x
1284
	add	ax,sb_size_x
1084
		sub eax,sb_btn_high
1285
	sub	eax,sb_btn_high
1085
		dec eax
1286
	dec	eax
1086
		;à¨á®¢ ­¨¥ á⨫쭮© à ¬ª¨ ­  ¯à ¢®© ª­®¯ª¥
1287
	; drawing a stylish frame on the right button
-
 
1288
	stdcall	draw_edge,eax,ebx,sb_btn_high,edx,\
1087
		stdcall draw_edge, eax,ebx,sb_btn_high,edx,\
1289
		sb_bckg_col,sb_frnt_col,sb_line_col
1088
			sb_bckg_col, sb_frnt_col, sb_line_col
1290
@@:
1089
@@:
1291
;-----------------------------------------------------------------------------
1090
	popa
1292
	popa
1091
	ret
1293
	ret
Line 1388... Line 1590...
1388
	sub   eax,sb_btn_high
1590
	sub	eax,sb_btn_high
1389
	sub   eax,sb_btn_high
1591
	sub	eax,sb_btn_high
1390
	sub   eax,sb_run_size
1592
	sub	eax,sb_run_size
1391
	mov   sb_position2,eax
1593
	mov	sb_position2,eax
1392
	jmp   .all_sb
1594
	jmp	.all_sb
-
 
1595
;*****************************************************************************
1393
.exit_sb:
1596
.exit_sb:
1394
scroll_bar_exit
1597
scroll_bar_exit
1395
}
1598
}