NSPasteboard | Mac OS X 10.0 |
This class provides access to the pasteboard server, which allows applications to share data with one another. A general purpose pasteboard is obtained using the class method generalPasteboard. Alternatively, clients can access one of the standard pasteboards (general, font, ruler, find, and drag), or create a private pasteboard using the class method pasteboardWithName:.
Data is read and written to a pasteboard using the methods dataForType: and setData:forType, respectively.
@interface NSPasteboard : NSObject
|
// Convenience Constructors |
+ (NSPasteboard *)pasteboardByFilteringData:(NSData *)data ofType:(NSString *)type; |
+ (NSPasteboard *)pasteboardByFilteringFile:(NSString *)filename; |
+ (NSPasteboard *)pasteboardByFilteringTypesInPasteboard:(NSPasteboard *)pboard; |
+ (NSPasteboard *)pasteboardWithName:(NSString *)name; |
+ (NSPasteboard *)pasteboardWithUniqueName;
|
// Accessor Methods |
- (BOOL)setString:(NSString *)string forType:(NSString *)dataType; |
- (BOOL)setData:(NSData *)data forType:(NSString *)dataType; |
- (BOOL)setPropertyList:(id)plist forType:(NSString *)dataType; |
// Class Methods |
+ (NSPasteboard *)generalPasteboard;
|
+ (NSArray *)typesFilterableTo:(NSString *)type; |
// Instance Methods |
- (NSString *)availableTypeFromArray:(NSArray *)types; |
- (int)addTypes:(NSArray *)newTypes owner:(id)newOwner; |
- (int)changeCount;
|
- (NSData *)dataForType:(NSString *)dataType; |
- (int)declareTypes:(NSArray *)newTypes owner:(id)newOwner; |
- (NSString *)name;
|
- (id)propertyListForType:(NSString *)dataType; |
- (NSString *)readFileContentsType:(NSString *)type toFile:(NSString *)filename; |
- (NSFileWrapper *)readFileWrapper;
|
- (void)releaseGlobally;
|
- (NSString *)stringForType:(NSString *)dataType; |
- (NSArray *)types;
|
- (BOOL)writeFileContents:(NSString *)filename; |
- (BOOL)writeFileWrapper:(NSFileWrapper *)wrapper; |