CPObjectCPPasteboard
@implementation CPPasteboard : CPObject
CPPasteBoard
is the object responsible for cut/copy/paste and drag&drop operations.
Method Summary | |
---|---|
+(id) | generalPasteboard Returns a new instance of a pasteboard. |
+(id) | pasteboardWithName:(CPString)aName Returns a pasteboard with the specified name. |
-(unsigned) | addTypes:(CPArray)types owner:(id)anOwner Adds supported data types to the pasteboard. |
-(CPString) | availableTypeFromArray:(CPArray)anArray Checks the pasteboard's types for a match with the types listen in the specified array. |
-(unsigned) | changeCount Returns the number of changes that have occurred to this pasteboard. |
-(CPData) | dataForType:(CPString)aType Returns the pasteboard data for the specified data type. |
-(unsigned) | declareTypes:(CPArray)types owner:(id)anOwner Sets the data types that this pasteboard will contain. |
-(id) | propertyListForType:(CPString)aType Returns the property list for the specified data type. |
-(BOOL) | setData:(CPData)aData forType:(CPString)aType Sets the pasteboard data for the specified type. |
-(BOOL) | setPropertyList:(id)aPropertyList forType:(CPString)aType Writes the specified property list as data for the specified type. |
-(void) | setString:(CPString)aString forType:(CPString)aType Sets the specified string as data for the specified type. |
-(CPString) | stringForType:(CPString)aType Returns the string for the specified data type. |
-(CPArray) | types Returns the pasteboards supported types. |
Method Detail |
---|
+(id)generalPasteboard
+(id)pasteboardWithName:(CPString)aName
aName
- the name of the pasteboard-(unsigned)addTypes:(CPArray)types owner:(id)anOwner
types
- the data typesanOwner
- the object that contains the data types-(CPString)availableTypeFromArray:(CPArray)anArray
anArray
- an array of requested types ordered by preferencenil
if no match was found
-(unsigned)changeCount
-(CPData)dataForType:(CPString)aType
aType
- the requested data typenil
if the data doesn't exist
-(unsigned)declareTypes:(CPArray)types owner:(id)anOwner
types
anOwner
- the object that contains the the data-(id)propertyListForType:(CPString)aType
aType
- the requested data typenil
if the list was not found
-(BOOL)setData:(CPData)aData forType:(CPString)aType
aData
- the dataaType
- the data type being setYES
if the data was successfully written to the pasteboard
-(BOOL)setPropertyList:(id)aPropertyList forType:(CPString)aType
aPropertyList
- the property list to writeaType
- the data typeYES
if the property list was successfully written to the pasteboard
-(void)setString:(CPString)aString forType:(CPString)aType
aString
- the string to writeaType
- the data typeYES
if the string was successfully written to the pasteboard
-(CPString)stringForType:(CPString)aType
aType
- the requested data typenil
if the string was not found
-(CPArray)types
Created on Sat Sep 13 14:15:43 PDT 2008