Rev 6358 | Rev 6367 | Go to most recent revision | 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 | |
1643 | mario79 | 9 | mov eax,[esi+34] |
10 | mov ebx,[esi+38] |
||
11 | mov ecx,[esi+42] |
||
12 | mov edx,[esi+46] |
||
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 | ;------------------------------------------------ |
2037 | leency | 48 | mov ebx,50 ;[Window_CordinatX] |
49 | mov ecx,50 ;[Window_CordinatY] |
||
1643 | mario79 | 50 | shl ebx,16 |
51 | shl ecx,16 |
||
6358 | IgorA | 52 | add ebx, [Window_SizeX] |
53 | add ecx, [Window_SizeY] |
||
6359 | IgorA | 54 | mcall SF_CREATE_WINDOW,,,0x73aabbcc,,name_of_program |
2045 | mario79 | 55 | |
56 | mov eax,[procinfo+70] ;staus of window |
||
6358 | IgorA | 57 | test eax,100b |
2045 | mario79 | 58 | jne .end |
59 | |||
1643 | mario79 | 60 | ;------------------------------------------------ |
6359 | IgorA | 61 | mov ebx,[Window_SizeX] |
62 | sub ebx,5+ci_panel_x_pos+ci_offs_skin_w-1 |
||
63 | mcall SF_DRAW_RECT,,ci_panel_y_pos,dword[syscolors+20] ; чистка полосы для меню |
||
255 | heavyiron | 64 | |
6359 | IgorA | 65 | call put_main_menu |
1643 | mario79 | 66 | ;------------------------------------------------ |
6359 | IgorA | 67 | mov eax,ci_panel_x_pos |
68 | mov ebx,ci_panel_y_pos |
||
1643 | mario79 | 69 | mov ecx,[Window_SizeX] |
70 | mov edx,50 |
||
71 | mov esi,1 |
||
6359 | IgorA | 72 | sub ecx,5+ci_panel_x_pos+ci_offs_skin_w |
1643 | mario79 | 73 | call draw_volume_rectangle ; tools panel |
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 | ;----------------------------------------------------------------------------- |