1 /* 2 * Copyright (C) 2002 - David W. Durham 3 * 4 * This file is part of ReZound, an audio editing application. 5 * 6 * ReZound is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published 8 * by the Free Software Foundation; either version 2 of the License, 9 * or (at your option) any later version. 10 * 11 * ReZound is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 19 */ 20 21 #ifndef __FXLFOParamValue_H__ 22 #define __FXLFOParamValue_H__ 23 24 #include "../../config/common.h" 25 #include "fox_compat.h" 26 27 #include <string> 28 29 #include "../backend/ALFO.h" 30 31 class CNestedDataFile; 32 class FXConstantParamValue; 33 34 class FXLFOParamValue : public FXVerticalFrame 35 { 36 FXDECLARE(FXLFOParamValue); 37 public: 38 FXLFOParamValue(FXComposite *p,int opts,const char *name,const string ampUnits,const string ampTitle,const double maxAmp,const string freqUnits,const double maxFreq,const bool hideBipolarLFOs); 39 virtual ~FXLFOParamValue(); 40 41 FXint getDefaultWidth(); 42 FXint getDefaultHeight(); 43 void setMinSize(FXint minWidth,FXint minHeight); 44 45 long onLFOTypeChange(FXObject *sender,FXSelector sel,void *ptr); 46 47 const CLFODescription getValue(); 48 49 const string getName() const; 50 51 void enable(); 52 void disable(); 53 54 /* 55 void setTipText(const FXString &text); 56 FXString getTipText() const; 57 */ 58 void readFromFile(const string &prefix,CNestedDataFile *f); 59 void writeToFile(const string &prefix,CNestedDataFile *f); 60 61 enum 62 { 63 ID_LFO_TYPE_COMBOBOX=FXVerticalFrame::ID_LAST, 64 65 ID_LAST 66 }; 67 68 69 protected: FXLFOParamValue()70 FXLFOParamValue() {} 71 72 private: 73 const string name; 74 75 FXLabel *titleLabel; 76 FXHorizontalFrame *sliders; 77 FXConstantParamValue *amplitudeSlider; 78 FXConstantParamValue *frequencySlider; 79 FXConstantParamValue *phaseSlider; 80 FXListBox *LFOTypeComboBox; 81 82 FXFont *textFont; 83 84 FXint minWidth,minHeight; 85 }; 86 87 #endif 88