/[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 1725 by persson, Sat Apr 26 08:52:15 2008 UTC revision 3068 by schoenebeck, Mon Jan 2 22:13:01 2017 UTC
# Line 1  Line 1 
1  /*                                                         -*- c++ -*-  /*                                                         -*- c++ -*-
2   * Copyright (C) 2006 - 2008 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    #else
26    # include <gig.h>
27    #endif
28    
29    #include <gtkmm/box.h>
30  #include <gtkmm/actiongroup.h>  #include <gtkmm/actiongroup.h>
31  #include <gtkmm/buttonbox.h>  #include <gtkmm/buttonbox.h>
32  #include <gtkmm/dialog.h>  #include <gtkmm/dialog.h>
33  #include <gtkmm/liststore.h>  #include <gtkmm/liststore.h>
34    #include <gtkmm/menu.h>
35  #include <gtkmm/paned.h>  #include <gtkmm/paned.h>
36  #include <gtkmm/progressbar.h>  #include <gtkmm/progressbar.h>
37    #include <gtkmm/radiomenuitem.h>
38  #include <gtkmm/scrolledwindow.h>  #include <gtkmm/scrolledwindow.h>
39  #include <gtkmm/treestore.h>  #include <gtkmm/treestore.h>
40  #include <gtkmm/uimanager.h>  #include <gtkmm/uimanager.h>
# Line 40  Line 47 
47  #include "regionchooser.h"  #include "regionchooser.h"
48  #include "dimregionchooser.h"  #include "dimregionchooser.h"
49  #include "dimregionedit.h"  #include "dimregionedit.h"
50    #include "midirules.h"
51    #ifndef OLD_THREADS
52    #include <glibmm/threads.h>
53    #endif
54    #include "ManagedWindow.h"
55    
56  class MainWindow;  class MainWindow;
57    
58  class Table : public Gtk::Table  class PropDialog : public ManagedWindow,
59  {                     public PropEditor<DLS::Info> {
 public:  
     Table(int x, int y);  
     void add(BoolEntry& boolentry);  
     void add(BoolEntryPlus6& boolentry);  
     void add(LabelWidget& labelwidget);  
 private:  
     int rowno;  
 };  
   
 class PropDialog : public Gtk::Window {  
60  public:  public:
61      PropDialog();      PropDialog();
62      void set_info(DLS::Info* info);      void set_info(DLS::Info* info);
63      sigc::signal<void>& signal_info_changed();      void set_file(gig::File* file);
64    
65        // implementation for abstract methods of interface class "ManagedWindow"
66        virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->filePropsWindowX; }
67        virtual Settings::Property<int>* windowSettingY() { return &Settings::singleton()->filePropsWindowY; }
68        virtual Settings::Property<int>* windowSettingWidth() { return &Settings::singleton()->filePropsWindowW; }
69        virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->filePropsWindowH; }
70    
71  protected:  protected:
72      sigc::signal<void> info_changed;      ChoiceEntry<int> eFileFormat;
73      StringEntry eName;      StringEntry eName;
74      StringEntry eCreationDate;      StringEntry eCreationDate;
75      StringEntryMultiLine eComments;      StringEntryMultiLine eComments;
# Line 81  protected: Line 90  protected:
90      Gtk::HButtonBox buttonBox;      Gtk::HButtonBox buttonBox;
91      Gtk::Button quitButton;      Gtk::Button quitButton;
92      Table table;      Table table;
     int update_model;  
     DLS::Info* info;  
93    
94      template<typename T>      gig::File* m_file;
     void set_member(T value, T DLS::Info::* member) {  
         if (update_model == 0) {  
             info->*member = value;  
             info_changed();  
         }  
     }  
95    
96      template<typename C, typename T>      void onFileFormatChanged();
     void connect(C& widget, T DLS::Info::* member) {  
         widget.signal_value_changed().connect(  
             sigc::compose(  
                 sigc::bind(sigc::mem_fun(*this, &PropDialog::set_member<T>), member),  
                 sigc::mem_fun(widget, &C::get_value)));  
     }  
97  };  };
98    
99  class InstrumentProps : public Gtk::Window {  class InstrumentProps : public ManagedWindow,
100                            public PropEditor<gig::Instrument> {
101  public:  public:
102      InstrumentProps();      InstrumentProps();
103      void set_instrument(gig::Instrument* instrument);      void set_instrument(gig::Instrument* instrument);
104      sigc::signal<void>& signal_instrument_changed();      gig::Instrument* get_instrument() { return m; }
105  protected:      void update_name();
106      gig::Instrument* instrument;      sigc::signal<void>& signal_name_changed() {
107      int update_model;          return sig_name_changed;
   
     template<typename T>  
     void set_value(T value, sigc::slot<void, InstrumentProps*, T> setter) {  
         if (update_model == 0) {  
             setter(this, value);  
             instrument_changed();  
         }  
     }  
   
     template<typename C, typename T>  
     void connect(C& widget, T gig::Instrument::* member) {  
         widget.signal_value_changed().connect(  
             sigc::compose(  
                 sigc::bind(sigc::mem_fun(*this, &InstrumentProps::set_value<T>),  
                            sigc::bind(sigc::mem_fun(&InstrumentProps::set_member<T>), member)),  
                 sigc::mem_fun(widget, &C::get_value)));  
     }  
   
     template<typename C, typename T>  
     void connect(C& widget, void (InstrumentProps::*setter)(T)) {  
         widget.signal_value_changed().connect(  
             sigc::compose(  
                 sigc::bind(sigc::mem_fun(*this, &InstrumentProps::set_value<T>),  
                            sigc::mem_fun(setter)),  
                 sigc::mem_fun(widget, &C::get_value)));  
108      }      }
109    
110      template<typename T>      // implementation for abstract methods of interface class "ManagedWindow"
111      void set_member(T value, T gig::Instrument::* member) {      virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->instrPropsWindowX; }
112          instrument->*member = value;      virtual Settings::Property<int>* windowSettingY() { return &Settings::singleton()->instrPropsWindowY; }
113      }      virtual Settings::Property<int>* windowSettingWidth() { return &Settings::singleton()->instrPropsWindowW; }
114        virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->instrPropsWindowH; }
115    
116    protected:
117        void set_Name(const gig::String& name);
118      void set_IsDrum(bool value);      void set_IsDrum(bool value);
119      void set_MIDIBank(uint16_t value);      void set_MIDIBank(uint16_t value);
120      void set_MIDIProgram(uint32_t value);      void set_MIDIProgram(uint32_t value);
     void set_DimensionKeyRange_low(uint8_t value);  
     void set_DimensionKeyRange_high(uint8_t value);  
121    
122        sigc::signal<void> sig_name_changed;
123      Gtk::VBox vbox;      Gtk::VBox vbox;
124      Gtk::HButtonBox buttonBox;      Gtk::HButtonBox buttonBox;
125      Gtk::Button quitButton;      Gtk::Button quitButton;
# Line 163  protected: Line 136  protected:
136      BoolEntry ePianoReleaseMode;      BoolEntry ePianoReleaseMode;
137      NoteEntry eDimensionKeyRangeLow;      NoteEntry eDimensionKeyRangeLow;
138      NoteEntry eDimensionKeyRangeHigh;      NoteEntry eDimensionKeyRangeHigh;
     sigc::signal<void> instrument_changed;  
139  };  };
140    
141  class LoadDialog : public Gtk::Dialog {  class ProgressDialog : public Gtk::Dialog {
142  public:  public:
143      LoadDialog(const Glib::ustring& title, Gtk::Window& parent);      ProgressDialog(const Glib::ustring& title, Gtk::Window& parent);
144      void set_fraction(float fraction) { progressBar.set_fraction(fraction); }      void set_fraction(float fraction) { progressBar.set_fraction(fraction); }
145  protected:  protected:
146      Gtk::ProgressBar progressBar;      Gtk::ProgressBar progressBar;
# Line 179  public: Line 151  public:
151      Loader(const char* filename);      Loader(const char* filename);
152      void launch();      void launch();
153      Glib::Dispatcher& signal_progress();      Glib::Dispatcher& signal_progress();
154      Glib::Dispatcher& signal_finished();      Glib::Dispatcher& signal_finished(); ///< Finished successfully, without error.
155        Glib::Dispatcher& signal_error();
156      void progress_callback(float fraction);      void progress_callback(float fraction);
157      float get_progress();      float get_progress();
158      const char* filename;      const Glib::ustring filename;
159        Glib::ustring error_message;
160      gig::File* gig;      gig::File* gig;
161    
162  private:  private:
163      Glib::Thread* thread;      Glib::Threads::Thread* thread;
164      void thread_function();      void thread_function();
165      Glib::Dispatcher finished_dispatcher;      Glib::Dispatcher finished_dispatcher;
166      Glib::Dispatcher progress_dispatcher;      Glib::Dispatcher progress_dispatcher;
167      Glib::Mutex progressMutex;      Glib::Dispatcher error_dispatcher;
168        Glib::Threads::Mutex progressMutex;
169      float progress;      float progress;
170  };  };
171    
172  class MainWindow : public Gtk::Window {  class Saver : public sigc::trackable {
173    public:
174        Saver(gig::File* file, Glib::ustring filename = ""); ///< one argument means "save", two arguments means "save as"
175        void launch();
176        Glib::Dispatcher& signal_progress();
177        Glib::Dispatcher& signal_finished(); ///< Finished successfully, without error.
178        Glib::Dispatcher& signal_error();
179        void progress_callback(float fraction);
180        float get_progress();
181        gig::File* gig;
182        const Glib::ustring filename;
183        Glib::ustring error_message;
184    
185    private:
186        Glib::Threads::Thread* thread;
187        void thread_function();
188        Glib::Dispatcher finished_dispatcher;
189        Glib::Dispatcher progress_dispatcher;
190        Glib::Dispatcher error_dispatcher;
191        Glib::Threads::Mutex progressMutex;
192        float progress;
193    };
194    
195    class MainWindow : public ManagedWindow {
196  public:  public:
197      MainWindow();      MainWindow();
198      virtual ~MainWindow();      virtual ~MainWindow();
# Line 209  public: Line 207  public:
207      sigc::signal<void, gig::Region*>& signal_region_changed();      sigc::signal<void, gig::Region*>& signal_region_changed();
208      sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_to_be_changed();      sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_to_be_changed();
209      sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_changed();      sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_changed();
210        sigc::signal<void, gig::Sample*>& signal_sample_changed();
211      sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/>& signal_sample_ref_changed();      sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/>& signal_sample_ref_changed();
212    
213      sigc::signal<void, int/*key*/, int/*velocity*/>& signal_note_on();      sigc::signal<void, int/*key*/, int/*velocity*/>& signal_note_on();
# Line 217  public: Line 216  public:
216      sigc::signal<void, int/*key*/, int/*velocity*/>& signal_keyboard_key_hit();      sigc::signal<void, int/*key*/, int/*velocity*/>& signal_keyboard_key_hit();
217      sigc::signal<void, int/*key*/, int/*velocity*/>& signal_keyboard_key_released();      sigc::signal<void, int/*key*/, int/*velocity*/>& signal_keyboard_key_released();
218    
219        sigc::signal<void, gig::Instrument*>& signal_switch_sampler_instrument();
220    
221        sigc::signal<void, gig::Script*> signal_script_to_be_changed;
222        sigc::signal<void, gig::Script*> signal_script_changed;
223    
224        // implementation for abstract methods of interface class "ManagedWindow"
225        virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->mainWindowX; }
226        virtual Settings::Property<int>* windowSettingY() { return &Settings::singleton()->mainWindowY; }
227        virtual Settings::Property<int>* windowSettingWidth() { return &Settings::singleton()->mainWindowW; }
228        virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->mainWindowH; }
229    
230  protected:  protected:
231      Glib::RefPtr<Gtk::ActionGroup> actionGroup;      Glib::RefPtr<Gtk::ActionGroup> actionGroup;
232      Glib::RefPtr<Gtk::UIManager> uiManager;      Glib::RefPtr<Gtk::UIManager> uiManager;
# Line 230  protected: Line 240  protected:
240    
241      PropDialog propDialog;      PropDialog propDialog;
242      InstrumentProps instrumentProps;      InstrumentProps instrumentProps;
243        MidiRules midiRules;
244    
245      sigc::signal<void, gig::File*> file_structure_to_be_changed_signal;      sigc::signal<void, gig::File*> file_structure_to_be_changed_signal;
246      sigc::signal<void, gig::File*> file_structure_changed_signal;      sigc::signal<void, gig::File*> file_structure_changed_signal;
# Line 239  protected: Line 250  protected:
250      sigc::signal<void, gig::Region*> region_changed_signal;      sigc::signal<void, gig::Region*> region_changed_signal;
251      sigc::signal<void, gig::DimensionRegion*> dimreg_to_be_changed_signal;      sigc::signal<void, gig::DimensionRegion*> dimreg_to_be_changed_signal;
252      sigc::signal<void, gig::DimensionRegion*> dimreg_changed_signal;      sigc::signal<void, gig::DimensionRegion*> dimreg_changed_signal;
253        sigc::signal<void, gig::Sample*> sample_changed_signal;
254      sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/> sample_ref_changed_signal;      sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/> sample_ref_changed_signal;
255    
256      sigc::signal<void, int/*key*/, int/*velocity*/> note_on_signal;      sigc::signal<void, int/*key*/, int/*velocity*/> note_on_signal;
257      sigc::signal<void, int/*key*/, int/*velocity*/> note_off_signal;      sigc::signal<void, int/*key*/, int/*velocity*/> note_off_signal;
258    
259      void on_instrument_selection_change(int index);      sigc::signal<void, gig::Instrument*> switch_sampler_instrument_signal;
260    
261        void on_instrument_selection_change(Gtk::RadioMenuItem* item);
262      void on_sel_change();      void on_sel_change();
263      void region_changed();      void region_changed();
264      void dimreg_changed();      void dimreg_changed();
265        void select_instrument(gig::Instrument* instrument);
266        bool select_dimension_region(gig::DimensionRegion* dimRgn);
267        void select_sample(gig::Sample* sample);
268      void on_loader_progress();      void on_loader_progress();
269      void on_loader_finished();      void on_loader_finished();
270        void on_loader_error();
271        void on_saver_progress();
272        void on_saver_error();
273        void on_saver_finished();
274    
275      void dimreg_all_dimregs_toggled();      void dimreg_all_dimregs_toggled();
276      gig::Instrument* get_instrument();      gig::Instrument* get_instrument();
277      void add_region_to_dimregs(gig::Region* region, bool stereo, bool all_dimregs);      void add_region_to_dimregs(gig::Region* region, bool stereo, bool all_dimregs);
# Line 258  protected: Line 280  protected:
280      class ModelColumns : public Gtk::TreeModel::ColumnRecord {      class ModelColumns : public Gtk::TreeModel::ColumnRecord {
281      public:      public:
282          ModelColumns() {          ModelColumns() {
283              add(m_col_nr);
284            add(m_col_name);            add(m_col_name);
285            add(m_col_instr);            add(m_col_instr);
286          }          }
287    
288            Gtk::TreeModelColumn<int> m_col_nr;
289          Gtk::TreeModelColumn<Glib::ustring> m_col_name;          Gtk::TreeModelColumn<Glib::ustring> m_col_name;
290          Gtk::TreeModelColumn<gig::Instrument*> m_col_instr;          Gtk::TreeModelColumn<gig::Instrument*> m_col_instr;
291      } m_Columns;      } m_Columns;
# Line 274  protected: Line 298  protected:
298      Gtk::TreeView m_TreeView;      Gtk::TreeView m_TreeView;
299      Glib::RefPtr<Gtk::ListStore> m_refTreeModel;      Glib::RefPtr<Gtk::ListStore> m_refTreeModel;
300    
301        Gtk::Menu* instrument_menu;
302    
303        std::map<gig::Sample*,int> sample_ref_count;
304    
305      class SamplesModel : public Gtk::TreeModel::ColumnRecord {      class SamplesModel : public Gtk::TreeModel::ColumnRecord {
306      public:      public:
307          SamplesModel() {          SamplesModel() {
308              add(m_col_name);              add(m_col_name);
309              add(m_col_sample);              add(m_col_sample);
310              add(m_col_group);              add(m_col_group);
311                add(m_col_refcount);
312                add(m_color);
313          }          }
314    
315          Gtk::TreeModelColumn<Glib::ustring> m_col_name;          Gtk::TreeModelColumn<Glib::ustring> m_col_name;
316          Gtk::TreeModelColumn<gig::Sample*> m_col_sample;          Gtk::TreeModelColumn<gig::Sample*> m_col_sample;
317          Gtk::TreeModelColumn<gig::Group*> m_col_group;          Gtk::TreeModelColumn<gig::Group*> m_col_group;
318            Gtk::TreeModelColumn<Glib::ustring> m_col_refcount;
319            Gtk::TreeModelColumn<Glib::ustring> m_color;
320      } m_SamplesModel;      } m_SamplesModel;
321    
322      class SamplesTreeStore : public Gtk::TreeStore {      class SamplesTreeStore : public Gtk::TreeStore {
# Line 300  protected: Line 332  protected:
332      Gtk::TreeView m_TreeViewSamples;      Gtk::TreeView m_TreeViewSamples;
333      Glib::RefPtr<SamplesTreeStore> m_refSamplesTreeModel;      Glib::RefPtr<SamplesTreeStore> m_refSamplesTreeModel;
334    
335        class ScriptsModel : public Gtk::TreeModel::ColumnRecord {
336        public:
337            ScriptsModel() {
338                add(m_col_name);
339                add(m_col_script);
340                add(m_col_group);
341            }
342    
343            Gtk::TreeModelColumn<Glib::ustring> m_col_name;
344            Gtk::TreeModelColumn<gig::Script*> m_col_script;
345            Gtk::TreeModelColumn<gig::ScriptGroup*> m_col_group;
346        } m_ScriptsModel;
347    
348        class ScriptsTreeStore : public Gtk::TreeStore {
349        public:
350            static Glib::RefPtr<ScriptsTreeStore> create(const ScriptsModel& columns) {
351                return Glib::RefPtr<ScriptsTreeStore>( new ScriptsTreeStore(columns) );
352            }
353        protected:
354            ScriptsTreeStore(const ScriptsModel& columns) : Gtk::TreeStore(columns) {}
355        };
356    
357        Gtk::ScrolledWindow m_ScrolledWindowScripts;
358        Gtk::TreeView m_TreeViewScripts;
359        Glib::RefPtr<ScriptsTreeStore> m_refScriptsTreeModel;
360    
361      Gtk::VBox dimreg_vbox;      Gtk::VBox dimreg_vbox;
362      Gtk::HBox dimreg_hbox;      Gtk::HBox dimreg_hbox;
363      Gtk::Label dimreg_label;      Gtk::Label dimreg_label;
# Line 308  protected: Line 366  protected:
366      Gtk::CheckButton dimreg_stereo;      Gtk::CheckButton dimreg_stereo;
367      DimRegionEdit dimreg_edit;      DimRegionEdit dimreg_edit;
368    
     Gtk::Notebook m_Notebook;  
369      Gtk::Notebook m_TreeViewNotebook;      Gtk::Notebook m_TreeViewNotebook;
370    
371      struct SampleImportItem {      struct SampleImportItem {
# Line 328  protected: Line 385  protected:
385      void on_action_file_properties();      void on_action_file_properties();
386      void on_action_quit();      void on_action_quit();
387      void show_instr_props();      void show_instr_props();
388        bool instr_props_set_instrument();
389        void show_midi_rules();
390        void show_script_slots();
391      void on_action_view_status_bar();      void on_action_view_status_bar();
392        void on_auto_restore_win_dim();
393        void on_save_with_temporary_file();
394        void on_action_refresh_all();
395        void on_action_warn_user_on_extensions();
396        void on_action_sync_sampler_instrument_selection();
397        void on_action_move_root_note_with_region_moved();
398      void on_action_help_about();      void on_action_help_about();
399    
400      // sample right-click popup actions      // sample right-click popup actions
# Line 336  protected: Line 402  protected:
402      void on_action_sample_properties();      void on_action_sample_properties();
403      void on_action_add_group();      void on_action_add_group();
404      void on_action_add_sample();      void on_action_add_sample();
405        void on_action_replace_sample();
406      void on_action_replace_all_samples_in_all_groups();      void on_action_replace_all_samples_in_all_groups();
407      void on_action_remove_sample();      void on_action_remove_sample();
408        void on_action_remove_unused_samples();
409    
410        // script right-click popup actions
411        void on_script_treeview_button_release(GdkEventButton* button);
412        void on_action_add_script_group();
413        void on_action_add_script();
414        void on_action_edit_script();
415        void on_action_remove_script();
416    
417      void on_action_add_instrument();      void on_action_add_instrument();
418        void on_action_duplicate_instrument();
419      void on_action_remove_instrument();      void on_action_remove_instrument();
420    
421      LoadDialog* load_dialog;      void show_samples_tab();
422        void show_intruments_tab();
423        void show_scripts_tab();
424    
425        void add_instrument(gig::Instrument* instrument);
426        Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name,
427                                                   int position = -1);
428        void remove_instrument_from_menu(int index);
429    
430        ProgressDialog* progress_dialog;
431      Loader* loader;      Loader* loader;
432        Saver* saver;
433      void load_gig(gig::File* gig, const char* filename, bool isSharedInstrument = false);      void load_gig(gig::File* gig, const char* filename, bool isSharedInstrument = false);
434        void updateSampleRefCountMap(gig::File* gig);
435    
436      gig::File* file;      gig::File* file;
437      bool file_is_shared;      bool file_is_shared;
# Line 361  protected: Line 448  protected:
448      bool check_if_savable();      bool check_if_savable();
449    
450      void on_button_release(GdkEventButton* button);      void on_button_release(GdkEventButton* button);
451        void on_instruments_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
452        void on_instruments_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,
453                                                   Gtk::SelectionData& selection_data, guint, guint);
454        void on_instruments_treeview_drop_drag_data_received(
455            const Glib::RefPtr<Gdk::DragContext>& context, int, int,
456            const Gtk::SelectionData& selection_data, guint, guint time
457        );
458        void on_scripts_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
459        void on_scripts_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,
460                                               Gtk::SelectionData& selection_data, guint, guint);
461      void on_sample_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);      void on_sample_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
462      void on_sample_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,      void on_sample_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,
463                                            Gtk::SelectionData& selection_data, guint, guint);                                            Gtk::SelectionData& selection_data, guint, guint);
# Line 369  protected: Line 466  protected:
466                                                   const Gtk::SelectionData& selection_data,                                                   const Gtk::SelectionData& selection_data,
467                                                   guint, guint time);                                                   guint, guint time);
468    
469        void script_name_changed(const Gtk::TreeModel::Path& path,
470                                 const Gtk::TreeModel::iterator& iter);
471        void script_double_clicked(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column);
472      void sample_name_changed(const Gtk::TreeModel::Path& path,      void sample_name_changed(const Gtk::TreeModel::Path& path,
473                               const Gtk::TreeModel::iterator& iter);                               const Gtk::TreeModel::iterator& iter);
474      void instrument_name_changed(const Gtk::TreeModel::Path& path,      void instrument_name_changed(const Gtk::TreeModel::Path& path,
475                                   const Gtk::TreeModel::iterator& iter);                                   const Gtk::TreeModel::iterator& iter);
476        void instr_name_changed_by_instr_props(Gtk::TreeModel::iterator& it);
477        sigc::connection instrument_name_connection;
478    
479        void on_action_combine_instruments();
480        void on_action_view_references();
481        void on_action_merge_files();
482        void mergeFiles(const std::vector<std::string>& filenames);
483    
484        void on_sample_ref_changed(gig::Sample* oldSample, gig::Sample* newSample);
485        void on_sample_ref_count_incremented(gig::Sample* sample, int offset);
486        void on_samples_to_be_removed(std::list<gig::Sample*> samples);
487    
488        void add_or_replace_sample(bool replace);
489    
490      void __import_queued_samples();      void __import_queued_samples();
491      void __clear();      void __clear();
492        void __refreshEntireGUI();
493    
494      bool close_confirmation_dialog();      bool close_confirmation_dialog();
495      bool leaving_shared_mode_dialog();      bool leaving_shared_mode_dialog();
# Line 385  protected: Line 499  protected:
499      bool on_delete_event(GdkEventAny* event);      bool on_delete_event(GdkEventAny* event);
500    
501      bool first_call_to_drag_data_get;      bool first_call_to_drag_data_get;
502        
503        bool is_copy_samples_unity_note_enabled() const;
504        bool is_copy_samples_fine_tune_enabled() const;
505        bool is_copy_samples_loop_enabled() const;
506  };  };
507    
508  #endif  #endif

Legend:
Removed from v.1725  
changed lines
  Added in v.3068

  ViewVC Help
Powered by ViewVC