mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 04:50:47 +00:00
Fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4554 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ad02b7b410
commit
0e02356ba4
6 changed files with 51 additions and 6 deletions
|
@ -16,6 +16,7 @@
|
|||
|
||||
tab_items = [NSMutableArray new];
|
||||
tab_font = [NSFont systemFontOfSize:12];
|
||||
tab_selected = nil;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -206,7 +207,7 @@
|
|||
NSTabState itemState;
|
||||
|
||||
// hack to simulate a selected tab other than tab one.
|
||||
if (i == 1) [anItem _setTabState:NSSelectedTab];
|
||||
// if (i == 0) [anItem _setTabState:NSSelectedTab];
|
||||
|
||||
itemState = [anItem tabState];
|
||||
|
||||
|
@ -303,14 +304,37 @@
|
|||
|
||||
- (NSTabViewItem *)tabViewItemAtPoint:(NSPoint)point
|
||||
{
|
||||
int howMany = [tab_items count];
|
||||
int i;
|
||||
|
||||
for (i=0;i<howMany;i++) {
|
||||
NSTabViewItem *anItem = [tab_items objectAtIndex:i];
|
||||
|
||||
if(NSPointInRect(point,[anItem _tabRect]))
|
||||
return anItem;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
/*
|
||||
- (NSView*) hitTest: (NSPoint)aPoint
|
||||
{
|
||||
NSTabViewItem *anItem = [self tabViewItemAtPoint:aPoint];
|
||||
|
||||
if (anItem) {
|
||||
if (tab_selected)
|
||||
[tab_selected _setTabState:NSBackgroundTab];
|
||||
|
||||
tab_selected = anItem;
|
||||
[anItem _setTabState:NSSelectedTab];
|
||||
}
|
||||
|
||||
[self setNeedsDisplay:YES];
|
||||
|
||||
return [super hitTest:aPoint];
|
||||
}
|
||||
|
||||
/*
|
||||
- (BOOL) mouse: (NSPoint)aPoint inRect: (NSRect)aRect
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue