Added new NSResponder method declarations and implemented shouldBeTreatedAsInkEvent:.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21238 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2005-05-20 12:31:42 +00:00
parent fe0e6ce497
commit 29db6affc8
7 changed files with 66 additions and 0 deletions

View file

@ -1,3 +1,15 @@
2005-05-20 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSResponder.h: Added new MacOSX methods.
* Source/NSResponder.m (-encodeWithCoder:, initWithCoder:) Handle
NSNextResponder for keyed encoding.
* Source/NSResponder.m
* Source/NSApplication.m
* Source/NSWindow.m
* Source/NSView.m
* Source/NSControl.m:
Implemented shouldBeTreatedAsInkEvent:.
2005-05-19 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSImageCell.m (-setObjectValue:) Nil parameter now unsets

View file

@ -169,6 +169,8 @@
*/
- (NSInterfaceStyle) interfaceStyle;
- (void) setInterfaceStyle: (NSInterfaceStyle)aStyle;
- (BOOL) shouldBeTreatedAsInkEvent: (NSEvent *)theEvent;
#endif
@end
@ -232,6 +234,13 @@
- (void) transposeWords: (id)sender;
- (void) uppercaseWord: (id)sender;
- (void) yank: (id)sender;
// New in MacOSX 10.3
- (void) cancelOperation: (id)sender;
- (void) deleteBackwardByDecomposingPreviousCharacter: (id)sender;
- (void) moveLeftAndModifySelection: (id)sender;
- (void) moveRightAndModifySelection: (id)sender;
@end
#endif

View file

@ -1633,6 +1633,11 @@ See -runModalForWindow:
return _current_event;
}
- (BOOL) shouldBeTreatedAsInkEvent: (NSEvent *)theEvent
{
return [[theEvent window] shouldBeTreatedAsInkEvent: theEvent];
}
- (void) discardEventsMatchingMask: (unsigned int)mask
beforeEvent: (NSEvent *)lastEvent
{

View file

@ -687,6 +687,11 @@ static Class actionCellClass;
[self sendAction: [self action] to: [self target]];
}
- (BOOL) shouldBeTreatedAsInkEvent: (NSEvent *)theEvent
{
return NO;
}
- (void) resetCursorRects
{
[_cell resetCursorRect: _bounds inView: self];

View file

@ -351,6 +351,11 @@
[aCoder encodeObject: [self menu]
forKey: @"NSMenu"];
}
if([self nextResponder] != nil)
{
[aCoder encodeConditionalObject: [self nextResponder]
forKey: @"NSNextResponder"];
}
}
else
{
@ -375,6 +380,11 @@
{
obj = [aDecoder decodeObjectForKey: @"NSMenu"];
}
if([aDecoder containsValueForKey: @"NSNextResponder"])
{
[self setNextResponder: [aDecoder decodeObjectForKey: @"NSNextResponder"]];
}
}
else
{
@ -416,4 +426,10 @@
{
return nil;
}
- (BOOL) shouldBeTreatedAsInkEvent: (NSEvent *)theEvent
{
return NO;
}
@end

View file

@ -4247,5 +4247,10 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
}
}
- (BOOL) shouldBeTreatedAsInkEvent: (NSEvent *)theEvent
{
return YES;
}
@end

View file

@ -3429,6 +3429,20 @@ resetCursorRectsForView(NSView *theView)
}
}
- (BOOL) shouldBeTreatedAsInkEvent: (NSEvent *)theEvent
{
NSView *v;
v = [_wv hitTest: [theEvent locationInWindow]];
if (![self isMainWindow])
{
return (v != _wv);
}
else
{
return [v shouldBeTreatedAsInkEvent: theEvent];
}
}
- (BOOL) tryToPerform: (SEL)anAction with: (id)anObject
{