1 /* MoveMatrix.h 2 * 3 * Copyright (C) 1993-2002 by vhf interservice GmbH 4 * Author: T+T Hennerich, Georg Fleischmann 5 * 6 * Created: 1993-05-17 7 * Modified: 2002-07-01 8 * 9 * This program is free software; you can redistribute it and/or 10 * modify it under the terms of the vhf Public License as 11 * published by vhf interservice GmbH. Among other things, the 12 * License requires that the copyright notices and this notice 13 * be preserved on all copies. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 * See the vhf Public License for more details. 19 * 20 * You should have received a copy of the vhf Public License along 21 * with this program; see the file LICENSE. If not, write to vhf. 22 * 23 * vhf interservice GmbH, Im Marxle 3, 72119 Altingen, Germany 24 * eMail: info@vhf.de 25 * http://www.vhf.de 26 */ 27 28 #ifndef VHF_H_MOVEMATRIX 29 #define VHF_H_MOVEMATRIX 30 31 @interface MoveMatrix: NSMatrix 32 { 33 NSImage *matrixCache; 34 NSImage *cellCache; 35 id activeCell; // Cell currently move using the Control key 36 37 id delegate; 38 } 39 40 - (id)initCellClass:aCellClass; 41 - (void)calcCellSize; 42 43 - (NSCell*)makeCellAtRow:(int)row column:(int)col; 44 45 - (void)mouseDown:(NSEvent *)theEvent; 46 - (void)shuffleCell:(int)row to:(int)newRow; 47 - (void)drawRect:(NSRect)rect; 48 49 - (void)setupCache; 50 - (NSImage*)sizeCache:(NSImage*)cacheWindow to:(NSSize)windowSize; 51 52 - (void)setDelegate:(id)anObject; 53 - (id)delegate; 54 55 - (void)dealloc; 56 57 @end 58 59 60 @interface PossibleDelegate: NSObject 61 {} 62 63 - (void)matrixDidShuffleCellFrom:(int)row to:(int)newRow; 64 65 @end 66 67 #endif // VHF_H_MOVEMATRIX 68