This is DragView.h in view mode; [Download] [Up]
//======================================================================
//
// Portions written by FreemanSoft Inc.
//
// FreemanSoft disclaims any warranty of any kind, expressed or implied,
// as to this source code's fitness for any particular use.
//
// For more information, use the following electronic mail addresses:
//
// info@FreemanSoft.com general questions
// support@FreemanSoft.com technical questions
//
//======================================================================
/*
* DragView
* Written by
* Joe Freeman jfreeman@next.com
*
* This code has no warranty.
* It is provided so that the consumer may maintain and modify it
* at their own risk. Use this code at your own risk.
*/
#import <appkit/View.h>
@interface DragView:View
{
id delegate;
NXImage *proposedImage; /* holds the proposed icon */
NXImage *currentImage; /* holds the current icon */
/* just for fun, record number of times */
int exit_count; /* the user dragged stuff in and out. */
}
- setDelegate:anObject;
/*========================================================================
* notifies workspace to slide browser to that points
*========================================================================*/
- mouseDown:(NXEvent *)theEvent;
/*========================================================================
*
*========================================================================*/
- (NXDragOperation) draggingEntered:sender;
- draggingExited:(id <NXDraggingInfo>)sender;
- (BOOL)prepareForDragOperation:(id <NXDraggingInfo>)sender;
/*========================================================================
* so someone can programaticly tell to grab an icon for a specific file
*========================================================================*/
- useIconForFile:(char *)aFullFilePath;
/*========================================================================
*
* we suppor the notion of a current image and a proposed
* that way we can flash a new icon but still get back to the
* old when if the operation fails (user drags out or wrong type file)
*
*========================================================================*/
/* does not free previous proposed */
- proposedImage:theImage; /* make passed in icon, the proposed icon */
/* frees old current NXImage */
- currentImage:theImage ; /* make passed in icon, the current icon */
- (NXImage *)currentImage;
- abortProposedImage:sender; /* proposed icon not accepted use current */
- acceptProposedImage:sender; /* make the proposed icon the currentImage */
- clearCurrentImage:sender; /* we don't want an icon any more */
@end
@interface DragViewDelegate:Object
{
}
- iconEntered:where; /* so window title is cute */
- iconBogus:where; /* was determined to be invalid */
- iconLeft:where; /* so window title is cute */
- iconDropped:where; /* so window title is cute */
- (BOOL) isFilePBValid:(Pasteboard *)aPB forView:sender;
- (BOOL) acceptedFilePB:(Pasteboard *)pboard forView:sender;
- userClicked:(int)numTimes at:(NXPoint *)clickPoint inDragView:sender;
@endThese are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.