scottc@net-community.com
)
far@ix.netcom.com
)
ovidiu@net-community.com
)
richard@brainstorm.co.uk
)The view class which encapsulates all drawing functionality
Copyright: (C) (C) 1996 Free Software Foundation, Inc.
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.
- Declared in:
- AppKit/NSView.h
Standards:
- MacOS-X
- OpenStep
- GNUstep
Method summary
Description forthcoming.
Return the view at the top of graphics contexts
stack or nil
if none is focused.
Returns YES
if the view object will
accept the first click received when in an inactive
window, and NO
otherwise.
Description forthcoming.
Adds aView as a subview of the receiver.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Tell the view to maintain a private gstate object which encapsulates all the information about drawing, such as coordinate transforms, line widths, etc. If you do not invoke this method, a gstate object is constructed each time the view is lockFocused. Allocating a private gstate may improve the performance of views that are focused a lot and have a lot of customized drawing parameters.
View subclasses should override the setUpGstate method to set these custom parameters.
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
.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Writes header and job information for the PostScript document. This includes at a minimum, PostScript header information. It may also include job setup information if the output is intended for a printer (i.e. not an EPS file). Most of the information for writing the header comes from the NSPrintOperation and NSPrintInfo objects associated with the current print operation. There isn't normally anything that the program needs to override at the beginning of a document, although if there is additional setup that needs to be done, you can override the NSView's methods endHeaderComments, endPrologue, beginSetup, and/or endSetup. This method calls the above methods in the listed order before or after writing the required information. For an EPS operation, the beginSetup and endSetup methods aren't used.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
This method is invoked to handle drawing inside the view. The default NSView's implementation does nothing; subclasses might override it to draw something inside the view. Since NSView's implementation is guaranteed to be empty, you should not call super's implementation when you override it in subclasses. drawRect: is invoked when the focus has already been locked on the view; you can use arbitrary postscript functions in drawRect: to draw inside your view; the coordinate system in which you draw is the view's own coordinate system (this means for example that you should refer to the rectangle covered by the view using its bounds, and not its frame). The argument of drawRect: is the rectangle which needs to be redrawn. In a lossy implementation, you can ignore the argument and redraw the whole view; if you are aiming at performance, you may want to redraw only what is inside the rectangle which needs to be redrawn; this usually improves drawing performance considerably.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Returns an identifier that represents the view's gstate object, which is used to encapsulate drawing information about the view. Most of the time a gstate object is created from scratch when the view is focused, so if the view is not currently focused or allocateGState has not been called, then this method will
Description forthcoming.
Returns the subview, lowest in the receiver's hierarchy, which contains aPoint
Description forthcoming.
Returns YES
if aView is an
ancestor of the receiver.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Returns whether or not aPoint lies within aRect
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Frees the gstate object, if there is one. Note that the next time the view is lockFocused, the gstate will be allocated again.
Description forthcoming.
Description forthcoming.
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. In this case, you can use the -removeFromSuperviewWithoutNeedingDisplay method instead.
Removes the receiver from its superviews list of subviews, by invoking the superviews [ -removeSubview: ] method.
Removes aSubview 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.
Description forthcoming.
Description forthcoming.
Invalidates the view's gstate object so it will be set up again using setUpGState the next time the view is focused.
Removes oldView from the receiver and places newView in its place.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Notifies the receiver that its superview is being changed to newSuperview.
Notifies the receiver that it will now be a view
of newWindow. Note, this method is also used
when removing a view from a window (in which case,
newWindow is nil
) to let all
the subviews know that they have also been removed from
the window.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Returns the window in which the receiver resides.
Description forthcoming.
Description forthcoming.
- Declared in:
- AppKit/NSView.h
Standards:
- NotOpenStep
- NotMacOS-X
- GNUstep
Description forthcoming.
Method summaryDescription forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.