70 |
return sig_changed; |
return sig_changed; |
71 |
} |
} |
72 |
protected: |
protected: |
73 |
|
virtual void on_show_tooltips_changed(); |
74 |
#ifdef OLD_TOOLTIPS |
#ifdef OLD_TOOLTIPS |
75 |
Gtk::Tooltips tooltips; |
Gtk::Tooltips tooltips; |
76 |
#endif |
#endif |
99 |
static int round_to_int(double x) { |
static int round_to_int(double x) { |
100 |
return int(x < 0.0 ? x - 0.5 : x + 0.5); |
return int(x < 0.0 ? x - 0.5 : x + 0.5); |
101 |
} |
} |
102 |
|
|
103 |
public: |
public: |
104 |
NumEntry(const char* labelText, double lower = 0, double upper = 127, |
NumEntry(const char* labelText, double lower = 0, double upper = 127, |
105 |
int decimals = 0); |
int decimals = 0); |
117 |
adjust->set_upper(upper); |
adjust->set_upper(upper); |
118 |
#endif |
#endif |
119 |
} |
} |
120 |
|
void on_show_tooltips_changed(); |
121 |
}; |
}; |
122 |
|
|
123 |
class NumEntryGain : public NumEntry { |
class NumEntryGain : public NumEntry { |
205 |
void set_value(uint16_t value); |
void set_value(uint16_t value); |
206 |
}; |
}; |
207 |
|
|
208 |
|
class ChoiceEntryBase : public LabelWidget { |
209 |
|
protected: |
210 |
|
ChoiceEntryBase(const char* labelText, Gtk::Widget& widget) : LabelWidget(labelText, widget) {}; |
211 |
|
Gtk::ComboBoxText combobox; |
212 |
|
void on_show_tooltips_changed(); |
213 |
|
}; |
214 |
|
|
215 |
template<typename T> |
template<typename T> |
216 |
class ChoiceEntry : public LabelWidget { |
class ChoiceEntry : public ChoiceEntryBase { |
217 |
private: |
private: |
|
Gtk::ComboBoxText combobox; |
|
218 |
#if HAS_GTKMM_ALIGNMENT |
#if HAS_GTKMM_ALIGNMENT |
219 |
Gtk::Alignment align; |
Gtk::Alignment align; |
220 |
#endif |
#endif |
237 |
template<typename T> |
template<typename T> |
238 |
ChoiceEntry<T>::ChoiceEntry(const char* labelText) : |
ChoiceEntry<T>::ChoiceEntry(const char* labelText) : |
239 |
#if HAS_GTKMM_ALIGNMENT |
#if HAS_GTKMM_ALIGNMENT |
240 |
LabelWidget(labelText, align), |
ChoiceEntryBase(labelText, align), |
241 |
align(0, 0, 0, 0), |
align(0, 0, 0, 0), |
242 |
#else |
#else |
243 |
LabelWidget(labelText, combobox), |
ChoiceEntryBase(labelText, combobox), |
244 |
#endif |
#endif |
245 |
values(0) |
values(0) |
246 |
{ |
{ |
290 |
Gtk::Alignment align; |
Gtk::Alignment align; |
291 |
#endif |
#endif |
292 |
void value_changed(); |
void value_changed(); |
293 |
|
protected: |
294 |
|
void on_show_tooltips_changed(); |
295 |
public: |
public: |
296 |
ChoiceEntryLeverageCtrl(const char* labelText); |
ChoiceEntryLeverageCtrl(const char* labelText); |
297 |
gig::leverage_ctrl_t get_value() const { return value; } |
gig::leverage_ctrl_t get_value() const { return value; } |
321 |
|
|
322 |
class BoolBox : public Gtk::CheckButton { |
class BoolBox : public Gtk::CheckButton { |
323 |
public: |
public: |
324 |
BoolBox(const char* labelText) : Gtk::CheckButton(labelText) { |
BoolBox(const char* labelText); |
|
signal_toggled().connect(sig_changed.make_slot()); |
|
|
} |
|
325 |
bool get_value() const { return get_active(); } |
bool get_value() const { return get_active(); } |
326 |
void set_value(bool value) { set_active(value); } |
void set_value(bool value) { set_active(value); } |
327 |
sigc::signal<void>& signal_value_changed() { return sig_changed; } |
sigc::signal<void>& signal_value_changed() { return sig_changed; } |
328 |
protected: |
protected: |
329 |
|
void on_show_tooltips_changed(); |
330 |
|
|
331 |
sigc::signal<void> sig_changed; |
sigc::signal<void> sig_changed; |
332 |
}; |
}; |
333 |
|
|
338 |
void value_changed(); |
void value_changed(); |
339 |
NumEntryGain& eGain; |
NumEntryGain& eGain; |
340 |
int32_t plus6value; |
int32_t plus6value; |
341 |
|
protected: |
342 |
|
void on_show_tooltips_changed(); |
343 |
public: |
public: |
344 |
BoolEntryPlus6(const char* labelText, NumEntryGain& eGain, int32_t plus6value); |
BoolEntryPlus6(const char* labelText, NumEntryGain& eGain, int32_t plus6value); |
345 |
int32_t get_value() const; |
int32_t get_value() const; |
362 |
Gtk::TextView text_view; |
Gtk::TextView text_view; |
363 |
Glib::RefPtr<Gtk::TextBuffer> text_buffer; |
Glib::RefPtr<Gtk::TextBuffer> text_buffer; |
364 |
Gtk::Frame frame; |
Gtk::Frame frame; |
365 |
|
protected: |
366 |
|
void on_show_tooltips_changed(); |
367 |
public: |
public: |
368 |
StringEntryMultiLine(const char* labelText); |
StringEntryMultiLine(const char* labelText); |
369 |
gig::String get_value() const; |
gig::String get_value() const; |