--- gigedit/trunk/src/gigedit/mainwindow.h 2013/04/28 06:07:22 2445 +++ gigedit/trunk/src/gigedit/mainwindow.h 2014/06/07 22:34:31 2604 @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (C) 2006 - 2013 Andreas Persson + * Copyright (C) 2006 - 2014 Andreas Persson * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -42,6 +42,7 @@ #include "regionchooser.h" #include "dimregionchooser.h" #include "dimregionedit.h" +#include "midirules.h" #ifndef OLD_THREADS #include #endif @@ -53,7 +54,9 @@ public: PropDialog(); void set_info(DLS::Info* info); + void set_file(gig::File* file); protected: + ChoiceEntry eFileFormat; StringEntry eName; StringEntry eCreationDate; StringEntryMultiLine eComments; @@ -74,6 +77,10 @@ Gtk::HButtonBox buttonBox; Gtk::Button quitButton; Table table; + + gig::File* m_file; + + void onFileFormatChanged(); }; class InstrumentProps : public Gtk::Window, @@ -176,6 +183,7 @@ PropDialog propDialog; InstrumentProps instrumentProps; + MidiRules midiRules; sigc::signal file_structure_to_be_changed_signal; sigc::signal file_structure_changed_signal; @@ -249,6 +257,32 @@ Gtk::TreeView m_TreeViewSamples; Glib::RefPtr m_refSamplesTreeModel; + class ScriptsModel : public Gtk::TreeModel::ColumnRecord { + public: + ScriptsModel() { + add(m_col_name); + add(m_col_script); + add(m_col_group); + } + + Gtk::TreeModelColumn m_col_name; + Gtk::TreeModelColumn m_col_script; + Gtk::TreeModelColumn m_col_group; + } m_ScriptsModel; + + class ScriptsTreeStore : public Gtk::TreeStore { + public: + static Glib::RefPtr create(const ScriptsModel& columns) { + return Glib::RefPtr( new ScriptsTreeStore(columns) ); + } + protected: + ScriptsTreeStore(const ScriptsModel& columns) : Gtk::TreeStore(columns) {} + }; + + Gtk::ScrolledWindow m_ScrolledWindowScripts; + Gtk::TreeView m_TreeViewScripts; + Glib::RefPtr m_refScriptsTreeModel; + Gtk::VBox dimreg_vbox; Gtk::HBox dimreg_hbox; Gtk::Label dimreg_label; @@ -277,7 +311,9 @@ void on_action_quit(); void show_instr_props(); bool instr_props_set_instrument(); + void show_midi_rules(); void on_action_view_status_bar(); + void on_action_warn_user_on_extensions(); void on_action_help_about(); // sample right-click popup actions @@ -287,6 +323,13 @@ void on_action_add_sample(); void on_action_replace_all_samples_in_all_groups(); void on_action_remove_sample(); + + // script right-click popup actions + void on_script_treeview_button_release(GdkEventButton* button); + void on_action_add_script_group(); + void on_action_add_script(); + void on_action_edit_script(); + void on_action_remove_script(); void on_action_add_instrument(); void on_action_duplicate_instrument(); @@ -324,6 +367,8 @@ const Gtk::SelectionData& selection_data, guint, guint time); + void script_name_changed(const Gtk::TreeModel::Path& path, + const Gtk::TreeModel::iterator& iter); void sample_name_changed(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter); void instrument_name_changed(const Gtk::TreeModel::Path& path, @@ -331,8 +376,13 @@ void instr_name_changed_by_instr_props(Gtk::TreeModel::iterator& it); sigc::connection instrument_name_connection; + void on_action_combine_instruments(); + void on_action_merge_files(); + void mergeFiles(const std::vector& filenames); + void __import_queued_samples(); void __clear(); + void __refreshEntireGUI(); bool close_confirmation_dialog(); bool leaving_shared_mode_dialog(); @@ -342,6 +392,10 @@ bool on_delete_event(GdkEventAny* event); bool first_call_to_drag_data_get; + + bool is_copy_samples_unity_note_enabled() const; + bool is_copy_samples_fine_tune_enabled() const; + bool is_copy_samples_loop_enabled() const; }; #endif