46 |
|
|
47 |
class MainWindow; |
class MainWindow; |
48 |
|
|
49 |
class Table : public Gtk::Table |
class PropDialog : public Gtk::Window, |
50 |
{ |
public PropEditor<DLS::Info> { |
|
public: |
|
|
Table(int x, int y); |
|
|
void add(BoolEntry& boolentry); |
|
|
void add(BoolEntryPlus6& boolentry); |
|
|
void add(LabelWidget& labelwidget); |
|
|
private: |
|
|
int rowno; |
|
|
}; |
|
|
|
|
|
class PropDialog : public Gtk::Window { |
|
51 |
public: |
public: |
52 |
PropDialog(); |
PropDialog(); |
53 |
void set_info(DLS::Info* info); |
void set_info(DLS::Info* info); |
|
sigc::signal<void>& signal_info_changed(); |
|
54 |
protected: |
protected: |
|
sigc::signal<void> info_changed; |
|
55 |
StringEntry eName; |
StringEntry eName; |
56 |
StringEntry eCreationDate; |
StringEntry eCreationDate; |
57 |
StringEntryMultiLine eComments; |
StringEntryMultiLine eComments; |
72 |
Gtk::HButtonBox buttonBox; |
Gtk::HButtonBox buttonBox; |
73 |
Gtk::Button quitButton; |
Gtk::Button quitButton; |
74 |
Table table; |
Table table; |
|
int update_model; |
|
|
DLS::Info* info; |
|
|
|
|
|
template<typename T> |
|
|
void set_member(T value, T DLS::Info::* member) { |
|
|
if (update_model == 0) { |
|
|
info->*member = value; |
|
|
info_changed(); |
|
|
} |
|
|
} |
|
|
|
|
|
template<typename C, typename T> |
|
|
void connect(C& widget, T DLS::Info::* member) { |
|
|
widget.signal_value_changed().connect( |
|
|
sigc::compose( |
|
|
sigc::bind(sigc::mem_fun(*this, &PropDialog::set_member<T>), member), |
|
|
sigc::mem_fun(widget, &C::get_value))); |
|
|
} |
|
75 |
}; |
}; |
76 |
|
|
77 |
class InstrumentProps : public Gtk::Window { |
class InstrumentProps : public Gtk::Window, |
78 |
|
public PropEditor<gig::Instrument> { |
79 |
public: |
public: |
80 |
InstrumentProps(); |
InstrumentProps(); |
81 |
void set_instrument(gig::Instrument* instrument); |
void set_instrument(gig::Instrument* instrument); |
|
sigc::signal<void>& signal_instrument_changed(); |
|
82 |
protected: |
protected: |
|
gig::Instrument* instrument; |
|
|
int update_model; |
|
|
|
|
|
template<typename T> |
|
|
void set_value(T value, sigc::slot<void, InstrumentProps*, T> setter) { |
|
|
if (update_model == 0) { |
|
|
setter(this, value); |
|
|
instrument_changed(); |
|
|
} |
|
|
} |
|
|
|
|
|
template<typename C, typename T> |
|
|
void connect(C& widget, T gig::Instrument::* member) { |
|
|
widget.signal_value_changed().connect( |
|
|
sigc::compose( |
|
|
sigc::bind(sigc::mem_fun(*this, &InstrumentProps::set_value<T>), |
|
|
sigc::bind(sigc::mem_fun(&InstrumentProps::set_member<T>), member)), |
|
|
sigc::mem_fun(widget, &C::get_value))); |
|
|
} |
|
|
|
|
|
template<typename C, typename T> |
|
|
void connect(C& widget, void (InstrumentProps::*setter)(T)) { |
|
|
widget.signal_value_changed().connect( |
|
|
sigc::compose( |
|
|
sigc::bind(sigc::mem_fun(*this, &InstrumentProps::set_value<T>), |
|
|
sigc::mem_fun(setter)), |
|
|
sigc::mem_fun(widget, &C::get_value))); |
|
|
} |
|
|
|
|
|
template<typename T> |
|
|
void set_member(T value, T gig::Instrument::* member) { |
|
|
instrument->*member = value; |
|
|
} |
|
|
|
|
83 |
void set_IsDrum(bool value); |
void set_IsDrum(bool value); |
84 |
void set_MIDIBank(uint16_t value); |
void set_MIDIBank(uint16_t value); |
85 |
void set_MIDIProgram(uint32_t value); |
void set_MIDIProgram(uint32_t value); |
|
void set_DimensionKeyRange_low(uint8_t value); |
|
|
void set_DimensionKeyRange_high(uint8_t value); |
|
86 |
|
|
87 |
Gtk::VBox vbox; |
Gtk::VBox vbox; |
88 |
Gtk::HButtonBox buttonBox; |
Gtk::HButtonBox buttonBox; |
100 |
BoolEntry ePianoReleaseMode; |
BoolEntry ePianoReleaseMode; |
101 |
NoteEntry eDimensionKeyRangeLow; |
NoteEntry eDimensionKeyRangeLow; |
102 |
NoteEntry eDimensionKeyRangeHigh; |
NoteEntry eDimensionKeyRangeHigh; |
|
sigc::signal<void> instrument_changed; |
|
103 |
}; |
}; |
104 |
|
|
105 |
class LoadDialog : public Gtk::Dialog { |
class LoadDialog : public Gtk::Dialog { |
246 |
Gtk::CheckButton dimreg_stereo; |
Gtk::CheckButton dimreg_stereo; |
247 |
DimRegionEdit dimreg_edit; |
DimRegionEdit dimreg_edit; |
248 |
|
|
|
Gtk::Notebook m_Notebook; |
|
249 |
Gtk::Notebook m_TreeViewNotebook; |
Gtk::Notebook m_TreeViewNotebook; |
250 |
|
|
251 |
struct SampleImportItem { |
struct SampleImportItem { |