//-------------------------------------------------------------------------------------------------------
// VST Plug-Ins SDK
// Version 2.4		$Date: 2006/11/13 09:08:28 $
//
// Category     : VST 2.x SDK Samples
// Filename     : Editor.h
// Created by   : Steinberg Media Technologies
// Description  : Simple Surround Delay plugin with Editor using VSTGUI
//
// © 2006, Steinberg Media Technologies, All Rights Reserved
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
// Date: 2008/05/10 
//
// Category     : VST 2.x SDK Samples
// Filename     : my_editor.h
// Created by   : David Henzl
// Description  : GUI Editor for AWtm(Echo Hiding) (Mono->Stereo)
//-------------------------------------------------------------------------------------------------------

#ifndef __my_editor__
#define __my_editor__


// include VSTGUI
#ifndef __vstgui__
#include "../vstgui/vstgui.h"
#endif
//Zobrazení kepstrální oblasti
#ifndef __waveform__
#include "../editor/waveform.h"
#endif
#ifndef __AEcho_Hiding_Wtm__
#include "../source/echo_hiding_wtm.h"
#endif
//-----------------------------------------------------------------------------

class Editor : public AEffGUIEditor, public CControlListener
{
public:
	Editor (AudioEffect *effect,int pSizeWaveDisp, char* Wtm);
	virtual ~Editor ();

public:
	virtual bool open (void* ptr);
	virtual void close ();
	virtual void setParameter (VstInt32 index, float value);
	virtual void valueChanged (CDrawContext* context, CControl* control);
	//virtual void setSignalWin (CDrawContext* context, CControl* control);
	virtual char* getwatermark(void);
private:
	// Controls
	COnOffButton*	 button1;
	COnOffButton*	 button2;
	CAnimKnob*	Delay0Val;
	CAnimKnob*	Delay1Val;
	CAnimKnob*	AlfaVal;
	CParamDisplay* Delay0Display;
	CParamDisplay* Delay1Display;
	CParamDisplay* AlfaDisplay;
	CParamDisplay* VSTBlokDisplay;

	CWaveform*	WaveDisplay;
	//Text
	CTextEdit* Delay0Txt;
	CTextEdit* Delay1Txt;
	CTextEdit* AlfaTxt;
	CTextEdit* VSTBlokTxt;
	CTextEdit* WatermarkTxt;
	CTextEdit* Watermark2Txt;
	CTextEdit* ModeTxt;
	CTextEdit* BlocksizeinfoTxt;
	CTextEdit* InsertingTxt;
	CTextEdit* DecodingTxt;
	CTextEdit* InsertWtmTxt;
	CTextEdit* DecodedWtmTxt;

	const char* Delay0;
	const char* Delay1;
	const char* Alfa;
	const char* VSTblok;
	const char* Watermark;
	const char* Watermark2;
	const char* Mode;
	const char* Inserting;
	const char* Decoding;
	const char* InsertWtm;
	const char* DecodedWtm;
	const char* WtmInfo;
	char Info[4];
	char ReceivedString[10];
	int Wtmblok;
	int CharCounter;

	float* buffer;
	int Wavesize;
	int _index;
	int Wtmlength;
	char* Wtm2Insert;

	// Bitmap
	CBitmap* hBackground;
	CDrawContext* my_context;


};

#endif