May 2003
Intermediate to advanced
566 pages
27h 29m
English
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; |
Read now
Unlock full access