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 { |
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 |
|
|
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> |
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 |
|
|
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 |
} |
} |