mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 18:01:56 +00:00
Added some new MacOSX methods. Changed order of methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11510 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b2d37a940b
commit
a9da90c382
1 changed files with 120 additions and 106 deletions
|
@ -80,7 +80,7 @@ enum {
|
||||||
NSViewMaxYMargin = 32 // top margin between views can stretch
|
NSViewMaxYMargin = 32 // top margin between views can stretch
|
||||||
};
|
};
|
||||||
|
|
||||||
@interface NSView : NSResponder <NSCoding>
|
@interface NSView : NSResponder
|
||||||
{
|
{
|
||||||
NSRect _frame;
|
NSRect _frame;
|
||||||
NSRect _bounds;
|
NSRect _bounds;
|
||||||
|
@ -141,13 +141,24 @@ enum {
|
||||||
- (NSWindow*) window;
|
- (NSWindow*) window;
|
||||||
- (void) viewWillMoveToSuperview: (NSView*)newSuper;
|
- (void) viewWillMoveToSuperview: (NSView*)newSuper;
|
||||||
- (void) viewWillMoveToWindow: (NSWindow*)newWindow;
|
- (void) viewWillMoveToWindow: (NSWindow*)newWindow;
|
||||||
|
#ifndef STRICT_OPENSTEP
|
||||||
|
- (void) didAddSubview: (NSView *)subview;
|
||||||
|
- (void) viewDidMoveToSuperview;
|
||||||
|
- (void) viewDidMoveToWindow;
|
||||||
|
- (void) willRemoveSubview: (NSView *)subview;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Assigning a Tag
|
||||||
|
*/
|
||||||
|
- (int) tag;
|
||||||
|
- (id) viewWithTag: (int)aTag;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Modifying the Frame Rectangle
|
* Modifying the Frame Rectangle
|
||||||
*/
|
*/
|
||||||
- (float) frameRotation;
|
- (float) frameRotation;
|
||||||
- (NSRect) frame;
|
- (NSRect) frame;
|
||||||
- (void) rotateByAngle: (float)angle;
|
|
||||||
- (void) setFrame: (NSRect)frameRect;
|
- (void) setFrame: (NSRect)frameRect;
|
||||||
- (void) setFrameOrigin: (NSPoint)newOrigin;
|
- (void) setFrameOrigin: (NSPoint)newOrigin;
|
||||||
- (void) setFrameRotation: (float)angle;
|
- (void) setFrameRotation: (float)angle;
|
||||||
|
@ -158,15 +169,18 @@ enum {
|
||||||
*/
|
*/
|
||||||
- (float) boundsRotation;
|
- (float) boundsRotation;
|
||||||
- (NSRect) bounds;
|
- (NSRect) bounds;
|
||||||
- (BOOL) isFlipped;
|
|
||||||
- (BOOL) isRotatedFromBase;
|
|
||||||
- (BOOL) isRotatedOrScaledFromBase;
|
|
||||||
- (void) scaleUnitSquareToSize: (NSSize)newSize;
|
|
||||||
- (void) setBounds: (NSRect)aRect;
|
- (void) setBounds: (NSRect)aRect;
|
||||||
- (void) setBoundsOrigin: (NSPoint)newOrigin;
|
- (void) setBoundsOrigin: (NSPoint)newOrigin;
|
||||||
- (void) setBoundsRotation: (float)angle;
|
- (void) setBoundsRotation: (float)angle;
|
||||||
- (void) setBoundsSize: (NSSize)newSize;
|
- (void) setBoundsSize: (NSSize)newSize;
|
||||||
|
|
||||||
- (void) translateOriginToPoint: (NSPoint)point;
|
- (void) translateOriginToPoint: (NSPoint)point;
|
||||||
|
- (void) scaleUnitSquareToSize: (NSSize)newSize;
|
||||||
|
- (void) rotateByAngle: (float)angle;
|
||||||
|
|
||||||
|
- (BOOL) isFlipped;
|
||||||
|
- (BOOL) isRotatedFromBase;
|
||||||
|
- (BOOL) isRotatedOrScaledFromBase;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Converting Coordinates
|
* Converting Coordinates
|
||||||
|
@ -203,6 +217,36 @@ enum {
|
||||||
- (unsigned int) autoresizingMask;
|
- (unsigned int) autoresizingMask;
|
||||||
- (void) resizeWithOldSuperviewSize: (NSSize)oldSize;
|
- (void) resizeWithOldSuperviewSize: (NSSize)oldSize;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Focusing
|
||||||
|
*/
|
||||||
|
+ (NSView*) focusView;
|
||||||
|
- (void) lockFocus;
|
||||||
|
- (void) unlockFocus;
|
||||||
|
#ifndef STRICT_OPENSTEP
|
||||||
|
- (BOOL) lockFocusIfCanDraw;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Displaying
|
||||||
|
*/
|
||||||
|
- (void) display;
|
||||||
|
- (void) displayIfNeeded;
|
||||||
|
- (void) displayIfNeededIgnoringOpacity;
|
||||||
|
- (void) displayIfNeededInRect: (NSRect)aRect;
|
||||||
|
- (void) displayIfNeededInRectIgnoringOpacity: (NSRect)aRect;
|
||||||
|
- (void) displayRect: (NSRect)aRect;
|
||||||
|
- (void) displayRectIgnoringOpacity: (NSRect)aRect;
|
||||||
|
- (BOOL) needsDisplay;
|
||||||
|
- (void) setNeedsDisplay: (BOOL)flag;
|
||||||
|
- (void) setNeedsDisplayInRect: (NSRect)invalidRect;
|
||||||
|
- (BOOL) isOpaque;
|
||||||
|
|
||||||
|
- (void) drawRect: (NSRect)rect;
|
||||||
|
- (NSRect) visibleRect;
|
||||||
|
- (BOOL) canDraw;
|
||||||
|
- (BOOL) shouldDrawColor;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Graphics State Objects
|
* Graphics State Objects
|
||||||
*/
|
*/
|
||||||
|
@ -212,82 +256,14 @@ enum {
|
||||||
- (void) renewGState;
|
- (void) renewGState;
|
||||||
- (void) setUpGState;
|
- (void) setUpGState;
|
||||||
|
|
||||||
/*
|
|
||||||
* Focusing
|
|
||||||
*/
|
|
||||||
+ (NSView*) focusView;
|
|
||||||
- (void) lockFocus;
|
|
||||||
- (void) unlockFocus;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Displaying
|
|
||||||
*/
|
|
||||||
- (BOOL) canDraw;
|
|
||||||
- (void) display;
|
|
||||||
- (void) displayIfNeeded;
|
|
||||||
- (void) displayIfNeededIgnoringOpacity;
|
|
||||||
- (void) displayIfNeededInRect: (NSRect)aRect;
|
|
||||||
- (void) displayIfNeededInRectIgnoringOpacity: (NSRect)aRect;
|
|
||||||
- (void) displayRect: (NSRect)aRect;
|
|
||||||
- (void) displayRectIgnoringOpacity: (NSRect)aRect;
|
|
||||||
- (void) drawRect: (NSRect)rect;
|
|
||||||
- (NSRect) visibleRect;
|
|
||||||
- (BOOL) isOpaque;
|
|
||||||
- (BOOL) needsDisplay;
|
|
||||||
- (void) setNeedsDisplay: (BOOL)flag;
|
|
||||||
- (void) setNeedsDisplayInRect: (NSRect)invalidRect;
|
|
||||||
- (BOOL) shouldDrawColor;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Scrolling
|
|
||||||
*/
|
|
||||||
- (NSRect) adjustScroll: (NSRect)newVisible;
|
|
||||||
- (BOOL) autoscroll: (NSEvent*)theEvent;
|
|
||||||
- (NSScrollView*) enclosingScrollView;
|
|
||||||
- (void) reflectScrolledClipView: (NSClipView*)aClipView;
|
|
||||||
- (void) scrollClipView: (NSClipView*)aClipView
|
|
||||||
toPoint: (NSPoint)aPoint;
|
|
||||||
- (void) scrollPoint: (NSPoint)aPoint;
|
|
||||||
- (void) scrollRect: (NSRect)aRect
|
|
||||||
by: (NSSize)delta;
|
|
||||||
- (BOOL) scrollRectToVisible: (NSRect)aRect;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Managing the Cursor
|
|
||||||
*/
|
|
||||||
- (void) addCursorRect: (NSRect)aRect
|
|
||||||
cursor: (NSCursor*)anObject;
|
|
||||||
- (void) discardCursorRects;
|
|
||||||
- (void) removeCursorRect: (NSRect)aRect
|
|
||||||
cursor: (NSCursor*)anObject;
|
|
||||||
- (void) resetCursorRects;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Assigning a Tag
|
|
||||||
*/
|
|
||||||
- (int) tag;
|
|
||||||
- (id) viewWithTag: (int)aTag;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Aiding Event Handling
|
|
||||||
*/
|
|
||||||
- (BOOL) acceptsFirstMouse: (NSEvent*)theEvent;
|
- (BOOL) acceptsFirstMouse: (NSEvent*)theEvent;
|
||||||
- (NSView*) hitTest: (NSPoint)aPoint;
|
- (NSView*) hitTest: (NSPoint)aPoint;
|
||||||
- (BOOL) mouse: (NSPoint)aPoint
|
- (BOOL) mouse: (NSPoint)aPoint
|
||||||
inRect: (NSRect)aRect;
|
inRect: (NSRect)aRect;
|
||||||
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent;
|
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent;
|
||||||
- (void) removeTrackingRect: (NSTrackingRectTag)tag;
|
#ifndef STRICT_OPENSTEP
|
||||||
- (BOOL) shouldDelayWindowOrderingForEvent: (NSEvent*)anEvent;
|
- (BOOL) performMnemonic: (NSString *)aString;
|
||||||
- (NSTrackingRectTag) addTrackingRect: (NSRect)aRect
|
#endif
|
||||||
owner: (id)anObject
|
|
||||||
userData: (void*)data
|
|
||||||
assumeInside: (BOOL)flag;
|
|
||||||
- (void) setNextKeyView: (NSView*)aView;
|
|
||||||
- (NSView*) nextKeyView;
|
|
||||||
- (NSView*) nextValidKeyView;
|
|
||||||
- (void) setPreviousKeyView: (NSView*)aView;
|
|
||||||
- (NSView*) previousKeyView;
|
|
||||||
- (NSView*) previousValidKeyView;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Dragging
|
* Dragging
|
||||||
|
@ -305,13 +281,79 @@ enum {
|
||||||
slideBack: (BOOL)slideFlag;
|
slideBack: (BOOL)slideFlag;
|
||||||
- (void) registerForDraggedTypes: (NSArray*)newTypes;
|
- (void) registerForDraggedTypes: (NSArray*)newTypes;
|
||||||
- (void) unregisterDraggedTypes;
|
- (void) unregisterDraggedTypes;
|
||||||
|
- (BOOL) shouldDelayWindowOrderingForEvent: (NSEvent*)anEvent;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Managing the Cursor
|
||||||
|
*/
|
||||||
|
- (void) addCursorRect: (NSRect)aRect
|
||||||
|
cursor: (NSCursor*)anObject;
|
||||||
|
- (void) discardCursorRects;
|
||||||
|
- (void) removeCursorRect: (NSRect)aRect
|
||||||
|
cursor: (NSCursor*)anObject;
|
||||||
|
- (void) resetCursorRects;
|
||||||
|
|
||||||
|
#ifndef STRICT_OPENSTEP
|
||||||
|
/*
|
||||||
|
* Tool Tips
|
||||||
|
*/
|
||||||
|
- (NSToolTipTag) addToolTipRect: (NSRect)aRect
|
||||||
|
owner: (id)anObject
|
||||||
|
userData: (void *)data;
|
||||||
|
- (void) removeAllToolTips;
|
||||||
|
- (void) removeToolTip: (NSToolTipTag)tag;
|
||||||
|
- (void) setToolTip: (NSString *)string;
|
||||||
|
- (NSString *) toolTip;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Tracking rectangles
|
||||||
|
*/
|
||||||
|
- (void) removeTrackingRect: (NSTrackingRectTag)tag;
|
||||||
|
- (NSTrackingRectTag) addTrackingRect: (NSRect)aRect
|
||||||
|
owner: (id)anObject
|
||||||
|
userData: (void*)data
|
||||||
|
assumeInside: (BOOL)flag;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Scrolling
|
||||||
|
*/
|
||||||
|
- (NSRect) adjustScroll: (NSRect)newVisible;
|
||||||
|
- (BOOL) autoscroll: (NSEvent*)theEvent;
|
||||||
|
- (NSScrollView*) enclosingScrollView;
|
||||||
|
- (void) scrollPoint: (NSPoint)aPoint;
|
||||||
|
- (void) scrollRect: (NSRect)aRect
|
||||||
|
by: (NSSize)delta;
|
||||||
|
- (BOOL) scrollRectToVisible: (NSRect)aRect;
|
||||||
|
|
||||||
|
- (void) reflectScrolledClipView: (NSClipView*)aClipView;
|
||||||
|
- (void) scrollClipView: (NSClipView*)aClipView
|
||||||
|
toPoint: (NSPoint)aPoint;
|
||||||
|
|
||||||
|
#ifndef STRICT_OPENSTEP
|
||||||
|
/*
|
||||||
|
* Menu operations
|
||||||
|
*/
|
||||||
|
+ (NSMenu *) defaultMenu;
|
||||||
|
- (NSMenu *) menuForEvent: (NSEvent *)theEvent;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Aiding Event Handling
|
||||||
|
*/
|
||||||
|
- (void) setNextKeyView: (NSView*)aView;
|
||||||
|
- (NSView*) nextKeyView;
|
||||||
|
- (NSView*) nextValidKeyView;
|
||||||
|
- (void) setPreviousKeyView: (NSView*)aView;
|
||||||
|
- (NSView*) previousKeyView;
|
||||||
|
- (NSView*) previousValidKeyView;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Printing
|
* Printing
|
||||||
*/
|
*/
|
||||||
- (NSData*) dataWithEPSInsideRect: (NSRect)aRect;
|
|
||||||
- (void) fax: (id)sender;
|
- (void) fax: (id)sender;
|
||||||
- (void) print: (id)sender;
|
- (void) print: (id)sender;
|
||||||
|
- (NSData*) dataWithEPSInsideRect: (NSRect)aRect;
|
||||||
- (void) writeEPSInsideRect: (NSRect)rect
|
- (void) writeEPSInsideRect: (NSRect)rect
|
||||||
toPasteboard: (NSPasteboard*)pasteboard;
|
toPasteboard: (NSPasteboard*)pasteboard;
|
||||||
#ifndef STRICT_OPENSTEP
|
#ifndef STRICT_OPENSTEP
|
||||||
|
@ -376,34 +418,6 @@ enum {
|
||||||
- (void)endDocument;
|
- (void)endDocument;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef STRICT_OPENSTEP
|
|
||||||
/*
|
|
||||||
* Menu operations
|
|
||||||
*/
|
|
||||||
+ (NSMenu *) defaultMenu;
|
|
||||||
- (NSMenu *) menuForEvent: (NSEvent *)theEvent;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Tool Tips
|
|
||||||
*/
|
|
||||||
|
|
||||||
- (NSToolTipTag) addToolTipRect: (NSRect)aRect
|
|
||||||
owner: (id)anObject
|
|
||||||
userData: (void *)data;
|
|
||||||
- (void) removeAllToolTips;
|
|
||||||
- (void) removeToolTip: (NSToolTipTag)tag;
|
|
||||||
- (void) setToolTip: (NSString *)string;
|
|
||||||
- (NSString *) toolTip;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* NSCoding protocol
|
|
||||||
*/
|
|
||||||
- (void) encodeWithCoder: (NSCoder*)aCoder;
|
|
||||||
- (id) initWithCoder: (NSCoder*)aDecoder;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue