/[svn]/gigedit/trunk/src/gigedit/mainwindow.h
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/mainwindow.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3109 by schoenebeck, Sun Feb 12 16:35:03 2017 UTC revision 3339 by schoenebeck, Sun Jul 30 18:57:35 2017 UTC
# Line 22  Line 22 
22    
23  #ifdef LIBGIG_HEADER_FILE  #ifdef LIBGIG_HEADER_FILE
24  # include LIBGIG_HEADER_FILE(gig.h)  # include LIBGIG_HEADER_FILE(gig.h)
25    # include LIBGIG_HEADER_FILE(Serialization.h)
26  #else  #else
27  # include <gig.h>  # include <gig.h>
28    # include <Serialization.h>
29  #endif  #endif
30    
31  #include <gtkmm/box.h>  #include <gtkmm/box.h>
# Line 242  protected: Line 244  protected:
244      InstrumentProps instrumentProps;      InstrumentProps instrumentProps;
245      MidiRules midiRules;      MidiRules midiRules;
246    
247        /**
248         * Ensures that the 2 signals MainWindow::dimreg_to_be_changed_signal and
249         * MainWindowv::dimreg_changed_signal are always triggered correctly as a
250         * pair. It behaves similar to a "mutex lock guard" design pattern.
251         */
252        class DimRegionChangeGuard : public SignalGuard<gig::DimensionRegion*> {
253        public:
254            DimRegionChangeGuard(MainWindow* w, gig::DimensionRegion* pDimReg) :
255            SignalGuard<gig::DimensionRegion*>(w->dimreg_to_be_changed_signal, w->dimreg_changed_signal, pDimReg)
256            {
257            }
258        };
259    
260      sigc::signal<void, gig::File*> file_structure_to_be_changed_signal;      sigc::signal<void, gig::File*> file_structure_to_be_changed_signal;
261      sigc::signal<void, gig::File*> file_structure_changed_signal;      sigc::signal<void, gig::File*> file_structure_changed_signal;
262      sigc::signal<void, std::list<gig::Sample*> > samples_to_be_removed_signal;      sigc::signal<void, std::list<gig::Sample*> > samples_to_be_removed_signal;
# Line 271  protected: Line 286  protected:
286      void on_saver_progress();      void on_saver_progress();
287      void on_saver_error();      void on_saver_error();
288      void on_saver_finished();      void on_saver_finished();
289        void updateMacroMenu();
290        void onMacroSelected(int iMacro);
291        void setupMacros();
292        void onMacrosSetupChanged(const std::vector<Serialization::Archive>& macros);
293        void applyMacro(Serialization::Archive& macro);
294        void onScriptSlotsModified(gig::Instrument* pInstrument);
295        void bringToFront();
296    
297      void dimreg_all_dimregs_toggled();      void dimreg_all_dimregs_toggled();
298      gig::Instrument* get_instrument();      gig::Instrument* get_instrument();
# Line 283  protected: Line 305  protected:
305            add(m_col_nr);            add(m_col_nr);
306            add(m_col_name);            add(m_col_name);
307            add(m_col_instr);            add(m_col_instr);
308              add(m_col_scripts);
309          }          }
310    
311          Gtk::TreeModelColumn<int> m_col_nr;          Gtk::TreeModelColumn<int> m_col_nr;
312          Gtk::TreeModelColumn<Glib::ustring> m_col_name;          Gtk::TreeModelColumn<Glib::ustring> m_col_name;
313          Gtk::TreeModelColumn<gig::Instrument*> m_col_instr;          Gtk::TreeModelColumn<gig::Instrument*> m_col_instr;
314            Gtk::TreeModelColumn<Glib::ustring> m_col_scripts;
315      } m_Columns;      } m_Columns;
316    
317      Gtk::VBox m_VBox;      Gtk::VBox m_VBox;
# Line 299  protected: Line 323  protected:
323      Glib::RefPtr<Gtk::ListStore> m_refTreeModel;      Glib::RefPtr<Gtk::ListStore> m_refTreeModel;
324    
325      Gtk::Menu* instrument_menu;      Gtk::Menu* instrument_menu;
326        Gtk::Menu* assign_scripts_menu;
327    
328      std::map<gig::Sample*,int> sample_ref_count;      std::map<gig::Sample*,int> sample_ref_count;
329    
# Line 386  protected: Line 411  protected:
411          Glib::ustring sample_path; // file name of the sample to be          Glib::ustring sample_path; // file name of the sample to be
412                                     // imported                                     // imported
413      };      };
414      std::list<SampleImportItem> m_SampleImportQueue;      std::map<gig::Sample*, SampleImportItem> m_SampleImportQueue;
415    
416    
417      void on_action_file_new();      void on_action_file_new();
# Line 433  protected: Line 458  protected:
458      void show_intruments_tab();      void show_intruments_tab();
459      void show_scripts_tab();      void show_scripts_tab();
460    
461        void select_prev_instrument();
462        void select_next_instrument();
463        void select_instrument_by_dir(int dir);
464    
465        void select_prev_region();
466        void select_next_region();
467    
468        void select_next_dim_rgn_zone();
469        void select_prev_dim_rgn_zone();
470        void select_add_next_dim_rgn_zone();
471        void select_add_prev_dim_rgn_zone();
472        void select_prev_dimension();
473        void select_next_dimension();
474    
475        Serialization::Archive m_serializationArchive; ///< Clipboard content.
476        std::vector<Serialization::Archive> m_macros; ///< User configured list of macros.
477    
478        void copy_selected_dimrgn();
479        void paste_copied_dimrgn();
480        void adjust_clipboard_content();
481        void updateClipboardCopyAvailable();
482        void updateClipboardPasteAvailable();
483        void on_clipboard_owner_change(GdkEventOwnerChange* event);
484        void on_clipboard_get(Gtk::SelectionData& selection_data, guint info);
485        void on_clipboard_clear();
486        void on_clipboard_received(const Gtk::SelectionData& selection_data);
487        void on_clipboard_received_targets(const std::vector<Glib::ustring>& targets);
488    
489      void add_instrument(gig::Instrument* instrument);      void add_instrument(gig::Instrument* instrument);
490      Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name,      Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name,
491                                                 int position = -1);                                                 int position = -1);
# Line 501  protected: Line 554  protected:
554      void __import_queued_samples();      void __import_queued_samples();
555      void __clear();      void __clear();
556      void __refreshEntireGUI();      void __refreshEntireGUI();
557        void updateScriptListOfMenu();
558        void assignScript(gig::Script* pScript);
559    
560      bool close_confirmation_dialog();      bool close_confirmation_dialog();
561      bool leaving_shared_mode_dialog();      bool leaving_shared_mode_dialog();

Legend:
Removed from v.3109  
changed lines
  Added in v.3339

  ViewVC Help
Powered by ViewVC