API  0.9.6
 All Classes Files Functions Variables Macros Modules Pages
CPImage Class Reference

#import <CPImage.h>

+ Inheritance diagram for CPImage:

Instance Methods

(CPData- data
 
(id) - delegate
 
(CPString- description
 
(void) - encodeWithCoder:
 
(CPString- filename
 
(id) - init
 
(id) - initByReferencingFile:size:
 
(id) - initWithCoder:
 
(id) - initWithContentsOfFile:
 
(id) - initWithContentsOfFile:size:
 
(id) - initWithData:
 
(BOOL) - isNinePartImage
 
(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:
 
(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

(id) + imageNamed:
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(Class) + class
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isSubclassOfClass:
 
(CPSet+ keyPathsForValuesAffectingValueForKey:
 
(id) + new
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Additional Inherited Members

- Instance Variables inherited from CPObject
Class isa
 

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

- (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 180 of file CPImage.j.

- (id) delegate
implementation

Returns the receiver's delegate

Definition at line 280 of file CPImage.j.

- (CPString) description
implementation

Returns a human readable string describing the receiver

Reimplemented from CPObject.

Definition at line 366 of file CPImage.j.

- (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 445 of file CPImage.j.

- (CPString) filename
implementation

Returns the path of the file associated with this image.

Definition at line 171 of file CPImage.j.

+ (id) imageNamed: (CPString aName
implementation

Definition at line 224 of file CPImage.j.

- (id) init
implementation

Initializes the receiver

Returns
the initialized receiver

Reimplemented from CPObject.

Definition at line 95 of file CPImage.j.

- (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 108 of file CPImage.j.

- (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 436 of file CPImage.j.

- (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 144 of file CPImage.j.

- (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 128 of file CPImage.j.

- (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 159 of file CPImage.j.

- (BOOL) isNinePartImage
implementation

Definition at line 361 of file CPImage.j.

- (BOOL) isThreePartImage
implementation

Definition at line 356 of file CPImage.j.

- (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 299 of file CPImage.j.

- (unsigned) loadStatus
implementation

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

Definition at line 288 of file CPImage.j.

- (CPString) name
implementation

Definition at line 263 of file CPImage.j.

- (void) setDelegate: (id)  aDelegate
implementation

Sets the receiver's delegate.

Parameters
thedelegate

Definition at line 272 of file CPImage.j.

- (BOOL) setName: (CPString aName
implementation

Definition at line 248 of file CPImage.j.

- (void) setSize: (CGSize)  aSize
implementation

Sets the size of the image.

Parameters
thesize of the image

Definition at line 211 of file CPImage.j.

- (CGSize) size
implementation

Returns the size of the image

Definition at line 219 of file CPImage.j.


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