Main Page | Namespaces | Classes | Compounds | Files | Compound Members | Related AInput.h00001 // 00002 // SYNTOPIA. See http://Syntopia.sourceforge.net for details and documentation. 00003 // 00004 // Author of this file: Mikael Hvidtfeldt Christensen (mikaelc@users.sourceforge.net) 00005 // 00006 00007 #ifndef __AInput 00008 #define __AInput 00009 00010 #include <windows.h> 00011 #include <string> 00012 #include "WinForm.h" 00013 #include "GUIControl.h" 00014 00015 using namespace GUIToolkit; 00016 00030 namespace SynthGUI { 00031 00032 class GUIToolkit::WinForm ; // Forward Declaration 00033 00035 00039 class AInput : public Component, public EventHandler { 00040 00041 public: 00042 00045 AInput(std::string s, float min, float max, int steps, bool integral); 00046 00048 ~AInput(); 00049 00051 void PutInWinForm(WinForm * WF, int x0, int x1, int y0, int y1); 00052 00054 void HandleEvents(event ev); 00055 00057 float getValue() ; 00058 00060 void setValue(float f); 00061 00062 private: 00063 std::string myLabel; 00064 float myMax; // max value 00065 float myMin; // min 00066 float myCurrent; // current calue 00067 int mySteps; // number of steps in scrollbar 00068 bool myIntegral; // Only allow integer values? 00069 Label * mLabel; 00070 ComboBox * mDropDown; 00071 ComboBox * mInputMenu; 00072 00073 Label * mLabel2; 00074 ScrollBar * mScrollBar; 00075 TextBox * mTextBox; 00076 ComboBoxItem * mItem1; 00077 ComboBoxItem * mItem2; 00078 ComboBoxItem * mItem3; 00079 ComboBoxItem * mItem4; 00080 ComboBoxItem * mInput1; 00081 ComboBoxItem * mInput2; 00082 ComboBoxItem * mInput3; 00083 ComboBoxItem * mInput4; 00084 00085 }; 00086 00088 class SlideInput : public Component, public EventHandler { 00089 00090 public: 00091 00094 SlideInput(std::string s, float min, float max, int steps, bool integral); 00095 00097 ~SlideInput(); 00098 00100 void PutInWinForm(WinForm * WF, int x0, int x1, int y0, int y1); 00101 00103 void HandleEvents(event ev); 00104 00106 float getValue() ; 00107 00108 private: 00109 std::string myLabel; 00110 float myMax; // max value 00111 float myMin; // min 00112 float myCurrent; // current calue 00113 int mySteps; // number of steps in scrollbar 00114 bool myIntegral; // Only allow integer values? 00115 Label * mLabel; 00116 00117 Label * mLabel2; 00118 ScrollBar * mScrollBar; 00119 TextBox * mTextBox; 00120 }; 00121 00122 }; // end of namespace: SynthGUI 00123 00124 #endif Docs made by Doxygen. Email: Mikael Christensen |