/*

File Crossword.h

A crossword is a matrix of squares.  The user can adjust the squares that are empty and filled using the mouse.  When resized, a crossword automatically adjusts the number of squares in the frame to match.  It is possible to extract the words from a crossword with the -getWords method.

*/

#import <appkit/Matrix.h>

#import "CrosswordSquare.h"


/* 行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行  */


#define DEFAULTSQUAREWIDTH		19
#define INTERCELLWIDTH			1


/* 行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行  */


@interface Crossword:Matrix
{
	float		squareWidth;
	id			inspector;
	BOOL		fill;
	BOOL		numbered;
}

- (float) getSquareWidth;
- (BOOL) getFill;
- (BOOL) getNumbered;
- getInspector;
- setInspector: (id) theInspector;
- initFrame: (NXRect *) frameRect;
- initFrame: (NXRect *) frameRect  squareWidth: (float) squareSize;
- write: (NXTypedStream *) stream;
- read: (NXTypedStream *) stream;
- superviewSizeChanged: (NXSize *) old;
- changeFont: sender;
- print: sender;
- mouseDown: (NXEvent *) event;
- (BOOL) acceptsFirstMouse;
- clear: (squareColor) color;
- putLetter: (char) letter  inSquare: (id) square;
- number;
- unnumber;
- getWords;

@end


/* 行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行行  */


@interface anInspector:Object
{
}

- update: sender;

@end