/[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 1153 by schoenebeck, Mon Apr 9 21:05:01 2007 UTC revision 1156 by schoenebeck, Wed Apr 11 21:36:30 2007 UTC
# Line 65  public: Line 65  public:
65      void set_tip(const Glib::ustring& tip_text) {      void set_tip(const Glib::ustring& tip_text) {
66          tooltips.set_tip(spinbutton, tip_text);          tooltips.set_tip(spinbutton, tip_text);
67      }      }
68        void set_upper(double upper) {
69            adjust.set_upper(upper);
70        }
71  };  };
72    
73  class NumEntryGain : public NumEntry {  class NumEntryGain : public NumEntry {
# Line 110  template<typename T> Line 113  template<typename T>
113  void NumEntryTemp<T>::set_ptr(T* ptr)  void NumEntryTemp<T>::set_ptr(T* ptr)
114  {  {
115      this->ptr = 0;      this->ptr = 0;
116      set_value(*ptr);      if (ptr) set_value(*ptr);
117      this->ptr = ptr;      this->ptr = ptr;
118  }  }
119    
# Line 151  public: Line 154  public:
154      Glib::SignalProxy0<void> signal_changed() {      Glib::SignalProxy0<void> signal_changed() {
155          return combobox.signal_changed();          return combobox.signal_changed();
156      }      }
157        void set_tip(const Glib::ustring& tip_text) {
158            tooltips.set_tip(combobox, tip_text); //FIXME: don't Gtk::ComboBoxes support tooltips ???
159        }
160  };  };
161    
162  template<typename T>  template<typename T>
# Line 185  template<typename T> Line 191  template<typename T>
191  void ChoiceEntry<T>::set_ptr(T* ptr)  void ChoiceEntry<T>::set_ptr(T* ptr)
192  {  {
193      this->ptr = 0;      this->ptr = 0;
194      T value = *ptr;      if (ptr) {
195      int row = 0;          T value = *ptr;
196      int nb_rows = combobox.get_model()->children().size();          int row = 0;
197      for (; row < nb_rows ; row++) {          int nb_rows = combobox.get_model()->children().size();
198          if (value == values[row]) break;          for (; row < nb_rows ; row++) {
199      }              if (value == values[row]) break;
200      combobox.set_active(row == nb_rows ? -1 : row);          }
201            combobox.set_active(row == nb_rows ? -1 : row);
202        } else combobox.set_active(-1);
203      this->ptr = ptr;      this->ptr = ptr;
204  }  }
205    
# Line 220  private: Line 228  private:
228  public:  public:
229      BoolEntry(char* labelText);      BoolEntry(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); }
232      Glib::SignalProxy0<void> signal_toggled() {      Glib::SignalProxy0<void> signal_toggled() {
233          return checkbutton.signal_toggled();          return checkbutton.signal_toggled();
234      }      }

Legend:
Removed from v.1153  
changed lines
  Added in v.1156

  ViewVC Help
Powered by ViewVC