From 0520b35f0740266eb3708e47621ce4be9a551cc7 Mon Sep 17 00:00:00 2001 From: Marcian Lytwyn Date: Mon, 3 Sep 2012 20:39:02 +0000 Subject: [PATCH] Implement toolTip/setToolTip for NSTabViewItem - NOT TIED IN YET git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35506 72102866-910b-0410-8b05-ffd578937521 --- Headers/AppKit/NSTabViewItem.h | 8 ++++++++ Source/NSTabViewItem.m | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/Headers/AppKit/NSTabViewItem.h b/Headers/AppKit/NSTabViewItem.h index 75d8fd4ac..ce263b7b4 100644 --- a/Headers/AppKit/NSTabViewItem.h +++ b/Headers/AppKit/NSTabViewItem.h @@ -52,6 +52,7 @@ typedef enum { NSView *_first_responder; NSTabView *_tabview; NSRect _rect; // cached + NSString *_toolTip; } - (id) initWithIdentifier:(id)identifier; @@ -76,6 +77,12 @@ typedef enum { - (void)drawLabel:(BOOL)shouldTruncateLabel inRect:(NSRect)tabRect; + +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) +- (NSString *)toolTip; +- (void) setToolTip:(NSString *)newToolTip; +#endif + @end @interface NSTabViewItem (GNUstep) @@ -85,6 +92,7 @@ typedef enum { - (void)_setTabView:(NSTabView *)tabView; - (NSRect) _tabRect; - (NSString*)_truncatedLabel; + @end #endif // _GNUstep_H_NSTabViewItem diff --git a/Source/NSTabViewItem.m b/Source/NSTabViewItem.m index 814b66f97..672991643 100644 --- a/Source/NSTabViewItem.m +++ b/Source/NSTabViewItem.m @@ -249,6 +249,18 @@ return self; } + +- (NSString *)toolTip +{ + return _toolTip; +} + +- (void) setToolTip:(NSString *)newToolTip +{ + // FIXME: Need to find out how to link this to display + ASSIGN(_toolTip, newToolTip); +} + @end @implementation NSTabViewItem (GNUstep)