NSView 0.2 8 April, 2000 NSView Gui/NSView.h 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.

defaultMenu

As of yet, unimplemented.

focusView

Returns the view which currently has the focus.

acceptsFirstMouse: theEvent

Returns YES if the view object will accept the first click received when in an inactive window, and NO otherwise.

addCursorRect: aRect cursor: aCursor addSubview: aView

Adds aView as a subview of the receiver.

addSubview: aView positioned: place relativeTo: otherView addToPageSetup addTrackingRect: aRect owner: anObject userData: userData assumeInside: flag adjustPageHeightNew: newBottom top: top bottom: proposedBottom adjustPageWidthNew: newRight left: left right: proposedRight adjustScroll: proposedVisibleRect allocateGState ancestorSharedWithView: 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.

autoresizesSubviews autoresizingMask autoscroll: theEvent beginPage: ordinalNum label: aString bBox: pageRect beginPageSetupRect: aRect placement: location beginPrologueBBox: boundingBox creationDate: dateCreated createdBy: anApplication fonts: fontNames forWhom: user pages: numPages beginSetup beginTrailer bounds boundsRotation canDraw centerScanRect: aRect convertPoint: aPoint fromView: aView convertPoint: aPoint convertRect: aRect fromView: aView convertRect: aRect toView: aView convertSize: aSize fromView: aView convertSize: aSize toView: aView dataWithEPSInsideRect: aRect discardCursorRects display displayIfNeeded displayIfNeededIgnoringOpacity displayIfNeededInRect: aRect displayIfNeededInRectIgnoringOpacity: aRect displayRect: aRect displayRectIgnoringOpacity: aRect dragFile: fullPath fromRect: aRect slideBack: slideBack dragImage: anImage at: imageLoc offset: mouseOffset event: theEvent pasteboard: pboard source: sourceObject slideBack: slideBack drawPageBorderWithSize: borderSize drawRect: aRect drawSheetBorderWithSize: borderSize enclosingScrollView endHeaderComments endPage endPageSetup endPrologue endSetup endTrailer fax: sender frame frameRotation gState heightAdjustLimit hitTest: aPoint

Returns the subview, lowest in the receiver's hierarchy, which contains aPoint

initWithFrame: frameRect interfaceStyle isDescendantOf: aView

Returns YES if aView is an ancestor of the receiver.

isFlipped isOpaque isRotatedFromBase isRotatedOrScaledFromBase knowsPageRange: range knowsPagesFirst: firstPageNum locationOfPrintRect: aRect lockFocus menuForEvent: theEvent

As of yet, unimplemented.

mouse: aPoint inRect: aRect

Returns whether or not aPoint lies within aRect.

needsDisplay needsPanelToBecomeKey nextKeyView nextValidKeyView opaqueAncestor performKeyEquivalent: theEvent performMnemonic: aString postsBoundsChangedNotifications postsFrameChangedNotifications previousKeyView previousValidKeyView print: sender rectForPage: pageNumber reflectScrolledClipView: aClipView registerForDraggedTypes: pboardTypes releaseGState removeCursorRect: aRect cursor: aCursor 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.

removeFromSuperviewWithoutNeedingDisplay

Removes the receiver from its superviews list of subviews, by invoking the superviews [-removeSubview:] method.

removeSubview: aView

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.

removeTrackingRect: aTag renewGState replaceSubview: oldView with: newView

Removes oldView from the receiver and places newView in its place.

resetCursorRects resizeSubviewsWithOldSize: oldFrameSize resizeWithOldSuperviewSize: oldFrameSize rotateByAngle: angle scaleUnitSquareToSize: newUnitSize scrollClipView: aClipView scrollPoint: aPoint scrollRect: aRect scrollRectToVisible: aRect setAutoresizesSubviews: flag setAutoresizingMask: mask setBounds: boundsRect setBoundsOrigin: newOrigin setBoundsRotation: angle setBoundsSize: newSize setFrame: frameRect setFrameOrigin: newOrigin setFrameRotation: angle setFrameSize: newSize setInterfaceStyle: interfaceStyle setNeedsDisplay: flag setNeedsDisplayInRect: invalidRect setNextKeyView: aView setPostsBoundsChangedNotifications: flag setPostsFrameChangedNotifications: flag setToolTip: string setUpGState shouldDelayWindowOrderingForEvent: theEvent shouldDrawColor sortSubviewsUsingFunction: compare context: context subviews superview tag toolTip translateOriginToPoint: newOrigin unlockFocus unregisterDraggedTypes viewWillMoveToSuperview: newSuperview

Notifies the receiver that its superview is being changed to newSuperview.

viewWillMoveToWindow: newWindow

Notifies the receiver that it will now be a view of newWindow.

viewWithTag: aTag visibleRect widthAdjustLimit window

Returns the window in which the receiver resides.

writeEPSInsideRect: aRect toPasteboard: pboard