CsoundVstFltk.hpp

Go to the documentation of this file.
00001 /*
00002  * C S O U N D   V S T
00003  *
00004  * A VST plugin version of Csound, with Python scripting.
00005  *
00006  * L I C E N S E
00007  *
00008  * This software is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2.1 of the License, or (at your option) any later version.
00012  *
00013  * This software is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this software; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  */
00022 #ifndef CSOUNDVSTFLTK_H
00023 #define CSOUNDVSTFLTK_H
00024 
00025 class CsoundVstFltk;
00026 
00027 #include "public.sdk/source/vst2.x/aeffeditor.h"
00028 #include <FL/Fl_Help_View.H>
00029 #include <FL/Fl_Pack.H>
00030 #include <FL/Fl_Tabs.H>
00031 #include <FL/Fl_Input.H>
00032 #include <FL/Fl_Preferences.H>
00033 #include <FL/Fl_Browser.H>
00034 #include <FL/Fl_Text_Editor.H>
00035 #include <FL/Fl_Text_Display.H>
00036 #include <FL/Fl_Text_Buffer.H>
00037 #include <FL/Fl_Button.H>
00038 #include <FL/Fl_Check_Button.H>
00039 #include <FL/Fl_Group.H>
00040 #include <list>
00041 #undef KeyPress
00042 #include "CsoundVST.hpp"
00043 #include "CsoundVstUi.h"
00044 
00045 #if defined(WIN32)
00046 
00047 extern HINSTANCE hInstance;
00048 
00049 #endif
00050 
00051 class SILENCE_PUBLIC WaitCursor
00052 {
00053   void *cursor;
00054 public:
00055   WaitCursor();
00056   virtual ~WaitCursor();
00057 };
00058 
00059 class CsoundVstFltk :
00060   public AEffEditor
00061 {
00062 public:
00063   typedef enum {
00064     kEditorWidth = 708,
00065     kEditorHeight = 389,
00066     xPad = 4,
00067     yPad = 4
00068   } AEffEditorSize;
00069   static std::string aboutText;
00070   static Fl_Preferences preferences;
00071   CsoundVST *csoundVST;
00072   void *windowHandle;
00073   Fl_Window *csoundVstUi;
00074   int useCount;
00075   bool updateFlag;
00076   Fl_Tabs *mainTabs;
00077   Fl_Input *commandInput;
00078   Fl_Browser *runtimeMessagesBrowser;
00079   Fl_Text_Editor *orchestraTextEdit;
00080   Fl_Text_Buffer *orchestraTextBuffer;
00081   Fl_Text_Editor *scoreTextEdit;
00082   Fl_Text_Buffer *scoreTextBuffer;
00083   Fl_Input *settingsEditSoundfileInput;
00084   Fl_Check_Button* settingsVstPluginModeEffect;
00085   Fl_Check_Button* settingsVstPluginModeInstrument;
00086   Fl_Text_Buffer *aboutTextBuffer;
00087   Fl_Text_Display *aboutTextDisplay;
00088   Fl_Group *orchestraGroup;
00089   Fl_Group *scoreGroup;
00090   std::list<std::string> messages;
00091   std::string helpFilename;
00092   std::string messagebuffer;
00093   static void messageCallback(CSOUND *csound, int attribute, const char *format, va_list valist);
00094   CsoundVstFltk(AudioEffect *audioEffect);
00095   virtual ~CsoundVstFltk(void);
00096   virtual void updateCaption();
00097   virtual void updateModel();
00098   //    AEffEditor overrides.
00099   virtual bool getRect(ERect **rect);
00100   virtual bool open(void *windowHandle);
00101   virtual void close();
00102   virtual void idle();
00103   virtual void update();
00104   virtual void postUpdate();
00105   void onPerformScriptButtonThreadRoutine();
00106   // FLTK event handlers.
00107   void onNew(Fl_Button*, CsoundVstFltk* csoundVstFltk);
00108   void onNewVersion(Fl_Button*, CsoundVstFltk* csoundVstFltk);
00109   void onOpen(Fl_Button*, CsoundVstFltk* csoundVstFltk);
00110   void onImport(Fl_Button*, CsoundVstFltk* csoundVstFltk);
00111   void onSave(Fl_Button*, CsoundVstFltk* csoundVstFltk);
00112   void onSaveAs(Fl_Button*, CsoundVstFltk* csoundVstFltk);
00113   void onPerform(Fl_Button*, CsoundVstFltk* csoundVstFltk);
00114   void onStop(Fl_Button*, CsoundVstFltk* csoundVstFltk);
00115   void onEdit(Fl_Button*, CsoundVstFltk* csoundVstFltk);
00116   void onSettingsVstPluginMode(Fl_Check_Button*, CsoundVstFltk* csoundVstFltk);
00117   void onSettingsVstInstrumentMode(Fl_Check_Button*, CsoundVstFltk* csoundVstFltk);
00118   void onSettingsApply(Fl_Button*, CsoundVstFltk* csoundVstFltk);
00119 };
00120 
00121 #endif
00122 

Generated on Tue Apr 14 11:00:49 2009 for Csound and CsoundAC by  doxygen 1.5.8