Rev 7577 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7577 | Rev 7579 | ||
---|---|---|---|
Line 214... | Line 214... | ||
214 | ;txtBRi db 26 |
214 | ;txtBRi db 26 |
215 | ;txtBLe db 27 |
215 | ;txtBLe db 27 |
216 | 216 | ||
217 | ;input: |
217 | align 4 |
Line 218... | Line -... | ||
218 | ; edi = pointer to tedit struct |
- | |
219 | align 4 |
- | |
220 | proc draw_panel_find |
218 | proc draw_panels uses edi, edit:dword |
221 | cmp ted_panel_id,TED_PANEL_FIND |
219 | mov edi,[edit] |
- | 220 | cmp ted_panel_id,TED_PANEL_FIND |
|
222 | jne @f |
221 | jne @f |
223 | call p_find |
222 | call p_find |
224 | jmp .end_f |
223 | jmp .end_f |
225 | @@: |
224 | @@: |
226 | cmp ted_panel_id,TED_PANEL_REPLACE |
225 | cmp ted_panel_id,TED_PANEL_REPLACE |
227 | jne @f |
226 | jne @f |
228 | call p_replace |
227 | call p_replace |
229 | jmp .end_f |
228 | jmp .end_f |
230 | @@: |
229 | @@: |
231 | push eax edx |
230 | cmp ted_panel_id,TED_PANEL_GOTO |
- | 231 | jne @f |
|
- | 232 | call p_goto |
|
- | 233 | jmp .end_f |
|
- | 234 | @@: |
|
- | 235 | cmp ted_panel_id,TED_PANEL_SYNTAX |
|
- | 236 | jne @f |
|
- | 237 | call p_syntax |
|
- | 238 | jmp .end_f |
|
- | 239 | @@: |
|
- | 240 | push eax edx |
|
232 | mcall SF_DEFINE_BUTTON,,,0x80000000+201 |
241 | mcall SF_DEFINE_BUTTON,,,0x80000000+200 |
233 | mcall ,,,0x80000000+202 |
242 | mcall ,,,0x80000000+201 |
- | 243 | mcall ,,,0x80000000+202 |
|
234 | mcall ,,,0x80000000+203 |
244 | mcall ,,,0x80000000+203 |
235 | pop edx eax |
245 | mcall ,,,0x80000000+204 |
- | 246 | pop edx eax |
|
236 | .end_f: |
247 | .end_f: |
237 | ret |
248 | ret |
238 | endp |
249 | endp |
239 | 250 | ||
Line 254... | Line 265... | ||
254 | sub cx,20+15-1 ; 15 - height text box |
265 | sub cx,20+15-1 ; 15 - height text box |
255 | mcall ,,,[sc.work] |
266 | mcall ,,,[sc.work] |
256 | 267 | ||
257 | stdcall [edit_box_draw], edit2 |
268 | stdcall [edit_box_draw], edit_find |
Line 258... | Line 269... | ||
258 | 269 | ||
Line 259... | Line 270... | ||
259 | mov ecx,ted_wnd_t |
270 | mov ecx,ted_wnd_t |
260 | shl ecx,16 |
271 | shl ecx,16 |
261 | add ecx,(93 shl 16)+20 |
272 | add ecx,(93 shl 16)+20 |
262 | mcall SF_DEFINE_BUTTON,(5 shl 16)+85,,201,[sc.work_button] ;201 - button id |
273 | mcall SF_DEFINE_BUTTON,(5 shl 16)+85,,201,[sc.work_button] ;201 - button id |
Line 294... | Line 305... | ||
294 | sub cx,20+15-1 ; 15 - height text box |
305 | sub cx,20+15-1 ; 15 - height text box |
295 | mcall ,,,[sc.work] |
306 | mcall ,,,[sc.work] |
296 | 307 | ||
297 | stdcall [edit_box_draw], edit1 |
308 | stdcall [edit_box_draw], edit_replace |
Line 298... | Line 309... | ||
298 | stdcall [edit_box_draw], edit2 |
309 | stdcall [edit_box_draw], edit_find |
299 | 310 | ||
Line 300... | Line 311... | ||
300 | mov ecx,ted_wnd_t |
311 | mov ecx,ted_wnd_t |
301 | shl ecx,16 |
312 | shl ecx,16 |
302 | add ecx,(133 shl 16)+20 |
313 | add ecx,(133 shl 16)+20 |
303 | mcall SF_DEFINE_BUTTON,(5 shl 16)+95,,202,[sc.work_button] ;replace next |
314 | mcall SF_DEFINE_BUTTON,(5 shl 16)+95,,202,[sc.work_button] ;replace next |
Line 325... | Line 336... | ||
325 | pop edx ecx ebx eax |
336 | pop edx ecx ebx eax |
326 | ret |
337 | ret |
327 | 338 | ||
Line -... | Line 339... | ||
- | 339 | align 4 |
|
- | 340 | p_goto: |
|
- | 341 | push eax ebx ecx edx |
|
- | 342 | mov ecx,ted_wnd_t |
|
- | 343 | shl ecx,16 |
|
- | 344 | mov cx,20 |
|
- | 345 | mcall SF_DRAW_RECT,TED_PANEL_WIDTH,,[sc.work] |
|
- | 346 | ||
- | 347 | mov ecx,ted_wnd_t |
|
- | 348 | add cx,20+15 ; 15 - height text box |
|
- | 349 | shl ecx,16 |
|
- | 350 | add ecx,ted_wnd_h |
|
- | 351 | mov edx,ted_scr_h |
|
- | 352 | add cx,word[edx+sb_offs_size_y] |
|
- | 353 | sub cx,20+15-1 ; 15 - height text box |
|
- | 354 | mcall ,,,[sc.work] |
|
- | 355 | ||
- | 356 | stdcall [edit_box_draw], edit_goto |
|
- | 357 | ||
- | 358 | mov ecx,ted_wnd_t |
|
- | 359 | shl ecx,16 |
|
- | 360 | add ecx,(40 shl 16)+20 |
|
- | 361 | mcall SF_DEFINE_BUTTON,(5 shl 16)+85,,204,[sc.work_button] |
|
- | 362 | ||
- | 363 | mov ebx,(23 shl 16)+7 |
|
- | 364 | add ebx,ted_wnd_t |
|
- | 365 | mov ecx,[sc.work_text] |
|
- | 366 | or ecx,0x80000000 |
|
- | 367 | mcall SF_DRAW_TEXT,,,txtGotoCapt |
|
- | 368 | ||
- | 369 | mov ecx,[sc.work_button_text] |
|
- | 370 | or ecx,0x80000000 |
|
- | 371 | mov ebx,(15 shl 16)+47 |
|
- | 372 | add ebx,ted_wnd_t |
|
- | 373 | mcall ,,,txtGoto |
|
- | 374 | pop edx ecx ebx eax |
|
- | 375 | ret |
|
- | 376 | ||
328 | ;input: |
377 | ;input: |
329 | ; edi = pointer to tedit struct |
378 | ; edi = pointer to tedit struct |
330 | align 4 |
379 | align 4 |
331 | proc draw_panel_syntax |
- | |
332 | cmp ted_panel_id,TED_PANEL_SYNTAX ;if not panel |
- | |
333 | jne @f |
380 | p_syntax: |
334 | pushad |
381 | pushad |
Line 335... | Line 382... | ||
335 | 382 | ||
336 | mov ecx,ted_wnd_t |
383 | mov ecx,ted_wnd_t |
337 | shl ecx,16 |
384 | shl ecx,16 |
Line 376... | Line 423... | ||
376 | mcall ,,,txtFormatApply |
423 | mcall ,,,txtFormatApply |
377 | 424 | ||
378 | popad |
425 | popad |
Line 379... | Line 426... | ||
379 | jmp .end_f |
426 | ret |
380 | @@: |
- | |
381 | push eax edx |
- | |
382 | mov edx,0x80000000+200 |
- | |
383 | mcall SF_DEFINE_BUTTON ;åñëè íåò ïàíåëè òî óäàëÿåì êíîïêó |
- | |
384 | pop edx eax |
- | |
385 | .end_f: |
- | |
386 | ret |
- | |
387 | endp |
427 | |
388 | - | ||
Line 389... | Line 428... | ||
389 | MIN_M_WND_H equ 100 ;ìèíèìàëüíàÿ âûñîòà ãëàâíîãî îêíà |
428 | MIN_M_WND_H equ 100 ;ìèíèìàëüíàÿ âûñîòà ãëàâíîãî îêíà |
390 | ;input: |
429 | ;input: |
391 | ; edi = pointer to tedit struct |
430 | ; edi = pointer to tedit struct |
392 | align 4 |
431 | align 4 |
Line 419... | Line 458... | ||
419 | mov tl_box_top,eax ;=ted_wnd_t |
458 | mov tl_box_top,eax ;=ted_wnd_t |
420 | add tl_box_top,20 |
459 | add tl_box_top,20 |
421 | 460 | ||
422 | mov [edit2.top],eax ;=ted_wnd_t |
461 | mov [edit_find.top],eax ;=ted_wnd_t |
Line 423... | Line 462... | ||
423 | add dword[edit2.top],20 |
462 | add dword[edit_find.top],20 |
424 | mov [edit1.top],eax ;=ted_wnd_t |
463 | mov [edit_replace.top],eax |
- | 464 | add dword[edit_replace.top],113 |
|
- | 465 | mov [edit_goto.top],eax |
|
425 | add dword[edit1.top],113 |
466 | add dword[edit_goto.top],20 |
426 | popad |
467 | popad |
427 | ret |
468 | ret |
428 | 469 | ||
Line 429... | Line 470... | ||
429 | ;input: |
470 | ;input: |
430 | ; ecx = 0x4000____ |
471 | ; ecx = 0x4000____ |