Rev 6359 | Rev 6369 | 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 | ;------------------------------------------------ |
6367 | leency | 67 | ; draw toolbard background |
68 | mov ebx, ci_panel_x_pos |
||
69 | shl ebx, 16 |
||
70 | add ebx, [Window_SizeX] |
||
71 | sub ebx, 9 |
||
72 | mov ecx, ci_panel_y_pos |
||
73 | shl ecx, 16 |
||
74 | add ecx, 51 |
||
75 | mov edx, 0xD5CDCB |
||
76 | mcall 13 |
||
77 | |||
6359 | IgorA | 78 | mov eax,ci_panel_x_pos |
79 | mov ebx,ci_panel_y_pos |
||
1643 | mario79 | 80 | mov ecx,[Window_SizeX] |
81 | mov edx,50 |
||
82 | mov esi,1 |
||
6359 | IgorA | 83 | sub ecx,5+ci_panel_x_pos+ci_offs_skin_w |
1643 | mario79 | 84 | call draw_icons |
85 | call PrintMousePos |
||
86 | ;------------------------------------------------ |
||
6352 | IgorA | 87 | mov ecx,[k] |
88 | call MovePictureToWorkScreen |
||
1643 | mario79 | 89 | ;------------------------------------------------ |
90 | mov ebx,[WorkScreen_SizeX] |
||
6357 | IgorA | 91 | add ebx,ci_edit_wnd_x_pos+ci_edit_wnd_border |
6358 | IgorA | 92 | mov edx,[Window_SizeX] |
93 | sub edx,ebx |
||
94 | sub edx,ci_scroll_dim+5-ci_edit_wnd_border |
||
1643 | mario79 | 95 | shl ebx,16 |
6358 | IgorA | 96 | mov bx,dx ;ширина бордюра |
1643 | mario79 | 97 | |
6357 | IgorA | 98 | mov ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border |
1643 | mario79 | 99 | mov edx,[Window_SizeY] |
6358 | IgorA | 100 | sub edx,ci_edit_wnd_y_pos+2*ci_edit_wnd_border+ci_scroll_dim+5+ci_offs_skin_h |
1643 | mario79 | 101 | shl ecx,16 |
6357 | IgorA | 102 | mov cx,dx ;высота бордюра |
255 | heavyiron | 103 | |
6359 | IgorA | 104 | mcall SF_DRAW_RECT,,,dword[syscolors+20] ;бордюр справа от окна перед скроллингом |
1643 | mario79 | 105 | ;------------------------------------------------ |
6357 | IgorA | 106 | mcall , |
1643 | mario79 | 107 | ;------------------------------------------------ |
6357 | IgorA | 108 | mov ebx,ci_edit_wnd_x_pos |
1643 | mario79 | 109 | mov edx,[Window_SizeX] |
6358 | IgorA | 110 | sub edx,ci_scroll_dim+5+ci_edit_wnd_x_pos |
1643 | mario79 | 111 | shl ebx,16 |
6357 | IgorA | 112 | mov bx,dx ;ширина бордюра |
255 | heavyiron | 113 | |
1643 | mario79 | 114 | mov ecx,[WorkScreen_SizeY] |
6357 | IgorA | 115 | add ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border |
6358 | IgorA | 116 | mov edx,[Window_SizeY] |
117 | sub edx,ecx |
||
118 | sub edx,ci_scroll_dim+5+ci_offs_skin_h;ci_edit_wnd_border |
||
1643 | mario79 | 119 | shl ecx,16 |
6358 | IgorA | 120 | mov cx,dx ;высота бордюра |
255 | heavyiron | 121 | |
6359 | IgorA | 122 | mcall SF_DRAW_RECT,,,dword[syscolors+20] ;бордюр под окном и над скроллингом |
1643 | mario79 | 123 | ;------------------------------------------------ |
6357 | IgorA | 124 | mcall ,, |
1643 | mario79 | 125 | ;------------------------------------------------ |
6357 | IgorA | 126 | mov eax,ci_edit_wnd_x_pos |
1643 | mario79 | 127 | mov ebx,[Window_SizeY] |
128 | mov ecx,[Window_SizeX] |
||
6358 | IgorA | 129 | mov edx,ci_scroll_dim |
1643 | mario79 | 130 | mov esi,3 |
6358 | IgorA | 131 | sub ecx,ci_scroll_dim+5+ci_edit_wnd_x_pos+ci_offs_skin_w |
132 | sub ebx,ci_scroll_dim+5+ci_offs_skin_h |
||
6357 | IgorA | 133 | call draw_volume_rectangle ; horizontal scrollbar border |
1643 | mario79 | 134 | ;------------------------------------------------ |
135 | mov eax,[Window_SizeX] |
||
6357 | IgorA | 136 | mov ebx,ci_edit_wnd_y_pos |
6358 | IgorA | 137 | mov ecx,ci_scroll_dim |
1643 | mario79 | 138 | mov edx,[Window_SizeY] |
139 | mov esi,3 |
||
6358 | IgorA | 140 | sub eax,ci_scroll_dim+5+ci_offs_skin_w |
141 | sub edx,ci_scroll_dim+5+ci_edit_wnd_y_pos+ci_offs_skin_h |
||
6357 | IgorA | 142 | call draw_volume_rectangle ; vertical scrollbar border |
143 | call draw_scrollers |
||
1643 | mario79 | 144 | ;------------------------------------------------ |
145 | mov eax,[Window_SizeX] |
||
146 | mov ebx,[Window_SizeY] |
||
6358 | IgorA | 147 | mov ecx,ci_scroll_dim |
148 | mov edx,ci_scroll_dim |
||
1643 | mario79 | 149 | mov esi,6 |
6358 | IgorA | 150 | sub eax,ci_scroll_dim+5+ci_offs_skin_w |
151 | sub ebx,ci_scroll_dim+5+ci_offs_skin_h |
||
6357 | IgorA | 152 | call draw_volume_rectangle ; down and right small area |
1643 | mario79 | 153 | ;------------------------------------------------ |
2045 | mario79 | 154 | .end: |
6352 | IgorA | 155 | mcall SF_REDRAW,SSF_END_DRAW |
1643 | mario79 | 156 | ret |
157 | ;----------------------------------------------------------------------------- |