1 /* 2 NSSelection.h 3 4 Class describing a selection in a document 5 6 Copyright (C) 1996 Free Software Foundation, Inc. 7 8 Author: Scott Christley <scottc@net-community.com> 9 Date: 1996 10 11 This file is part of the GNUstep GUI Library. 12 13 This library is free software; you can redistribute it and/or 14 modify it under the terms of the GNU Lesser General Public 15 License as published by the Free Software Foundation; either 16 version 2 of the License, or (at your option) any later version. 17 18 This library is distributed in the hope that it will be useful, 19 but WITHOUT ANY WARRANTY; without even the implied warranty of 20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 Lesser General Public License for more details. 22 23 You should have received a copy of the GNU Lesser General Public 24 License along with this library; see the file COPYING.LIB. 25 If not, see <http://www.gnu.org/licenses/> or write to the 26 Free Software Foundation, 51 Franklin Street, Fifth Floor, 27 Boston, MA 02110-1301, USA. 28 */ 29 30 #ifndef _GNUstep_H_NSSelection 31 #define _GNUstep_H_NSSelection 32 33 #import <Foundation/NSObject.h> 34 35 @class NSData; 36 @class NSPasteboard; 37 38 @interface NSSelection : NSObject <NSCoding> 39 { 40 // Attributes 41 @private 42 NSData *_descriptionData; 43 BOOL _isWellKnownSelection; 44 int _selectionType; 45 } 46 47 // 48 // Returning Special Selection Shared Instances 49 // 50 + (NSSelection *)allSelection; 51 + (NSSelection *)currentSelection; 52 + (NSSelection *)emptySelection; 53 54 // 55 // Creating and Initializing a Selection 56 // 57 + (NSSelection *)selectionWithDescriptionData:(NSData *)data; 58 - (id)initWithDescriptionData:(NSData *)newData; 59 - (id)initWithPasteboard:(NSPasteboard *)pasteboard; 60 61 // 62 // Describing a Selection 63 // 64 - (NSData *)descriptionData; 65 - (BOOL)isWellKnownSelection; 66 67 // 68 // Writing a Selection to the Pasteboard 69 // 70 - (void)writeToPasteboard:(NSPasteboard *)pasteboard; 71 72 @end 73 74 #endif // _GNUstep_H_NSSelection 75