Inherits From:
SCOpenGLView : NSView : NSResponder : NSObject
Conforms To:
NSCoding
SCDrawable
Declared In:
Sc21/SCView.h
SCView conforms to the SCDrawable protocol, which means it can be used by an SCController to display a Coin scenegraph.
Note that when connecting SCView's controller outlet, the
controller's drawable will automatically be set to the SCView.
Event handling
Instead of handling events directly, SCView forwards them to its
SCController's handleEvent: method. Refer to the SCEventHandler
documentation for more information.
controller
Returns the receiver's SCController.
flagsChanged:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
initWithFrame:(NSRect)rect
Equivalent to calling [self initWithFrame:rect format:nil].
initWithFrame:(NSRect)rect pixelFormat:(SCOpenGLPixelFormat *)format
Designated initializer.
Initializes a newly allocated SCView with rect as its frame
rectangle and sets up an OpenGL context with the pixelformat
format. Returns self.
keyDown:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
keyUp:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
mouseDown:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
Note that if you press the left mouse button while holding
down the ctrl key, you will not receive a mouseDown event.
Instead, the view's default context menu will be shown. (This
behavior is inherited from NSView.) If you want to handle
ctrl-click yourself, you have to subclass SCView and override
- (NSMenu *)menuForEvent:(NSEvent *)event to return nil.
This will cause the event to be passed on to this function.
mouseDragged:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
Note that when processing "mouse dragged" events, Coin does not distinguish between left and right mouse button. If you interested in that information, you have to evaluate the last mouseDown that occured before the dragging.
mouseMoved:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
Note: You have to send setAcceptsMouseMovedEvents:YES to the
receiver's parent NSWindow to enable NSMouseMoved events.
mouseUp:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
otherMouseDown:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
otherMouseDragged:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
Note that when processing "mouse dragged" events, Coin does not distinguish between left and right mouse button. If you are interested in that information, you have to evaluate the last mouseDown that occured before the dragging.
otherMouseUp:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
rightMouseDown:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
rightMouseDragged:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
Note that when processing "mouse dragged" events, Coin does not distinguish between left and right mouse button. If you are interested in that information, you have to evaluate the last mouseDown that occured before the dragging.
rightMouseUp:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
scrollWheel:(NSEvent *)event
Forwards event to the controller. If the event is not handled by the controller, it will be sent on through the responder chain as usual.
setController:(SCController *)newcontroller
Sets the receiver's SCController to newcontroller. newcontroller is retained.