From bc8190f6d7f03c6193f15e49af4c51562d99a439 Mon Sep 17 00:00:00 2001 From: CaS Date: Sat, 28 Jun 2003 19:15:18 +0000 Subject: [PATCH] Documentation tweaks git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17064 72102866-910b-0410-8b05-ffd578937521 --- Headers/gnustep/gui/NSPasteboard.h | 2 +- Source/NSPasteboard.m | 69 ++++++++++++++++++++++++++---- 2 files changed, 62 insertions(+), 9 deletions(-) diff --git a/Headers/gnustep/gui/NSPasteboard.h b/Headers/gnustep/gui/NSPasteboard.h index 004baca86..ceefe5056 100644 --- a/Headers/gnustep/gui/NSPasteboard.h +++ b/Headers/gnustep/gui/NSPasteboard.h @@ -146,7 +146,7 @@ APPKIT_EXPORT NSString *NSFindPboard; APPKIT_EXPORT NSString *NSFontPboard; /** - * The general purpose pasteboard (mostly used for sut and paste) + * The general purpose pasteboard (mostly used for cut and paste) */ APPKIT_EXPORT NSString *NSGeneralPboard; diff --git a/Source/NSPasteboard.m b/Source/NSPasteboard.m index e2e60dbc6..b1a3a8440 100644 --- a/Source/NSPasteboard.m +++ b/Source/NSPasteboard.m @@ -617,11 +617,16 @@ static NSMapTable *mimeMap = NULL; *

* Standard pasteboard names are - * - * NSGeneralPboard - * NSFontPboard - * NSRulerPboard - * NSFindPboard - * NSDragPboard + * + * NSGeneralPboard + * + * NSFontPboard + * + * NSRulerPboard + * + * NSFindPboard + * + * NSDragPboard * */ + (NSPasteboard*) pasteboardWithName: (NSString*)aName @@ -846,7 +851,8 @@ static NSMapTable *mimeMap = NULL; } /** - * Returns the pasteboard name for the receiver. + * Returns the pasteboard name (as given to +pasteboardWithName:) + * for the receiver. */ - (NSString*) name { @@ -905,6 +911,52 @@ static NSMapTable *mimeMap = NULL; * is incremented and returned, rather than the last value specified * by the -setChangeCount: method. *

+ *

The types you declare can be arbitrary strings, but as at least two + * applications really need to be aware of the same type for it to be + * of use, it is much more normal to use a predefined (standard) type + * or a type representing the name or content of a particular kind of + * file (returned by the NSCreateFilenamePboardType() or + * NSCreateFilenamePboardType() function).
+ * The standard type for raw data is + * NSGeneralPboardType + *

+ * The predefined pasteboard types are - + * + * + * NSStringPboardType + * + * NSColorPboardType + * + * NSFileContentsPboardType + * + * NSFilenamesPboardType + * + * NSFontPboardType + * + * NSRulerPboardType + * + * NSPostScriptPboardType + * + * NSTabularTextPboardType + * + * NSRTFPboardType + * + * NSRTFDPboardType + * + * NSTIFFPboardType + * + * NSDataLinkPboardType + * + * NSGeneralPboardType + * + * NSPDFPboardType + * + * NSPICTPboardType + * + * NSURLPboardType + * + * NSHTMLPboardType + * */ - (int) declareTypes: (NSArray*)newTypes owner: (id)newOwner @@ -1134,7 +1186,7 @@ static NSMapTable *mimeMap = NULL; /** * Returns the first type listed in types which the receiver has been - * declared to support. + * declared (see -declareTypes:owner:) to support. */ - (NSString*) availableTypeFromArray: (NSArray*)types { @@ -1159,7 +1211,8 @@ static NSMapTable *mimeMap = NULL; } /** - * Returns all the types that the receiver has been declared to support. + * Returns all the types that the receiver has been declared to support.
+ * See -declareTypes:owner: for details. */ - (NSArray*) types {