mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
MacOS-X methods added
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6292 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
91e30dedde
commit
80e278d3aa
3 changed files with 157 additions and 40 deletions
|
@ -3,6 +3,7 @@ Thu Mar 16 13:15:00 2000 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
|||
* Source/NSText.m: Fixes by Fred Kiefer for rich text display.
|
||||
* Source/NSTextView.m: ditto
|
||||
* Source/NSFontManager.m: bugfixes - check for nil fonts.
|
||||
* Headers/AppKit/NSResponder.h: additional macOS-X methods declared
|
||||
|
||||
Wed Mar 15 02:41:04 2000 Nicola Pero <n.pero@mi.flashnet.it>
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
@class NSString;
|
||||
@class NSEvent;
|
||||
@class NSMenu;
|
||||
@class NSUndoManager;
|
||||
|
||||
@interface NSResponder : NSObject <NSCoding>
|
||||
{
|
||||
|
@ -51,15 +53,15 @@
|
|||
* not change during the views lifetime - if it does, the view must
|
||||
* be sure to change the flag accordingly.
|
||||
*/
|
||||
unsigned flipped_view:1;
|
||||
unsigned has_subviews:1; /* The view has subviews. */
|
||||
unsigned has_currects:1; /* The view has cursor rects. */
|
||||
unsigned has_trkrects:1; /* The view has tracking rects. */
|
||||
unsigned has_draginfo:1; /* View/window has drag types. */
|
||||
unsigned opaque_view:1; /* For views whose opacity may */
|
||||
unsigned flipped_view: 1;
|
||||
unsigned has_subviews: 1; /* The view has subviews. */
|
||||
unsigned has_currects: 1; /* The view has cursor rects. */
|
||||
unsigned has_trkrects: 1; /* The view has tracking rects. */
|
||||
unsigned has_draginfo: 1; /* View/window has drag types. */
|
||||
unsigned opaque_view: 1; /* For views whose opacity may */
|
||||
/* change to keep track of it. */
|
||||
unsigned valid_rects:1; /* Some cursor rects may be ok. */
|
||||
unsigned needs_display:1; /* Window/view needs display. */
|
||||
unsigned valid_rects: 1; /* Some cursor rects may be ok. */
|
||||
unsigned needs_display: 1; /* Window/view needs display. */
|
||||
} _rFlags;
|
||||
}
|
||||
|
||||
|
@ -83,32 +85,32 @@
|
|||
/*
|
||||
* Aid event processing
|
||||
*/
|
||||
- (BOOL) performKeyEquivalent: (NSEvent *)theEvent;
|
||||
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent;
|
||||
- (BOOL) tryToPerform: (SEL)anAction with: (id)anObject;
|
||||
|
||||
/*
|
||||
* Forwarding event messages
|
||||
*/
|
||||
- (void) flagsChanged: (NSEvent *)theEvent;
|
||||
- (void) helpRequested: (NSEvent *)theEvent;
|
||||
- (void) keyDown: (NSEvent *)theEvent;
|
||||
- (void) keyUp: (NSEvent *)theEvent;
|
||||
- (void) mouseDown: (NSEvent *)theEvent;
|
||||
- (void) mouseDragged: (NSEvent *)theEvent;
|
||||
- (void) mouseEntered: (NSEvent *)theEvent;
|
||||
- (void) mouseExited: (NSEvent *)theEvent;
|
||||
- (void) mouseMoved: (NSEvent *)theEvent;
|
||||
- (void) mouseUp: (NSEvent *)theEvent;
|
||||
- (void) flagsChanged: (NSEvent*)theEvent;
|
||||
- (void) helpRequested: (NSEvent*)theEvent;
|
||||
- (void) keyDown: (NSEvent*)theEvent;
|
||||
- (void) keyUp: (NSEvent*)theEvent;
|
||||
- (void) mouseDown: (NSEvent*)theEvent;
|
||||
- (void) mouseDragged: (NSEvent*)theEvent;
|
||||
- (void) mouseEntered: (NSEvent*)theEvent;
|
||||
- (void) mouseExited: (NSEvent*)theEvent;
|
||||
- (void) mouseMoved: (NSEvent*)theEvent;
|
||||
- (void) mouseUp: (NSEvent*)theEvent;
|
||||
- (void) noResponderFor: (SEL)eventSelector;
|
||||
- (void) rightMouseDown: (NSEvent *)theEvent;
|
||||
- (void) rightMouseDragged: (NSEvent *)theEvent;
|
||||
- (void) rightMouseUp: (NSEvent *)theEvent;
|
||||
- (void) rightMouseDown: (NSEvent*)theEvent;
|
||||
- (void) rightMouseDragged: (NSEvent*)theEvent;
|
||||
- (void) rightMouseUp: (NSEvent*)theEvent;
|
||||
|
||||
/*
|
||||
* Services menu support
|
||||
*/
|
||||
- (id) validRequestorForSendType: (NSString *)typeSent
|
||||
returnType: (NSString *)typeReturned;
|
||||
- (id) validRequestorForSendType: (NSString*)typeSent
|
||||
returnType: (NSString*)typeReturned;
|
||||
|
||||
/*
|
||||
* NSCoding protocol
|
||||
|
@ -117,6 +119,84 @@
|
|||
- (id) initWithCoder: (NSCoder*)aDecoder;
|
||||
|
||||
#ifndef STRICT_OPENSTEP
|
||||
- (void) interpretKeyEvents: (NSArray*)eventArray;
|
||||
- (BOOL) performMnemonic: (NSString*)aString;
|
||||
- (void) flushBufferedKeyEvents;
|
||||
- (void) doCommandBySelector: (SEL)aSelector;
|
||||
- (void) insertText: (NSString*)aString;
|
||||
- (NSUndoManager*) undoManager;
|
||||
|
||||
/*
|
||||
* Action methods, declared but not implemented
|
||||
*/
|
||||
- (void) capitalizeWord: (id)sender;
|
||||
- (void) centerSelectionInVisibleArea: (id)sender;
|
||||
- (void) changeCaseOfLetter: (id)sender;
|
||||
- (void) complete: (id)sender;
|
||||
- (void) deleteBackward: (id)sender;
|
||||
- (void) deleteForward: (id)sender;
|
||||
- (void) deleteToBeginningOfLine: (id)sender;
|
||||
- (void) deleteToBeginningOfParagraph: (id)sender;
|
||||
- (void) deleteToEndOfLine: (id)sender;
|
||||
- (void) deleteToEndOfParagraph: (id)sender;
|
||||
- (void) deleteToMark: (id)sender;
|
||||
- (void) deleteWordBackward: (id)sender;
|
||||
- (void) deleteWordForward: (id)sender;
|
||||
- (void) indent: (id)sender;
|
||||
- (void) insertBacktab: (id)sender;
|
||||
- (void) insertNewline: (id)sender;
|
||||
- (void) insertNewlineIgnoringFieldEditor: (id)sender;
|
||||
- (void) insertParagraphSeparator: (id)sender;
|
||||
- (void) insertTab: (id)sender;
|
||||
- (void) insertTabIgnoringFieldEditor: (id)sender;
|
||||
- (void) lowercaseWord: (id)sender;
|
||||
- (void) moveBackward: (id)sender;
|
||||
- (void) moveBackwardAndModifySelection: (id)sender;
|
||||
- (void) moveDown: (id)sender;
|
||||
- (void) moveDownAndModifySelection: (id)sender;
|
||||
- (void) moveForward: (id)sender;
|
||||
- (void) moveForwardAndModifySelection: (id)sender;
|
||||
- (void) moveLeft: (id)sender;
|
||||
- (void) moveRight: (id)sender;
|
||||
- (void) moveToBeginningOfDocument: (id)sender;
|
||||
- (void) moveToBeginningOfLine: (id)sender;
|
||||
- (void) moveToBeginningOfParagraph: (id)sender;
|
||||
- (void) moveToEndOfDocument: (id)sender;
|
||||
- (void) moveToEndOfLine: (id)sender;
|
||||
- (void) moveToEndOfParagraph: (id)sender;
|
||||
- (void) moveUp: (id)sender;
|
||||
- (void) moveUpAndModifySelection: (id)sender;
|
||||
- (void) moveWordBackward: (id)sender;
|
||||
- (void) moveWordBackwardAndModifySelection: (id)sender;
|
||||
- (void) moveWordForward: (id)sender;
|
||||
- (void) moveWordForwardAndModifySelection: (id)sender;
|
||||
- (void) pageDown: (id)sender;
|
||||
- (void) pageUp: (id)sender;
|
||||
- (void) scrollLineDown: (id)sender;
|
||||
- (void) scrollLineUp: (id)sender;
|
||||
- (void) scrollPageDown: (id)sender;
|
||||
- (void) scrollPageUp: (id)sender;
|
||||
- (void) selectAll: (id)sender;
|
||||
- (void) selectLine: (id)sender;
|
||||
- (void) selectParagraph: (id)sender;
|
||||
- (void) selectToMark: (id)sender;
|
||||
- (void) selectWord: (id)sender;
|
||||
- (void) showContextHelp: (id)sender;
|
||||
- (void) swapWithMark: (id)sender;
|
||||
- (void) transpose: (id)sender;
|
||||
- (void) transposeWords: (id)sender;
|
||||
- (void) uppercaseWord: (id)sender;
|
||||
- (void) yank: (id)sender;
|
||||
|
||||
/*
|
||||
* Menu
|
||||
*/
|
||||
- (NSMenu*) menu;
|
||||
- (void) setMenu: (NSMenu*)aMenu;
|
||||
|
||||
/*
|
||||
* Setting the interface
|
||||
*/
|
||||
- (NSInterfaceStyle) interfaceStyle;
|
||||
- (void) setInterfaceStyle: (NSInterfaceStyle)aStyle;
|
||||
#endif
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
/*
|
||||
* Aid event processing
|
||||
*/
|
||||
- (BOOL) performKeyEquivalent: (NSEvent *)theEvent
|
||||
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
@ -110,10 +110,30 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (BOOL) performMnemonic: (NSString*)aString
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void) interpretKeyEvents:(NSArray*)eventArray
|
||||
{
|
||||
// FIXME: As NSInputManger is still missing this method does nothing
|
||||
}
|
||||
|
||||
- (void) flushBufferedKeyEvents
|
||||
{
|
||||
}
|
||||
|
||||
- (void) doCommandBySelector:(SEL)aSelector
|
||||
{
|
||||
if (![self tryToPerform: aSelector with: nil])
|
||||
NSBeep();
|
||||
}
|
||||
|
||||
/*
|
||||
* Forwarding event messages
|
||||
*/
|
||||
- (void) flagsChanged: (NSEvent *)theEvent
|
||||
- (void) flagsChanged: (NSEvent*)theEvent
|
||||
{
|
||||
if (next_responder)
|
||||
return [next_responder flagsChanged: theEvent];
|
||||
|
@ -121,7 +141,7 @@
|
|||
return [self noResponderFor: @selector(flagsChanged:)];
|
||||
}
|
||||
|
||||
- (void) helpRequested: (NSEvent *)theEvent
|
||||
- (void) helpRequested: (NSEvent*)theEvent
|
||||
{
|
||||
if(![[NSHelpManager sharedHelpManager]
|
||||
showContextHelpForObject: self
|
||||
|
@ -131,7 +151,7 @@
|
|||
[NSHelpManager setContextHelpModeActive: NO];
|
||||
}
|
||||
|
||||
- (void) keyDown: (NSEvent *)theEvent
|
||||
- (void) keyDown: (NSEvent*)theEvent
|
||||
{
|
||||
if (next_responder)
|
||||
return [next_responder keyDown: theEvent];
|
||||
|
@ -139,7 +159,7 @@
|
|||
return [self noResponderFor: @selector(keyDown:)];
|
||||
}
|
||||
|
||||
- (void) keyUp: (NSEvent *)theEvent
|
||||
- (void) keyUp: (NSEvent*)theEvent
|
||||
{
|
||||
if (next_responder)
|
||||
return [next_responder keyUp: theEvent];
|
||||
|
@ -147,7 +167,7 @@
|
|||
return [self noResponderFor: @selector(keyUp:)];
|
||||
}
|
||||
|
||||
- (void) mouseDown: (NSEvent *)theEvent
|
||||
- (void) mouseDown: (NSEvent*)theEvent
|
||||
{
|
||||
if (next_responder)
|
||||
return [next_responder mouseDown: theEvent];
|
||||
|
@ -155,7 +175,7 @@
|
|||
return [self noResponderFor: @selector(mouseDown:)];
|
||||
}
|
||||
|
||||
- (void) mouseDragged: (NSEvent *)theEvent
|
||||
- (void) mouseDragged: (NSEvent*)theEvent
|
||||
{
|
||||
if (next_responder)
|
||||
return [next_responder mouseDragged: theEvent];
|
||||
|
@ -163,7 +183,7 @@
|
|||
return [self noResponderFor: @selector(mouseDragged:)];
|
||||
}
|
||||
|
||||
- (void) mouseEntered: (NSEvent *)theEvent
|
||||
- (void) mouseEntered: (NSEvent*)theEvent
|
||||
{
|
||||
if (next_responder)
|
||||
return [next_responder mouseEntered: theEvent];
|
||||
|
@ -171,7 +191,7 @@
|
|||
return [self noResponderFor: @selector(mouseEntered:)];
|
||||
}
|
||||
|
||||
- (void) mouseExited: (NSEvent *)theEvent
|
||||
- (void) mouseExited: (NSEvent*)theEvent
|
||||
{
|
||||
if (next_responder)
|
||||
return [next_responder mouseExited: theEvent];
|
||||
|
@ -179,7 +199,7 @@
|
|||
return [self noResponderFor: @selector(mouseExited:)];
|
||||
}
|
||||
|
||||
- (void) mouseMoved: (NSEvent *)theEvent
|
||||
- (void) mouseMoved: (NSEvent*)theEvent
|
||||
{
|
||||
if (next_responder)
|
||||
return [next_responder mouseMoved: theEvent];
|
||||
|
@ -187,7 +207,7 @@
|
|||
return [self noResponderFor: @selector(mouseMoved:)];
|
||||
}
|
||||
|
||||
- (void) mouseUp: (NSEvent *)theEvent
|
||||
- (void) mouseUp: (NSEvent*)theEvent
|
||||
{
|
||||
if (next_responder)
|
||||
return [next_responder mouseUp: theEvent];
|
||||
|
@ -202,7 +222,7 @@
|
|||
NSBeep();
|
||||
}
|
||||
|
||||
- (void) rightMouseDown: (NSEvent *)theEvent
|
||||
- (void) rightMouseDown: (NSEvent*)theEvent
|
||||
{
|
||||
if (next_responder != nil)
|
||||
{
|
||||
|
@ -210,6 +230,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
// FIXME: This should be moved into NSApplication
|
||||
NSMenu *menu = [NSApp mainMenu];
|
||||
|
||||
if (menu != nil)
|
||||
|
@ -219,7 +240,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void) rightMouseDragged: (NSEvent *)theEvent
|
||||
- (void) rightMouseDragged: (NSEvent*)theEvent
|
||||
{
|
||||
if (next_responder)
|
||||
return [next_responder rightMouseDragged: theEvent];
|
||||
|
@ -227,7 +248,7 @@
|
|||
return [self noResponderFor: @selector(rightMouseDragged:)];
|
||||
}
|
||||
|
||||
- (void) rightMouseUp: (NSEvent *)theEvent
|
||||
- (void) rightMouseUp: (NSEvent*)theEvent
|
||||
{
|
||||
if (next_responder)
|
||||
return [next_responder rightMouseUp: theEvent];
|
||||
|
@ -238,8 +259,8 @@
|
|||
/*
|
||||
* Services menu support
|
||||
*/
|
||||
- (id) validRequestorForSendType: (NSString *)typeSent
|
||||
returnType: (NSString *)typeReturned
|
||||
- (id) validRequestorForSendType: (NSString*)typeSent
|
||||
returnType: (NSString*)typeReturned
|
||||
{
|
||||
if (next_responder)
|
||||
return [next_responder validRequestorForSendType: typeSent
|
||||
|
@ -266,6 +287,17 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (NSMenu*) menu
|
||||
{
|
||||
// FIXME: We need a slot for the menu
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void) setMenu: (NSMenu*)aMenu
|
||||
{
|
||||
// FIXME: We need a slot for the menu
|
||||
}
|
||||
|
||||
- (NSInterfaceStyle) interfaceStyle
|
||||
{
|
||||
return interface_style;
|
||||
|
@ -276,4 +308,8 @@
|
|||
interface_style = aStyle;
|
||||
}
|
||||
|
||||
- (NSUndoManager*) undoManager
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue