#import <UIKit/UIKit.h>
#import "TuneParser.h"

@class Tune;
@class TuneViewController;

@interface EditABCController : UIViewController <UITextViewDelegate
#if TARGET_IPAD
  , UIActionSheetDelegate, TuneParserDelegate
#endif
  >
{
  BOOL changed;
  IBOutlet UITextView *textView;
  CGRect savedFrame;
#if TARGET_IPAD
  Tune *editTune;
  Tune *tune;
  IBOutlet TuneViewController* tuneViewController;
  int numTunes;
  NSMutableArray *parsedTunes;
  UIActionSheet *multipleTunesSheet;

  IBOutlet UIView* accessoryView;
#endif
}

@property(readwrite) BOOL changed;
#if TARGET_IPAD
@property(retain) Tune* editTune;
@property(retain) TuneViewController* tuneViewController;
#endif

-(id)initWithTitle:(NSString*)title frame:(CGRect)frame;

- (void)textViewDidChange:(UITextView *)textView;

-(void)setText:(NSString*)text;
-(NSString *)text;

- (void)textViewDidChange:(UITextView *)textView;

#if TARGET_IPAD
- (void)layoutViews:(UIInterfaceOrientation)orientation;
- (IBAction)previewPressed:(id)sender;
- (IBAction)cancelPressed:(id)sender;
- (IBAction)donePressed:(id)sender;
#endif

@end
