Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Sources/MSDrag.h
// SVDrag.c |
// |
// Original version by Jon Lansdell and Nigel Humphreys. |
// 4.0 and 3.1 updates by Greg Sutton. |
// Drag Manager support by Chris White |
// ©Apple Computer Inc 1996, all rights reserved. |
#pragma once |
#include <Types.h> |
#include <Drag.h> |
#include "MSGlobals.h" |
pascal OSErr MyTrackingHandler ( DragTrackingMessage theMessage, WindowPtr theWindow, |
void* handlerRefCon, DragReference theDrag ); |
pascal OSErr MyReceiveHandler ( WindowPtr theWindow, void* handlerRefCon, |
DragReference theDrag ); |
OSErr InitDragHandlers ( void ); |
OSErr InstallDragHandlers ( WindowPtr theWindow ); |
void RemoveDragHandlers ( WindowPtr theWindow ); |
Boolean IsDragInWindowContent ( DragReference theDrag, WindowRef theWindow ); |
Boolean PtInWindow ( Point localPt, WindowRef theWindow ); |
Boolean PtInDocument ( Point localPt, DPtr theDocument ); |
Boolean IsMouseInContentRgn ( DragReference theDrag, WindowPtr theWindow ); |
Boolean CanAcceptDragItems ( DragReference theDrag, WindowPtr theWindow ); |
OSErr GetSelectedText ( DPtr theDocument, Ptr dataPtr, short* dataSize ); |
void GetSelectedTextRgn ( DPtr theDocument, RgnHandle dataRgn ); |
Boolean IsMoving ( DragReference theDrag ); |
void OutlineRegion ( RgnHandle theRgn ); |
OSErr DoWindowContentDrag ( WindowPtr theWindow, EventRecord* theEvent ); |
static Boolean DragIsNotInSourceWindow ( DragReference theDrag ); |
Boolean UserWantsToDrag ( WindowRef theWindow, Point globalPt ); |
Boolean PointInWindowSelection ( Point localPt, WindowRef theWindow ); |
static Boolean IsDragMoving ( DragReference theDrag ); |
static Boolean IsDragWithOptionKey ( DragReference theDrag ); |
void LocalRgnToGlobalRgn ( RgnHandle theRgn, WindowRef theWindow ); |
void LocalRectToGlobalRect ( Rect* theRect, WindowRef theWindow ); |
short HitTest(Point theLoc, DPtr* theDoc); |
void DrawCaret(short offset, TEHandle theTE); |
char GetCharAtOffset(short offset, TEHandle theTE); |
Boolean WhiteSpace(char theChar); |
Boolean WhiteSpaceAtOffset(short offset, TEHandle theTE); |
void InsertTextAtOffset(short offset, char *theBuf, long size, StScrpHandle theStyl, TEHandle theTE); |
Boolean IsOffsetInSelection ( short theOffset, TEHandle theTE ); |
short TEIsFrontOfLine ( short offset, TEHandle theTE ); |
short TEGetLine ( short offset, TEHandle theTE ); |
void DeleteTextSelection ( TEHandle theTE, short* theInsertPosition ); |
Boolean DropLocationIsFinderTrash ( AEDesc* dropLocation ); |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14