mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
Added NSWindow 'title' binding
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29113 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ce7ea4a7c1
commit
416dcffdb4
4 changed files with 35 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2009-12-10 Quentin Mathe <quentin.mathe@gmail.com>
|
||||
|
||||
* Headers/AppKit/NSKKeyValueBinding.h:
|
||||
* Source/externs.m:
|
||||
* Source/NSWindow.m (+initialize, -bind:toObject:withKeyPath:options:):
|
||||
Added NSWindow 'title' binding.
|
||||
|
||||
2009-12-08 Quentin Mathe <quentin.mathe@gmail.com>
|
||||
|
||||
* Source/NSTableColumn.m (-dealloc): Fixed missing release for
|
||||
|
|
|
@ -110,6 +110,7 @@ APPKIT_EXPORT NSString *NSFontBinding;
|
|||
APPKIT_EXPORT NSString *NSHiddenBinding;
|
||||
APPKIT_EXPORT NSString *NSSelectedIndexBinding;
|
||||
APPKIT_EXPORT NSString *NSTextColorBinding;
|
||||
APPKIT_EXPORT NSString *NSTitleBinding;
|
||||
APPKIT_EXPORT NSString *NSToolTipBinding;
|
||||
APPKIT_EXPORT NSString *NSValueBinding;
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
#include "AppKit/NSFont.h"
|
||||
#include "AppKit/NSGraphics.h"
|
||||
#include "AppKit/NSHelpManager.h"
|
||||
#include "AppKit/NSKeyValueBinding.h"
|
||||
#include "AppKit/NSImage.h"
|
||||
#include "AppKit/NSMenu.h"
|
||||
#include "AppKit/NSPasteboard.h"
|
||||
|
@ -75,6 +76,7 @@
|
|||
#include "AppKit/NSView.h"
|
||||
#include "AppKit/NSWindow.h"
|
||||
#include "AppKit/NSWindowController.h"
|
||||
#include "GSBindingHelpers.h"
|
||||
#include "AppKit/PSOperators.h"
|
||||
#include "GNUstepGUI/GSTrackingRect.h"
|
||||
#include "GNUstepGUI/GSDisplayServer.h"
|
||||
|
@ -620,6 +622,8 @@ static NSNotificationCenter *nc = nil;
|
|||
windowmaps = NSCreateMapTable(NSIntMapKeyCallBacks,
|
||||
NSNonRetainedObjectMapValueCallBacks, 20);
|
||||
nc = [NSNotificationCenter defaultCenter];
|
||||
|
||||
[self exposeBinding: NSTitleBinding];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5179,6 +5183,28 @@ current key view.<br />
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) bind: (NSString *)binding
|
||||
toObject: (id)anObject
|
||||
withKeyPath: (NSString *)keyPath
|
||||
options: (NSDictionary *)options
|
||||
{
|
||||
if ([binding isEqual: NSTitleBinding])
|
||||
{
|
||||
[self unbind: binding];
|
||||
[[GSKeyValueBinding alloc] initWithBinding: @"title"
|
||||
withName: NSTitleBinding
|
||||
toObject: anObject
|
||||
withKeyPath: keyPath
|
||||
options: options
|
||||
fromObject: self];
|
||||
}
|
||||
else
|
||||
{
|
||||
[super bind: binding toObject: anObject withKeyPath: keyPath
|
||||
options: options];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Returns all drawers associated with this window.
|
||||
*/
|
||||
|
|
|
@ -649,6 +649,7 @@ NSString *NSFontBinding = @"font";
|
|||
NSString *NSHiddenBinding = @"hidden";
|
||||
NSString *NSSelectedIndexBinding = @"selectedIndex";
|
||||
NSString *NSTextColorBinding = @"textColor";
|
||||
NSString *NSTitleBinding = @"title";
|
||||
NSString *NSToolTipBinding = @"toolTip";
|
||||
NSString *NSValueBinding = @"value";
|
||||
|
||||
|
|
Loading…
Reference in a new issue