[Previous]
[Up]
[Next]
NSView
Authors
- Richard Frith-Macdonald
-
- James Dessart
-
Version: 0.2
Date: 8 April, 2000
Declared in: Gui/NSView.h
Inherits from: NSResponder
Conforms to: NSCoding
NSView is an abstract class which provides facilities for drawing in a window and
receiving events. It is the superclass of many of the visual elements of the GUI.
In order to display itself, a view must be placed in a window (represented by an
NSWindow object). Within the window is a hierarchy of NSViews, headed by the window's
content view. Every other view in a window is a descendant of this view.
Subclasses can override drawRect:
in order to implement their
appearance. Other methods of NSView and NSResponder can also be overridden to handle
user generated events.
+ (NSMenu*) defaultMenu
As of yet, unimplemented.
+ (NSView*) focusView
Returns the view which currently has the focus.
- (BOOL) acceptsFirstMouse: (NSEvent*)theEvent
Returns YES
if the view object will accept the first click
received when in an inactive window, and NO
otherwise.
- (void) addCursorRect: (NSRect)aRect cursor: (NSCursor*)aCursor
- (void) addSubview: (NSView*)aView
Adds aView as a subview of the receiver.
- (void) addSubview: (NSView*)aView positioned: (NSWindowOrderingMode)place relativeTo: (NSView*)otherView
- (void) addToPageSetup
- (NSTrackingRectTag) addTrackingRect: (NSRect)aRect owner: (id)anObject userData: (void*)userData assumeInside: (BOOL)flag
- (void) adjustPageHeightNew: (float*)newBottom top: (float)top bottom: (float)proposedBottom
- (void) adjustPageWidthNew: (float*)newRight left: (float)left right: (float)proposedRight
- (NSRect) adjustScroll: (NSRect)proposedVisibleRect
- (void) allocateGState
- (NSView*) ancestorSharedWithView: (NSView*)aView
Returns self
if aView is the receiver or aView is a
subview of the receiver, the ancestor view shared by aView and the receiver,
if any, aView if it is an ancestor of the receiver, otherwise returns
nil
.
- (BOOL) autoresizesSubviews
- (unsigned int) autoresizingMask
- (BOOL) autoscroll: (NSEvent*)theEvent
- (void) beginPage: (int)ordinalNum label: (NSString *)aString bBox: (NSRect)pageRect
- (void) beginPageSetupRect: (NSRect)aRect placement: (NSPoint)location
- (void) beginPrologueBBox: (NSRect)boundingBox creationDate: (NSString*)dateCreated createdBy: (NSString *)anApplication fonts: (NSString*)fontNames forWhom: (NSString *)user pages: (int)numPages
- (void) beginSetup
- (void) beginTrailer
- (NSRect) bounds
- (float) boundsRotation
- (BOOL) canDraw
- (NSRect) centerScanRect: (NSRect)aRect
- (NSPoint) convertPoint: (NSPoint)aPoint fromView: (NSView*)aView
- (NSPoint) convertPoint: (NSPoint)aPoint
- (NSRect) convertRect: (NSRect)aRect fromView: (NSView*)aView
- (NSRect) convertRect: (NSRect)aRect toView: (NSView*)aView
- (NSSize) convertSize: (NSSize)aSize fromView: (NSView*)aView
- (NSSize) convertSize: (NSSize)aSize toView: (NSView*)aView
- (NSData*) dataWithEPSInsideRect: (NSRect)aRect
- (void) discardCursorRects
- (void) display
- (void) displayIfNeeded
- (void) displayIfNeededIgnoringOpacity
- (void) displayIfNeededInRect: (NSRect)aRect
- (void) displayIfNeededInRectIgnoringOpacity: (NSRect)aRect
- (void) displayRect: (NSRect)aRect
- (void) displayRectIgnoringOpacity: (NSRect)aRect
- (BOOL) dragFile: (NSString*)fullPath fromRect: (NSRect)aRect slideBack: (BOOL)slideBack
- (void) dragImage: (NSImage*)anImage at: (NSPoint)imageLoc offset: (NSSize)mouseOffset event: (NSEvent *)theEvent pasteboard: (NSPasteboard*)pboard source: (id)sourceObject slideBack: (BOOL)slideBack
- (void) drawPageBorderWithSize: (NSSize)borderSize
- (void) drawRect: (NSRect)aRect
- (void) drawSheetBorderWithSize: (NSSize)borderSize
- (NSScrollView*) enclosingScrollView
- (void) endHeaderComments
- (void) endPage
- (void) endPageSetup
- (void) endPrologue
- (void) endSetup
- (void) endTrailer
- (void) fax: (id)sender
- (NSRect) frame
- (float) frameRotation
- (int) gState
- (float) heightAdjustLimit
- (NSView*) hitTest: (NSPoint)aPoint
Returns the subview, lowest in the receiver's hierarchy, which contains
aPoint
- (id) initWithFrame: (NSRect)frameRect
- (NSInterfaceStyle) interfaceStyle
- (BOOL) isDescendantOf: (NSView*)aView
Returns YES
if aView is an ancestor of the receiver.
- (BOOL) isFlipped
- (BOOL) isOpaque
- (BOOL) isRotatedFromBase
- (BOOL) isRotatedOrScaledFromBase
- (BOOL) knowsPageRange: (NSRangePointer)range
- (BOOL) knowsPagesFirst: (int*)firstPageNum
- (NSPoint) locationOfPrintRect: (NSRect)aRect
- (void) lockFocus
- (NSMenu*) menuForEvent: (NSEvent*)theEvent
As of yet, unimplemented.
- (BOOL) mouse: (NSPoint)aPoint inRect: (NSRect)aRect
Returns whether or not aPoint lies within aRect.
- (BOOL) needsDisplay
- (BOOL) needsPanelToBecomeKey
- (NSView*) nextKeyView
- (NSView*) nextValidKeyView
- (NSView*) opaqueAncestor
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent
- (BOOL) performMnemonic: (NSString*)aString
- (BOOL) postsBoundsChangedNotifications
- (BOOL) postsFrameChangedNotifications
- (NSView*) previousKeyView
- (NSView*) previousValidKeyView
- (void) print: (id)sender
- (NSRect) rectForPage: (int)pageNumber
- (void) reflectScrolledClipView: (NSClipView*)aClipView
- (void) registerForDraggedTypes: (NSArray*)pboardTypes
- (void) releaseGState
- (void) removeCursorRect: (NSRect)aRect cursor: (NSCursor*)aCursor
- (void) removeFromSuperview
Removes the receiver from its superviews list of subviews,
by invoking the superviews [-removeSubview:] method, and
marks the rectangle that the reciever occupied in the
superview as needing redisplay.
This is dangerous to use during display, since it alters the
rectangles needing display.
- (void) removeFromSuperviewWithoutNeedingDisplay
Removes the receiver from its superviews list of subviews,
by invoking the superviews [-removeSubview:] method.
- (void) removeSubview: (NSView*)aView
Standards: NotMacOS-X NotOpenStep
Removes the view from the receivers list of subviews
and from the responder chain.
Also invokes [aView -viewWillMoveToWindow: nil] to handle
removal of aView (and recursively, its children) from its
window - performing tidyup by invalidating cursor rects etc.
- (void) removeTrackingRect: (NSTrackingRectTag)aTag
- (void) renewGState
- (void) replaceSubview: (NSView*)oldView with: (NSView*)newView
Removes oldView from the receiver and places newView in its place.
- (void) resetCursorRects
- (void) resizeSubviewsWithOldSize: (NSSize)oldFrameSize
- (void) resizeWithOldSuperviewSize: (NSSize)oldFrameSize
- (void) rotateByAngle: (float)angle
- (void) scaleUnitSquareToSize: (NSSize)newUnitSize
- (void) scrollClipView: (NSClipView*)aClipView
- (void) scrollPoint: (NSPoint)aPoint
- (void) scrollRect: (NSRect)aRect
- (BOOL) scrollRectToVisible: (NSRect)aRect
- (void) setAutoresizesSubviews: (BOOL)flag
- (void) setAutoresizingMask: (unsigned int)mask
- (void) setBounds: (NSRect)boundsRect
- (void) setBoundsOrigin: (NSPoint)newOrigin
- (void) setBoundsRotation: (float)angle
- (void) setBoundsSize: (NSSize)newSize
- (void) setFrame: (NSRect)frameRect
- (void) setFrameOrigin: (NSPoint)newOrigin
- (void) setFrameRotation: (float)angle
- (void) setFrameSize: (NSSize)newSize
- (void) setInterfaceStyle: (NSInterfaceStyle)interfaceStyle
- (void) setNeedsDisplay: (BOOL)flag
- (void) setNeedsDisplayInRect: (NSRect)invalidRect
- (void) setNextKeyView: (NSView*)aView
- (void) setPostsBoundsChangedNotifications: (BOOL)flag
- (void) setPostsFrameChangedNotifications: (BOOL)flag
- (void) setToolTip: (NSString*)string
- (void) setUpGState
- (BOOL) shouldDelayWindowOrderingForEvent: (NSEvent*)theEvent
- (BOOL) shouldDrawColor
- (void) sortSubviewsUsingFunction: (int (*)(id,id,void*))compare context: (void*)context
- (NSArray*) subviews
- (NSView*) superview
- (int) tag
- (NSString*) toolTip
- (void) translateOriginToPoint: (NSPoint)newOrigin
- (void) unlockFocus
- (void) unregisterDraggedTypes
- (void) viewWillMoveToSuperview: (NSView*)newSuperview
Notifies the receiver that its superview is being changed to
newSuperview.
- (void) viewWillMoveToWindow: (NSWindow*)newWindow
Notifies the receiver that it will now be a view of newWindow.
- (id) viewWithTag: (int)aTag
- (NSRect) visibleRect
- (float) widthAdjustLimit
- (NSWindow*) window
Returns the window in which the receiver resides.
- (void) writeEPSInsideRect: (NSRect)aRect toPasteboard: (NSPasteboard*)pboard