ftp.nice.ch/pub/next/developer/objc/iconkit/IconKit.1.2.s.tar.gz#/IconKit-1.2/Classes/IKIconObject.h

This is IKIconObject.h in view mode; [Download] [Up]

/*

File IKIconObject.h

Release 1.2, 7 June 1994
Copyright (C) 1994 by H. Scott Roy

This code is part of IconKit, a general toolbox for drag-and-drop applications.  IconKit is free for noncommercial use, but costs money for a commercial license.  You should have received a copy of the license agreement with this file.  If not, a copy of the license and the complete source of IconKit can be obtained from the author:

		H. Scott Roy
		2573 Stowe Ct.
		Northbrook, IL  60062-8103
		iconkit@cs.stanford.edu

For your editing convenience, this file is best viewed using an editor that automatically wraps long lines, in a fixed point font at 80 columns, with tabs every 4 spaces.

*/


/* ========================================================================== */


/*

An IKIconObject has a graphical representation that the user can select, edit, and drag around the workspace.  This file defines the protocol to which such objects adhere.  The protocol is a formal one and should be fully implemented by all classes that adhere to it.

*/

#import <appkit/Pasteboard.h>


/* ========================================================================== */


/*

Here are the protocols.  A class can conform to any of them as long as the query methods are consistent.  For example, a class that conforms to IKSimpleObject should always return NO to isDraggable, isDragAccepting, and isEditable.  The IconKit currently does not check for protocol conformance at run time, though a future version might.

*/

@protocol IKSimpleObject

- (const char *) name;
- image;
- (BOOL) isDraggable;
- (BOOL) isDragAccepting;
- (BOOL) isEditable;

@end


@protocol IKDraggableObject <IKSimpleObject>

- setDraggable: (BOOL) flag;
- copyToPasteboard: (Pasteboard *) pboard;
+ readFromPasteboard: (Pasteboard *) pboard;
+ (NXAtom *) pasteTypes;

@end


@protocol IKDragAcceptingObject <IKSimpleObject>

- setDragAccepting: (BOOL) flag;
- acceptingDragImage;
- setAcceptingDragImage: image;

@end


@protocol IKEditableObject <IKSimpleObject>

- setName: (const char *) name;
- setImage: image;
- setEditable: (BOOL) flag;

@end


@protocol IKIconObject <
				IKDraggableObject,
				IKDragAcceptingObject,
				IKEditableObject
			>
@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.