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:
FredKiefer 2005-05-20 12:31:42 +00:00
parent 48cb9c3f15
commit 22fd51937f
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> 2005-05-19 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSImageCell.m (-setObjectValue:) Nil parameter now unsets * Source/NSImageCell.m (-setObjectValue:) Nil parameter now unsets

View file

@ -169,6 +169,8 @@
*/ */
- (NSInterfaceStyle) interfaceStyle; - (NSInterfaceStyle) interfaceStyle;
- (void) setInterfaceStyle: (NSInterfaceStyle)aStyle; - (void) setInterfaceStyle: (NSInterfaceStyle)aStyle;
- (BOOL) shouldBeTreatedAsInkEvent: (NSEvent *)theEvent;
#endif #endif
@end @end
@ -232,6 +234,13 @@
- (void) transposeWords: (id)sender; - (void) transposeWords: (id)sender;
- (void) uppercaseWord: (id)sender; - (void) uppercaseWord: (id)sender;
- (void) yank: (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 @end
#endif #endif

View file

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

View file

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

View file

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

View file

@ -4247,5 +4247,10 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
} }
} }
- (BOOL) shouldBeTreatedAsInkEvent: (NSEvent *)theEvent
{
return YES;
}
@end @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 - (BOOL) tryToPerform: (SEL)anAction with: (id)anObject
{ {