/* SonogramView */

#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h>

#import "AUSonogramViewController.h"
#import "SonogramViewDemo.h"

#include "SonogramRingBuffer.h"

@interface AUSonogramView : NSView
{
	IBOutlet NSColorWell				*myBackgroundWell; 
	IBOutlet NSColorWell				*myLineWell;
	
	IBOutlet NSMatrix					*myDistortionButton;
	
	IBOutlet NSButton					*myHoldButton;
	
	NSColor								*backgroundColor;
	NSColor								*lineColor;
					
	Float32								*colormap; 
	UInt32								colormapSize;
			
	SonogramRingBuffer					*mRingBuffer;	
	SInt64								mRingBufferCounter;
		
	UInt32								mNumBins;
	UInt32								mNumSlices;
	
	UInt32								mCapacitySlices;
	
	SInt64								mRenderCounter;
	
	CABufferList*						mFetchingBufferList;
	CABufferList*						mStoringBufferList;
	
	bool								storing;
		
}

- (bool) storing;

#pragma mark INTERFACE ACTIONS
- (IBAction) changeBackgroundColor: (id) sender;
- (IBAction) changeLineColor: (id) sender;
- (IBAction) changeDistortion: (id) sender;

#pragma mark EVENTS

- (void) storeSlices: (SonogramOverview) data;

@end
