Mercurial > dwindows
comparison os2/dw.c @ 538:5c1ee7f6e7ff
More merging with Windows, removed code to reverse tabbing for vertical
boxes.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 25 Mar 2004 19:52:57 +0000 |
parents | a3b2e2244c18 |
children | 8f80ed604a89 |
comparison
equal
deleted
inserted
replaced
537:a3b2e2244c18 | 538:5c1ee7f6e7ff |
---|---|
455 return 0; | 455 return 0; |
456 } | 456 } |
457 | 457 |
458 int _focus_check_box(Box *box, HWND handle, int start, HWND defaultitem) | 458 int _focus_check_box(Box *box, HWND handle, int start, HWND defaultitem) |
459 { | 459 { |
460 int z, n; | 460 int z; |
461 static HWND lasthwnd, firsthwnd; | 461 static HWND lasthwnd, firsthwnd; |
462 static int finish_searching; | 462 static int finish_searching; |
463 | 463 |
464 /* Start is 2 when we have cycled completely and | 464 /* Start is 2 when we have cycled completely and |
465 * need to set the focus to the last widget we found | 465 * need to set the focus to the last widget we found |
481 lasthwnd = handle; | 481 lasthwnd = handle; |
482 finish_searching = 0; | 482 finish_searching = 0; |
483 firsthwnd = 0; | 483 firsthwnd = 0; |
484 } | 484 } |
485 | 485 |
486 for(n=0;n<box->count;n++) | 486 for(z=box->count-1;z>-1;z--) |
487 { | 487 { |
488 /* Vertical boxes are inverted on OS/2 */ | |
489 if(box->type == DW_VERT) | |
490 z = n; | |
491 else | |
492 z = box->count - n - 1; | |
493 | |
494 if(box->items[z].type == TYPEBOX) | 488 if(box->items[z].type == TYPEBOX) |
495 { | 489 { |
496 Box *thisbox = WinQueryWindowPtr(box->items[z].hwnd, QWP_USER); | 490 Box *thisbox = WinQueryWindowPtr(box->items[z].hwnd, QWP_USER); |
497 | 491 |
498 if(thisbox && _focus_check_box(thisbox, handle, start == 3 ? 3 : 0, defaultitem)) | 492 if(thisbox && _focus_check_box(thisbox, handle, start == 3 ? 3 : 0, defaultitem)) |
583 return 0; | 577 return 0; |
584 } | 578 } |
585 | 579 |
586 int _focus_check_box_back(Box *box, HWND handle, int start, HWND defaultitem) | 580 int _focus_check_box_back(Box *box, HWND handle, int start, HWND defaultitem) |
587 { | 581 { |
588 int z, n; | 582 int z; |
589 static HWND lasthwnd, firsthwnd; | 583 static HWND lasthwnd, firsthwnd; |
590 static int finish_searching; | 584 static int finish_searching; |
591 | 585 |
592 /* Start is 2 when we have cycled completely and | 586 /* Start is 2 when we have cycled completely and |
593 * need to set the focus to the last widget we found | 587 * need to set the focus to the last widget we found |
609 lasthwnd = handle; | 603 lasthwnd = handle; |
610 finish_searching = 0; | 604 finish_searching = 0; |
611 firsthwnd = 0; | 605 firsthwnd = 0; |
612 } | 606 } |
613 | 607 |
614 for(n=0;n<box->count;n++) | 608 for(z=0;z<box->count;z++) |
615 { | 609 { |
616 /* Vertical boxes are inverted on OS/2 */ | |
617 if(box->type == DW_VERT) | |
618 z = box->count - n - 1; | |
619 else | |
620 z = n; | |
621 | |
622 if(box->items[z].type == TYPEBOX) | 610 if(box->items[z].type == TYPEBOX) |
623 { | 611 { |
624 Box *thisbox = WinQueryWindowPtr(box->items[z].hwnd, QWP_USER); | 612 Box *thisbox = WinQueryWindowPtr(box->items[z].hwnd, QWP_USER); |
625 | 613 |
626 if(thisbox && _focus_check_box_back(thisbox, handle, start == 3 ? 3 : 0, defaultitem)) | 614 if(thisbox && _focus_check_box_back(thisbox, handle, start == 3 ? 3 : 0, defaultitem)) |