Subversion Repositories Kolibri OS

Rev

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

Rev 7834 Rev 8346
Line 21... Line 21...
21
	dd stacktop
21
	dd stacktop
22
	dd params
22
	dd params
23
	dd cur_dir_path
23
	dd cur_dir_path
24
;---------------------------------------------------------------------
24
;---------------------------------------------------------------------
25
include '../../../config.inc'		;for nightbuild
25
include '../../../config.inc'		;for nightbuild
-
 
26
include '../../../KOSfuncs.inc'
26
include '../../../macros.inc'
27
include '../../../macros.inc'
27
include '../../../gui_patterns.inc'
28
include '../../../gui_patterns.inc'
28
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
29
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
29
include '../../../develop/libraries/box_lib/load_lib.mac'
30
include '../../../load_lib.mac'
30
  @use_library
31
  @use_library
Line 31... Line 32...
31
 
32
 
32
START:
33
START:
33
	mcall	68,11
34
	mcall	SF_SYS_MISC,SSF_HEAP_INIT
Line 34... Line 35...
34
	mcall	40,0x80000027
35
	mcall	SF_SET_EVENTS_MASK,0x80000027
35
 
36
 
36
	load_libraries l_libs_start,load_lib_end
37
	load_libraries l_libs_start,load_lib_end
Line 128... Line 129...
128
;---------------------------------------------------------------------
129
;---------------------------------------------------------------------
129
red:
130
red:
130
	call	draw_window
131
	call	draw_window
131
;--------------------------------------
132
;--------------------------------------
132
still:
133
still:
133
	mcall	10
134
	mcall	SF_WAIT_EVENT
134
	dec	eax
135
	dec	eax
135
	jz	red
136
	jz	red
Line 136... Line 137...
136
 
137
 
137
	dec	eax
138
	dec	eax
Line 180... Line 181...
180
	ret
181
	ret
181
;*********************************************************************
182
;*********************************************************************
182
exit:
183
exit:
183
	xor	eax,eax
184
	xor	eax,eax
184
	dec	eax
185
	dec	eax
185
	mcall
186
	mcall	;SF_TERMINATE_PROCESS
186
;*********************************************************************
187
;*********************************************************************
187
button:
188
button:
188
; button pressed
189
; button pressed
189
	mcall	17
190
	mcall	SF_GET_BUTTON
190
	xchg	al,ah
191
	xchg	al,ah
191
	cmp	al,7
192
	cmp	al,7
192
	jz	but7
193
	jz	but7
Line 193... Line 194...
193
 
194
 
Line 316... Line 317...
316
	mov	edi,edit3
317
	mov	edi,edit3
317
	call	set_editbox_position
318
	call	set_editbox_position
318
	ret
319
	ret
319
;*********************************************************************
320
;*********************************************************************
320
key:
321
key:
321
	mcall	2
322
	mcall	SF_GET_KEY
Line 322... Line 323...
322
 
323
 
323
	push	dword edit1
324
	push	dword edit1
Line 324... Line 325...
324
	call	[edit_box_key]
325
	call	[edit_box_key]
Line 406... Line 407...
406
	repnz	scasb
407
	repnz	scasb
407
	sub	ecx,79
408
	sub	ecx,79
408
	neg	ecx
409
	neg	ecx
409
	mov	esi,ecx
410
	mov	esi,ecx
410
	pop	edi
411
	pop	edi
411
	mcall	4,,0xB0000000,edi
412
	mcall	SF_DRAW_TEXT,,0xB0000000,edi
412
	add	ebx,16
413
	add	ebx,16
413
	add	edi,80
414
	add	edi,80
414
	cmp	edi,message_cur_pos
415
	cmp	edi,message_cur_pos
415
	jb	@b
416
	jb	@b
Line 416... Line 417...
416
 
417
 
417
	ret
418
	ret
418
;*********************************************************************
419
;*********************************************************************
419
draw_log_area:
420
draw_log_area:
420
	DrawRectangle 5, LOG_Y, WIN_W-12, LOG_H, [sc.work_graph]
421
	DrawRectangle 5, LOG_Y, WIN_W-12, LOG_H, [sc.work_graph]
421
	mcall	13, <6,WIN_W-13>, , 0xFFFfff
422
	mcall	SF_DRAW_RECT, <6,WIN_W-13>, , 0xFFFfff
422
	DrawRectangle3D 6, LOG_Y+1, WIN_W-13, LOG_H-1, 0xDEDEDE, [sc.work_graph] 
423
	DrawRectangle3D 6, LOG_Y+1, WIN_W-13, LOG_H-1, 0xDEDEDE, [sc.work_graph] 
423
	ret
424
	ret
424
;*********************************************************************
425
;*********************************************************************
425
draw_window:
426
draw_window:
426
; start redraw
427
; start redraw
427
	mcall	12,1	
428
	mcall	SF_REDRAW,SSF_BEGIN_DRAW	
428
	mcall	48,3,sc,40
429
	mcall	SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,40
429
	;--------------------------------------
430
	;--------------------------------------
430
	edit_boxes_set_sys_color edit1,editboxes_end,sc
431
	edit_boxes_set_sys_color edit1,editboxes_end,sc
431
	check_boxes_set_sys_color2 check1,check1_end,sc
432
	check_boxes_set_sys_color2 check1,check1_end,sc
432
	;--------------------------------------
433
	;--------------------------------------
433
; define window
434
; define window
Line 434... Line 435...
434
	mcall 48,4
435
	mcall	SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
435
 
436
 
Line 436... Line 437...
436
	mov	ecx,100 shl 16 + WIN_H
437
	mov	ecx,100 shl 16 + WIN_H
437
	add ecx, eax
438
	add ecx, eax
438
	
439
	
439
	mov	edx,[sc.work]
440
	mov	edx,[sc.work]
440
	add	edx,34000000h
441
	add	edx,34000000h
441
	xor	esi,esi
442
	xor	esi,esi
Line 442... Line 443...
442
	xor	edi,edi
443
	xor	edi,edi
443
	mcall	0,<250,WIN_W+10>,,,,caption_str
444
	mcall	SF_CREATE_WINDOW,<250,WIN_W+10>,,,,caption_str
444
	mcall	9,procinfo,-1
445
	mcall	SF_THREAD_INFO,procinfo,-1
445
	
446
	
Line 455... Line 456...
455
	call	draw_messages
456
	call	draw_messages
456
; draw editbox's
457
; draw editbox's
457
	call	draw_editbox
458
	call	draw_editbox
458
; end redraw
459
; end redraw
459
.end:
460
.end:
460
	mcall	12,2
461
	mcall	SF_REDRAW,SSF_END_DRAW
461
	ret
462
	ret
462
;*********************************************************************
463
;*********************************************************************
463
draw_editbox:
464
draw_editbox:
464
	push	dword edit1
465
	push	dword edit1
465
	call	[edit_box_draw]
466
	call	[edit_box_draw]
Line 492... Line 493...
492
	ret
493
	ret
493
;*********************************************************************
494
;*********************************************************************
494
draw_buttons:
495
draw_buttons:
495
; define compress button
496
; define compress button
496
	mov	cx,18
497
	mov	cx,18
497
	mcall	8,, <3, 20>,2,[sc.work_button]
498
	mcall	SF_DEFINE_BUTTON,, <3, 20>,2,[sc.work_button]
498
; uncompress button
499
; uncompress button
499
	inc	edx
500
	inc	edx
500
	add	ecx,LINE_H shl 16
501
	add	ecx,LINE_H shl 16
501
	mcall
502
	mcall
502
; question button
503
; question button
Line 504... Line 505...
504
	mov	dl,7
505
	mov	dl,7
505
	mcall	,,
506
	mcall	,,
506
	mov ecx,[sc.work_button_text]
507
	mov ecx,[sc.work_button_text]
507
	or  ecx,0x90000000
508
	or  ecx,0x90000000
508
	mov edx,aQuestion
509
	mov edx,aQuestion
509
	mcall  4,
510
	mcall	SF_DRAW_TEXT,
510
	pop	esi
511
	pop	esi
511
; define Path button
512
; define Path button
512
	mcall	8,<6,64>,,4
513
	mcall	SF_DEFINE_BUTTON,<6,64>,,4
513
; text on Path button
514
; text on Path button
514
	mov	ebx,8 shl 16+5
515
	mov	ebx,8 shl 16+5
515
	mov	al,4
516
	mov	al,4
516
	mov	ecx,[sc.work_text]
517
	mov	ecx,[sc.work_text]
517
	push	buttons1names
518
	push	buttons1names