Subversion Repositories Kolibri OS

Rev

Rev 6369 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
255 heavyiron 1
;----------------------------------------------------------
2
;-------------draw window of program-----------------------
3
;----------------------------------------------------------
4
drawwin:
1643 mario79 5
	or	ecx,-1
6352 IgorA 6
	mcall SF_THREAD_INFO,procinfo
1643 mario79 7
	mov	esi,procinfo
255 heavyiron 8
 
8271 IgorA 9
	mov	eax,[esi+process_information.box.left]
10
	mov	ebx,[esi+process_information.box.top]
11
	mov	ecx,[esi+process_information.box.width]
12
	mov	edx,[esi+process_information.box.height]
1643 mario79 13
	mov	[Window_CordinatX],eax
14
	mov	[Window_CordinatY],ebx
6357 IgorA 15
 
6358 IgorA 16
	cmp ecx,ci_wnd_min_siz_x
17
	jge @f
18
		mov ecx,ci_wnd_min_siz_x
6357 IgorA 19
	@@:
6358 IgorA 20
	cmp edx,ci_wnd_min_siz_y
21
	jge @f
22
		mov edx,ci_wnd_min_siz_y
6357 IgorA 23
	@@:
1643 mario79 24
	mov	[Window_SizeX],ecx
6357 IgorA 25
	mov [Window_SizeY],edx
1643 mario79 26
	mov	[MaxWorkScreen_SizeX],ecx
27
	mov	[MaxWorkScreen_SizeY],edx
6358 IgorA 28
	sub	[MaxWorkScreen_SizeX],ci_edit_wnd_x_pos+2*ci_edit_wnd_border\
29
		+ci_scroll_dim+ci_offs_skin_w+5
30
	sub	[MaxWorkScreen_SizeY],ci_edit_wnd_y_pos+2*ci_edit_wnd_border\
31
		+ci_scroll_dim+ci_offs_skin_h+5
255 heavyiron 32
 
1643 mario79 33
	cmp	[MaxWorkScreen_SizeX],0
34
	jns	no_znak1
255 heavyiron 35
 
1643 mario79 36
	mov	[MaxWorkScreen_SizeX],ecx
255 heavyiron 37
 
1643 mario79 38
no_znak1:
39
	cmp	[MaxWorkScreen_SizeY],0
40
	jns	no_znak2
255 heavyiron 41
 
1643 mario79 42
	mov	[MaxWorkScreen_SizeY],edx
255 heavyiron 43
 
1643 mario79 44
no_znak2:
255 heavyiron 45
 
6352 IgorA 46
	mcall SF_REDRAW,SSF_BEGIN_DRAW
1643 mario79 47
;------------------------------------------------
8271 IgorA 48
	mov	ebx,50 shl 16 ;[Window_CordinatX]
49
	mov	ecx,50 shl 16 ;[Window_CordinatY]
6358 IgorA 50
	add	ebx, [Window_SizeX]
51
	add	ecx, [Window_SizeY]
6359 IgorA 52
	mcall SF_CREATE_WINDOW,,,0x73aabbcc,,name_of_program
2045 mario79 53
 
54
	mov	eax,[procinfo+70] ;staus of window
6358 IgorA 55
	test eax,100b
2045 mario79 56
	jne	.end
57
 
1643 mario79 58
;------------------------------------------------
6359 IgorA 59
	mov	ebx,[Window_SizeX]
60
	sub	ebx,5+ci_panel_x_pos+ci_offs_skin_w-1
61
	mcall SF_DRAW_RECT,,ci_panel_y_pos,dword[syscolors+20] ; чистка полосы для меню
255 heavyiron 62
 
6359 IgorA 63
	call put_main_menu
1643 mario79 64
;------------------------------------------------
6367 leency 65
	; draw toolbard background
66
	mov ebx, ci_panel_x_pos
67
	shl ebx, 16
68
	add ebx, [Window_SizeX]
69
	sub	ebx, 9
8271 IgorA 70
	mov ecx, (ci_panel_y_pos shl 16) + 51
6367 leency 71
	mov edx, 0xD5CDCB
8271 IgorA 72
	mcall SF_DRAW_RECT
6367 leency 73
 
1643 mario79 74
	call	draw_icons
75
	call	PrintMousePos
76
;------------------------------------------------
6352 IgorA 77
	mov ecx,[k]
78
	call MovePictureToWorkScreen
1643 mario79 79
;------------------------------------------------
80
	mov	ebx,[WorkScreen_SizeX]
6357 IgorA 81
	add	ebx,ci_edit_wnd_x_pos+ci_edit_wnd_border
6358 IgorA 82
	mov	edx,[Window_SizeX]
83
	sub	edx,ebx
84
	sub	edx,ci_scroll_dim+5-ci_edit_wnd_border
1643 mario79 85
	shl	ebx,16
6358 IgorA 86
	mov	bx,dx ;ширина бордюра
1643 mario79 87
 
6357 IgorA 88
	mov	ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border
1643 mario79 89
	mov	edx,[Window_SizeY]
6358 IgorA 90
	sub	edx,ci_edit_wnd_y_pos+2*ci_edit_wnd_border+ci_scroll_dim+5+ci_offs_skin_h
1643 mario79 91
	shl	ecx,16
6357 IgorA 92
	mov	cx,dx ;высота бордюра
255 heavyiron 93
 
6359 IgorA 94
	mcall SF_DRAW_RECT,,,dword[syscolors+20] ;бордюр справа от окна перед скроллингом
1643 mario79 95
;------------------------------------------------
6357 IgorA 96
	mcall , ;бордюр слева от окна
1643 mario79 97
;------------------------------------------------
6357 IgorA 98
	mov	ebx,ci_edit_wnd_x_pos
1643 mario79 99
	mov	edx,[Window_SizeX]
6358 IgorA 100
	sub	edx,ci_scroll_dim+5+ci_edit_wnd_x_pos
1643 mario79 101
	shl	ebx,16
6357 IgorA 102
	mov	bx,dx ;ширина бордюра
255 heavyiron 103
 
1643 mario79 104
	mov	ecx,[WorkScreen_SizeY]
6357 IgorA 105
	add	ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border
6358 IgorA 106
	mov	edx,[Window_SizeY]
107
	sub	edx,ecx
108
	sub	edx,ci_scroll_dim+5+ci_offs_skin_h;ci_edit_wnd_border
1643 mario79 109
	shl	ecx,16
6358 IgorA 110
	mov	cx,dx ;высота бордюра
255 heavyiron 111
 
6359 IgorA 112
	mcall SF_DRAW_RECT,,,dword[syscolors+20] ;бордюр под окном и над скроллингом
1643 mario79 113
;------------------------------------------------
6357 IgorA 114
	mcall ,, ;бордюр под панелью и над окном
1643 mario79 115
;------------------------------------------------
6357 IgorA 116
	mov	eax,ci_edit_wnd_x_pos
1643 mario79 117
	mov	ebx,[Window_SizeY]
118
	mov	ecx,[Window_SizeX]
6358 IgorA 119
	mov	edx,ci_scroll_dim
1643 mario79 120
	mov	esi,3
6358 IgorA 121
	sub	ecx,ci_scroll_dim+5+ci_edit_wnd_x_pos+ci_offs_skin_w
122
	sub	ebx,ci_scroll_dim+5+ci_offs_skin_h
6357 IgorA 123
	call draw_volume_rectangle ; horizontal scrollbar border
1643 mario79 124
;------------------------------------------------
125
	mov	eax,[Window_SizeX]
6357 IgorA 126
	mov	ebx,ci_edit_wnd_y_pos
6358 IgorA 127
	mov	ecx,ci_scroll_dim
1643 mario79 128
	mov	edx,[Window_SizeY]
129
	mov	esi,3
6358 IgorA 130
	sub	eax,ci_scroll_dim+5+ci_offs_skin_w
131
	sub	edx,ci_scroll_dim+5+ci_edit_wnd_y_pos+ci_offs_skin_h
6357 IgorA 132
	call draw_volume_rectangle ; vertical scrollbar border
133
	call draw_scrollers
1643 mario79 134
;------------------------------------------------
135
	mov	eax,[Window_SizeX]
136
	mov	ebx,[Window_SizeY]
6358 IgorA 137
	mov	ecx,ci_scroll_dim
138
	mov	edx,ci_scroll_dim
1643 mario79 139
	mov	esi,6
6358 IgorA 140
	sub	eax,ci_scroll_dim+5+ci_offs_skin_w
141
	sub	ebx,ci_scroll_dim+5+ci_offs_skin_h
6357 IgorA 142
	call draw_volume_rectangle ; down and right small area
1643 mario79 143
;------------------------------------------------
2045 mario79 144
.end:
6352 IgorA 145
	mcall SF_REDRAW,SSF_END_DRAW
1643 mario79 146
	ret
147
;-----------------------------------------------------------------------------