view Source/GUI.h @ 13:989865d55c73 tip

Commit.
author martinm_home <martin.morrell@eecs.qmul.ac.uk>
date Thu, 27 Sep 2012 23:30:29 +0100
parents 87dc3d84c120
children
line wrap: on
line source
//-----------------------------------------------------------------------------
// VSTGUI: Graphical User Interface Framework for VST plugins : 
//
// Version 3.5
//
//-----------------------------------------------------------------------------
// VSTGUI LICENSE
// © 2008, Steinberg Media Technologies, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
// 
//   * Redistributions of source code must retain the above copyright notice, 
//     this list of conditions and the following disclaimer.
//   * Redistributions in binary form must reproduce the above copyright notice,
//     this list of conditions and the following disclaimer in the documentation 
//     and/or other materials provided with the distribution.
//   * Neither the name of the Steinberg Media Technologies nor the names of its
//     contributors may be used to endorse or promote products derived from this 
//     software without specific prior written permission.
// 
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A  PARTICULAR PURPOSE ARE DISCLAIMED. 
// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
// OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE  OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------

#ifndef __MyEditor__
#define __MyEditor__

#define IMAGE 281

#define cSep 12
#define tDepth 15
#define tDepthLarge 20
#define dOffset 3
#define kOffset (1*dOffset + tDepth + tDepthLarge)
#define lOffset kOffset-(1*dOffset + tDepth)
#define tOffset kOffset-(1*dOffset + tDepth + tDepthLarge)
#define pOffset kOffset+(64+dOffset)


#include "aeffguieditor.h"
#include <vstgui.h>
#include "ClassicAmbiDec.h"
#include "ClassicAmbiDecParameters.h"
#include "MyPlot.h"






class MyEditor :  public AEffGUIEditor, public CControlListener
{    	
public:
	MyEditor (void*);
	
	// from AEffGUIEditor
	bool    open (void* ptr);
	void    close ();
	void    setParameter (VstInt32 index, float value);
    void    setParameterAutomated();
    void    getParameterDisplay (VstInt32 index, char *text);

	// from CControlListener
	void valueChanged (CControl* pControl);

    

	CControl*           controls[kNumParameters];
    char                displayText;
    

    
    
    // own function
	void    transformsDisplay(CFrame* newFrame);
	void    zoomDisplay(CFrame* newFrame);
    void    plotDisplay(CFrame* newFrame);
    void    settingsDisplay(CFrame* newFrame);
    void    nameDisplay(CFrame* newFrame);
    void    modeChange();
    void    stereoDisplay();
    void    twooneDisplay();
    void    fourDisplay();
    void    fiveDisplay();
    void    fiveoneDisplay();
    void    hellerDisplay();
    void    clearStereo();
    void    clearTwoOne();
    void    clearFour();
    void    clearFive();
    void    clearFiveOne();
    void    clearHeller();
    void    suspendDisplay();
    void    resumeDisplay();
	
    
private:

    
protected:
	//Parameters
	CAnimKnob			*knobRotate;
	CAnimKnob			*knobTilt;
	CAnimKnob			*knobTumble;
	CHorizontalSwitch	*knobZoomMethod;
	CAnimKnob			*knobZoom;
	CAnimKnob			*knobWidth;
	CAnimKnob			*knobPattern;
	CHorizontalSwitch	*knobMode;
	CAnimKnob			*knobRearVerb;
	CAnimKnob			*knobHiVerb;
    CAnimKnob			*knobCentrePattern;
    CAnimKnob			*knobCentreGain;
    CAnimKnob			*knobSubGain;
    CAnimKnob			*knobFc;
    CHorizontalSwitch	*knobSurroundMode;
    CAnimKnob			*knobSurroundPattern;
    CAnimKnob			*knobSurroundWidth;
    CAnimKnob			*knobSurroundGain;
    CHorizontalSwitch	*knobDecoder;
    CHorizontalSwitch	*knobChannel;
    
    //Main Controls Section Background
    CView               *control_view;
    CView               *control_view2;
    
    //Controls Text Labels
    CTextLabel          *labelMode;
    CTextLabel          *labelWidth;
    CTextLabel          *labelPattern;
    CTextLabel          *labelRearVerb;
    CTextLabel          *labelHiVerb;
    CTextLabel          *labelSurMode;
    CTextLabel          *labelSurWidth;
    CTextLabel          *labelSurPattern;
    CTextLabel          *labelSurGain;
    CTextLabel          *labelCtrPattern;
    CTextLabel          *labelCtreGain;
    CTextLabel          *labelSubGain;
    CTextLabel          *labelFc;
    
    //Controls Parameters
    CTextLabel          *paramMode;
    CTextLabel          *paramWidth;
    CTextLabel          *paramPattern;
    CTextLabel          *paramRotate;
    CTextLabel          *paramTilt;
	CTextLabel          *paramTumble;
	CTextLabel          *paramZoom;
	CTextLabel          *paramZoomMethod;
	CTextLabel          *paramRearVerb;
	CTextLabel          *paramHiVerb;
    CTextLabel          *paramSurMode;
    CTextLabel          *paramSurWidth;
    CTextLabel          *paramSurPattern;
    CTextLabel          *paramSurGain;
    CTextLabel          *paramCtrPattern;
    CTextLabel          *paramCtrGain;
    CTextLabel          *paramSubGain;
    CTextLabel          *paramFc;
    CTextLabel          *paramDecoder;
    CTextLabel          *paramChannel;
    
    
    //Main Controls Section Text
    CTextLabel          *decoderLabel1;
    
    //Polar Plot
    polarPlot*          myPlot;

    
    
    CRect frameSize;
	CRect DisplaySize;
	CRect LabelSize;
	CRect r;
	
	CColor kDisplayText;
	CColor kDisplayBackground;
	CColor kLabelText;
	CColor kBlank;
	
	
	CBitmap* knob_360;
	CBitmap* knob_red;
	CBitmap* knob_blue;
	CBitmap* knob_red_blue;
    CBitmap* knob_blue_red;
	CBitmap* knob_mode2;
    CBitmap* knob_mode2b;
	CBitmap* knob_mode4;
    CBitmap* knob_mode5;
	
    CBitmap *bTransforms;
    CBitmap *bZoom;
    CBitmap *bControls;
    CBitmap *bControls2;
    CBitmap *bName;
    CBitmap *bPlot;
    CBitmap *bSettings;
    
    CTextLabel* suspend;
    CTextLabel* heller1;
    CTextLabel* heller2;
};





#endif // __MyEditor__