/[svn]/gigedit/trunk/src/paramedit.h
ViewVC logotype

Diff of /gigedit/trunk/src/paramedit.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1223 by schoenebeck, Wed Apr 11 21:36:30 2007 UTC revision 1224 by persson, Sun Jun 10 09:26:36 2007 UTC
# Line 38  public: Line 38  public:
38      Gtk::Label label;      Gtk::Label label;
39      Gtk::Widget& widget;      Gtk::Widget& widget;
40    
41      LabelWidget(char* labelText, Gtk::Widget& widget);      LabelWidget(const char* labelText, Gtk::Widget& widget);
42      void set_sensitive(bool sensitive = true);      void set_sensitive(bool sensitive = true);
43  protected:  protected:
44      Gtk::Tooltips tooltips;      Gtk::Tooltips tooltips;
# Line 51  protected: Line 51  protected:
51      Gtk::SpinButton spinbutton;      Gtk::SpinButton spinbutton;
52      Gtk::HBox box;      Gtk::HBox box;
53  public:  public:
54      NumEntry(char* labelText, double lower = 0, double upper = 127,      NumEntry(const char* labelText, double lower = 0, double upper = 127,
55               int decimals = 0);               int decimals = 0);
56      void set_value(double value) {      void set_value(double value) {
57          spinbutton.set_value(value);          spinbutton.set_value(value);
# Line 76  private: Line 76  private:
76      int32_t* ptr;      int32_t* ptr;
77      double coeff;      double coeff;
78  public:  public:
79      NumEntryGain(char* labelText,      NumEntryGain(const char* labelText,
80                   double lower, double upper, int decimals, double coeff);                   double lower, double upper, int decimals, double coeff);
81      void set_ptr(int32_t* ptr);      void set_ptr(int32_t* ptr);
82  };  };
# Line 87  private: Line 87  private:
87      T* ptr;      T* ptr;
88      void value_changed();      void value_changed();
89  public:  public:
90      NumEntryTemp(char* labelText,      NumEntryTemp(const char* labelText,
91                   double lower = 0, double upper = 127, int decimals = 0);                   double lower = 0, double upper = 127, int decimals = 0);
92      void set_ptr(T* ptr);      void set_ptr(T* ptr);
93  };  };
94    
95  template<typename T>  template<typename T>
96  NumEntryTemp<T>::NumEntryTemp(char* labelText,  NumEntryTemp<T>::NumEntryTemp(const char* labelText,
97                                double lower, double upper, int decimals) :                                double lower, double upper, int decimals) :
98      NumEntry(labelText, lower, upper, decimals)      NumEntry(labelText, lower, upper, decimals)
99  {  {
# Line 120  void NumEntryTemp<T>::set_ptr(T* ptr) Line 120  void NumEntryTemp<T>::set_ptr(T* ptr)
120    
121  class NoteEntry : public NumEntryTemp<uint8_t> {  class NoteEntry : public NumEntryTemp<uint8_t> {
122  public:  public:
123      NoteEntry(char* labelText);      NoteEntry(const char* labelText);
124  private:  private:
125      int on_input(double* new_value);      int on_input(double* new_value);
126      bool on_output();      bool on_output();
# Line 132  private: Line 132  private:
132      uint16_t* ptr;      uint16_t* ptr;
133      void value_changed();      void value_changed();
134  public:  public:
135      NumEntryPermille(char* labelText,      NumEntryPermille(const char* labelText,
136                       double lower = 0, double upper = 127, int decimals = 0);                       double lower = 0, double upper = 127, int decimals = 0);
137      void set_ptr(uint16_t* ptr);      void set_ptr(uint16_t* ptr);
138  };  };
# Line 147  private: Line 147  private:
147      void value_changed();      void value_changed();
148      const T* values;      const T* values;
149  public:  public:
150      ChoiceEntry(char* labelText);      ChoiceEntry(const char* labelText);
151      void set_choices(char** texts, const T* values);      void set_choices(const char** texts, const T* values);
152      void set_ptr(T* ptr);      void set_ptr(T* ptr);
153      int get_active_row_number() { return combobox.get_active_row_number(); }      int get_active_row_number() { return combobox.get_active_row_number(); }
154      Glib::SignalProxy0<void> signal_changed() {      Glib::SignalProxy0<void> signal_changed() {
# Line 160  public: Line 160  public:
160  };  };
161    
162  template<typename T>  template<typename T>
163  ChoiceEntry<T>::ChoiceEntry(char* labelText) :  ChoiceEntry<T>::ChoiceEntry(const char* labelText) :
164      align(0, 0, 0, 0),      align(0, 0, 0, 0),
165      LabelWidget(labelText, align)      LabelWidget(labelText, align)
166  {  {
# Line 170  ChoiceEntry<T>::ChoiceEntry(char* labelT Line 170  ChoiceEntry<T>::ChoiceEntry(char* labelT
170  }  }
171    
172  template<typename T>  template<typename T>
173  void ChoiceEntry<T>::set_choices(char** texts, const T* values)  void ChoiceEntry<T>::set_choices(const char** texts, const T* values)
174  {  {
175      for (int i = 0 ; texts[i] ; i++) {      for (int i = 0 ; texts[i] ; i++) {
176          combobox.append_text(texts[i]);          combobox.append_text(texts[i]);
# Line 211  private: Line 211  private:
211      gig::leverage_ctrl_t* ptr;      gig::leverage_ctrl_t* ptr;
212      void value_changed();      void value_changed();
213  public:  public:
214      ChoiceEntryLeverageCtrl(char* labelText);      ChoiceEntryLeverageCtrl(const char* labelText);
215      void set_ptr(gig::leverage_ctrl_t* ptr);      void set_ptr(gig::leverage_ctrl_t* ptr);
216      int get_active_row_number() { return combobox.get_active_row_number(); }      int get_active_row_number() { return combobox.get_active_row_number(); }
217      Glib::SignalProxy0<void> signal_changed() {      Glib::SignalProxy0<void> signal_changed() {
# Line 226  private: Line 226  private:
226      bool* ptr;      bool* ptr;
227      void value_changed();      void value_changed();
228  public:  public:
229      BoolEntry(char* labelText);      BoolEntry(const char* labelText);
230      bool get_active() { return checkbutton.get_active(); }      bool get_active() { return checkbutton.get_active(); }
231      bool set_active(bool b) { checkbutton.set_active(b); }      bool set_active(bool b) { checkbutton.set_active(b); }
232      Glib::SignalProxy0<void> signal_toggled() {      Glib::SignalProxy0<void> signal_toggled() {
# Line 247  private: Line 247  private:
247      NumEntryGain& eGain;      NumEntryGain& eGain;
248      int32_t plus6value;      int32_t plus6value;
249  public:  public:
250      BoolEntryPlus6(char* labelText, NumEntryGain& eGain, int32_t plus6value);      BoolEntryPlus6(const char* labelText, NumEntryGain& eGain, int32_t plus6value);
251      void set_ptr(int32_t* ptr);      void set_ptr(int32_t* ptr);
252      bool get_active() { return checkbutton.get_active(); }      bool get_active() { return checkbutton.get_active(); }
253      Glib::SignalProxy0<void> signal_toggled() {      Glib::SignalProxy0<void> signal_toggled() {
# Line 261  private: Line 261  private:
261      gig::String* ptr;      gig::String* ptr;
262      void value_changed();      void value_changed();
263  public:  public:
264      StringEntry(char* labelText);      StringEntry(const char* labelText);
265      void set_ptr(gig::String* ptr);      void set_ptr(gig::String* ptr);
266  };  };
267    

Legend:
Removed from v.1223  
changed lines
  Added in v.1224

  ViewVC Help
Powered by ViewVC