Subversion Repositories Kolibri OS

Rev

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

Rev 595 Rev 617
Line 1... Line 1...
1
;-----------------------------------------------------------------------------
1
;-----------------------------------------------------------------------------
2
func drawwindow ;///// DRAW WINDOW ///////////////////////////////////////////
2
proc drawwindow ;///// DRAW WINDOW ///////////////////////////////////////////
3
;-----------------------------------------------------------------------------
3
;-----------------------------------------------------------------------------
Line 4... Line 4...
4
 
4
 
5
	cmp	[just_from_popup],1
5
	cmp	[just_from_popup],1
6
	jne	@f
6
	jne	@f
7
	ret
7
	ret
Line 8... Line 8...
8
    @@:
8
    @@:
9
 
9
 
Line 10... Line 10...
10
	mcall	48,3,sc,sizeof.system_colors
10
	mcall	48,3,sc,sizeof.system_colors
-
 
11
	call	calc_3d_colors
-
 
12
 
Line 11... Line 13...
11
	call	calc_3d_colors
13
	;mcall   12,1
Line 12... Line 14...
12
 
14
	invoke	gfx.open,TRUE
13
	mcall	12,1
15
	mov	[ctx],eax
14
 
16
 
15
	m2m	[sc.work],dword[color_tbl.back]
17
	;m2m     [sc.work],dword[color_tbl.back]
Line 108... Line 110...
108
 
110
 
109
  .exit:
111
  .exit:
110
	call	draw_editor
112
	call	draw_editor
111
	call	draw_tabctl
113
	call	draw_tabctl
112
  .exit.2:
114
  .exit.2:
-
 
115
	;mcall   12,2
113
	mcall	12,2
116
	invoke	gfx.close,[ctx]
114
	ret
117
	ret
Line 115... Line 118...
115
endf
118
endp
116
 
119
 
117
;-----------------------------------------------------------------------------
120
;-----------------------------------------------------------------------------
118
func draw_bottom_dialog ;/////////////////////////////////////////////////////
121
proc draw_bottom_dialog ;/////////////////////////////////////////////////////
119
;-----------------------------------------------------------------------------
122
;-----------------------------------------------------------------------------
120
	cmp	[bot_dlg_height],0
123
	cmp	[bot_dlg_height],0
121
	je	.exit
124
	je	.exit
122
	pushad
125
	pushad
123
	mov	ebx,[p_info.client_box.width]
126
	invoke	gfx.pen.color,[ctx],[cl_3d_inset]
-
 
127
	mov	ecx,[bot_ofs]
-
 
128
	dec	ecx
-
 
129
	invoke	gfx.line,[ctx],0,ecx,[p_info.client_box.width],ecx
-
 
130
	invoke	gfx.brush.color,[ctx],[cl_3d_normal]
-
 
131
	inc	ecx
-
 
132
	mov	eax,ecx
-
 
133
	add	eax,[bot_dlg_height]
-
 
134
	invoke	gfx.fillrect,[ctx],0,ecx,[p_info.client_box.width],eax
-
 
135
	;mov     ebx,[p_info.client_box.width]
124
	mov	ecx,[bot_ofs]
136
	;mov     ecx,[bot_ofs]
125
	dec	ecx
137
	;dec     ecx
126
	push	cx
138
	;push    cx
127
	shl	ecx,16
139
	;shl     ecx,16
128
	pop	cx
140
	;pop     cx
129
	mcall	38,,,[cl_3d_inset]
141
	;mcall   38,,,[cl_3d_inset]
130
	mov	ecx,[bot_ofs-2]
142
	;mov     ecx,[bot_ofs-2]
131
	mov	cx,word[bot_dlg_height]
143
	;mov     cx,word[bot_dlg_height]
132
	dec	ecx
144
	;dec     ecx
133
	mov	ebx,[p_info.client_box.width]
145
	;mov     ebx,[p_info.client_box.width]
134
	inc	ebx
146
	;inc     ebx
135
	mcall	13,,,[cl_3d_normal]
147
	;mcall   13,,,[cl_3d_normal]
136
	mov	al,1
148
	mov	al,1
Line 137... Line 149...
137
	call	[bot_dlg_handler]
149
	call	[bot_dlg_handler]
138
	popad
150
	popad
139
 
151
 
Line 140... Line 152...
140
  .exit:
152
  .exit:
141
	ret
153
	ret
Line 142... Line 154...
142
endf
154
endp
143
 
155
 
144
mi_sel	 dd ?
156
mi_sel	 dd ?
145
mi_cur	 dd -1
157
mi_cur	 dd -1
146
 
158
 
147
;-----------------------------------------------------------------------------
159
;-----------------------------------------------------------------------------
Line 219... Line 231...
219
 
231
 
Line 220... Line 232...
220
	ret
232
	ret
221
 
233
 
222
cross:
234
cross:
Line 223... Line 235...
223
	db	'X'
235
	db	'X'
224
endf
236
endp
225
 
237
 
226
;-----------------------------------------------------------------------------
238
;-----------------------------------------------------------------------------
227
func draw_statusbar ;///// DRAW POSITION, MODIFIED STATE, HINT ///////////////
239
proc draw_statusbar ;///// DRAW POSITION, MODIFIED STATE, HINT ///////////////
228
;-----------------------------------------------------------------------------
240
;-----------------------------------------------------------------------------
Line 296... Line 308...
296
 
308
 
Line 297... Line 309...
297
    @@: popa
309
    @@: popa
298
 
310
 
299
  .exit:
311
  .exit:
Line 300... Line 312...
300
	ret
312
	ret
301
endf
313
endp
302
 
314
 
303
func draw_fillrect ; ebx,ecx,edx
315
proc draw_fillrect ; ebx,ecx,edx
304
	; ebx = 
316
	; ebx = 
305
	; ecx = 
317
	; ecx = 
306
	push	ebx ecx edx
318
	push	ebx ecx edx
307
	call	draw_framerect
319
	call	draw_framerect
308
	add	ebx,1*65536-2
320
	add	ebx,1*65536-2
309
	add	ecx,1*65536-2
321
	add	ecx,1*65536-2
310
	mcall	13,,,esi
322
	mcall	13,,,esi
Line 311... Line 323...
311
	pop	edx ecx ebx
323
	pop	edx ecx ebx
312
	ret
324
	ret
313
endf
325
endp
314
 
326
 
Line 315... Line 327...
315
func draw_framerect ; ebx,ecx,edx
327
proc draw_framerect ; ebx,ecx,edx
Line 339... Line 351...
339
	sub	ebx,0x00010001
351
	sub	ebx,0x00010001
340
	mcall
352
	mcall
Line 341... Line 353...
341
 
353
 
342
	pop	ecx ebx
354
	pop	ecx ebx
343
	ret
355
	ret
Line 344... Line 356...
344
endf
356
endp
345
 
357
 
346
func draw_check
358
proc draw_check
347
	push	bx
359
	push	bx
348
	shl	ebx,16
360
	shl	ebx,16
349
	pop	bx
361
	pop	bx
Line 359... Line 371...
359
	sub	ecx,2
371
	sub	ecx,2
360
	mcall
372
	mcall
361
	sub	ecx,0x00010001
373
	sub	ecx,0x00010001
362
	mcall
374
	mcall
363
	ret
375
	ret
364
endf
376
endp
Line 365... Line 377...
365
 
377
 
366
func calc_middle
378
proc calc_middle
367
	shr	eax,1
379
	shr	eax,1
368
	shr	ebx,1
380
	shr	ebx,1
369
	and	eax,0x007F7F7F
381
	and	eax,0x007F7F7F
370
	and	ebx,0x007F7F7F
382
	and	ebx,0x007F7F7F
371
	add	eax,ebx
383
	add	eax,ebx
372
	ret
384
	ret
Line 373... Line 385...
373
endf
385
endp
374
 
386
 
375
func calc_3d_colors
387
proc calc_3d_colors
376
	pushad
388
	pushad
377
	m2m	[cl_3d_normal],[sc.work]
389
	m2m	[cl_3d_normal],[sc.work]
378
	m2m	[cl_3d_inset],[sc.work_graph]
390
	m2m	[cl_3d_inset],[sc.work_graph]
Line 397... Line 409...
397
	mov	ebx,[sc.work_text]
409
	mov	ebx,[sc.work_text]
398
	call	calc_middle
410
	call	calc_middle
399
	mov	[cl_3d_grayed],eax
411
	mov	[cl_3d_grayed],eax
400
	popad
412
	popad
401
	ret
413
	ret
402
endf
414
endp
Line 403... Line 415...
403
 
415
 
404
func draw_3d_panel ; x,y,w,h
416
proc draw_3d_panel ; x,y,w,h
405
	push	eax ebx ecx edx
417
	push	eax ebx ecx edx
406
	cmp	dword[esp+16+8],4
418
	cmp	dword[esp+16+8],4
407
	jl	.exit
419
	jl	.exit
408
	cmp	dword[esp+16+4],4
420
	cmp	dword[esp+16+4],4
Line 445... Line 457...
445
	add	ecx,2*65536-1
457
	add	ecx,2*65536-1
446
	mcall
458
	mcall
447
  .exit:
459
  .exit:
448
	pop	edx ecx ebx eax
460
	pop	edx ecx ebx eax
449
	ret	4*4
461
	ret	4*4
450
endf
462
endp