1 |
/* -*- c++ -*- |
/* -*- c++ -*- |
2 |
* Copyright (C) 2006-2017 Andreas Persson |
* Copyright (C) 2006-2019 Andreas Persson |
3 |
* |
* |
4 |
* This program is free software; you can redistribute it and/or |
* This program is free software; you can redistribute it and/or |
5 |
* modify it under the terms of the GNU General Public License as |
* modify it under the terms of the GNU General Public License as |
26 |
# include <gig.h> |
# include <gig.h> |
27 |
#endif |
#endif |
28 |
|
|
29 |
|
#include "compat.h" |
30 |
|
|
31 |
#include <cairomm/context.h> |
#include <cairomm/context.h> |
32 |
#include <gtkmm/box.h> |
#include <gtkmm/box.h> |
33 |
#include <gtkmm/drawingarea.h> |
#include <gtkmm/drawingarea.h> |
34 |
#include <gtkmm/entry.h> |
#include <gtkmm/entry.h> |
35 |
#include <gtkmm/label.h> |
#include <gtkmm/label.h> |
36 |
#include <gtkmm/notebook.h> |
#include <gtkmm/notebook.h> |
37 |
#include <gtkmm/table.h> |
#if USE_GTKMM_GRID |
38 |
|
# include <gtkmm/grid.h> |
39 |
|
#else |
40 |
|
# include <gtkmm/table.h> |
41 |
|
#endif |
42 |
|
|
43 |
#include <set> |
#include <set> |
44 |
|
|
81 |
bool sensitive); |
bool sensitive); |
82 |
}; |
}; |
83 |
|
|
84 |
|
class EGStateOptions : public HBox { |
85 |
|
public: |
86 |
|
Gtk::Label label; |
87 |
|
BoolBox checkBoxAttack; |
88 |
|
BoolBox checkBoxAttackHold; |
89 |
|
BoolBox checkBoxDecay1; |
90 |
|
BoolBox checkBoxDecay2; |
91 |
|
BoolBox checkBoxRelease; |
92 |
|
|
93 |
|
EGStateOptions(); |
94 |
|
void on_show_tooltips_changed(); |
95 |
|
}; |
96 |
|
|
97 |
class DimRegionEdit : public Gtk::Notebook |
class DimRegionEdit : public Gtk::Notebook |
98 |
{ |
{ |
99 |
public: |
public: |
137 |
Gtk::Tooltips tooltips; |
Gtk::Tooltips tooltips; |
138 |
#endif |
#endif |
139 |
|
|
140 |
|
#if USE_GTKMM_GRID |
141 |
|
Gtk::Grid* table[7]; |
142 |
|
#else |
143 |
Gtk::Table* table[7]; |
Gtk::Table* table[7]; |
144 |
|
#endif |
145 |
|
|
146 |
Gtk::Label* lSample; |
Gtk::Label* lSample; |
147 |
|
|
163 |
NumEntryTemp<uint8_t> eEG1ControllerAttackInfluence; |
NumEntryTemp<uint8_t> eEG1ControllerAttackInfluence; |
164 |
NumEntryTemp<uint8_t> eEG1ControllerDecayInfluence; |
NumEntryTemp<uint8_t> eEG1ControllerDecayInfluence; |
165 |
NumEntryTemp<uint8_t> eEG1ControllerReleaseInfluence; |
NumEntryTemp<uint8_t> eEG1ControllerReleaseInfluence; |
166 |
|
EGStateOptions eEG1StateOptions; |
167 |
NumEntryTemp<double> eLFO1Frequency; |
NumEntryTemp<double> eLFO1Frequency; |
168 |
NumEntryTemp<uint16_t> eLFO1InternalDepth; |
NumEntryTemp<uint16_t> eLFO1InternalDepth; |
169 |
NumEntryTemp<uint16_t> eLFO1ControlDepth; |
NumEntryTemp<uint16_t> eLFO1ControlDepth; |
182 |
NumEntryTemp<uint8_t> eEG2ControllerAttackInfluence; |
NumEntryTemp<uint8_t> eEG2ControllerAttackInfluence; |
183 |
NumEntryTemp<uint8_t> eEG2ControllerDecayInfluence; |
NumEntryTemp<uint8_t> eEG2ControllerDecayInfluence; |
184 |
NumEntryTemp<uint8_t> eEG2ControllerReleaseInfluence; |
NumEntryTemp<uint8_t> eEG2ControllerReleaseInfluence; |
185 |
|
EGStateOptions eEG2StateOptions; |
186 |
NumEntryTemp<double> eLFO2Frequency; |
NumEntryTemp<double> eLFO2Frequency; |
187 |
NumEntryTemp<uint16_t> eLFO2InternalDepth; |
NumEntryTemp<uint16_t> eLFO2InternalDepth; |
188 |
NumEntryTemp<uint16_t> eLFO2ControlDepth; |
NumEntryTemp<uint16_t> eLFO2ControlDepth; |
220 |
NumEntryTemp<uint8_t> eCrossfade_out_start; |
NumEntryTemp<uint8_t> eCrossfade_out_start; |
221 |
NumEntryTemp<uint8_t> eCrossfade_out_end; |
NumEntryTemp<uint8_t> eCrossfade_out_end; |
222 |
BoolEntry ePitchTrack; |
BoolEntry ePitchTrack; |
223 |
|
ChoiceEntry<gig::sust_rel_trg_t> eSustainReleaseTrigger; |
224 |
|
BoolEntry eNoNoteOffReleaseTrigger; |
225 |
ChoiceEntry<gig::dim_bypass_ctrl_t> eDimensionBypass; |
ChoiceEntry<gig::dim_bypass_ctrl_t> eDimensionBypass; |
226 |
NumEntryTemp<int8_t> ePan; |
NumEntryTemp<int8_t> ePan; |
227 |
BoolEntry eSelfMask; |
BoolEntry eSelfMask; |
259 |
void addProp(BoolEntry& boolentry); |
void addProp(BoolEntry& boolentry); |
260 |
void addProp(BoolEntryPlus6& boolentry); |
void addProp(BoolEntryPlus6& boolentry); |
261 |
void addProp(LabelWidget& labelwidget); |
void addProp(LabelWidget& labelwidget); |
262 |
|
void addLine(HBox& line); |
263 |
void addString(const char* labelText, Gtk::Label*& label, |
void addString(const char* labelText, Gtk::Label*& label, |
264 |
Gtk::Entry*& widget); |
Gtk::Entry*& widget); |
265 |
void addString(const char* labelText, Gtk::Label*& label, |
void addString(const char* labelText, Gtk::Label*& label, |
288 |
void loop_length_changed(); |
void loop_length_changed(); |
289 |
void loop_infinite_toggled(); |
void loop_infinite_toggled(); |
290 |
void nullOutSampleReference(); |
void nullOutSampleReference(); |
291 |
|
void on_show_tooltips_changed(); |
292 |
|
|
293 |
int update_model; |
int update_model; |
294 |
|
|
307 |
sigc::bind(sigc::mem_fun(&DimRegionEdit::set_member<T>), member)); |
sigc::bind(sigc::mem_fun(&DimRegionEdit::set_member<T>), member)); |
308 |
} |
} |
309 |
|
|
310 |
|
// connect a widget to a member of a struct member in gig::DimensionRegion |
311 |
|
template<typename C, typename T, typename S> |
312 |
|
void connect(C& widget, S gig::DimensionRegion::* member, T S::* member2) { |
313 |
|
connect<C, T>(widget, |
314 |
|
sigc::bind(sigc::mem_fun(&DimRegionEdit::set_member<T, S>), member, member2)); |
315 |
|
} |
316 |
|
|
317 |
// connect a widget to a setter function in gig::DimensionRegion |
// connect a widget to a setter function in gig::DimensionRegion |
318 |
template<typename C, typename T> |
template<typename C, typename T> |
319 |
void connect(C& widget, |
void connect(C& widget, |
353 |
d->*member = value; |
d->*member = value; |
354 |
} |
} |
355 |
|
|
356 |
|
// set a value of a member of a struct member variable in the given dimregion |
357 |
|
template<typename T, typename S> |
358 |
|
void set_member(gig::DimensionRegion* d, T value, |
359 |
|
S gig::DimensionRegion::* member, T S::* member2) { |
360 |
|
d->*member.*member2 = value; |
361 |
|
} |
362 |
|
|
363 |
// setters for specific dimregion parameters |
// setters for specific dimregion parameters |
364 |
|
|
365 |
void set_UnityNote(gig::DimensionRegion* d, uint8_t value); |
void set_UnityNote(gig::DimensionRegion* d, uint8_t value); |