/[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 2541 by schoenebeck, Wed Apr 23 16:49:05 2014 UTC revision 2644 by schoenebeck, Tue Jun 17 22:55:02 2014 UTC
# Line 54  class PropDialog : public Gtk::Window, Line 54  class PropDialog : public Gtk::Window,
54  public:  public:
55      PropDialog();      PropDialog();
56      void set_info(DLS::Info* info);      void set_info(DLS::Info* info);
57        void set_file(gig::File* file);
58  protected:  protected:
59        ChoiceEntry<int> eFileFormat;
60      StringEntry eName;      StringEntry eName;
61      StringEntry eCreationDate;      StringEntry eCreationDate;
62      StringEntryMultiLine eComments;      StringEntryMultiLine eComments;
# Line 75  protected: Line 77  protected:
77      Gtk::HButtonBox buttonBox;      Gtk::HButtonBox buttonBox;
78      Gtk::Button quitButton;      Gtk::Button quitButton;
79      Table table;      Table table;
80    
81        gig::File* m_file;
82    
83        void onFileFormatChanged();
84  };  };
85    
86  class InstrumentProps : public Gtk::Window,  class InstrumentProps : public Gtk::Window,
# Line 225  protected: Line 231  protected:
231    
232      Gtk::Menu* instrument_menu;      Gtk::Menu* instrument_menu;
233    
234        std::map<gig::Sample*,int> sample_ref_count;
235    
236      class SamplesModel : public Gtk::TreeModel::ColumnRecord {      class SamplesModel : public Gtk::TreeModel::ColumnRecord {
237      public:      public:
238          SamplesModel() {          SamplesModel() {
239              add(m_col_name);              add(m_col_name);
240              add(m_col_sample);              add(m_col_sample);
241              add(m_col_group);              add(m_col_group);
242                add(m_col_refcount);
243                add(m_color);
244          }          }
245    
246          Gtk::TreeModelColumn<Glib::ustring> m_col_name;          Gtk::TreeModelColumn<Glib::ustring> m_col_name;
247          Gtk::TreeModelColumn<gig::Sample*> m_col_sample;          Gtk::TreeModelColumn<gig::Sample*> m_col_sample;
248          Gtk::TreeModelColumn<gig::Group*> m_col_group;          Gtk::TreeModelColumn<gig::Group*> m_col_group;
249            Gtk::TreeModelColumn<Glib::ustring> m_col_refcount;
250            Gtk::TreeModelColumn<Glib::ustring> m_color;
251      } m_SamplesModel;      } m_SamplesModel;
252    
253      class SamplesTreeStore : public Gtk::TreeStore {      class SamplesTreeStore : public Gtk::TreeStore {
# Line 251  protected: Line 263  protected:
263      Gtk::TreeView m_TreeViewSamples;      Gtk::TreeView m_TreeViewSamples;
264      Glib::RefPtr<SamplesTreeStore> m_refSamplesTreeModel;      Glib::RefPtr<SamplesTreeStore> m_refSamplesTreeModel;
265    
266        class ScriptsModel : public Gtk::TreeModel::ColumnRecord {
267        public:
268            ScriptsModel() {
269                add(m_col_name);
270                add(m_col_script);
271                add(m_col_group);
272            }
273    
274            Gtk::TreeModelColumn<Glib::ustring> m_col_name;
275            Gtk::TreeModelColumn<gig::Script*> m_col_script;
276            Gtk::TreeModelColumn<gig::ScriptGroup*> m_col_group;
277        } m_ScriptsModel;
278    
279        class ScriptsTreeStore : public Gtk::TreeStore {
280        public:
281            static Glib::RefPtr<ScriptsTreeStore> create(const ScriptsModel& columns) {
282                return Glib::RefPtr<ScriptsTreeStore>( new ScriptsTreeStore(columns) );
283            }
284        protected:
285            ScriptsTreeStore(const ScriptsModel& columns) : Gtk::TreeStore(columns) {}
286        };
287    
288        Gtk::ScrolledWindow m_ScrolledWindowScripts;
289        Gtk::TreeView m_TreeViewScripts;
290        Glib::RefPtr<ScriptsTreeStore> m_refScriptsTreeModel;
291    
292      Gtk::VBox dimreg_vbox;      Gtk::VBox dimreg_vbox;
293      Gtk::HBox dimreg_hbox;      Gtk::HBox dimreg_hbox;
294      Gtk::Label dimreg_label;      Gtk::Label dimreg_label;
# Line 280  protected: Line 318  protected:
318      void show_instr_props();      void show_instr_props();
319      bool instr_props_set_instrument();      bool instr_props_set_instrument();
320      void show_midi_rules();      void show_midi_rules();
321        void show_script_slots();
322      void on_action_view_status_bar();      void on_action_view_status_bar();
323      void on_action_warn_user_on_extensions();      void on_action_warn_user_on_extensions();
324      void on_action_help_about();      void on_action_help_about();
# Line 291  protected: Line 330  protected:
330      void on_action_add_sample();      void on_action_add_sample();
331      void on_action_replace_all_samples_in_all_groups();      void on_action_replace_all_samples_in_all_groups();
332      void on_action_remove_sample();      void on_action_remove_sample();
333        
334        // script right-click popup actions
335        void on_script_treeview_button_release(GdkEventButton* button);
336        void on_action_add_script_group();
337        void on_action_add_script();
338        void on_action_edit_script();
339        void on_action_remove_script();
340    
341      void on_action_add_instrument();      void on_action_add_instrument();
342      void on_action_duplicate_instrument();      void on_action_duplicate_instrument();
343      void on_action_remove_instrument();      void on_action_remove_instrument();
344    
345        void show_samples_tab();
346        void show_intruments_tab();
347        void show_scripts_tab();
348    
349      void add_instrument(gig::Instrument* instrument);      void add_instrument(gig::Instrument* instrument);
350      Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name,      Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name,
351                                                 int position = -1);                                                 int position = -1);
# Line 304  protected: Line 354  protected:
354      LoadDialog* load_dialog;      LoadDialog* load_dialog;
355      Loader* loader;      Loader* loader;
356      void load_gig(gig::File* gig, const char* filename, bool isSharedInstrument = false);      void load_gig(gig::File* gig, const char* filename, bool isSharedInstrument = false);
357        void updateSampleRefCountMap(gig::File* gig);
358    
359      gig::File* file;      gig::File* file;
360      bool file_is_shared;      bool file_is_shared;
# Line 320  protected: Line 371  protected:
371      bool check_if_savable();      bool check_if_savable();
372    
373      void on_button_release(GdkEventButton* button);      void on_button_release(GdkEventButton* button);
374        void on_scripts_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
375        void on_scripts_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,
376                                               Gtk::SelectionData& selection_data, guint, guint);
377      void on_sample_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);      void on_sample_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
378      void on_sample_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,      void on_sample_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,
379                                            Gtk::SelectionData& selection_data, guint, guint);                                            Gtk::SelectionData& selection_data, guint, guint);
# Line 328  protected: Line 382  protected:
382                                                   const Gtk::SelectionData& selection_data,                                                   const Gtk::SelectionData& selection_data,
383                                                   guint, guint time);                                                   guint, guint time);
384    
385        void script_name_changed(const Gtk::TreeModel::Path& path,
386                                 const Gtk::TreeModel::iterator& iter);
387        void script_double_clicked(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column);
388      void sample_name_changed(const Gtk::TreeModel::Path& path,      void sample_name_changed(const Gtk::TreeModel::Path& path,
389                               const Gtk::TreeModel::iterator& iter);                               const Gtk::TreeModel::iterator& iter);
390      void instrument_name_changed(const Gtk::TreeModel::Path& path,      void instrument_name_changed(const Gtk::TreeModel::Path& path,
# Line 335  protected: Line 392  protected:
392      void instr_name_changed_by_instr_props(Gtk::TreeModel::iterator& it);      void instr_name_changed_by_instr_props(Gtk::TreeModel::iterator& it);
393      sigc::connection instrument_name_connection;      sigc::connection instrument_name_connection;
394    
395        void on_action_combine_instruments();
396        void on_action_view_references();
397        void on_action_merge_files();
398        void mergeFiles(const std::vector<std::string>& filenames);
399    
400        void on_sample_ref_changed(gig::Sample* oldSample, gig::Sample* newSample);
401        void on_sample_ref_count_incremented(gig::Sample* sample, int offset);
402        void on_samples_to_be_removed(std::list<gig::Sample*> samples);
403    
404      void __import_queued_samples();      void __import_queued_samples();
405      void __clear();      void __clear();
406        void __refreshEntireGUI();
407    
408      bool close_confirmation_dialog();      bool close_confirmation_dialog();
409      bool leaving_shared_mode_dialog();      bool leaving_shared_mode_dialog();

Legend:
Removed from v.2541  
changed lines
  Added in v.2644

  ViewVC Help
Powered by ViewVC