--- gigedit/trunk/src/gigedit/mainwindow.h 2017/02/11 17:04:48 3106 +++ gigedit/trunk/src/gigedit/mainwindow.h 2017/07/30 18:57:35 3339 @@ -22,8 +22,10 @@ #ifdef LIBGIG_HEADER_FILE # include LIBGIG_HEADER_FILE(gig.h) +# include LIBGIG_HEADER_FILE(Serialization.h) #else # include +# include #endif #include @@ -242,6 +244,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; @@ -271,6 +286,13 @@ void on_saver_progress(); void on_saver_error(); void on_saver_finished(); + void updateMacroMenu(); + void onMacroSelected(int iMacro); + 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(); @@ -283,11 +305,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; @@ -299,6 +323,7 @@ Glib::RefPtr m_refTreeModel; Gtk::Menu* instrument_menu; + Gtk::Menu* assign_scripts_menu; std::map sample_ref_count; @@ -366,6 +391,7 @@ Gtk::CheckButton dimreg_stereo; Gtk::HBox legend_hbox; + Gtk::Label labelLegend; Gtk::Image imageNoSample; Gtk::Label labelNoSample; Gtk::Image imageMissingSample; @@ -385,7 +411,7 @@ Glib::ustring sample_path; // file name of the sample to be // imported }; - std::list m_SampleImportQueue; + std::map m_SampleImportQueue; void on_action_file_new(); @@ -432,6 +458,34 @@ 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(); + + void select_next_dim_rgn_zone(); + void select_prev_dim_rgn_zone(); + void select_add_next_dim_rgn_zone(); + void select_add_prev_dim_rgn_zone(); + void select_prev_dimension(); + void select_next_dimension(); + + Serialization::Archive m_serializationArchive; ///< Clipboard content. + std::vector m_macros; ///< User configured list of macros. + + void copy_selected_dimrgn(); + void paste_copied_dimrgn(); + void adjust_clipboard_content(); + void updateClipboardCopyAvailable(); + void updateClipboardPasteAvailable(); + void on_clipboard_owner_change(GdkEventOwnerChange* event); + void on_clipboard_get(Gtk::SelectionData& selection_data, guint info); + void on_clipboard_clear(); + void on_clipboard_received(const Gtk::SelectionData& selection_data); + void on_clipboard_received_targets(const std::vector& targets); + void add_instrument(gig::Instrument* instrument); Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name, int position = -1); @@ -500,6 +554,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();