API 0.9.5
CPPasteboard Class Reference

#import <CPPasteboard.h>

Inheritance diagram for CPPasteboard:

List of all members.

Instance Methods

(unsigned) - addTypes:owner:
(CPString- availableTypeFromArray:
(unsigned) - changeCount
(CPData- dataForType:
(unsigned) - declareTypes:owner:
(void) - pasteboard:provideDataForType:
(id) - propertyListForType:
(BOOL) - setData:forType:
(BOOL) - setPropertyList:forType:
(void) - setString:forType:
(CPString- stringForType:
(CPArray- types

Class Methods

(id) + generalPasteboard
(void) + initialize
(id) + pasteboardWithName:

Detailed Description

CPPasteBoard is the object responsible for cut/copy/paste and drag&drop operations.

Definition at line 2 of file CPPasteboard.h.


Method Documentation

- (unsigned) addTypes: (CPArray types
owner: (id)  anOwner 

Adds supported data types to the pasteboard

Parameters:
typesthe data types
anOwnerthe object that contains the data types
Returns:
the pasteboard's change count

Definition at line 140 of file CPPasteboard.j.

- (CPString) availableTypeFromArray: (CPArray anArray

Checks the pasteboard's types for a match with the types listen in the specified array. The array should be ordered by the requestor's most preferred data type first.

Parameters:
anArrayan array of requested types ordered by preference
Returns:
the highest match with the pasteboard's supported types or nil if no match was found

Definition at line 251 of file CPPasteboard.j.

- (unsigned) changeCount

Returns the number of changes that have occurred to this pasteboard

Definition at line 269 of file CPPasteboard.j.

- (CPData) dataForType: (CPString aType

Returns the pasteboard data for the specified data type

Parameters:
aTypethe requested data type
Returns:
the requested data or nil if the data doesn't exist

Definition at line 279 of file CPPasteboard.j.

- (unsigned) declareTypes: (CPArray types
owner: (id)  anOwner 

Sets the data types that this pasteboard will contain.

Parameters:
typethe data types it will support
anOwnerthe object that contains the the data
Returns:
the pasteboard's change count

Definition at line 176 of file CPPasteboard.j.

+ (id) generalPasteboard

Returns a new instance of a pasteboard

Definition at line 86 of file CPPasteboard.j.

+ (void) initialize

Definition at line 70 of file CPPasteboard.j.

- (void) pasteboard: (CPPasteboard aPasteboard
provideDataForType: (CPString aType 

method provided for integration with native pasteboard

Definition at line 317 of file CPPasteboard.j.

+ (id) pasteboardWithName: (CPString aName

Returns a pasteboard with the specified name. If the pasteboard doesn't exist, it will be created.

Parameters:
aNamethe name of the pasteboard
Returns:
the requested pasteboard

Definition at line 96 of file CPPasteboard.j.

- (id) propertyListForType: (CPString aType

Returns the property list for the specified data type

Parameters:
aTypethe requested data type
Returns:
the property list or nil if the list was not found

Definition at line 335 of file CPPasteboard.j.

- (BOOL) setData: (CPData aData
forType: (CPString aType 

Sets the pasteboard data for the specified type

Parameters:
aDatathe data
aTypethe data type being set
Returns:
YES if the data was successfully written to the pasteboard

Definition at line 212 of file CPPasteboard.j.

- (BOOL) setPropertyList: (id)  aPropertyList
forType: (CPString aType 

Writes the specified property list as data for the specified type

Parameters:
aPropertyListthe property list to write
aTypethe data type
Returns:
YES if the property list was successfully written to the pasteboard

Definition at line 228 of file CPPasteboard.j.

- (void) setString: (CPString aString
forType: (CPString aType 

Sets the specified string as data for the specified type

Parameters:
aStringthe string to write
aTypethe data type
Returns:
YES if the string was successfully written to the pasteboard

Definition at line 239 of file CPPasteboard.j.

- (CPString) stringForType: (CPString aType

Returns the string for the specified data type

Parameters:
aTypethe requested data type
Returns:
the string or nil if the string was not found

Definition at line 350 of file CPPasteboard.j.

- (CPArray) types

Returns the pasteboards supported types

Definition at line 259 of file CPPasteboard.j.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines