Rev 2093 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2093 | Rev 2105 | ||
---|---|---|---|
Line 111... | Line 111... | ||
111 | ;--------------------------------------------------------------------- |
111 | ;--------------------------------------------------------------------- |
112 | red: ; Redraw |
112 | red: ; Redraw |
113 | call draw_window |
113 | call draw_window |
Line 114... | Line 114... | ||
114 | 114 | ||
115 | still: |
115 | still: |
116 | push 10 ; Wait here for event |
- | |
117 | pop eax |
- | |
118 | mcall |
116 | mcall 10 ; Wait here for event |
119 | cmp al,6 |
117 | cmp al,6 |
120 | je call_mouse |
118 | je call_mouse |
121 | dec eax |
119 | dec eax |
122 | je red ; Redraw request |
120 | je red ; Redraw request |
123 | dec eax |
121 | dec eax |
124 | jne button ; Button in buffer |
122 | jne button ; Button in buffer |
125 | key: ; Key |
123 | key: ; Key |
126 | mov al,2 ; Read it and ignore |
- | |
Line 127... | Line 124... | ||
127 | mcall |
124 | mcall 2 ; Read it and ignore |
128 | 125 | ||
129 | push dword edit1 |
126 | push dword edit1 |
130 | call [edit_box_key] |
127 | call [edit_box_key] |
Line 137... | Line 134... | ||
137 | call_mouse: |
134 | call_mouse: |
138 | call mouse |
135 | call mouse |
139 | jmp still |
136 | jmp still |
140 | ;--------------------------------------------------------------------- |
137 | ;--------------------------------------------------------------------- |
141 | button: ; Button in Window |
138 | button: ; Button in Window |
142 | mov al,17 |
- | |
143 | mcall |
139 | mcall 17 |
144 | - | ||
145 | cmp ah,1 |
140 | cmp ah,1 |
146 | jne noclose |
141 | jne noclose |
147 | or eax,-1 |
142 | or eax,-1 |
148 | mcall |
143 | mcall |
149 | ;--------------------------------------------------------------------- |
144 | ;--------------------------------------------------------------------- |
Line 188... | Line 183... | ||
188 | ;--------------------------------------------------------------------- |
183 | ;--------------------------------------------------------------------- |
189 | draw_window: |
184 | draw_window: |
190 | pusha |
185 | pusha |
191 | mcall 12,1 ; Start of draw |
186 | mcall 12,1 ; Start of draw |
192 | ;get_sys_colors 1,0 |
187 | ;get_sys_colors 1,0 |
193 | xor eax,eax |
188 | |
194 | mov ebx,100*65536+280 |
- | |
195 | mov ecx,90*65536+260 |
- | |
196 | mov edx,[sc.work] |
189 | mov edx,[sc.work] |
197 | or edx,0x33000000 |
190 | or edx,0x33000000 |
- | 191 | xor eax,eax |
|
- | 192 | xor esi,esi |
|
198 | mov edi,fullpath_open ;title ; Draw Window Label Text |
193 | mcall ,<100,280>,<90,260>,,,title ; Draw Window Label Text |
199 | mcall |
- | |
Line 200... | Line 194... | ||
200 | 194 | ||
Line 201... | Line 195... | ||
201 | mcall 9,PROCESSINFO,-1 |
195 | mcall 9,PROCESSINFO,-1 |
202 | 196 | ||
Line 227... | Line 221... | ||
227 | mov ecx, 33*65536+14 |
221 | mov ecx, 33*65536+14 |
228 | mcall ,,,5 |
222 | mcall ,,,5 |
Line 229... | Line 223... | ||
229 | 223 | ||
230 | mpack ebx,6,0 ; Draw Window Text |
224 | mpack ebx,6,0 ; Draw Window Text |
231 | add ebx,1+ 14/2-3 |
- | |
232 | mov ecx,[sc.work_text] |
- | |
233 | mov edx,text |
225 | add ebx,1+ 14/2-3 |
234 | mov esi,text.line_size |
- | |
235 | mov eax,4 |
- | |
Line 236... | Line 226... | ||
236 | mcall ;InFile |
226 | mcall 4,,[sc.work_text],text,text.line_size ;InFile |
237 | 227 | ||
238 | add ebx, 16 ;14 |
228 | add ebx, 16 ;14 |
Line 361... | Line 351... | ||
361 | @@: |
351 | @@: |
362 | popad |
352 | popad |
363 | ret |
353 | ret |
364 | ;--------------------------------------------------------------------- |
354 | ;--------------------------------------------------------------------- |
365 | draw_messages: |
355 | draw_messages: |
366 | mov eax,13 ; clear work area |
- | |
367 | mpack ebx,7-2,[pinfo.box.width] |
356 | mpack ebx,7-2,[pinfo.box.width] |
368 | sub ebx,5*2+7*2-1-2*2 |
357 | sub ebx,5*2+7*2-1-2*2 |
369 | mpack ecx,0,[pinfo.box.height] |
358 | mpack ecx,0,[pinfo.box.height] |
370 | madd ecx, 14*3+16+1+7+1,-( 14*3+16+1+7*2+25) |
359 | madd ecx, 14*3+16+1+7+1,-( 14*3+16+1+7*2+25) |
371 | mov word[bottom_right+2],bx |
360 | mov word[bottom_right+2],bx |
372 | mov word[bottom_right],cx |
361 | mov word[bottom_right],cx |
373 | msub [bottom_right],7,11 |
362 | msub [bottom_right],7,11 |
374 | add [bottom_right],7 shl 16 + 53 |
363 | add [bottom_right],7 shl 16 + 53 |
375 | mov edx,[sc.work] |
364 | mcall 13,,,[sc.work] ; clear work area |
376 | mcall |
- | |
377 | _cy = 0 |
365 | _cy = 0 |
378 | _sy = 2 |
366 | _sy = 2 |
379 | _cx = 4 |
367 | _cx = 4 |
380 | _sx = 6 |
368 | _sx = 6 |
381 | push ebx ecx |
369 | push ebx ecx |