2006-12-29 17:50:24 +03:00
|
|
|
|
;----------------------------------------------------------
|
|
|
|
|
;-------------draw window of program-----------------------
|
|
|
|
|
;----------------------------------------------------------
|
|
|
|
|
drawwin:
|
2010-10-05 00:40:19 +04:00
|
|
|
|
or ecx,-1
|
2016-03-16 16:23:19 +03:00
|
|
|
|
mcall SF_THREAD_INFO,procinfo
|
2010-10-05 00:40:19 +04:00
|
|
|
|
mov esi,procinfo
|
|
|
|
|
|
2020-11-28 20:05:52 +03:00
|
|
|
|
mov eax,[esi+process_information.box.left]
|
|
|
|
|
mov ebx,[esi+process_information.box.top]
|
|
|
|
|
mov ecx,[esi+process_information.box.width]
|
|
|
|
|
mov edx,[esi+process_information.box.height]
|
2010-10-05 00:40:19 +04:00
|
|
|
|
mov [Window_CordinatX],eax
|
|
|
|
|
mov [Window_CordinatY],ebx
|
2016-03-19 12:57:37 +03:00
|
|
|
|
|
2016-03-19 22:38:56 +03:00
|
|
|
|
cmp ecx,ci_wnd_min_siz_x
|
|
|
|
|
jge @f
|
|
|
|
|
mov ecx,ci_wnd_min_siz_x
|
2016-03-19 12:57:37 +03:00
|
|
|
|
@@:
|
2016-03-19 22:38:56 +03:00
|
|
|
|
cmp edx,ci_wnd_min_siz_y
|
|
|
|
|
jge @f
|
|
|
|
|
mov edx,ci_wnd_min_siz_y
|
2016-03-19 12:57:37 +03:00
|
|
|
|
@@:
|
|
|
|
|
mov [Window_SizeX],ecx
|
|
|
|
|
mov [Window_SizeY],edx
|
2010-10-05 00:40:19 +04:00
|
|
|
|
mov [MaxWorkScreen_SizeX],ecx
|
|
|
|
|
mov [MaxWorkScreen_SizeY],edx
|
2016-03-19 22:38:56 +03:00
|
|
|
|
sub [MaxWorkScreen_SizeX],ci_edit_wnd_x_pos+2*ci_edit_wnd_border\
|
|
|
|
|
+ci_scroll_dim+ci_offs_skin_w+5
|
|
|
|
|
sub [MaxWorkScreen_SizeY],ci_edit_wnd_y_pos+2*ci_edit_wnd_border\
|
|
|
|
|
+ci_scroll_dim+ci_offs_skin_h+5
|
2010-10-05 00:40:19 +04: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 16:23:19 +03:00
|
|
|
|
mcall SF_REDRAW,SSF_BEGIN_DRAW
|
2010-10-05 00:40:19 +04:00
|
|
|
|
;------------------------------------------------
|
2020-11-28 20:05:52 +03:00
|
|
|
|
mov ebx,50 shl 16 ;[Window_CordinatX]
|
|
|
|
|
mov ecx,50 shl 16 ;[Window_CordinatY]
|
2016-03-19 22:38:56 +03:00
|
|
|
|
add ebx, [Window_SizeX]
|
|
|
|
|
add ecx, [Window_SizeY]
|
2016-03-21 20:29:30 +03:00
|
|
|
|
mcall SF_CREATE_WINDOW,,,0x73aabbcc,,name_of_program
|
2011-08-11 13:03:51 +04:00
|
|
|
|
|
|
|
|
|
mov eax,[procinfo+70] ;staus of window
|
2016-03-19 22:38:56 +03:00
|
|
|
|
test eax,100b
|
2011-08-11 13:03:51 +04:00
|
|
|
|
jne .end
|
|
|
|
|
|
2010-10-05 00:40:19 +04:00
|
|
|
|
;------------------------------------------------
|
2016-03-21 20:29:30 +03:00
|
|
|
|
mov ebx,[Window_SizeX]
|
|
|
|
|
sub ebx,5+ci_panel_x_pos+ci_offs_skin_w-1
|
|
|
|
|
mcall SF_DRAW_RECT,,ci_panel_y_pos,dword[syscolors+20] ; <EFBFBD><EFBFBD><EFBFBD>⪠ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-05 00:40:19 +04:00
|
|
|
|
|
2016-03-21 20:29:30 +03:00
|
|
|
|
call put_main_menu
|
2010-10-05 00:40:19 +04:00
|
|
|
|
;------------------------------------------------
|
2016-03-23 16:24:22 +03:00
|
|
|
|
; draw toolbard background
|
|
|
|
|
mov ebx, ci_panel_x_pos
|
|
|
|
|
shl ebx, 16
|
|
|
|
|
add ebx, [Window_SizeX]
|
|
|
|
|
sub ebx, 9
|
2020-11-28 20:05:52 +03:00
|
|
|
|
mov ecx, (ci_panel_y_pos shl 16) + 51
|
2016-03-23 16:24:22 +03:00
|
|
|
|
mov edx, 0xD5CDCB
|
2020-11-28 20:05:52 +03:00
|
|
|
|
mcall SF_DRAW_RECT
|
2016-03-23 16:24:22 +03:00
|
|
|
|
|
2010-10-05 00:40:19 +04:00
|
|
|
|
call draw_icons
|
|
|
|
|
call PrintMousePos
|
|
|
|
|
;------------------------------------------------
|
2016-03-16 16:23:19 +03:00
|
|
|
|
mov ecx,[k]
|
|
|
|
|
call MovePictureToWorkScreen
|
2010-10-05 00:40:19 +04:00
|
|
|
|
;------------------------------------------------
|
|
|
|
|
mov ebx,[WorkScreen_SizeX]
|
2016-03-19 12:57:37 +03:00
|
|
|
|
add ebx,ci_edit_wnd_x_pos+ci_edit_wnd_border
|
2016-03-19 22:38:56 +03:00
|
|
|
|
mov edx,[Window_SizeX]
|
|
|
|
|
sub edx,ebx
|
|
|
|
|
sub edx,ci_scroll_dim+5-ci_edit_wnd_border
|
2010-10-05 00:40:19 +04:00
|
|
|
|
shl ebx,16
|
2016-03-19 22:38:56 +03:00
|
|
|
|
mov bx,dx ;<EFBFBD><EFBFBD>ਭ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-05 00:40:19 +04:00
|
|
|
|
|
2016-03-19 12:57:37 +03:00
|
|
|
|
mov ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border
|
2010-10-05 00:40:19 +04:00
|
|
|
|
mov edx,[Window_SizeY]
|
2016-03-19 22:38:56 +03:00
|
|
|
|
sub edx,ci_edit_wnd_y_pos+2*ci_edit_wnd_border+ci_scroll_dim+5+ci_offs_skin_h
|
2010-10-05 00:40:19 +04:00
|
|
|
|
shl ecx,16
|
2016-03-19 12:57:37 +03:00
|
|
|
|
mov cx,dx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-05 00:40:19 +04:00
|
|
|
|
|
2016-03-21 20:29:30 +03:00
|
|
|
|
mcall SF_DRAW_RECT,,,dword[syscolors+20] ;<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-05 00:40:19 +04:00
|
|
|
|
;------------------------------------------------
|
2016-03-19 12:57:37 +03: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-05 00:40:19 +04:00
|
|
|
|
;------------------------------------------------
|
2016-03-19 12:57:37 +03:00
|
|
|
|
mov ebx,ci_edit_wnd_x_pos
|
2010-10-05 00:40:19 +04:00
|
|
|
|
mov edx,[Window_SizeX]
|
2016-03-19 22:38:56 +03:00
|
|
|
|
sub edx,ci_scroll_dim+5+ci_edit_wnd_x_pos
|
2010-10-05 00:40:19 +04:00
|
|
|
|
shl ebx,16
|
2016-03-19 12:57:37 +03:00
|
|
|
|
mov bx,dx ;<EFBFBD><EFBFBD>ਭ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-05 00:40:19 +04:00
|
|
|
|
|
|
|
|
|
mov ecx,[WorkScreen_SizeY]
|
2016-03-19 12:57:37 +03:00
|
|
|
|
add ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border
|
2016-03-19 22:38:56 +03:00
|
|
|
|
mov edx,[Window_SizeY]
|
|
|
|
|
sub edx,ecx
|
|
|
|
|
sub edx,ci_scroll_dim+5+ci_offs_skin_h;ci_edit_wnd_border
|
2010-10-05 00:40:19 +04:00
|
|
|
|
shl ecx,16
|
2016-03-19 22:38:56 +03:00
|
|
|
|
mov cx,dx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-05 00:40:19 +04:00
|
|
|
|
|
2016-03-21 20:29:30 +03:00
|
|
|
|
mcall SF_DRAW_RECT,,,dword[syscolors+20] ;<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-05 00:40:19 +04:00
|
|
|
|
;------------------------------------------------
|
2016-03-19 12:57:37 +03: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-05 00:40:19 +04:00
|
|
|
|
;------------------------------------------------
|
2016-03-19 12:57:37 +03:00
|
|
|
|
mov eax,ci_edit_wnd_x_pos
|
2010-10-05 00:40:19 +04:00
|
|
|
|
mov ebx,[Window_SizeY]
|
|
|
|
|
mov ecx,[Window_SizeX]
|
2016-03-19 22:38:56 +03:00
|
|
|
|
mov edx,ci_scroll_dim
|
2010-10-05 00:40:19 +04:00
|
|
|
|
mov esi,3
|
2016-03-19 22:38:56 +03:00
|
|
|
|
sub ecx,ci_scroll_dim+5+ci_edit_wnd_x_pos+ci_offs_skin_w
|
|
|
|
|
sub ebx,ci_scroll_dim+5+ci_offs_skin_h
|
2016-03-19 12:57:37 +03:00
|
|
|
|
call draw_volume_rectangle ; horizontal scrollbar border
|
2010-10-05 00:40:19 +04:00
|
|
|
|
;------------------------------------------------
|
|
|
|
|
mov eax,[Window_SizeX]
|
2016-03-19 12:57:37 +03:00
|
|
|
|
mov ebx,ci_edit_wnd_y_pos
|
2016-03-19 22:38:56 +03:00
|
|
|
|
mov ecx,ci_scroll_dim
|
2010-10-05 00:40:19 +04:00
|
|
|
|
mov edx,[Window_SizeY]
|
|
|
|
|
mov esi,3
|
2016-03-19 22:38:56 +03:00
|
|
|
|
sub eax,ci_scroll_dim+5+ci_offs_skin_w
|
|
|
|
|
sub edx,ci_scroll_dim+5+ci_edit_wnd_y_pos+ci_offs_skin_h
|
2016-03-19 12:57:37 +03:00
|
|
|
|
call draw_volume_rectangle ; vertical scrollbar border
|
|
|
|
|
call draw_scrollers
|
2010-10-05 00:40:19 +04:00
|
|
|
|
;------------------------------------------------
|
|
|
|
|
mov eax,[Window_SizeX]
|
|
|
|
|
mov ebx,[Window_SizeY]
|
2016-03-19 22:38:56 +03:00
|
|
|
|
mov ecx,ci_scroll_dim
|
|
|
|
|
mov edx,ci_scroll_dim
|
2010-10-05 00:40:19 +04:00
|
|
|
|
mov esi,6
|
2016-03-19 22:38:56 +03:00
|
|
|
|
sub eax,ci_scroll_dim+5+ci_offs_skin_w
|
|
|
|
|
sub ebx,ci_scroll_dim+5+ci_offs_skin_h
|
2016-03-19 12:57:37 +03:00
|
|
|
|
call draw_volume_rectangle ; down and right small area
|
2010-10-05 00:40:19 +04:00
|
|
|
|
;------------------------------------------------
|
2011-08-11 13:03:51 +04:00
|
|
|
|
.end:
|
2016-03-16 16:23:19 +03:00
|
|
|
|
mcall SF_REDRAW,SSF_END_DRAW
|
2010-10-05 00:40:19 +04:00
|
|
|
|
ret
|
|
|
|
|
;-----------------------------------------------------------------------------
|