28 |
# include <gtkmm/table.h> |
# include <gtkmm/table.h> |
29 |
#endif |
#endif |
30 |
|
|
31 |
|
#include "Settings.h" |
32 |
|
|
33 |
VelocityCurve::VelocityCurve(double (gig::DimensionRegion::*getter)(uint8_t)) : |
VelocityCurve::VelocityCurve(double (gig::DimensionRegion::*getter)(uint8_t)) : |
34 |
getter(getter), dimreg(0) { |
getter(getter), dimreg(0) { |
35 |
set_size_request(80, 80); |
set_size_request(80, 80); |
189 |
)); |
)); |
190 |
} |
} |
191 |
|
|
192 |
|
void EGStateOptions::on_show_tooltips_changed() { |
193 |
|
const bool b = Settings::singleton()->showTooltips; |
194 |
|
|
195 |
|
checkBoxAttack.set_has_tooltip(b); |
196 |
|
checkBoxAttackHold.set_has_tooltip(b); |
197 |
|
checkBoxDecay1.set_has_tooltip(b); |
198 |
|
checkBoxDecay2.set_has_tooltip(b); |
199 |
|
checkBoxRelease.set_has_tooltip(b); |
200 |
|
} |
201 |
|
|
202 |
|
|
203 |
DimRegionEdit::DimRegionEdit() : |
DimRegionEdit::DimRegionEdit() : |
204 |
velocity_curve(&gig::DimensionRegion::GetVelocityAttenuation), |
velocity_curve(&gig::DimensionRegion::GetVelocityAttenuation), |
291 |
eGain(_("Gain"), -96, 0, 2, -655360), |
eGain(_("Gain"), -96, 0, 2, -655360), |
292 |
eGainPlus6(_("Gain +6dB"), eGain, 6 * -655360), |
eGainPlus6(_("Gain +6dB"), eGain, 6 * -655360), |
293 |
eSampleLoopEnabled(_("Enabled")), |
eSampleLoopEnabled(_("Enabled")), |
294 |
eSampleLoopStart(_("Loop start positon")), |
eSampleLoopStart(_("Loop start position")), |
295 |
eSampleLoopLength(_("Loop size")), |
eSampleLoopLength(_("Loop size")), |
296 |
eSampleLoopType(_("Loop type")), |
eSampleLoopType(_("Loop type")), |
297 |
eSampleLoopInfinite(_("Infinite loop")), |
eSampleLoopInfinite(_("Infinite loop")), |
463 |
table[i]->set_col_spacings(7); |
table[i]->set_col_spacings(7); |
464 |
#endif |
#endif |
465 |
|
|
466 |
|
// on Gtk 3 there is absolutely no margin by default |
467 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
468 |
|
# if GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION < 12 |
469 |
|
table[i]->set_margin_left(12); |
470 |
|
table[i]->set_margin_right(12); |
471 |
|
# else |
472 |
|
table[i]->set_margin_start(12); |
473 |
|
table[i]->set_margin_end(12); |
474 |
|
# endif |
475 |
|
#endif |
476 |
} |
} |
477 |
|
|
478 |
// set tooltips |
// set tooltips |
657 |
|
|
658 |
Gtk::Frame* frame = new Gtk::Frame; |
Gtk::Frame* frame = new Gtk::Frame; |
659 |
frame->add(crossfade_curve); |
frame->add(crossfade_curve); |
660 |
|
// on Gtk 3 there is no margin at all by default |
661 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
662 |
|
frame->set_margin_top(12); |
663 |
|
frame->set_margin_bottom(12); |
664 |
|
#endif |
665 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
666 |
table[pageno]->attach(*frame, 1, rowno, 2); |
table[pageno]->attach(*frame, 1, rowno, 2); |
667 |
#else |
#else |
741 |
|
|
742 |
frame = new Gtk::Frame; |
frame = new Gtk::Frame; |
743 |
frame->add(cutoff_curve); |
frame->add(cutoff_curve); |
744 |
|
// on Gtk 3 there is no margin at all by default |
745 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
746 |
|
frame->set_margin_top(12); |
747 |
|
frame->set_margin_bottom(12); |
748 |
|
#endif |
749 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
750 |
table[pageno]->attach(*frame, 1, rowno, 2); |
table[pageno]->attach(*frame, 1, rowno, 2); |
751 |
#else |
#else |
852 |
|
|
853 |
frame = new Gtk::Frame; |
frame = new Gtk::Frame; |
854 |
frame->add(velocity_curve); |
frame->add(velocity_curve); |
855 |
|
// on Gtk 3 there is no margin at all by default |
856 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
857 |
|
frame->set_margin_top(12); |
858 |
|
frame->set_margin_bottom(12); |
859 |
|
#endif |
860 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
861 |
table[pageno]->attach(*frame, 1, rowno, 2); |
table[pageno]->attach(*frame, 1, rowno, 2); |
862 |
#else |
#else |
877 |
sigc::mem_fun(release_curve, &VelocityCurve::queue_draw)); |
sigc::mem_fun(release_curve, &VelocityCurve::queue_draw)); |
878 |
frame = new Gtk::Frame; |
frame = new Gtk::Frame; |
879 |
frame->add(release_curve); |
frame->add(release_curve); |
880 |
|
// on Gtk 3 there is no margin at all by default |
881 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
882 |
|
frame->set_margin_top(12); |
883 |
|
frame->set_margin_bottom(12); |
884 |
|
#endif |
885 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
886 |
table[pageno]->attach(*frame, 1, rowno, 2); |
table[pageno]->attach(*frame, 1, rowno, 2); |
887 |
#else |
#else |
972 |
append_page(*table[4], _("Filter (2)")); |
append_page(*table[4], _("Filter (2)")); |
973 |
append_page(*table[5], _("Pitch")); |
append_page(*table[5], _("Pitch")); |
974 |
append_page(*table[6], _("Misc")); |
append_page(*table[6], _("Misc")); |
975 |
|
|
976 |
|
Settings::singleton()->showTooltips.get_proxy().signal_changed().connect( |
977 |
|
sigc::mem_fun(*this, &DimRegionEdit::on_show_tooltips_changed) |
978 |
|
); |
979 |
|
|
980 |
|
on_show_tooltips_changed(); |
981 |
} |
} |
982 |
|
|
983 |
DimRegionEdit::~DimRegionEdit() |
DimRegionEdit::~DimRegionEdit() |
1069 |
#else |
#else |
1070 |
label->set_halign(Gtk::Align::START); |
label->set_halign(Gtk::Align::START); |
1071 |
#endif |
#endif |
1072 |
|
// on GTKMM 3 there is absolutely no margin by default |
1073 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
1074 |
|
label->set_margin_top(18); |
1075 |
|
label->set_margin_bottom(13); |
1076 |
|
#endif |
1077 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
1078 |
table[pageno]->attach(*label, 0, rowno, 3); |
table[pageno]->attach(*label, 0, rowno, 3); |
1079 |
#else |
#else |
1085 |
return label; |
return label; |
1086 |
} |
} |
1087 |
|
|
1088 |
|
void DimRegionEdit::on_show_tooltips_changed() { |
1089 |
|
const bool b = Settings::singleton()->showTooltips; |
1090 |
|
|
1091 |
|
buttonSelectSample.set_has_tooltip(b); |
1092 |
|
buttonNullSampleReference->set_has_tooltip(b); |
1093 |
|
wSample->set_has_tooltip(b); |
1094 |
|
|
1095 |
|
eEG1StateOptions.on_show_tooltips_changed(); |
1096 |
|
eEG2StateOptions.on_show_tooltips_changed(); |
1097 |
|
|
1098 |
|
set_has_tooltip(b); |
1099 |
|
} |
1100 |
|
|
1101 |
void DimRegionEdit::nextPage() |
void DimRegionEdit::nextPage() |
1102 |
{ |
{ |
1103 |
if (firstRowInBlock < rowno - 1) |
if (firstRowInBlock < rowno - 1) |