--- gigedit/trunk/src/gigedit/mainwindow.h 2013/02/24 15:19:39 2423 +++ gigedit/trunk/src/gigedit/mainwindow.h 2014/04/23 16:49:05 2541 @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (C) 2006 - 2013 Andreas Persson + * Copyright (C) 2006 - 2014 Andreas Persson * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -26,8 +26,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -40,6 +42,7 @@ #include "regionchooser.h" #include "dimregionchooser.h" #include "dimregionedit.h" +#include "midirules.h" #ifndef OLD_THREADS #include #endif @@ -79,11 +82,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; @@ -167,6 +177,7 @@ PropDialog propDialog; InstrumentProps instrumentProps; + MidiRules midiRules; sigc::signal file_structure_to_be_changed_signal; sigc::signal file_structure_changed_signal; @@ -182,7 +193,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 +223,8 @@ Gtk::TreeView m_TreeView; Glib::RefPtr m_refTreeModel; + Gtk::Menu* instrument_menu; + class SamplesModel : public Gtk::TreeModel::ColumnRecord { public: SamplesModel() { @@ -265,7 +278,10 @@ void on_action_file_properties(); void on_action_quit(); void show_instr_props(); + bool instr_props_set_instrument(); + void show_midi_rules(); void on_action_view_status_bar(); + void on_action_warn_user_on_extensions(); void on_action_help_about(); // sample right-click popup actions @@ -280,6 +296,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 +332,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(); @@ -323,6 +346,10 @@ bool on_delete_event(GdkEventAny* event); bool first_call_to_drag_data_get; + + bool is_copy_samples_unity_note_enabled() const; + bool is_copy_samples_fine_tune_enabled() const; + bool is_copy_samples_loop_enabled() const; }; #endif