Class CPImageView

CPObject
    extended byCPResponder
        extended byCPView
            extended byCPControl
                extended byCPImageView

@implementation CPImageView : CPControl

This class is a control that displays an image.


Method Summary
-(id)initWithCoder:(CPCoder)aCoder
          Initializes the image view with the provided coder.
-(id)initWithFrame:(CGRect)aFrame
          Initializes the receiver for usage with the specified bounding rectangle.
-(void)encodeWithCoder:(CPCoder)aCoder
          Writes the image view out to the coder.
-(BOOL)hasShadow
          Returns YES if the image view draws with a drop shadow.
-(void)hideOrDisplayContents
          Toggles the display of the image view.
-(CPImage)image
          Returns the view's image.
-(CGRect)imageRect
          Returns the view's image rectangle.
-(CPImageScaling)imageScaling
          Returns the image scaling method used to render this image.
-(void)setFrameSize:(CGSize)aSize
          Sets the receiver's frame size.
-(void)setHasShadow:(BOOL)shouldHaveShadow
          Sets whether the image view should draw with a drop shadow.
-(void)setImage:(CPImage)anImage
          Sets the image for the view.
-(void)setImageScaling:(CPImageScaling)anImageScaling
          Sets the type of image scaling that should be used to render the image.
-(void)tile
          Add a description.

Methods inherited from class CPObject
initialize, alloc, class, instanceMethodForSelector, instancesRespondToSelector, isSubclassOfClass, load, new, setVersion, superclass, version, init, autorelease, awakeAfterUsingCoder, class, classForCoder, classForKeyedArchiver, className, copy, dealloc, description, doesNotRecognizeSelector, forwardInvocation, hash, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableCopy, performSelector, performSelector, performSelector, release, replacementObjectForArchiver, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, retain, self, superclass

Methods inherited from class CPResponder
acceptsFirstResponder, becomeFirstResponder, deleteBackward, doCommandBySelector, insertLineBreak, insertText, interpretKeyEvents, keyDown, keyUp, menu, mouseDown, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseUp, nextResponder, noResponderFor, performKeyEquivalent, resignFirstResponder, scrollWheel, setMenu, setNextResponder, tryToPerform, undoManager

Methods inherited from class CPView
initWithFrame, acceptsFirstMouse, addSubview, addSubview, adjustScroll, alphaValue, autoresizesSubviews, autoresizingMask, autoscroll, backgroundColor, bounds, convertPoint, convertPoint, convertRect, convertRect, convertSize, convertSize, didAddSubview, display, displayIfNeeded, displayIfNeededInRect, displayRect, displayRectIgnoringOpacity, dragImage, dragView, drawRect, enclosingMenuItem, enclosingScrollView, enterFullScreenMode, exitFullScreenModeWithOptions, frame, hitTest, hitTests, isDescendantOf, isFlipped, isHidden, isHiddenOrHasHiddenAncestor, isInFullScreenMode, isOpaque, lockFocus, mouseDown, mouseDownCanMoveWindow, needsDisplay, postsBoundsChangedNotifications, postsFrameChangedNotifications, reflectScrolledClipView, registerForDraggedTypes, registeredDraggedTypes, removeFromSuperview, replaceSubview, resizeSubviewsWithOldSize, resizeWithOldSuperviewSize, scrollClipView, scrollPoint, scrollRectToVisible, scrollRect, setAlphaValue, setAutoresizesSubviews, setAutoresizingMask, setBackgroundColor, setBounds, setBoundsOrigin, setBoundsSize, setFrame, setFrameOrigin, setFrameSize, setHidden, setHitTests, setNeedsDisplay, setNeedsDisplayInRect, setPostsBoundsChangedNotifications, setPostsFrameChangedNotifications, subviews, superview, unlockFocus, unregisterDraggedTypes, viewDidMoveToSuperview, viewDidMoveToWindow, viewWillMoveToSuperview, viewWillMoveToWindow, visibleRect, willRemoveSubview, window

Methods inherited from class CPControl
initWithFrame, action, alignment, backgroundColorForName, floatValue, font, isEnabled, mouseUp, sendAction, setAction, setAlignment, setBackgroundColor, setBackgroundColorWithName, setBackgroundColor, setEnabled, setFloatValue, setFont, setTarget, setTextColor, setTextShadow, target, textColor, textShadow


Method Detail

initWithCoder

-(id)initWithCoder:(CPCoder)aCoder
Initializes the image view with the provided coder.
Parameters:
aCoder - the coder from which data will be read.
Returns:
the initialized image view

initWithFrame

-(id)initWithFrame:(CGRect)aFrame
Initializes the receiver for usage with the specified bounding rectangle
Parameters:
aFrame
Returns:
the initialized view

encodeWithCoder

-(void)encodeWithCoder:(CPCoder)aCoder
Writes the image view out to the coder.
Parameters:
aCoder - the coder to which the image view will be written

hasShadow

-(BOOL)hasShadow
Returns YES if the image view draws with a drop shadow. The default is NO.

hideOrDisplayContents

-(void)hideOrDisplayContents
Toggles the display of the image view.

image

-(CPImage)image
Returns the view's image.

imageRect

-(CGRect)imageRect
Returns the view's image rectangle

imageScaling

-(CPImageScaling)imageScaling
Returns the image scaling method used to render this image.

setFrameSize

-(void)setFrameSize:(CGSize)aSize
Sets the receiver's frame size. If aSize is the same as the frame's current dimensions, this method simply returns. The method posts a CPViewFrameDidChangeNotification to the default notification center if the receiver is configured to do so.
Parameters:
aSize - the new size for the frame

setHasShadow

-(void)setHasShadow:(BOOL)shouldHaveShadow
Sets whether the image view should draw with a drop shadow.
Parameters:
shouldHaveShadow - whether the image view should have a shadow

setImage

-(void)setImage:(CPImage)anImage
Sets the image for the view.
Parameters:
anImage - the view's image

setImageScaling

-(void)setImageScaling:(CPImageScaling)anImageScaling
Sets the type of image scaling that should be used to render the image.
Parameters:
anImageScaling - the type of scaling to use

tile

-(void)tile
Add a description

Created on Sat Sep 13 14:15:43 PDT 2008