/[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 2621 by schoenebeck, Wed Jun 11 16:46:27 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();
# Line 304  protected: Line 350  protected:
350      LoadDialog* load_dialog;      LoadDialog* load_dialog;
351      Loader* loader;      Loader* loader;
352      void load_gig(gig::File* gig, const char* filename, bool isSharedInstrument = false);      void load_gig(gig::File* gig, const char* filename, bool isSharedInstrument = false);
353        void updateSampleRefCountMap(gig::File* gig);
354    
355      gig::File* file;      gig::File* file;
356      bool file_is_shared;      bool file_is_shared;
# Line 320  protected: Line 367  protected:
367      bool check_if_savable();      bool check_if_savable();
368    
369      void on_button_release(GdkEventButton* button);      void on_button_release(GdkEventButton* button);
370        void on_scripts_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
371        void on_scripts_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,
372                                               Gtk::SelectionData& selection_data, guint, guint);
373      void on_sample_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);      void on_sample_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
374      void on_sample_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,      void on_sample_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,
375                                            Gtk::SelectionData& selection_data, guint, guint);                                            Gtk::SelectionData& selection_data, guint, guint);
# Line 328  protected: Line 378  protected:
378                                                   const Gtk::SelectionData& selection_data,                                                   const Gtk::SelectionData& selection_data,
379                                                   guint, guint time);                                                   guint, guint time);
380    
381        void script_name_changed(const Gtk::TreeModel::Path& path,
382                                 const Gtk::TreeModel::iterator& iter);
383      void sample_name_changed(const Gtk::TreeModel::Path& path,      void sample_name_changed(const Gtk::TreeModel::Path& path,
384                               const Gtk::TreeModel::iterator& iter);                               const Gtk::TreeModel::iterator& iter);
385      void instrument_name_changed(const Gtk::TreeModel::Path& path,      void instrument_name_changed(const Gtk::TreeModel::Path& path,
# Line 335  protected: Line 387  protected:
387      void instr_name_changed_by_instr_props(Gtk::TreeModel::iterator& it);      void instr_name_changed_by_instr_props(Gtk::TreeModel::iterator& it);
388      sigc::connection instrument_name_connection;      sigc::connection instrument_name_connection;
389    
390        void on_action_combine_instruments();
391        void on_action_merge_files();
392        void mergeFiles(const std::vector<std::string>& filenames);
393    
394        void on_sample_ref_changed(gig::Sample* oldSample, gig::Sample* newSample);
395        void on_sample_ref_count_incremented(gig::Sample* sample, int offset);
396        void on_samples_to_be_removed(std::list<gig::Sample*> samples);
397    
398      void __import_queued_samples();      void __import_queued_samples();
399      void __clear();      void __clear();
400        void __refreshEntireGUI();
401    
402      bool close_confirmation_dialog();      bool close_confirmation_dialog();
403      bool leaving_shared_mode_dialog();      bool leaving_shared_mode_dialog();

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

  ViewVC Help
Powered by ViewVC