git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4557 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Michael Silva 1999-07-10 01:49:18 +00:00
parent 2df56c0541
commit 2661be8f55
2 changed files with 19 additions and 2 deletions

View file

@ -4,6 +4,8 @@
in the tabs works wonderfully. Now just need to hook up code to
draw the selected tabs view in the tabview rect.
[Check out nstabview.app in Testing/, you won't regret it, hehe.]
1999-07-9 Michael Hanni <mhanni@sprintmail.com>
* Headers/AppKit/NSTabViewItem.h: defined some non-spec methods.

View file

@ -163,7 +163,16 @@
- (NSRect)contentRect
{
return NSZeroRect;
NSRect cRect = [self frame];
cRect.origin.x = 2;
cRect.origin.y = 2;
cRect.size.height -= 4;
cRect.size.width -= 4;
cRect.size.height -= 21;
return cRect;
}
// Drawing.
@ -330,11 +339,17 @@ tRect.origin.x, tRect.origin.y, tRect.size.width, tRect.size.height);
NSTabViewItem *anItem = [self tabViewItemAtPoint:aPoint];
if (anItem) {
if (tab_selected)
if (tab_selected) {
[tab_selected _setTabState:NSBackgroundTab];
if ([tab_selected view])
[[tab_selected view] removeFromSuperview];
}
tab_selected = anItem;
[anItem _setTabState:NSSelectedTab];
if ([anItem view]) {
[self addSubview:[anItem view]];
}
}
[self setNeedsDisplay:YES];