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