2006-12-29 15:50:24 +01:00
|
|
|
|
;----------------------------------------------------------
|
|
|
|
|
;-------------draw window of program-----------------------
|
|
|
|
|
;----------------------------------------------------------
|
|
|
|
|
drawwin:
|
2010-10-04 22:40:19 +02:00
|
|
|
|
or ecx,-1
|
2016-03-16 14:23:19 +01:00
|
|
|
|
mcall SF_THREAD_INFO,procinfo
|
2010-10-04 22:40:19 +02:00
|
|
|
|
mov esi,procinfo
|
|
|
|
|
|
|
|
|
|
mov eax,[esi+34]
|
|
|
|
|
mov ebx,[esi+38]
|
|
|
|
|
mov ecx,[esi+42]
|
|
|
|
|
mov edx,[esi+46]
|
|
|
|
|
mov [Window_CordinatX],eax
|
|
|
|
|
mov [Window_CordinatY],ebx
|
2016-03-19 10:57:37 +01:00
|
|
|
|
|
|
|
|
|
cmp ecx,585
|
|
|
|
|
jae @f
|
|
|
|
|
mov ecx,585 ;minimum size x
|
|
|
|
|
@@:
|
2010-10-04 22:40:19 +02:00
|
|
|
|
cmp [Window_SizeY],400
|
2016-03-19 10:57:37 +01:00
|
|
|
|
jae @f
|
|
|
|
|
mov edx,400 ;minimum size y
|
|
|
|
|
@@:
|
|
|
|
|
mov [Window_SizeX],ecx
|
|
|
|
|
mov [Window_SizeY],edx
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
|
|
mov [MaxWorkScreen_SizeX],ecx
|
|
|
|
|
mov [MaxWorkScreen_SizeY],edx
|
2016-03-19 10:57:37 +01:00
|
|
|
|
sub [MaxWorkScreen_SizeX],ci_edit_wnd_x_pos+2*ci_edit_wnd_border+34
|
|
|
|
|
sub [MaxWorkScreen_SizeY],ci_edit_wnd_y_pos+2*ci_edit_wnd_border+34
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
|
|
cmp [MaxWorkScreen_SizeX],0
|
|
|
|
|
jns no_znak1
|
|
|
|
|
|
|
|
|
|
mov [MaxWorkScreen_SizeX],ecx
|
|
|
|
|
|
|
|
|
|
no_znak1:
|
|
|
|
|
cmp [MaxWorkScreen_SizeY],0
|
|
|
|
|
jns no_znak2
|
|
|
|
|
|
|
|
|
|
mov [MaxWorkScreen_SizeY],edx
|
|
|
|
|
|
|
|
|
|
no_znak2:
|
|
|
|
|
|
2016-03-16 14:23:19 +01:00
|
|
|
|
mcall SF_REDRAW,SSF_BEGIN_DRAW
|
2010-10-04 22:40:19 +02:00
|
|
|
|
;------------------------------------------------
|
2011-08-02 12:04:22 +02:00
|
|
|
|
mov ebx,50 ;[Window_CordinatX]
|
|
|
|
|
mov ecx,50 ;[Window_CordinatY]
|
2010-10-04 22:40:19 +02:00
|
|
|
|
shl ebx,16
|
|
|
|
|
shl ecx,16
|
|
|
|
|
add ebx,[Window_SizeX]
|
|
|
|
|
add ecx,[Window_SizeY]
|
2016-03-16 14:23:19 +01:00
|
|
|
|
mcall SF_CREATE_WINDOW,,,0x53aabbcc,,name_of_program
|
2011-08-11 11:03:51 +02:00
|
|
|
|
|
|
|
|
|
mov eax,[procinfo+70] ;staus of window
|
|
|
|
|
test eax,100b
|
|
|
|
|
jne .end
|
|
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
|
;------------------------------------------------
|
|
|
|
|
mov eax,5
|
|
|
|
|
mov ebx,20
|
|
|
|
|
mov ecx,[Window_SizeX]
|
|
|
|
|
mov edx,15
|
|
|
|
|
mov esi,6
|
|
|
|
|
sub ecx,10
|
|
|
|
|
call draw_volume_rectangle ; top menu - file and etc.
|
|
|
|
|
|
|
|
|
|
mov [counter],7
|
|
|
|
|
mov edi,panel_text
|
|
|
|
|
call print_panel_text
|
|
|
|
|
;------------------------------------------------
|
|
|
|
|
mov eax,5
|
|
|
|
|
mov ebx,20+15+1
|
|
|
|
|
mov ecx,[Window_SizeX]
|
|
|
|
|
mov edx,50
|
|
|
|
|
mov esi,1
|
|
|
|
|
sub ecx,10
|
|
|
|
|
call draw_volume_rectangle ; tools panel
|
|
|
|
|
call draw_icons
|
|
|
|
|
call PrintMousePos
|
|
|
|
|
;------------------------------------------------
|
2016-03-16 14:23:19 +01:00
|
|
|
|
mov ecx,[k]
|
|
|
|
|
call MovePictureToWorkScreen
|
2010-10-04 22:40:19 +02:00
|
|
|
|
;------------------------------------------------
|
|
|
|
|
mov ebx,[WorkScreen_SizeX]
|
2016-03-19 10:57:37 +01:00
|
|
|
|
add ebx,ci_edit_wnd_x_pos+ci_edit_wnd_border
|
2010-10-04 22:40:19 +02:00
|
|
|
|
shl ebx,16
|
2016-03-19 10:57:37 +01:00
|
|
|
|
mov bx,ci_edit_wnd_border ;<EFBFBD><EFBFBD>ਭ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
2016-03-19 10:57:37 +01:00
|
|
|
|
mov ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border
|
2010-10-04 22:40:19 +02:00
|
|
|
|
mov edx,[Window_SizeY]
|
2016-03-19 10:57:37 +01:00
|
|
|
|
sub edx,ci_edit_wnd_y_pos+2*ci_edit_wnd_border+34
|
2010-10-04 22:40:19 +02:00
|
|
|
|
shl ecx,16
|
2016-03-19 10:57:37 +01:00
|
|
|
|
mov cx,dx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
2016-03-19 10:57:37 +01:00
|
|
|
|
mcall SF_DRAW_RECT,,,0xc7cbcf ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ࠢ<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>। <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-04 22:40:19 +02:00
|
|
|
|
;------------------------------------------------
|
2016-03-19 10:57:37 +01:00
|
|
|
|
mcall ,<ci_edit_wnd_x_pos,ci_edit_wnd_border> ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-04 22:40:19 +02:00
|
|
|
|
;------------------------------------------------
|
2016-03-19 10:57:37 +01:00
|
|
|
|
mov ebx,ci_edit_wnd_x_pos
|
2010-10-04 22:40:19 +02:00
|
|
|
|
mov edx,[Window_SizeX]
|
2016-03-19 10:57:37 +01:00
|
|
|
|
sub edx,25+10+ci_edit_wnd_x_pos
|
2010-10-04 22:40:19 +02:00
|
|
|
|
shl ebx,16
|
2016-03-19 10:57:37 +01:00
|
|
|
|
mov bx,dx ;<EFBFBD><EFBFBD>ਭ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
|
|
mov ecx,[WorkScreen_SizeY]
|
2016-03-19 10:57:37 +01:00
|
|
|
|
add ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border
|
2010-10-04 22:40:19 +02:00
|
|
|
|
shl ecx,16
|
2016-03-19 10:57:37 +01:00
|
|
|
|
mov cx,ci_edit_wnd_border ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
2016-03-19 10:57:37 +01:00
|
|
|
|
mcall SF_DRAW_RECT,,,0xc7cbcf ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-04 22:40:19 +02:00
|
|
|
|
;------------------------------------------------
|
2016-03-19 10:57:37 +01:00
|
|
|
|
mcall ,,<ci_edit_wnd_y_pos,ci_edit_wnd_border> ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-04 22:40:19 +02:00
|
|
|
|
;------------------------------------------------
|
2016-03-19 10:57:37 +01:00
|
|
|
|
mov eax,ci_edit_wnd_x_pos
|
2010-10-04 22:40:19 +02:00
|
|
|
|
mov ebx,[Window_SizeY]
|
|
|
|
|
mov ecx,[Window_SizeX]
|
|
|
|
|
mov edx,20+10
|
|
|
|
|
mov esi,3
|
2016-03-19 10:57:37 +01:00
|
|
|
|
sub ecx,35+ci_edit_wnd_x_pos
|
2010-10-04 22:40:19 +02:00
|
|
|
|
sub ebx,25+10
|
2016-03-19 10:57:37 +01:00
|
|
|
|
call draw_volume_rectangle ; horizontal scrollbar border
|
2010-10-04 22:40:19 +02:00
|
|
|
|
;------------------------------------------------
|
|
|
|
|
mov eax,[Window_SizeX]
|
2016-03-19 10:57:37 +01:00
|
|
|
|
mov ebx,ci_edit_wnd_y_pos
|
2010-10-04 22:40:19 +02:00
|
|
|
|
mov ecx,20+10
|
|
|
|
|
mov edx,[Window_SizeY]
|
|
|
|
|
mov esi,3
|
|
|
|
|
sub eax,25+10
|
2016-03-19 10:57:37 +01:00
|
|
|
|
sub edx,35+ci_edit_wnd_y_pos
|
|
|
|
|
call draw_volume_rectangle ; vertical scrollbar border
|
|
|
|
|
call draw_scrollers
|
2010-10-04 22:40:19 +02:00
|
|
|
|
;------------------------------------------------
|
|
|
|
|
mov eax,[Window_SizeX]
|
|
|
|
|
mov ebx,[Window_SizeY]
|
|
|
|
|
mov ecx,20+10
|
|
|
|
|
mov edx,20+10
|
|
|
|
|
mov esi,6
|
|
|
|
|
sub eax,25+10
|
|
|
|
|
sub ebx,25+10
|
2016-03-19 10:57:37 +01:00
|
|
|
|
call draw_volume_rectangle ; down and right small area
|
2010-10-04 22:40:19 +02:00
|
|
|
|
;------------------------------------------------
|
2011-08-11 11:03:51 +02:00
|
|
|
|
.end:
|
2016-03-16 14:23:19 +01:00
|
|
|
|
mcall SF_REDRAW,SSF_END_DRAW
|
2010-10-04 22:40:19 +02:00
|
|
|
|
ret
|
|
|
|
|
;-----------------------------------------------------------------------------
|