//
//  logo.h
//  LOGOSX
//  Simple Logo Writer program for osx
//  Created by Micah Acinapura on Fri May 23 2003.
//  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
//

#import <AppKit/AppKit.h>
#import "logosxBezelDisplay.h"

@interface logo : NSView 
{
	NSRect turtle;  //currently is a box, later will be a graphic (hopefully)
	NSImage *turtlePic;// picture of the turtle
	NSColor *line_color; //turtle poo color
	NSColor *turtle_color;  //color of turtle
	NSColor *background;  //background color
	NSMutableArray *legnths;	//for stored commands
	NSMutableArray *turns;		//dido
	NSMutableArray *pen_states;//likewise
	BOOL pen_down;  //current pen state
	BOOL noBackground; //true if you dont want a background color
	BOOL noTurtle; // true if you dont want to see the turtle
	BOOL colorBeenSet; //true if user has chosen any colors (so that they stay when the color is cleared)
	int angle;  //current angle
	int legnth; //current lenght
	int step;   //current step in trail
	unsigned int level; //current level of recursion in for [F50]4 in commands
	NSBezierPath *turtlePoo;
	logosxBezelDisplay *bezel;
}

// Standard view create/free methods
- (id)initWithFrame:(NSRect)frame;
- (void)dealloc;

//overloaders
- (void)drawRect:(NSRect)rect;
//- (void)mouseUp:(NSEvent *)event;

//consant member functions
- (int)get_step;

//these ought to be in the controller class, but since they work here i'll leave then in this class
//modification member functions
- (void)set_width:(id)sender;
- (void)set_legnth:(id)sender;
- (void)set_angle:(id)sender;
- (void)flip_pen:(id)sender;
- (void)flipBackground:(id)sender; //sorry about the swichting of naming conventions but before i had forgot to use the objective-c standard
- (void)flipTurtle:(id)sender;//i figured i should start using it now though. :)
- (void)change_back_color:(id)sender;
- (void)change_line_color:(id)sender;
-(BOOL)checkCommand:(NSString *)command;
-(void)showBezel;
//internal functions
- (void)forward:(id)sender; //does the drawing
- (NSString *)reconstruct; //for undo and executeCommand methods
- (NSString *)executeCommand:(NSString *)command; //parses the string and populates arrays with commands then calls reconstruct 

@end

