/[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 2967 by schoenebeck, Mon Jul 18 11:22:38 2016 UTC revision 3177 by schoenebeck, Thu May 11 20:59:46 2017 UTC
# Line 1  Line 1 
1  /*                                                         -*- c++ -*-  /*                                                         -*- c++ -*-
2   * Copyright (C) 2006 - 2016 Andreas Persson   * Copyright (C) 2006 - 2017 Andreas Persson
3   *   *
4   * This program is free software; you can redistribute it and/or   * This program is free software; you can redistribute it and/or
5   * modify it under the terms of the GNU General Public License as   * modify it under the terms of the GNU General Public License as
# Line 20  Line 20 
20  #ifndef GIGEDIT_MAINWINDOW_H  #ifndef GIGEDIT_MAINWINDOW_H
21  #define GIGEDIT_MAINWINDOW_H  #define GIGEDIT_MAINWINDOW_H
22    
23  #include <gig.h>  #ifdef LIBGIG_HEADER_FILE
24    # include LIBGIG_HEADER_FILE(gig.h)
25    # include LIBGIG_HEADER_FILE(Serialization.h)
26    #else
27    # include <gig.h>
28    # include <Serialization.h>
29    #endif
30    
31  #include <gtkmm/box.h>  #include <gtkmm/box.h>
32  #include <gtkmm/actiongroup.h>  #include <gtkmm/actiongroup.h>
# Line 238  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 267  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    
295      void dimreg_all_dimregs_toggled();      void dimreg_all_dimregs_toggled();
296      gig::Instrument* get_instrument();      gig::Instrument* get_instrument();
# Line 276  protected: Line 300  protected:
300      class ModelColumns : public Gtk::TreeModel::ColumnRecord {      class ModelColumns : public Gtk::TreeModel::ColumnRecord {
301      public:      public:
302          ModelColumns() {          ModelColumns() {
303              add(m_col_nr);
304            add(m_col_name);            add(m_col_name);
305            add(m_col_instr);            add(m_col_instr);
306          }          }
307    
308            Gtk::TreeModelColumn<int> m_col_nr;
309          Gtk::TreeModelColumn<Glib::ustring> m_col_name;          Gtk::TreeModelColumn<Glib::ustring> m_col_name;
310          Gtk::TreeModelColumn<gig::Instrument*> m_col_instr;          Gtk::TreeModelColumn<gig::Instrument*> m_col_instr;
311      } m_Columns;      } m_Columns;
# Line 358  protected: Line 384  protected:
384      Gtk::CheckButton dimreg_all_regions;      Gtk::CheckButton dimreg_all_regions;
385      Gtk::CheckButton dimreg_all_dimregs;      Gtk::CheckButton dimreg_all_dimregs;
386      Gtk::CheckButton dimreg_stereo;      Gtk::CheckButton dimreg_stereo;
387    
388        Gtk::HBox legend_hbox;
389        Gtk::Label labelLegend;
390        Gtk::Image imageNoSample;
391        Gtk::Label labelNoSample;
392        Gtk::Image imageMissingSample;
393        Gtk::Label labelMissingSample;
394        Gtk::Image imageLooped;
395        Gtk::Label labelLooped;
396        Gtk::Image imageSomeLoops;
397        Gtk::Label labelSomeLoops;
398      DimRegionEdit dimreg_edit;      DimRegionEdit dimreg_edit;
399    
400      Gtk::Notebook m_TreeViewNotebook;      Gtk::Notebook m_TreeViewNotebook;
# Line 369  protected: Line 406  protected:
406          Glib::ustring sample_path; // file name of the sample to be          Glib::ustring sample_path; // file name of the sample to be
407                                     // imported                                     // imported
408      };      };
409      std::list<SampleImportItem> m_SampleImportQueue;      std::map<gig::Sample*, SampleImportItem> m_SampleImportQueue;
410    
411    
412      void on_action_file_new();      void on_action_file_new();
# Line 416  protected: Line 453  protected:
453      void show_intruments_tab();      void show_intruments_tab();
454      void show_scripts_tab();      void show_scripts_tab();
455    
456        void select_prev_region();
457        void select_next_region();
458    
459        void select_next_dim_rgn_zone();
460        void select_prev_dim_rgn_zone();
461        void select_add_next_dim_rgn_zone();
462        void select_add_prev_dim_rgn_zone();
463        void select_prev_dimension();
464        void select_next_dimension();
465    
466        Serialization::Archive m_serializationArchive; ///< Clipboard content.
467        std::vector<Serialization::Archive> m_macros; ///< User configured list of macros.
468    
469        void copy_selected_dimrgn();
470        void paste_copied_dimrgn();
471        void adjust_clipboard_content();
472        void updateClipboardCopyAvailable();
473        void updateClipboardPasteAvailable();
474        void on_clipboard_owner_change(GdkEventOwnerChange* event);
475        void on_clipboard_get(Gtk::SelectionData& selection_data, guint info);
476        void on_clipboard_clear();
477        void on_clipboard_received(const Gtk::SelectionData& selection_data);
478        void on_clipboard_received_targets(const std::vector<Glib::ustring>& targets);
479    
480      void add_instrument(gig::Instrument* instrument);      void add_instrument(gig::Instrument* instrument);
481      Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name,      Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name,
482                                                 int position = -1);                                                 int position = -1);

Legend:
Removed from v.2967  
changed lines
  Added in v.3177

  ViewVC Help
Powered by ViewVC