API  1.0.0
CPImage Class Reference

#import <CPImage.h>

+ Inheritance diagram for CPImage:

Instance Methods

(DOMElement) - applyCSSImageForView:onDOMElement:styleNode:previousState:
 
(CPData- data
 
(id) - delegate
 
(CPString- description
 
(void) - encodeWithCoder:
 
(CPString- filename
 
(BOOL) - hasCSSAfterDictionary
 
(BOOL) - hasCSSBeforeDictionary
 
(BOOL) - hasCSSDictionary
 
(Image) - image
 
(id) - init
 
(id) - initByReferencingFile:size:
 
(id) - initWithCoder:
 
(id) - initWithContentsOfFile:
 
(id) - initWithContentsOfFile:size:
 
(id) - initWithCSSDictionary:beforeDictionary:afterDictionary:size:
 
(id) - initWithData:
 
(BOOL) - isCSSBased
 
(BOOL) - isNinePartImage
 
(BOOL) - isSingleImage
 
(BOOL) - isThreePartImage
 
(void) - load
 
(unsigned) - loadStatus
 
(CPString- name
 
(void) - setDelegate:
 
(BOOL) - setName:
 
(void) - setSize:
 
(CGSize) - size
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray) - exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(CPImage+ cachedImageWithContentsOfFile:
 
(CPImage+ dummyCSSImageOfSize:
 
(id) + imageNamed:
 
(CPImage+ imageWithCSSDictionary:beforeDictionary:afterDictionary:size:
 
(CPImage+ imageWithCSSDictionary:size:
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(void) + cancelPreviousPerformRequestsWithTarget:
 
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
 
(Class) + class
 
(BOOL) + conformsToProtocol:
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesImplementSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isBindingExclusive:
 
(BOOL) + isSubclassOfClass:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 
(id) + new
 
(void) + object:performSelector:withObject:afterDelay:inModes:
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Detailed Description

CPImage is used to represent images in the Cappuccino framework. It supports loading all image types supported by the browser.

Delegate Methods

-(void)imageDidLoad:(CPImage)image; Called when the specified image has finished loading.

Parameters
imagethe image that loaded

-(void)imageDidError:(CPImage)image; Called when the specified image had an error loading.

Parameters
imagethe image with the loading error

-(void)imageDidAbort:(CPImage)image; Called when the image loading was aborted.

Parameters
imagethe image that was aborted

Definition at line 2 of file CPImage.h.

Method Documentation

◆ applyCSSImageForView:onDOMElement:styleNode:previousState:()

- (DOMElement) applyCSSImageForView: (CPView aView
onDOMElement: (DOMElement)  aDOMElement
styleNode: (DOMElement)  aStyleNode
previousState: (CPArrayRef)  aPreviousStateRef 
implementation

Provided by category CPImage(CSSTheming).

Definition at line 613 of file CPImage.j.

◆ cachedImageWithContentsOfFile:()

+ (CPImage) cachedImageWithContentsOfFile: (CPString aFile
implementation

Provided by category CPImage(CachedImage).

Definition at line 607 of file CPImageView.j.

◆ data()

- (CPData) data
implementation

Returns the data associated with this image. Returns nil if the reciever was not initialized with -initWithData: and the browser does not support the canvas feature;

Definition at line 228 of file CPImage.j.

◆ delegate()

- (id) delegate
implementation

Returns the receiver's delegate

Definition at line 349 of file CPImage.j.

◆ description()

- (CPString) description
implementation

Returns a human readable string describing the receiver

Reimplemented from CPObject.

Definition at line 440 of file CPImage.j.

◆ dummyCSSImageOfSize:()

+ (CPImage) dummyCSSImageOfSize: (CGSize)  aSize
implementation

Provided by category CPImage(CSSTheming).

Definition at line 570 of file CPImage.j.

◆ encodeWithCoder:()

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Writes the image data from memory into the coder.

Parameters
aCoderthe coder to which the data will be written

Provided by category CPImage(CPCoding).

Definition at line 728 of file CPImage.j.

◆ filename()

- (CPString) filename
implementation

Returns the path of the file associated with this image.

Definition at line 219 of file CPImage.j.

◆ hasCSSAfterDictionary()

- (BOOL) hasCSSAfterDictionary
implementation

Provided by category CPImage(CSSTheming).

Definition at line 608 of file CPImage.j.

◆ hasCSSBeforeDictionary()

- (BOOL) hasCSSBeforeDictionary
implementation

Provided by category CPImage(CSSTheming).

Definition at line 603 of file CPImage.j.

◆ hasCSSDictionary()

- (BOOL) hasCSSDictionary
implementation

Provided by category CPImage(CSSTheming).

Definition at line 598 of file CPImage.j.

◆ image()

- (Image) image
implementation

Returns the underlying Image element for a single image.

Definition at line 319 of file CPImage.j.

◆ imageNamed:()

+ (id) imageNamed: (CPString aName
implementation

Definition at line 272 of file CPImage.j.

◆ imageWithCSSDictionary:beforeDictionary:afterDictionary:size:()

+ (CPImage) imageWithCSSDictionary: (CPDictionary aDictionary
beforeDictionary: (CPDictionary beforeDictionary
afterDictionary: (CPDictionary afterDictionary
size: (CGSize)  aSize 
implementation

Provided by category CPImage(CSSTheming).

Definition at line 565 of file CPImage.j.

◆ imageWithCSSDictionary:size:()

+ (CPImage) imageWithCSSDictionary: (CPDictionary aDictionary
size: (CGSize)  aSize 
implementation

Provided by category CPImage(CSSTheming).

Definition at line 560 of file CPImage.j.

◆ init()

- (id) init
implementation

Initializes the receiver

Returns
the initialized receiver

Reimplemented from CPObject.

Definition at line 138 of file CPImage.j.

◆ initByReferencingFile:size:()

- (id) initByReferencingFile: (CPString aFilename
size: (CGSize)  aSize 
implementation

Initializes the image, by associating it with a filename. The image denoted in aFilename is not actually loaded. It will be loaded once needed.

Parameters
aFilenamethe file containing the image
aSizethe image's size
Returns
the initialized image

Definition at line 152 of file CPImage.j.

◆ initWithCoder:()

- (id) initWithCoder: (CPCoder aCoder
implementation

Initializes the image with data from a coder.

Parameters
aCoderthe coder from which to read the image data
Returns
the initialized image

Provided by category CPImage(CPCoding).

Definition at line 716 of file CPImage.j.

◆ initWithContentsOfFile:()

- (id) initWithContentsOfFile: (CPString aFilename
implementation

Initializes the receiver with the contents of the specified image file. The method loads the data into memory.

Parameters
aFilenamethe file name of the image
Returns
the initialized image

Definition at line 192 of file CPImage.j.

◆ initWithContentsOfFile:size:()

- (id) initWithContentsOfFile: (CPString aFilename
size: (CGSize)  aSize 
implementation

Initializes the image. Loads the specified image into memory.

Parameters
aFilenamethe image to load
aSizethe size of the image
Returns
the initialized image.

Definition at line 176 of file CPImage.j.

◆ initWithCSSDictionary:beforeDictionary:afterDictionary:size:()

- (id) initWithCSSDictionary: (CPDictionary aDictionary
beforeDictionary: (CPDictionary beforeDictionary
afterDictionary: (CPDictionary afterDictionary
size: (CGSize)  aSize 
implementation

Provided by category CPImage(CSSTheming).

Definition at line 576 of file CPImage.j.

◆ initWithData:()

- (id) initWithData: (CPData someData
implementation

Initializes the receiver with the specified data. The method loads the data into memory.

Parameters
someDatathe CPData object representing the image
Returns
the initialized image

Definition at line 207 of file CPImage.j.

◆ isCSSBased()

- (BOOL) isCSSBased
implementation

Provided by category CPImage(CSSTheming).

Definition at line 593 of file CPImage.j.

◆ isNinePartImage()

- (BOOL) isNinePartImage
implementation

Definition at line 435 of file CPImage.j.

◆ isSingleImage()

- (BOOL) isSingleImage
implementation

Definition at line 425 of file CPImage.j.

◆ isThreePartImage()

- (BOOL) isThreePartImage
implementation

Definition at line 430 of file CPImage.j.

◆ load()

- (void) load
implementation

Loads the image data from the file into memory. You should not call this method directly. Instead use one of the initializers.

Reimplemented from CPObject.

Definition at line 368 of file CPImage.j.

◆ loadStatus()

- (unsigned) loadStatus
implementation

Returns the load status, which will be CPImageLoadStatusCompleted if the image data has already been loaded.

Definition at line 357 of file CPImage.j.

◆ name()

- (CPString) name
implementation

Definition at line 311 of file CPImage.j.

◆ setDelegate:()

- (void) setDelegate: (id <CPImageDelegate>)  aDelegate
implementation

Sets the receiver's delegate.

Parameters
thedelegate

Definition at line 328 of file CPImage.j.

◆ setName:()

- (BOOL) setName: (CPString aName
implementation

Definition at line 296 of file CPImage.j.

◆ setSize:()

- (void) setSize: (CGSize)  aSize
implementation

Sets the size of the image.

Parameters
thesize of the image

Definition at line 259 of file CPImage.j.

◆ size()

- (CGSize) size
implementation

Returns the size of the image

Definition at line 267 of file CPImage.j.


The documentation for this class was generated from the following files: