--- gigedit/trunk/src/gigedit/mainwindow.h 2017/05/08 17:30:10 3157 +++ gigedit/trunk/src/gigedit/mainwindow.h 2017/07/31 11:20:18 3340 @@ -39,10 +39,12 @@ #include #include #include +#include #include #include #include #include +#include #include @@ -244,6 +246,19 @@ InstrumentProps instrumentProps; MidiRules midiRules; + /** + * Ensures that the 2 signals MainWindow::dimreg_to_be_changed_signal and + * MainWindowv::dimreg_changed_signal are always triggered correctly as a + * pair. It behaves similar to a "mutex lock guard" design pattern. + */ + class DimRegionChangeGuard : public SignalGuard { + public: + DimRegionChangeGuard(MainWindow* w, gig::DimensionRegion* pDimReg) : + SignalGuard(w->dimreg_to_be_changed_signal, w->dimreg_changed_signal, pDimReg) + { + } + }; + sigc::signal file_structure_to_be_changed_signal; sigc::signal file_structure_changed_signal; sigc::signal > samples_to_be_removed_signal; @@ -278,6 +293,8 @@ void setupMacros(); void onMacrosSetupChanged(const std::vector& macros); void applyMacro(Serialization::Archive& macro); + void onScriptSlotsModified(gig::Instrument* pInstrument); + void bringToFront(); void dimreg_all_dimregs_toggled(); gig::Instrument* get_instrument(); @@ -290,11 +307,13 @@ add(m_col_nr); add(m_col_name); add(m_col_instr); + add(m_col_scripts); } Gtk::TreeModelColumn m_col_nr; Gtk::TreeModelColumn m_col_name; Gtk::TreeModelColumn m_col_instr; + Gtk::TreeModelColumn m_col_scripts; } m_Columns; Gtk::VBox m_VBox; @@ -304,8 +323,10 @@ Gtk::TreeView m_TreeView; Glib::RefPtr m_refTreeModel; + Glib::RefPtr m_refTreeModelFilter; //FIXME: I really would love to get rid of TreeModelFilter, because it causes behavior conflicts with get_model() all over the place (see the respective comments regarding get_model()), however I found no other way to filter a treeview effectively. Gtk::Menu* instrument_menu; + Gtk::Menu* assign_scripts_menu; std::map sample_ref_count; @@ -384,7 +405,11 @@ Gtk::Label labelSomeLoops; DimRegionEdit dimreg_edit; + Gtk::VBox m_left_vbox; Gtk::Notebook m_TreeViewNotebook; + Gtk::HBox m_searchField; + Gtk::Label m_searchLabel; + Gtk::Entry m_searchText; struct SampleImportItem { gig::Sample* gig_sample; // pointer to the gig::Sample to @@ -415,6 +440,8 @@ void on_action_move_root_note_with_region_moved(); void on_action_help_about(); + void on_notebook_tab_switched(GtkNotebookPage* page, guint page_num); + // sample right-click popup actions void on_sample_treeview_button_release(GdkEventButton* button); void on_action_sample_properties(); @@ -440,6 +467,10 @@ void show_intruments_tab(); void show_scripts_tab(); + void select_prev_instrument(); + void select_next_instrument(); + void select_instrument_by_dir(int dir); + void select_prev_region(); void select_next_region(); @@ -516,6 +547,7 @@ 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); + bool instrument_row_visible(const Gtk::TreeModel::const_iterator& iter); sigc::connection instrument_name_connection; void on_action_combine_instruments(); @@ -532,6 +564,8 @@ void __import_queued_samples(); void __clear(); void __refreshEntireGUI(); + void updateScriptListOfMenu(); + void assignScript(gig::Script* pScript); bool close_confirmation_dialog(); bool leaving_shared_mode_dialog();