[Clickdrag-cvs] ClickDrag ClickDrag.h,1.2,1.3 ClickDragWindow.h,1.1,1.2
Status: Pre-Alpha
Brought to you by:
stevecheckoway
|
From: Steve C. <ste...@us...> - 2004-08-31 08:18:44
|
Update of /cvsroot/clickdrag/ClickDrag In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3672 Modified Files: ClickDrag.h ClickDragWindow.h Log Message: Make ivars private and add HeaderDoc comments Index: ClickDragWindow.h =================================================================== RCS file: /cvsroot/clickdrag/ClickDrag/ClickDragWindow.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ClickDragWindow.h 15 Jun 2004 12:12:43 -0000 1.1 +++ ClickDragWindow.h 31 Aug 2004 08:18:21 -0000 1.2 @@ -1,6 +1,23 @@ #import <Cocoa/Cocoa.h> +/*! + @header ClickDragWindow + @abstract Defines a replacement class for NSWindow. +*/ +/*! + @class + @abstract Replacement class for NSWindow + @discussion This class behaves exactly like NSWindow except it processes + all events by checking if the even should be handled by ClickDrag. +*/ @interface ClickDragWindow : NSWindow { } +/*! + @method + @abstract Process the event. + @discussion Check if ClickDrag should handle the event. If it cannot, then + handle it in the manner of NSWindow. +*/ +- (void) sendEvent:(NSEvent *)event; @end /* * Copyright (c) 2004 Steve Checkoway Index: ClickDrag.h =================================================================== RCS file: /cvsroot/clickdrag/ClickDrag/ClickDrag.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- ClickDrag.h 15 Jun 2004 12:12:44 -0000 1.2 +++ ClickDrag.h 31 Aug 2004 08:18:21 -0000 1.3 @@ -1,15 +1,56 @@ #import <Cocoa/Cocoa.h> +/*! + @header ClickDrag + @abstract Defines the main class in the ClickDrag bundle. + @discussion ClickDrag is the main class that performs all the dragging and + resizing of windows via option-clicking. +*/ +/*! + @class ClickDrag + @abstract Controls the dragging and resizing behavior of windows. + @discussion The ClickDrag singleton class handles all the dragging and + resizing of windows via option-clicking. +*/ @interface ClickDrag : NSObject { + @private; BOOL mDragging; BOOL mResizing; BOOL mFromBottom, mFromTop, mFromRight, mFromLeft; int mX, mY; } +/*! + @method + @abstract Called when the bundle is loaded. + @discussion This method creates the one ClickDrag object. +*/ ++ (void) load; + +/*! + @method + @abstract Initializes the instance. + @discussion Initializes and returns the instance to the caller. +*/ +- (id) init; + +/*! + @method + @abstract The method that does all of the work. + @discussion This method examines the event and the window to determine + if dragging or resizing is called for. If this method handles the event + then it returns YES, otherwise it returns NO and the calling code should + process the event as it sees fit. +*/ - (BOOL) handleEvent:(NSEvent *)event forWindow:(NSWindow *)window; @end +/*! + @var gClickDrag + @abstract The one global instance of ClickDrag. + @discussion Since only one window at a time can be dragged, this is the + only instance that is needed. It is created when the bundle is loaded. +*/ extern ClickDrag *gClickDrag; /* |