ftp.nice.ch/pub/next/developer/resources/classes/MOKit.1.0.0.s.tar.gz#/MOKit_1.0.0/Headers/MOKit/MODocumentWell.h

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

// MODocumentWell.h
//
// by Mike Ferris
// Part of MOKit
// Copyright 1993, all rights reserved.


// ABOUT MOKit
// by Mike Ferris (mike@lorax.com)
//
// MOKit is a collection of useful and general objects.  Permission is 
// granted by the author to use MOKit in your own programs in any way 
// you see fit.  All other rights pertaining to the kit are reserved by the 
// author including the right to sell these objects as objects,  as part 
// of a LIBRARY, or as SOURCE CODE.  In plain English, I wish to retain 
// rights to these objects as objects, but allow the use of the objects 
// as pieces in a fully functional program.  Permission is also granted to 
// redistribute the source code of MOKit for FREE as long as this copyright 
// notice is left intact and unchanged.  NO WARRANTY is expressed or implied.  
// The author will under no circumstances be held responsible for ANY 
// consequences from the use of these objects.  Since you don't have to pay 
// for them, and full source is provided, I think this is perfectly fair.

// ABOUT MODocumentWell
//
// A MODocumentWell accepts dragged file icons and can drag out or launch
// documents by dragging or double clicking.  Delegate is queried about
// certain aspects of behavior if there is one.

#import <appkit/appkit.h>
#import <appkit/drag.h>
#import "MOKit/MOPathString.h"

@interface MODocumentWell:View
{
	List *pathList;
	NXImage *icon;
	id delegate;
	BOOL enabled;
	BOOL isDragDestination;
	BOOL isDragSource;
	BOOL opensFiles;
	BOOL bordered;
	BOOL acceptsFans;
	
	NXImage *ghostHighlight;
	
	BOOL isReceiving;
	char *dragPath;
	NXImage *dragImage;
	NXImage *ghostImage;
	
	BOOL isDragging;
	
	MOString *tempString;
}

+ initialize;

- initFrame:(const NXRect *)frm;
- free;

- copyFromZone:(NXZone *)zone;

- drawSelf:(const NXRect *)rects :(int)rectCount;
- mouseDown:(NXEvent *)theEvent;

- openDocument:sender;

- (BOOL)setPath:(const char *)path andIcon:(NXImage *)theIcon;
- (const char *)path;

- icon;

- setDelegate:anObject;
- delegate;

- setEnabled:(BOOL)flag;
- (BOOL)isEnabled;

- setIsDragDestination:(BOOL)flag;
- (BOOL)isDragDestination;

- setIsDragSource:(BOOL)flag;
- (BOOL)isDragSource;

- setDoesOpenFiles:(BOOL)flag;
- (BOOL)doesOpenFiles;

- setBordered:(BOOL)flag;
- (BOOL)isBordered;

- setAcceptsFans:(BOOL)flag;
- (BOOL)acceptsFans;

// dragging destination informal protocol

- (NXDragOperation)draggingEntered:(id <NXDraggingInfo>)sender;
//- (NXDragOperation)draggingUpdated:(id <NXDraggingInfo>)sender;
- draggingExited:(id <NXDraggingInfo>)sender;
- (BOOL)prepareForDragOperation:(id <NXDraggingInfo>)sender;
- (BOOL)performDragOperation:(id <NXDraggingInfo>)sender;
- concludeDragOperation:(id <NXDraggingInfo>)sender;

// dragging source informal protocol

//- draggedImage:(NXImage *)image beganAt:(NXPoint *)screenPoint;
//- draggedImage:(NXImage *)image endedAt:(NXPoint *)screenPoint 
//			deposited:(BOOL)didDeposit;
- (NXDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal;

// internally used methods

- getFilenameFromPboard:pb;
- getOrigin:(NXPoint *)toPoint forImage:(NXImage *)image;

// archiving

- awake;
- read:(NXTypedStream *)stream;
- write:(NXTypedStream *)stream;

@end

@interface Object(MODocumentWellDelegate)

- (BOOL)docWell:(MODocumentWell *)sender 
			isValidDocument:(const char *)pathString;

- (BOOL)docWell:(MODocumentWell *)sender 
			willAcceptDocument:(const char *)pathString;
- docWellDidAcceptDocument:(MODocumentWell *)sender;

- (BOOL)docWellWillOpenDocument:(MODocumentWell *)sender;
- docWellDidOpenDocument:(MODocumentWell *)sender;

@end

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