Subversion Repositories Kolibri OS

Rev

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

Rev 1199 Rev 1666
Line 324... Line 324...
324
	mov   eax,10
324
	mov   eax,10
325
@@:
325
@@:
326
.no_size:
326
.no_size:
327
	mov   sb_run_size,eax
327
	mov   sb_run_size,eax
328
;*********************************
328
;*********************************
329
	cmp   sb_delta,word 1
329
	cmp   word sb_delta,1
330
	je	.@@_3
330
	je	.@@_3
331
	mov   eax,sb_work_size
331
	mov   eax,sb_work_size
332
	sub   eax,sb_run_size
332
	sub   eax,sb_run_size
333
	mov   ebx,sb_max_area
333
	mov   ebx,sb_max_area
334
	cmp   ebx,sb_cur_area
334
	cmp   ebx,sb_cur_area
Line 356... Line 356...
356
	shl   ebx,16
356
	shl   ebx,16
357
	inc   ebx
357
	inc   ebx
358
	mov   ecx,sb_size_y
358
	mov   ecx,sb_size_y
359
	mov   edx,sb_line_col
359
	mov   edx,sb_line_col
360
	mov   eax,13
360
	mov   eax,13
361
	cmp  sb_all_redraw,dword 0
361
	cmp  dword sb_all_redraw,0
362
	je   @f
362
	je   @f
363
	int   0x40   ; left extreme line
363
	int   0x40   ; left extreme line
364
@@:
364
@@:
365
	push  ebx
365
	push  ebx
366
	ror   ebx,16
366
	ror   ebx,16
367
	add   bx,sb_size_x
367
	add   bx,sb_size_x
368
	rol   ebx,16
368
	rol   ebx,16
369
	cmp  sb_all_redraw,dword 0
369
	cmp  dword sb_all_redraw,0
370
	je   @f
370
	je   @f
371
	int   0x40   ; right extreme line
371
	int   0x40   ; right extreme line
372
@@:
372
@@:
373
	pop   ebx
373
	pop   ebx
Line 376... Line 376...
376
	
376
	
377
	add   ebx,1 shl 16
377
	add   ebx,1 shl 16
378
	mov   bx,sb_size_x
378
	mov   bx,sb_size_x
379
	dec   ebx	
379
	dec   ebx	
380
	mov   cx,1
380
	mov   cx,1
381
	cmp  sb_all_redraw,dword 0
381
	cmp  dword sb_all_redraw,0
382
	je   @f
382
	je   @f
383
	int   0x40   ; top button - extreme line
383
	int   0x40   ; top button - extreme line
384
@@:
384
@@:
385
	push  ecx
385
	push  ecx
386
	add   ecx,1 shl 16
386
	add   ecx,1 shl 16
387
	add   ecx,sb_btn_high
387
	add   ecx,sb_btn_high
388
	sub   ecx,2
388
	sub   ecx,2
389
	mov   edx,sb_frnt_col
389
	mov   edx,sb_frnt_col
390
	cmp  sb_all_redraw,dword 0
390
	cmp  dword sb_all_redraw,0
391
	je   @f
391
	je   @f
392
	int   0x40   ; top button filling
392
	int   0x40   ; top button filling
393
;*********************************	
393
;*********************************	
394
draw_up_arrow_vertical
394
draw_up_arrow_vertical
Line 398... Line 398...
398
	
398
	
399
	ror   ecx,16
399
	ror   ecx,16
400
	add   ecx,sb_btn_high  ;14 shl 16
400
	add   ecx,sb_btn_high  ;14 shl 16
401
	rol   ecx,16
401
	rol   ecx,16
402
	mov   edx,sb_line_col
402
	mov   edx,sb_line_col
403
	cmp  sb_all_redraw,dword 0
403
	cmp  dword sb_all_redraw,0
404
	je   @f
404
	je   @f
405
	int   0x40   ;  top button - bottom line
405
	int   0x40   ;  top button - bottom line
406
@@:
406
@@:
407
	pop   ecx
407
	pop   ecx
Line 472... Line 472...
472
	sub   ecx,2
472
	sub   ecx,2
473
	shl   ecx,16
473
	shl   ecx,16
474
	inc   ecx
474
	inc   ecx
475
	mov   edx,sb_line_col
475
	mov   edx,sb_line_col
476
	mov   eax,13
476
	mov   eax,13
477
	cmp  sb_all_redraw,dword 0
477
	cmp  dword sb_all_redraw,0
478
	je   @f
478
	je   @f
479
	int   0x40   ; bottom button - top line
479
	int   0x40   ; bottom button - top line
480
@@:
480
@@:
481
	push  ecx
481
	push  ecx
482
	add   ecx,1 shl 16
482
	add   ecx,1 shl 16
483
	add   cx,sb_btn_high
483
	add   cx,sb_btn_high
484
	sub   ecx,2
484
	sub   ecx,2
485
	mov   edx,sb_frnt_col
485
	mov   edx,sb_frnt_col
486
	cmp  sb_all_redraw,dword 0
486
	cmp  dword sb_all_redraw,0
487
	je   @f
487
	je   @f
488
	int   0x40   ; bottom button filling
488
	int   0x40   ; bottom button filling
489
;********************************* 
489
;********************************* 
490
draw_down_arrow_vertical
490
draw_down_arrow_vertical
491
;********************************* 
491
;********************************* 
Line 496... Line 496...
496
	add   ecx,sb_btn_high
496
	add   ecx,sb_btn_high
497
	rol   ecx,16
497
	rol   ecx,16
Line 498... Line 498...
498
	
498
	
499
	mov   edx,sb_line_col
499
	mov   edx,sb_line_col
500
	mov   cx,1
500
	mov   cx,1
501
	cmp  sb_all_redraw,dword 0
501
	cmp  dword sb_all_redraw,0
502
	je   @f
502
	je   @f
503
	int   0x40   ; bottom button - extreme line
503
	int   0x40   ; bottom button - extreme line
504
@@:
504
@@:
505
	popa
505
	popa
Line 512... Line 512...
512
.mouse:
512
.mouse:
513
	pusha
513
	pusha
514
	mov	 edi,dword [esp+36]
514
	mov	 edi,dword [esp+36]
515
	mcall 37,1
515
	mcall 37,1
516
	mov   sb_m_pos,eax
516
	mov   sb_m_pos,eax
517
	cmp   sb_m_pos_2,dword 0
517
	cmp   dword sb_m_pos_2,0
518
	jne   @f
518
	jne   @f
Line 519... Line 519...
519
	
519
	
520
	mov   sb_m_pos_2,eax	
520
	mov   sb_m_pos_2,eax	
521
@@:
521
@@:
Line 532... Line 532...
532
	mov   eax,sb_m_pos
532
	mov   eax,sb_m_pos
533
	mov   sb_m_pos_2,eax
533
	mov   sb_m_pos_2,eax
534
	jmp   .continue_2
534
	jmp   .continue_2
Line 535... Line 535...
535
	
535
	
536
@@:
536
@@:
537
	cmp   sb_m_keys,dword 0
537
	cmp   dword sb_m_keys,0
538
	jne	 @f
538
	jne	 @f
539
	mov   eax,sb_m_pos
539
	mov   eax,sb_m_pos
540
	mov   sb_m_pos_2,eax
540
	mov   sb_m_pos_2,eax
541
	jmp   .correct_1	;.exit_sb	
541
	jmp   .correct_1	;.exit_sb	
Line 557... Line 557...
557
 
557
 
558
	mov   cx,sb_start_y
558
	mov   cx,sb_start_y
559
	cmp   ax,cx
559
	cmp   ax,cx
Line 560... Line 560...
560
	jb	.exit_sb
560
	jb	.exit_sb
561
	
561
	
562
	cmp   sb_delta2,word 0
562
	cmp   word sb_delta2,0
563
	je	@f
563
	je	@f
564
	push  ecx
564
	push  ecx
565
	add   cx,sb_btn_high
565
	add   cx,sb_btn_high
Line 570... Line 570...
570
@@:
570
@@:
571
	add   cx,sb_size_y
571
	add   cx,sb_size_y
572
	cmp   ax,cx
572
	cmp   ax,cx
573
	ja	.exit_sb
573
	ja	.exit_sb
Line 574... Line 574...
574
 
574
 
575
	cmp   sb_delta2,word 0
575
	cmp   word sb_delta2,0
576
	je	@f
576
	je	@f
577
	sub   cx,sb_btn_high
577
	sub   cx,sb_btn_high
578
	cmp   ax,cx
578
	cmp   ax,cx
Line 579... Line 579...
579
	ja	.exit_sb
579
	ja	.exit_sb
580
	
580
	
581
@@:
581
@@:
Line 582... Line 582...
582
	cmp   sb_delta2,word 1
582
	cmp   word sb_delta2,1
583
	je	@f
583
	je	@f
Line 584... Line 584...
584
	
584
	
585
	cmp   sb_m_keys,dword 0
585
	cmp   dword sb_m_keys,0
586
	je	.exit_sb
586
	je	.exit_sb
Line 661... Line 661...
661
	mov   sb_delta,dword 0
661
	mov   sb_delta,dword 0
662
.no_runner_1:
662
.no_runner_1:
663
	xor   ecx,ecx
663
	xor   ecx,ecx
664
	mov   cx,sb_start_y
664
	mov   cx,sb_start_y
665
	add   cx,sb_btn_high   ;15
665
	add   cx,sb_btn_high   ;15
666
	cmp   sb_delta,word 1
666
	cmp   word sb_delta,1
667
	je	.scroll_sb
667
	je	.scroll_sb
Line 668... Line 668...
668
	
668
	
669
	cmp   ax,cx
669
	cmp   ax,cx
Line 670... Line 670...
670
	ja	.scroll_sb
670
	ja	.scroll_sb
671
	
671
	
Line 672... Line 672...
672
	cmp   sb_m_keys,dword 0
672
	cmp   dword sb_m_keys,0
673
	je   .exit_sb
673
	je   .exit_sb
674
	
674
	
Line 686... Line 686...
686
;*****************************************************************************
686
;*****************************************************************************
687
.scroll_sb:
687
.scroll_sb:
688
	add   cx,sb_size_y
688
	add   cx,sb_size_y
689
	sub   cx,sb_btn_high
689
	sub   cx,sb_btn_high
690
	sub   cx,sb_btn_high
690
	sub   cx,sb_btn_high
691
	cmp   sb_delta,word 1
691
	cmp   word sb_delta,1
692
	je	@f
692
	je	@f
Line 693... Line 693...
693
	
693
	
694
	cmp   ax,cx
694
	cmp   ax,cx
Line 701... Line 701...
701
	sub   ax,bx
701
	sub   ax,bx
Line 702... Line 702...
702
	
702
	
703
.scroll_sb_1:	
703
.scroll_sb_1:	
704
	mov   ebx,sb_run_size
704
	mov   ebx,sb_run_size
705
;*****************************************************************************	
705
;*****************************************************************************	
706
	cmp   sb_delta,word 1
706
	cmp   word sb_delta,1
Line 707... Line 707...
707
	je	.continue
707
	je	.continue
708
	
708
	
709
@@:
709
@@:
Line 778... Line 778...
778
	mov   eax,sb_m_pos
778
	mov   eax,sb_m_pos
779
	mov   sb_m_pos_2,eax
779
	mov   sb_m_pos_2,eax
780
	jmp   .exit_sb
780
	jmp   .exit_sb
781
;*****************************************************************************
781
;*****************************************************************************
782
.down_sb:
782
.down_sb:
783
	cmp   sb_m_keys,dword 0
783
	cmp   dword sb_m_keys,0
784
	je   .exit_sb
784
	je   .exit_sb
Line 785... Line 785...
785
	
785
	
786
	mov   eax,sb_max_area
786
	mov   eax,sb_max_area
787
	mov   ebx,sb_ar_offset
787
	mov   ebx,sb_ar_offset
Line 848... Line 848...
848
	mov   eax,10
848
	mov   eax,10
849
@@:
849
@@:
850
.no_size:
850
.no_size:
851
	mov   sb_run_size,eax
851
	mov   sb_run_size,eax
852
;*********************************
852
;*********************************
853
	cmp   sb_delta,word 1
853
	cmp   word sb_delta,1
854
	je	.@@_3
854
	je	.@@_3
855
	mov   eax,sb_work_size
855
	mov   eax,sb_work_size
856
	sub   eax,sb_run_size
856
	sub   eax,sb_run_size
857
	mov   ebx,sb_max_area
857
	mov   ebx,sb_max_area
858
	cmp   ebx,sb_cur_area
858
	cmp   ebx,sb_cur_area
Line 880... Line 880...
880
	mov   ecx,sb_start_y
880
	mov   ecx,sb_start_y
881
	shl   ecx,16
881
	shl   ecx,16
882
	inc   ecx	
882
	inc   ecx	
883
	mov   edx,sb_line_col
883
	mov   edx,sb_line_col
884
	mov   eax,13
884
	mov   eax,13
885
	cmp  sb_all_redraw,dword 0
885
	cmp  dword sb_all_redraw,0
886
	je   @f
886
	je   @f
887
	int   0x40   ; top extreme line
887
	int   0x40   ; top extreme line
888
@@:
888
@@:
889
	push  ecx
889
	push  ecx
890
	ror   ecx,16
890
	ror   ecx,16
891
	add   cx,sb_size_y
891
	add   cx,sb_size_y
892
	rol   ecx,16
892
	rol   ecx,16
893
	cmp  sb_all_redraw,dword 0
893
	cmp  dword sb_all_redraw,0
894
	je   @f
894
	je   @f
895
	int   0x40   ; bottom extreme line
895
	int   0x40   ; bottom extreme line
896
@@:
896
@@:
897
	pop   ecx
897
	pop   ecx
Line 900... Line 900...
900
	
900
	
901
	add   ecx,1 shl 16
901
	add   ecx,1 shl 16
902
	mov   cx,sb_size_y
902
	mov   cx,sb_size_y
903
	dec   ecx	
903
	dec   ecx	
904
	mov   bx,1
904
	mov   bx,1
905
	cmp  sb_all_redraw,dword 0
905
	cmp  dword sb_all_redraw,0
906
	je   @f
906
	je   @f
907
	int   0x40   ; left button - extreme line
907
	int   0x40   ; left button - extreme line
908
@@:
908
@@:
909
	push  ebx
909
	push  ebx
910
	add   ebx,1 shl 16
910
	add   ebx,1 shl 16
911
	add   ebx,sb_btn_high
911
	add   ebx,sb_btn_high
912
	sub   ebx,2
912
	sub   ebx,2
913
	mov   edx,sb_frnt_col
913
	mov   edx,sb_frnt_col
914
	cmp  sb_all_redraw,dword 0
914
	cmp  dword sb_all_redraw,0
915
	je   @f
915
	je   @f
916
	int   0x40   ; left  button filling
916
	int   0x40   ; left  button filling
917
;*********************************	
917
;*********************************	
918
draw_up_arrow_horizontal
918
draw_up_arrow_horizontal
Line 922... Line 922...
922
	
922
	
923
	ror   ebx,16
923
	ror   ebx,16
924
	add   ebx,sb_btn_high  ;14 shl 16
924
	add   ebx,sb_btn_high  ;14 shl 16
925
	rol   ebx,16
925
	rol   ebx,16
926
	mov   edx,sb_line_col
926
	mov   edx,sb_line_col
927
	cmp  sb_all_redraw,dword 0
927
	cmp  dword sb_all_redraw,0
928
	je   @f
928
	je   @f
929
	int   0x40   ;  left  button - right line
929
	int   0x40   ;  left  button - right line
930
@@:
930
@@:
931
	pop   ebx
931
	pop   ebx
Line 996... Line 996...
996
	sub   ebx,2
996
	sub   ebx,2
997
	shl   ebx,16
997
	shl   ebx,16
998
	inc   ebx
998
	inc   ebx
999
	mov   edx,sb_line_col
999
	mov   edx,sb_line_col
1000
	mov   eax,13
1000
	mov   eax,13
1001
	cmp  sb_all_redraw,dword 0
1001
	cmp  dword sb_all_redraw,0
1002
	je   @f
1002
	je   @f
1003
	int   0x40	; bottom button - top line
1003
	int   0x40	; bottom button - top line
1004
@@:
1004
@@:
1005
	push  ebx
1005
	push  ebx
1006
	add   ebx,1 shl 16
1006
	add   ebx,1 shl 16
1007
	add   bx,sb_btn_high
1007
	add   bx,sb_btn_high
1008
	sub   ebx,2
1008
	sub   ebx,2
1009
	mov   edx,sb_frnt_col
1009
	mov   edx,sb_frnt_col
1010
	cmp  sb_all_redraw,dword 0
1010
	cmp  dword sb_all_redraw,0
1011
	je   @f
1011
	je   @f
1012
	int   0x40   ; bottom button filling
1012
	int   0x40   ; bottom button filling
1013
;********************************* 
1013
;********************************* 
1014
draw_down_arrow_horizontal
1014
draw_down_arrow_horizontal
1015
;*********************************
1015
;*********************************
Line 1020... Line 1020...
1020
	add   ebx,sb_btn_high  ;14 shl 16
1020
	add   ebx,sb_btn_high  ;14 shl 16
1021
	rol   ebx,16
1021
	rol   ebx,16
Line 1022... Line 1022...
1022
	
1022
	
1023
	mov   edx,sb_line_col
1023
	mov   edx,sb_line_col
1024
	mov   bx,1
1024
	mov   bx,1
1025
	cmp  sb_all_redraw,dword 0
1025
	cmp  dword sb_all_redraw,0
1026
	je   @f
1026
	je   @f
1027
	int   0x40   ; bottom button - extreme line
1027
	int   0x40   ; bottom button - extreme line
1028
@@:
1028
@@:
1029
	popa
1029
	popa
Line 1034... Line 1034...
1034
.mouse:
1034
.mouse:
1035
	pusha
1035
	pusha
1036
	mov	 edi,dword [esp+36]
1036
	mov	 edi,dword [esp+36]
1037
	mcall 37,1
1037
	mcall 37,1
1038
	mov   sb_m_pos,eax
1038
	mov   sb_m_pos,eax
1039
	cmp   sb_m_pos_2,dword 0
1039
	cmp   dword sb_m_pos_2,0
1040
	jne   @f
1040
	jne   @f
Line 1041... Line 1041...
1041
	
1041
	
1042
	mov   sb_m_pos_2,eax	
1042
	mov   sb_m_pos_2,eax	
1043
@@:
1043
@@:
Line 1054... Line 1054...
1054
	mov   eax,sb_m_pos
1054
	mov   eax,sb_m_pos
1055
	mov   sb_m_pos_2,eax
1055
	mov   sb_m_pos_2,eax
1056
	jmp   .continue_2
1056
	jmp   .continue_2
Line 1057... Line 1057...
1057
	
1057
	
1058
@@:
1058
@@:
1059
	cmp   sb_m_keys,dword 0
1059
	cmp   dword sb_m_keys,0
1060
	jne	 @f
1060
	jne	 @f
1061
	mov   eax,sb_m_pos
1061
	mov   eax,sb_m_pos
1062
	mov   sb_m_pos_2,eax
1062
	mov   sb_m_pos_2,eax
1063
	jmp   .correct_1	;.exit_sb
1063
	jmp   .correct_1	;.exit_sb
Line 1079... Line 1079...
1079
 
1079
 
1080
	mov   cx,sb_start_x   ;y
1080
	mov   cx,sb_start_x   ;y
1081
	cmp   ax,cx
1081
	cmp   ax,cx
Line 1082... Line 1082...
1082
	jb	.exit_sb
1082
	jb	.exit_sb
1083
	
1083
	
1084
	cmp   sb_delta2,word 0
1084
	cmp   word sb_delta2,0
1085
	je	@f
1085
	je	@f
1086
	push  ecx
1086
	push  ecx
1087
	add   cx,sb_btn_high
1087
	add   cx,sb_btn_high
Line 1092... Line 1092...
1092
@@:
1092
@@:
1093
	add   cx,sb_size_x	;y
1093
	add   cx,sb_size_x	;y
1094
	cmp   ax,cx
1094
	cmp   ax,cx
1095
	ja	.exit_sb
1095
	ja	.exit_sb
Line 1096... Line 1096...
1096
 
1096
 
1097
	cmp   sb_delta2,word 0
1097
	cmp   word sb_delta2,0
1098
	je	@f
1098
	je	@f
1099
	sub   cx,sb_btn_high
1099
	sub   cx,sb_btn_high
1100
	cmp   ax,cx
1100
	cmp   ax,cx
Line 1101... Line 1101...
1101
	ja	.exit_sb
1101
	ja	.exit_sb
1102
	
1102
	
1103
@@:
1103
@@:
Line 1104... Line 1104...
1104
	cmp   sb_delta2,word 1
1104
	cmp   word sb_delta2,1
1105
	je	@f
1105
	je	@f
Line 1106... Line 1106...
1106
	
1106
	
1107
	cmp   sb_m_keys,dword 0
1107
	cmp   dword sb_m_keys,0
1108
	je	.exit_sb
1108
	je	.exit_sb
Line 1186... Line 1186...
1186
	mov   sb_delta,dword 0
1186
	mov   sb_delta,dword 0
1187
.no_runner_1:
1187
.no_runner_1:
1188
	xor   ecx,ecx
1188
	xor   ecx,ecx
1189
	mov   cx,sb_start_x   ;y
1189
	mov   cx,sb_start_x   ;y
1190
	add   cx,sb_btn_high   ;15
1190
	add   cx,sb_btn_high   ;15
1191
	cmp   sb_delta,word 1
1191
	cmp   word sb_delta,1
1192
	je	.scroll_sb
1192
	je	.scroll_sb
Line 1193... Line 1193...
1193
	
1193
	
1194
	cmp   ax,cx
1194
	cmp   ax,cx
Line 1195... Line 1195...
1195
	ja	.scroll_sb
1195
	ja	.scroll_sb
1196
	
1196
	
Line 1197... Line 1197...
1197
	cmp   sb_m_keys,dword 0
1197
	cmp   dword sb_m_keys,0
1198
	je   .exit_sb
1198
	je   .exit_sb
1199
	
1199
	
Line 1211... Line 1211...
1211
;*****************************************************************************
1211
;*****************************************************************************
1212
.scroll_sb:
1212
.scroll_sb:
1213
	add   cx,sb_size_x	;y
1213
	add   cx,sb_size_x	;y
1214
	sub   cx,sb_btn_high
1214
	sub   cx,sb_btn_high
1215
	sub   cx,sb_btn_high
1215
	sub   cx,sb_btn_high
1216
	cmp   sb_delta,word 1
1216
	cmp   word sb_delta,1
1217
	je	@f
1217
	je	@f
Line 1218... Line 1218...
1218
	
1218
	
1219
	cmp   ax,cx
1219
	cmp   ax,cx
Line 1226... Line 1226...
1226
	sub   ax,bx
1226
	sub   ax,bx
Line 1227... Line 1227...
1227
	
1227
	
1228
.scroll_sb_1:	
1228
.scroll_sb_1:	
1229
	mov   ebx,sb_run_size
1229
	mov   ebx,sb_run_size
1230
;*****************************************************************************	
1230
;*****************************************************************************	
1231
	cmp   sb_delta,word 1
1231
	cmp   word sb_delta,1
Line 1232... Line 1232...
1232
	je	.continue
1232
	je	.continue
1233
	
1233
	
Line 1304... Line 1304...
1304
	mov   eax,sb_m_pos
1304
	mov   eax,sb_m_pos
1305
	mov   sb_m_pos_2,eax
1305
	mov   sb_m_pos_2,eax
1306
	jmp   .exit_sb
1306
	jmp   .exit_sb
1307
;*****************************************************************************
1307
;*****************************************************************************
1308
.down_sb:
1308
.down_sb:
1309
	cmp   sb_m_keys,dword 0
1309
	cmp   dword sb_m_keys,0
1310
	je   .exit_sb
1310
	je   .exit_sb
Line 1311... Line 1311...
1311
	
1311
	
1312
	mov   eax,sb_max_area
1312
	mov   eax,sb_max_area
1313
	mov   ebx,sb_ar_offset
1313
	mov   ebx,sb_ar_offset