File: DragDropMatrix.h

package info (click to toggle)
gnustep-addresses 0.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,912 kB
  • sloc: objc: 11,572; makefile: 35
file content (54 lines) | stat: -rw-r--r-- 1,421 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* This is -*- ObjC -*-)

   DragDropMatrix.h   
   \author: Bjrn Giesler <giesler@ira.uka.de>
   
   A Matrix that allows drag and drop between its cells
   
   $Author: buzzdee $
   $Locker:  $
   $Revision: 1.2 $
   $Date: 2013/02/11 10:08:40 $
 */

#ifndef DRAGDROPMATRIX_H
#define DRAGDROPMATRIX_H

/* system includes */
/* (none) */

/* my includes */
/* (none) */

@interface DragDropMatrix: NSMatrix
{
  NSBrowserCell *oldCell, *curCell;
  NSRect oldFrame;
  NSInteger groupRow;

  BOOL _didDrag;
  SEL _shouldSel, _didSel;
}
- (BOOL) acceptsFirstMouse: (NSEvent *) event;
- (void) copyToPasteboard: (NSPasteboard *) pb;
- (void) mouseDown: (NSEvent *) event;
- (void) mouseDragged: (NSEvent *) event;
- (NSDragOperation) draggingSourceOperationMaskForLocal: (BOOL) local;
- (void) draggingExited:  (id<NSDraggingInfo>) sender;
- (NSDragOperation) draggingUpdated: (id<NSDraggingInfo>) sender;
- (BOOL) prepareForDragOperation: (id<NSDraggingInfo>) sender;
- (BOOL) performDragOperation: (id<NSDraggingInfo>) sender;

- (NSImage*) draggingImage;
@end

@interface NSObject (DragDropMatrixDelegate)
- (NSDragOperation) dragDropMatrix: (DragDropMatrix*) matrix
	shouldAcceptDropFromSender: (id<NSDraggingInfo>) sender
			    onCell: (NSCell*) cell;
- (BOOL) dragDropMatrix: (DragDropMatrix*) matrix
didAcceptDropFromSender: (id<NSDraggingInfo>) sender
		 onCell: (NSCell*) cell;
@end

#endif /* DRAGDROPMATRIX_H */