--- gigedit/trunk/src/gigedit/mainwindow.h 2013/02/24 15:19:39 2423 +++ gigedit/trunk/src/gigedit/mainwindow.h 2013/04/28 06:07:22 2445 @@ -26,8 +26,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -79,11 +81,18 @@ public: InstrumentProps(); void set_instrument(gig::Instrument* instrument); + gig::Instrument* get_instrument() { return m; } + void update_name(); + sigc::signal& signal_name_changed() { + return sig_name_changed; + } protected: + void set_Name(const gig::String& name); void set_IsDrum(bool value); void set_MIDIBank(uint16_t value); void set_MIDIProgram(uint32_t value); + sigc::signal sig_name_changed; Gtk::VBox vbox; Gtk::HButtonBox buttonBox; Gtk::Button quitButton; @@ -182,7 +191,7 @@ sigc::signal note_on_signal; sigc::signal note_off_signal; - void on_instrument_selection_change(int index); + void on_instrument_selection_change(Gtk::RadioMenuItem* item); void on_sel_change(); void region_changed(); void dimreg_changed(); @@ -212,6 +221,8 @@ Gtk::TreeView m_TreeView; Glib::RefPtr m_refTreeModel; + Gtk::Menu* instrument_menu; + class SamplesModel : public Gtk::TreeModel::ColumnRecord { public: SamplesModel() { @@ -265,6 +276,7 @@ void on_action_file_properties(); void on_action_quit(); void show_instr_props(); + bool instr_props_set_instrument(); void on_action_view_status_bar(); void on_action_help_about(); @@ -280,6 +292,11 @@ void on_action_duplicate_instrument(); void on_action_remove_instrument(); + void add_instrument(gig::Instrument* instrument); + Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name, + int position = -1); + void remove_instrument_from_menu(int index); + LoadDialog* load_dialog; Loader* loader; void load_gig(gig::File* gig, const char* filename, bool isSharedInstrument = false); @@ -311,6 +328,8 @@ const Gtk::TreeModel::iterator& iter); void instrument_name_changed(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter); + void instr_name_changed_by_instr_props(Gtk::TreeModel::iterator& it); + sigc::connection instrument_name_connection; void __import_queued_samples(); void __clear();