Mercurial > hg > xemacs-beta
comparison lwlib/xlwtabs.c @ 647:b39c14581166
[xemacs-hg @ 2001-08-13 04:45:47 by ben]
removal of unsigned, size_t, etc.
author | ben |
---|---|
date | Mon, 13 Aug 2001 04:46:48 +0000 |
parents | 3078fd1074e8 |
children | 04bc9d2f42c7 |
comparison
equal
deleted
inserted
replaced
646:00c54252fe4f | 647:b39c14581166 |
---|---|
624 tw->tabs.tab_height += tw->tabs.font->max_bounds.ascent + | 624 tw->tabs.tab_height += tw->tabs.font->max_bounds.ascent + |
625 tw->tabs.font->max_bounds.descent ; | 625 tw->tabs.font->max_bounds.descent ; |
626 | 626 |
627 /* Tab size has changed. Resize all tabs and request a new size */ | 627 /* Tab size has changed. Resize all tabs and request a new size */ |
628 for(i=0, childP=tw->composite.children; | 628 for(i=0, childP=tw->composite.children; |
629 i < tw->composite.num_children; | 629 i < (int) tw->composite.num_children; |
630 ++i, ++childP) | 630 ++i, ++childP) |
631 if( XtIsManaged(*childP) ) | 631 if( XtIsManaged(*childP) ) |
632 TabWidth(*childP) ; | 632 TabWidth(*childP) ; |
633 PreferredSize(tw, &tw->core.width, &tw->core.height, NULL,NULL) ; | 633 PreferredSize(tw, &tw->core.width, &tw->core.height, NULL,NULL) ; |
634 needRedraw = True ; | 634 needRedraw = True ; |
665 #ifdef NEED_MOTIF | 665 #ifdef NEED_MOTIF |
666 XtVaSetValues(curtw->tabs.topWidget, XmNtraversalOn, False, 0) ; | 666 XtVaSetValues(curtw->tabs.topWidget, XmNtraversalOn, False, 0) ; |
667 XtVaSetValues(w, XmNtraversalOn, True, 0) ; | 667 XtVaSetValues(w, XmNtraversalOn, True, 0) ; |
668 #endif | 668 #endif |
669 | 669 |
670 if( tab->tabs.row != tw->tabs.numRows-1 ) | 670 if( tab->tabs.row != (int) tw->tabs.numRows-1 ) |
671 TabsShuffleRows(tw) ; | 671 TabsShuffleRows(tw) ; |
672 | 672 |
673 needRedraw = True ; | 673 needRedraw = True ; |
674 } | 674 } |
675 else | 675 else |
1064 | 1064 |
1065 /* TODO: determine which tab was clicked, if any. Set that | 1065 /* TODO: determine which tab was clicked, if any. Set that |
1066 * widget to be top of stacking order with XawTabsSetTop(). | 1066 * widget to be top of stacking order with XawTabsSetTop(). |
1067 */ | 1067 */ |
1068 for(i=0, childP=tw->composite.children; | 1068 for(i=0, childP=tw->composite.children; |
1069 i < TabsNumChildren (tw); | 1069 i < (int) TabsNumChildren (tw); |
1070 ++i, ++childP) | 1070 ++i, ++childP) |
1071 if( TabVisible(*childP) ) | 1071 if( TabVisible(*childP) ) |
1072 { | 1072 { |
1073 TabsConstraints tab = (TabsConstraints)(*childP)->core.constraints; | 1073 TabsConstraints tab = (TabsConstraints)(*childP)->core.constraints; |
1074 if( x > tab->tabs.x && x < tab->tabs.x + tab->tabs.width && | 1074 if( x > tab->tabs.x && x < tab->tabs.x + tab->tabs.width && |
1390 * is drawn last. (This is inefficiently written, but should not | 1390 * is drawn last. (This is inefficiently written, but should not |
1391 * be too slow as long as there are not a lot of rows.) | 1391 * be too slow as long as there are not a lot of rows.) |
1392 */ | 1392 */ |
1393 | 1393 |
1394 y = tw->tabs.numRows == 1 ? TABDELTA : 0 ; | 1394 y = tw->tabs.numRows == 1 ? TABDELTA : 0 ; |
1395 for(i=0; i<tw->tabs.numRows; ++i, y += th) | 1395 for(i=0; i < (int) tw->tabs.numRows; ++i, y += th) |
1396 { | 1396 { |
1397 for( j=TabsNumChildren (tw), childP=tw->composite.children; | 1397 for( j=TabsNumChildren (tw), childP=tw->composite.children; |
1398 --j >= 0; ++childP ) | 1398 --j >= 0; ++childP ) |
1399 if( TabVisible(*childP) ) | 1399 if( TabVisible(*childP) ) |
1400 { | 1400 { |
1401 tab = (TabsConstraints)(*childP)->core.constraints; | 1401 tab = (TabsConstraints)(*childP)->core.constraints; |
1402 if( tab->tabs.row == i && *childP != tw->tabs.topWidget ) | 1402 if( tab->tabs.row == i && *childP != tw->tabs.topWidget ) |
1403 DrawTab(tw, *childP, labels) ; | 1403 DrawTab(tw, *childP, labels) ; |
1404 } | 1404 } |
1405 if( i != tw->tabs.numRows -1 ) | 1405 if( i != (int) tw->tabs.numRows -1 ) |
1406 DrawTrim(tw, 0,y+th, tw->core.width, th+s, False,False) ; | 1406 DrawTrim(tw, 0,y+th, tw->core.width, th+s, False,False) ; |
1407 } | 1407 } |
1408 | 1408 |
1409 DrawFrame(tw) ; | 1409 DrawFrame(tw) ; |
1410 | 1410 |