39 |
#include <gtkmm/radiomenuitem.h> |
#include <gtkmm/radiomenuitem.h> |
40 |
#include <gtkmm/scrolledwindow.h> |
#include <gtkmm/scrolledwindow.h> |
41 |
#include <gtkmm/treestore.h> |
#include <gtkmm/treestore.h> |
42 |
|
#include <gtkmm/treemodelfilter.h> |
43 |
#include <gtkmm/uimanager.h> |
#include <gtkmm/uimanager.h> |
44 |
#include <gtkmm/window.h> |
#include <gtkmm/window.h> |
45 |
#include <gtkmm/statusbar.h> |
#include <gtkmm/statusbar.h> |
46 |
#include <gtkmm/image.h> |
#include <gtkmm/image.h> |
47 |
|
#include <gtkmm/entry.h> |
48 |
|
#include <gtk/gtknotebook.h> |
49 |
|
#include <gtkmm/notebook.h> |
50 |
|
|
51 |
#include <sstream> |
#include <sstream> |
52 |
|
|
248 |
InstrumentProps instrumentProps; |
InstrumentProps instrumentProps; |
249 |
MidiRules midiRules; |
MidiRules midiRules; |
250 |
|
|
251 |
|
/** |
252 |
|
* Ensures that the 2 signals MainWindow::dimreg_to_be_changed_signal and |
253 |
|
* MainWindowv::dimreg_changed_signal are always triggered correctly as a |
254 |
|
* pair. It behaves similar to a "mutex lock guard" design pattern. |
255 |
|
*/ |
256 |
|
class DimRegionChangeGuard : public SignalGuard<gig::DimensionRegion*> { |
257 |
|
public: |
258 |
|
DimRegionChangeGuard(MainWindow* w, gig::DimensionRegion* pDimReg) : |
259 |
|
SignalGuard<gig::DimensionRegion*>(w->dimreg_to_be_changed_signal, w->dimreg_changed_signal, pDimReg) |
260 |
|
{ |
261 |
|
} |
262 |
|
}; |
263 |
|
|
264 |
sigc::signal<void, gig::File*> file_structure_to_be_changed_signal; |
sigc::signal<void, gig::File*> file_structure_to_be_changed_signal; |
265 |
sigc::signal<void, gig::File*> file_structure_changed_signal; |
sigc::signal<void, gig::File*> file_structure_changed_signal; |
266 |
sigc::signal<void, std::list<gig::Sample*> > samples_to_be_removed_signal; |
sigc::signal<void, std::list<gig::Sample*> > samples_to_be_removed_signal; |
290 |
void on_saver_progress(); |
void on_saver_progress(); |
291 |
void on_saver_error(); |
void on_saver_error(); |
292 |
void on_saver_finished(); |
void on_saver_finished(); |
293 |
|
void updateMacroMenu(); |
294 |
|
void onMacroSelected(int iMacro); |
295 |
|
void setupMacros(); |
296 |
|
void onMacrosSetupChanged(const std::vector<Serialization::Archive>& macros); |
297 |
|
void applyMacro(Serialization::Archive& macro); |
298 |
|
void onScriptSlotsModified(gig::Instrument* pInstrument); |
299 |
|
void bringToFront(); |
300 |
|
|
301 |
void dimreg_all_dimregs_toggled(); |
void dimreg_all_dimregs_toggled(); |
302 |
gig::Instrument* get_instrument(); |
gig::Instrument* get_instrument(); |
309 |
add(m_col_nr); |
add(m_col_nr); |
310 |
add(m_col_name); |
add(m_col_name); |
311 |
add(m_col_instr); |
add(m_col_instr); |
312 |
|
add(m_col_scripts); |
313 |
} |
} |
314 |
|
|
315 |
Gtk::TreeModelColumn<int> m_col_nr; |
Gtk::TreeModelColumn<int> m_col_nr; |
316 |
Gtk::TreeModelColumn<Glib::ustring> m_col_name; |
Gtk::TreeModelColumn<Glib::ustring> m_col_name; |
317 |
Gtk::TreeModelColumn<gig::Instrument*> m_col_instr; |
Gtk::TreeModelColumn<gig::Instrument*> m_col_instr; |
318 |
|
Gtk::TreeModelColumn<Glib::ustring> m_col_scripts; |
319 |
} m_Columns; |
} m_Columns; |
320 |
|
|
321 |
Gtk::VBox m_VBox; |
Gtk::VBox m_VBox; |
325 |
|
|
326 |
Gtk::TreeView m_TreeView; |
Gtk::TreeView m_TreeView; |
327 |
Glib::RefPtr<Gtk::ListStore> m_refTreeModel; |
Glib::RefPtr<Gtk::ListStore> m_refTreeModel; |
328 |
|
Glib::RefPtr<Gtk::TreeModelFilter> m_refTreeModelFilter; //FIXME: I really would love to get rid of TreeModelFilter, because it causes behavior conflicts with get_model() all over the place (see the respective comments regarding get_model()), however I found no other way to filter a treeview effectively. |
329 |
|
|
330 |
Gtk::Menu* instrument_menu; |
Gtk::Menu* instrument_menu; |
331 |
|
Gtk::Menu* assign_scripts_menu; |
332 |
|
|
333 |
std::map<gig::Sample*,int> sample_ref_count; |
std::map<gig::Sample*,int> sample_ref_count; |
334 |
|
|
407 |
Gtk::Label labelSomeLoops; |
Gtk::Label labelSomeLoops; |
408 |
DimRegionEdit dimreg_edit; |
DimRegionEdit dimreg_edit; |
409 |
|
|
410 |
|
Gtk::VBox m_left_vbox; |
411 |
Gtk::Notebook m_TreeViewNotebook; |
Gtk::Notebook m_TreeViewNotebook; |
412 |
|
Gtk::HBox m_searchField; |
413 |
|
Gtk::Label m_searchLabel; |
414 |
|
Gtk::Entry m_searchText; |
415 |
|
|
416 |
struct SampleImportItem { |
struct SampleImportItem { |
417 |
gig::Sample* gig_sample; // pointer to the gig::Sample to |
gig::Sample* gig_sample; // pointer to the gig::Sample to |
442 |
void on_action_move_root_note_with_region_moved(); |
void on_action_move_root_note_with_region_moved(); |
443 |
void on_action_help_about(); |
void on_action_help_about(); |
444 |
|
|
445 |
|
void on_notebook_tab_switched(GtkNotebookPage* page, guint page_num); |
446 |
|
|
447 |
// sample right-click popup actions |
// sample right-click popup actions |
448 |
void on_sample_treeview_button_release(GdkEventButton* button); |
void on_sample_treeview_button_release(GdkEventButton* button); |
449 |
void on_action_sample_properties(); |
void on_action_sample_properties(); |
469 |
void show_intruments_tab(); |
void show_intruments_tab(); |
470 |
void show_scripts_tab(); |
void show_scripts_tab(); |
471 |
|
|
472 |
|
void select_prev_instrument(); |
473 |
|
void select_next_instrument(); |
474 |
|
void select_instrument_by_dir(int dir); |
475 |
|
|
476 |
void select_prev_region(); |
void select_prev_region(); |
477 |
void select_next_region(); |
void select_next_region(); |
478 |
|
|
483 |
void select_prev_dimension(); |
void select_prev_dimension(); |
484 |
void select_next_dimension(); |
void select_next_dimension(); |
485 |
|
|
486 |
Serialization::Archive m_serializationArchive; |
Serialization::Archive m_serializationArchive; ///< Clipboard content. |
487 |
|
std::vector<Serialization::Archive> m_macros; ///< User configured list of macros. |
488 |
|
|
489 |
void copy_selected_dimrgn(); |
void copy_selected_dimrgn(); |
490 |
void paste_copied_dimrgn(); |
void paste_copied_dimrgn(); |
491 |
|
void adjust_clipboard_content(); |
492 |
void updateClipboardCopyAvailable(); |
void updateClipboardCopyAvailable(); |
493 |
void updateClipboardPasteAvailable(); |
void updateClipboardPasteAvailable(); |
494 |
void on_clipboard_owner_change(GdkEventOwnerChange* event); |
void on_clipboard_owner_change(GdkEventOwnerChange* event); |
549 |
void instrument_name_changed(const Gtk::TreeModel::Path& path, |
void instrument_name_changed(const Gtk::TreeModel::Path& path, |
550 |
const Gtk::TreeModel::iterator& iter); |
const Gtk::TreeModel::iterator& iter); |
551 |
void instr_name_changed_by_instr_props(Gtk::TreeModel::iterator& it); |
void instr_name_changed_by_instr_props(Gtk::TreeModel::iterator& it); |
552 |
|
bool instrument_row_visible(const Gtk::TreeModel::const_iterator& iter); |
553 |
sigc::connection instrument_name_connection; |
sigc::connection instrument_name_connection; |
554 |
|
|
555 |
void on_action_combine_instruments(); |
void on_action_combine_instruments(); |
566 |
void __import_queued_samples(); |
void __import_queued_samples(); |
567 |
void __clear(); |
void __clear(); |
568 |
void __refreshEntireGUI(); |
void __refreshEntireGUI(); |
569 |
|
void updateScriptListOfMenu(); |
570 |
|
void assignScript(gig::Script* pScript); |
571 |
|
|
572 |
bool close_confirmation_dialog(); |
bool close_confirmation_dialog(); |
573 |
bool leaving_shared_mode_dialog(); |
bool leaving_shared_mode_dialog(); |