1 |
/* -*- c++ -*- |
/* -*- c++ -*- |
2 |
* Copyright (C) 2006 - 2017 Andreas Persson |
* Copyright (C) 2006 - 2019 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 |
22 |
|
|
23 |
#ifdef LIBGIG_HEADER_FILE |
#ifdef LIBGIG_HEADER_FILE |
24 |
# include LIBGIG_HEADER_FILE(gig.h) |
# include LIBGIG_HEADER_FILE(gig.h) |
25 |
|
# include LIBGIG_HEADER_FILE(Serialization.h) |
26 |
#else |
#else |
27 |
# include <gig.h> |
# include <gig.h> |
28 |
|
# include <Serialization.h> |
29 |
#endif |
#endif |
30 |
|
|
31 |
|
#include "compat.h" |
32 |
|
|
33 |
#include <gtkmm/box.h> |
#include <gtkmm/box.h> |
|
#include <gtkmm/actiongroup.h> |
|
34 |
#include <gtkmm/buttonbox.h> |
#include <gtkmm/buttonbox.h> |
35 |
#include <gtkmm/dialog.h> |
#include <gtkmm/dialog.h> |
36 |
#include <gtkmm/liststore.h> |
#include <gtkmm/liststore.h> |
40 |
#include <gtkmm/radiomenuitem.h> |
#include <gtkmm/radiomenuitem.h> |
41 |
#include <gtkmm/scrolledwindow.h> |
#include <gtkmm/scrolledwindow.h> |
42 |
#include <gtkmm/treestore.h> |
#include <gtkmm/treestore.h> |
43 |
#include <gtkmm/uimanager.h> |
#include <gtkmm/treemodelfilter.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 <gtkmm/notebook.h> |
49 |
|
|
50 |
|
#if USE_GTKMM_BUILDER |
51 |
|
# include <gtkmm/builder.h> |
52 |
|
#else |
53 |
|
# include <gtkmm/uimanager.h> // deprecated in gtkmm >= 3.21.4 |
54 |
|
#endif |
55 |
|
|
56 |
#include <sstream> |
#include <sstream> |
57 |
|
|
59 |
#include "dimregionchooser.h" |
#include "dimregionchooser.h" |
60 |
#include "dimregionedit.h" |
#include "dimregionedit.h" |
61 |
#include "midirules.h" |
#include "midirules.h" |
62 |
|
#ifdef GLIB_THREADS |
63 |
#ifndef OLD_THREADS |
#ifndef OLD_THREADS |
64 |
#include <glibmm/threads.h> |
#include <glibmm/threads.h> |
65 |
#endif |
#endif |
66 |
|
#else |
67 |
|
#include <thread> |
68 |
|
#include <mutex> |
69 |
|
#endif |
70 |
#include "ManagedWindow.h" |
#include "ManagedWindow.h" |
71 |
|
|
72 |
class MainWindow; |
class MainWindow; |
75 |
public PropEditor<DLS::Info> { |
public PropEditor<DLS::Info> { |
76 |
public: |
public: |
77 |
PropDialog(); |
PropDialog(); |
|
void set_info(DLS::Info* info); |
|
78 |
void set_file(gig::File* file); |
void set_file(gig::File* file); |
79 |
|
|
80 |
// implementation for abstract methods of interface class "ManagedWindow" |
// implementation for abstract methods of interface class "ManagedWindow" |
101 |
StringEntry eSourceForm; |
StringEntry eSourceForm; |
102 |
StringEntry eCommissioned; |
StringEntry eCommissioned; |
103 |
StringEntry eSubject; |
StringEntry eSubject; |
104 |
Gtk::VBox vbox; |
VBox vbox; |
105 |
Gtk::HButtonBox buttonBox; |
HButtonBox buttonBox; |
106 |
Gtk::Button quitButton; |
Gtk::Button quitButton; |
107 |
Table table; |
Table table; |
108 |
|
|
109 |
gig::File* m_file; |
gig::File* m_file; |
110 |
|
|
111 |
void onFileFormatChanged(); |
void set_FileFormat(int value); |
112 |
}; |
}; |
113 |
|
|
114 |
class InstrumentProps : public ManagedWindow, |
class InstrumentProps : public ManagedWindow, |
135 |
void set_MIDIProgram(uint32_t value); |
void set_MIDIProgram(uint32_t value); |
136 |
|
|
137 |
sigc::signal<void> sig_name_changed; |
sigc::signal<void> sig_name_changed; |
138 |
Gtk::VBox vbox; |
VBox vbox; |
139 |
Gtk::HButtonBox buttonBox; |
HButtonBox buttonBox; |
140 |
Gtk::Button quitButton; |
Gtk::Button quitButton; |
141 |
Table table; |
Table table; |
142 |
StringEntry eName; |
StringEntry eName; |
161 |
Gtk::ProgressBar progressBar; |
Gtk::ProgressBar progressBar; |
162 |
}; |
}; |
163 |
|
|
164 |
class Loader : public sigc::trackable { |
class LoaderSaverBase { |
165 |
public: |
public: |
|
Loader(const char* filename); |
|
166 |
void launch(); |
void launch(); |
167 |
Glib::Dispatcher& signal_progress(); |
Glib::Dispatcher& signal_progress(); |
168 |
Glib::Dispatcher& signal_finished(); ///< Finished successfully, without error. |
Glib::Dispatcher& signal_finished(); ///< Finished successfully, without error. |
169 |
Glib::Dispatcher& signal_error(); |
Glib::Dispatcher& signal_error(); |
170 |
void progress_callback(float fraction); |
void progress_callback(float fraction); |
171 |
float get_progress(); |
float get_progress(); |
172 |
|
void join(); |
173 |
const Glib::ustring filename; |
const Glib::ustring filename; |
174 |
Glib::ustring error_message; |
Glib::ustring error_message; |
175 |
gig::File* gig; |
gig::File* gig; |
176 |
|
|
177 |
|
protected: |
178 |
|
LoaderSaverBase(const Glib::ustring filename, gig::File* gig); |
179 |
|
|
180 |
private: |
private: |
181 |
|
#ifdef GLIB_THREADS |
182 |
Glib::Threads::Thread* thread; |
Glib::Threads::Thread* thread; |
183 |
|
Glib::Threads::Mutex progressMutex; |
184 |
|
#else |
185 |
|
std::thread thread; |
186 |
|
std::mutex progressMutex; |
187 |
|
#endif |
188 |
void thread_function(); |
void thread_function(); |
189 |
|
virtual void thread_function_sub(gig::progress_t& progress) = 0; |
190 |
Glib::Dispatcher finished_dispatcher; |
Glib::Dispatcher finished_dispatcher; |
191 |
Glib::Dispatcher progress_dispatcher; |
Glib::Dispatcher progress_dispatcher; |
192 |
Glib::Dispatcher error_dispatcher; |
Glib::Dispatcher error_dispatcher; |
|
Glib::Threads::Mutex progressMutex; |
|
193 |
float progress; |
float progress; |
194 |
}; |
}; |
195 |
|
|
196 |
class Saver : public sigc::trackable { |
class Loader : public LoaderSaverBase { |
197 |
|
public: |
198 |
|
Loader(const char* filename); |
199 |
|
|
200 |
|
private: |
201 |
|
void thread_function_sub(gig::progress_t& progress); |
202 |
|
}; |
203 |
|
|
204 |
|
class Saver : public LoaderSaverBase { |
205 |
public: |
public: |
206 |
Saver(gig::File* file, Glib::ustring filename = ""); ///< one argument means "save", two arguments means "save as" |
Saver(gig::File* file, Glib::ustring filename = ""); ///< one argument means "save", two arguments means "save as" |
|
void launch(); |
|
|
Glib::Dispatcher& signal_progress(); |
|
|
Glib::Dispatcher& signal_finished(); ///< Finished successfully, without error. |
|
|
Glib::Dispatcher& signal_error(); |
|
|
void progress_callback(float fraction); |
|
|
float get_progress(); |
|
|
gig::File* gig; |
|
|
const Glib::ustring filename; |
|
|
Glib::ustring error_message; |
|
207 |
|
|
208 |
private: |
private: |
209 |
Glib::Threads::Thread* thread; |
void thread_function_sub(gig::progress_t& progress); |
|
void thread_function(); |
|
|
Glib::Dispatcher finished_dispatcher; |
|
|
Glib::Dispatcher progress_dispatcher; |
|
|
Glib::Dispatcher error_dispatcher; |
|
|
Glib::Threads::Mutex progressMutex; |
|
|
float progress; |
|
210 |
}; |
}; |
211 |
|
|
212 |
class MainWindow : public ManagedWindow { |
class MainWindow : public ManagedWindow { |
245 |
virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->mainWindowH; } |
virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->mainWindowH; } |
246 |
|
|
247 |
protected: |
protected: |
248 |
|
#if USE_GTKMM_BUILDER |
249 |
|
Glib::RefPtr<Gio::SimpleActionGroup> m_actionGroup; |
250 |
|
Glib::RefPtr<Gtk::Builder> m_uiManager; |
251 |
|
#else |
252 |
Glib::RefPtr<Gtk::ActionGroup> actionGroup; |
Glib::RefPtr<Gtk::ActionGroup> actionGroup; |
253 |
Glib::RefPtr<Gtk::UIManager> uiManager; |
Glib::RefPtr<Gtk::UIManager> uiManager; |
254 |
|
#endif |
255 |
|
|
256 |
|
#if USE_GLIB_ACTION |
257 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionMIDIRules; |
258 |
|
|
259 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionCopyDimRgn; |
260 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionPasteDimRgn; |
261 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionAdjustClipboard; |
262 |
|
|
263 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionSampleProperties; |
264 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionAddSample; |
265 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionRemoveSample; |
266 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionViewSampleRefs; |
267 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionReplaceSample; |
268 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionAddSampleGroup; |
269 |
|
|
270 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionAddScriptGroup; |
271 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionAddScript; |
272 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionEditScript; |
273 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionRemoveScript; |
274 |
|
|
275 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleCopySampleUnity; |
276 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleCopySampleTune; |
277 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleCopySampleLoop; |
278 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleStatusBar; |
279 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleRestoreWinDim; |
280 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleSaveWithTempFile; |
281 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleWarnOnExtensions; |
282 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleShowTooltips; |
283 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleSyncSamplerSelection; |
284 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleMoveRootNoteWithRegion; |
285 |
|
#endif |
286 |
|
|
287 |
Gtk::Statusbar m_StatusBar; |
Gtk::Statusbar m_StatusBar; |
288 |
Gtk::Label m_AttachedStateLabel; |
Gtk::Label m_AttachedStateLabel; |
295 |
InstrumentProps instrumentProps; |
InstrumentProps instrumentProps; |
296 |
MidiRules midiRules; |
MidiRules midiRules; |
297 |
|
|
298 |
|
/** |
299 |
|
* Ensures that the 2 signals MainWindow::dimreg_to_be_changed_signal and |
300 |
|
* MainWindowv::dimreg_changed_signal are always triggered correctly as a |
301 |
|
* pair. It behaves similar to a "mutex lock guard" design pattern. |
302 |
|
*/ |
303 |
|
class DimRegionChangeGuard : public SignalGuard<gig::DimensionRegion*> { |
304 |
|
public: |
305 |
|
DimRegionChangeGuard(MainWindow* w, gig::DimensionRegion* pDimReg) : |
306 |
|
SignalGuard<gig::DimensionRegion*>(w->dimreg_to_be_changed_signal, w->dimreg_changed_signal, pDimReg) |
307 |
|
{ |
308 |
|
} |
309 |
|
}; |
310 |
|
|
311 |
sigc::signal<void, gig::File*> file_structure_to_be_changed_signal; |
sigc::signal<void, gig::File*> file_structure_to_be_changed_signal; |
312 |
sigc::signal<void, gig::File*> file_structure_changed_signal; |
sigc::signal<void, gig::File*> file_structure_changed_signal; |
313 |
sigc::signal<void, std::list<gig::Sample*> > samples_to_be_removed_signal; |
sigc::signal<void, std::list<gig::Sample*> > samples_to_be_removed_signal; |
324 |
|
|
325 |
sigc::signal<void, gig::Instrument*> switch_sampler_instrument_signal; |
sigc::signal<void, gig::Instrument*> switch_sampler_instrument_signal; |
326 |
|
|
327 |
|
#if !USE_GTKMM_BUILDER |
328 |
void on_instrument_selection_change(Gtk::RadioMenuItem* item); |
void on_instrument_selection_change(Gtk::RadioMenuItem* item); |
329 |
|
#endif |
330 |
void on_sel_change(); |
void on_sel_change(); |
331 |
void region_changed(); |
void region_changed(); |
332 |
void dimreg_changed(); |
void dimreg_changed(); |
339 |
void on_saver_progress(); |
void on_saver_progress(); |
340 |
void on_saver_error(); |
void on_saver_error(); |
341 |
void on_saver_finished(); |
void on_saver_finished(); |
342 |
|
void updateMacroMenu(); |
343 |
|
void onMacroSelected(int iMacro); |
344 |
|
void setupMacros(); |
345 |
|
void onMacrosSetupChanged(const std::vector<Serialization::Archive>& macros); |
346 |
|
void applyMacro(Serialization::Archive& macro); |
347 |
|
void onScriptSlotsModified(gig::Instrument* pInstrument); |
348 |
|
void bringToFront(); |
349 |
|
|
350 |
void dimreg_all_dimregs_toggled(); |
void dimreg_all_dimregs_toggled(); |
351 |
gig::Instrument* get_instrument(); |
gig::Instrument* get_instrument(); |
358 |
add(m_col_nr); |
add(m_col_nr); |
359 |
add(m_col_name); |
add(m_col_name); |
360 |
add(m_col_instr); |
add(m_col_instr); |
361 |
|
add(m_col_scripts); |
362 |
|
add(m_col_tooltip); |
363 |
} |
} |
364 |
|
|
365 |
Gtk::TreeModelColumn<int> m_col_nr; |
Gtk::TreeModelColumn<int> m_col_nr; |
366 |
Gtk::TreeModelColumn<Glib::ustring> m_col_name; |
Gtk::TreeModelColumn<Glib::ustring> m_col_name; |
367 |
Gtk::TreeModelColumn<gig::Instrument*> m_col_instr; |
Gtk::TreeModelColumn<gig::Instrument*> m_col_instr; |
368 |
|
Gtk::TreeModelColumn<Glib::ustring> m_col_scripts; |
369 |
|
Gtk::TreeModelColumn<Glib::ustring> m_col_tooltip; |
370 |
} m_Columns; |
} m_Columns; |
371 |
|
|
372 |
Gtk::VBox m_VBox; |
VBox m_VBox; |
373 |
Gtk::HPaned m_HPaned; |
Gtk::HPaned m_HPaned; |
374 |
|
|
375 |
Gtk::ScrolledWindow m_ScrolledWindow; |
Gtk::ScrolledWindow m_ScrolledWindow; |
376 |
|
|
377 |
Gtk::TreeView m_TreeView; |
Gtk::TreeView m_TreeView; |
378 |
Glib::RefPtr<Gtk::ListStore> m_refTreeModel; |
Glib::RefPtr<Gtk::ListStore> m_refTreeModel; |
379 |
|
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. |
380 |
|
|
381 |
Gtk::Menu* instrument_menu; |
#if USE_GTKMM_BUILDER |
382 |
|
Gtk::Menu* menuMacro; |
383 |
|
#else |
384 |
|
Gtk::Menu* instrument_menu; // kept for GTKMM 2 version only, will be completely removed in future |
385 |
|
#endif |
386 |
|
Gtk::Menu* assign_scripts_menu; |
387 |
|
|
388 |
std::map<gig::Sample*,int> sample_ref_count; |
std::map<gig::Sample*,int> sample_ref_count; |
389 |
|
|
443 |
Gtk::TreeView m_TreeViewScripts; |
Gtk::TreeView m_TreeViewScripts; |
444 |
Glib::RefPtr<ScriptsTreeStore> m_refScriptsTreeModel; |
Glib::RefPtr<ScriptsTreeStore> m_refScriptsTreeModel; |
445 |
|
|
446 |
Gtk::VBox dimreg_vbox; |
VBox dimreg_vbox; |
447 |
Gtk::HBox dimreg_hbox; |
HBox dimreg_hbox; |
448 |
Gtk::Label dimreg_label; |
Gtk::Label dimreg_label; |
449 |
Gtk::CheckButton dimreg_all_regions; |
Gtk::CheckButton dimreg_all_regions; |
450 |
Gtk::CheckButton dimreg_all_dimregs; |
Gtk::CheckButton dimreg_all_dimregs; |
451 |
Gtk::CheckButton dimreg_stereo; |
Gtk::CheckButton dimreg_stereo; |
452 |
|
|
453 |
|
HBox legend_hbox; |
454 |
|
Gtk::Label labelLegend; |
455 |
|
Gtk::Image imageNoSample; |
456 |
|
Gtk::Label labelNoSample; |
457 |
|
Gtk::Image imageMissingSample; |
458 |
|
Gtk::Label labelMissingSample; |
459 |
|
Gtk::Image imageLooped; |
460 |
|
Gtk::Label labelLooped; |
461 |
|
Gtk::Image imageSomeLoops; |
462 |
|
Gtk::Label labelSomeLoops; |
463 |
DimRegionEdit dimreg_edit; |
DimRegionEdit dimreg_edit; |
464 |
|
|
465 |
|
VBox m_left_vbox; |
466 |
Gtk::Notebook m_TreeViewNotebook; |
Gtk::Notebook m_TreeViewNotebook; |
467 |
|
HBox m_searchField; |
468 |
|
Gtk::Label m_searchLabel; |
469 |
|
Gtk::Entry m_searchText; |
470 |
|
|
471 |
struct SampleImportItem { |
struct SampleImportItem { |
472 |
gig::Sample* gig_sample; // pointer to the gig::Sample to |
gig::Sample* gig_sample; // pointer to the gig::Sample to |
475 |
Glib::ustring sample_path; // file name of the sample to be |
Glib::ustring sample_path; // file name of the sample to be |
476 |
// imported |
// imported |
477 |
}; |
}; |
478 |
std::list<SampleImportItem> m_SampleImportQueue; |
std::map<gig::Sample*, SampleImportItem> m_SampleImportQueue; |
479 |
|
|
480 |
|
|
481 |
void on_action_file_new(); |
void on_action_file_new(); |
493 |
void on_save_with_temporary_file(); |
void on_save_with_temporary_file(); |
494 |
void on_action_refresh_all(); |
void on_action_refresh_all(); |
495 |
void on_action_warn_user_on_extensions(); |
void on_action_warn_user_on_extensions(); |
496 |
|
void on_action_show_tooltips(); |
497 |
|
void on_show_tooltips_changed(); |
498 |
void on_action_sync_sampler_instrument_selection(); |
void on_action_sync_sampler_instrument_selection(); |
499 |
void on_action_move_root_note_with_region_moved(); |
void on_action_move_root_note_with_region_moved(); |
500 |
void on_action_help_about(); |
void on_action_help_about(); |
501 |
|
|
502 |
|
void on_notebook_tab_switched(void* page, guint page_num); |
503 |
|
|
504 |
// sample right-click popup actions |
// sample right-click popup actions |
505 |
|
#if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && (GTKMM_MINOR_VERSION > 91 || (GTKMM_MINOR_VERSION == 91 && GTKMM_MICRO_VERSION >= 2))) // GTKMM >= 3.91.2 |
506 |
|
bool on_sample_treeview_button_release(Gdk::EventButton& button); |
507 |
|
#else |
508 |
void on_sample_treeview_button_release(GdkEventButton* button); |
void on_sample_treeview_button_release(GdkEventButton* button); |
509 |
|
#endif |
510 |
void on_action_sample_properties(); |
void on_action_sample_properties(); |
511 |
void on_action_add_group(); |
void on_action_add_group(); |
512 |
void on_action_add_sample(); |
void on_action_add_sample(); |
516 |
void on_action_remove_unused_samples(); |
void on_action_remove_unused_samples(); |
517 |
|
|
518 |
// script right-click popup actions |
// script right-click popup actions |
519 |
|
#if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && (GTKMM_MINOR_VERSION > 91 || (GTKMM_MINOR_VERSION == 91 && GTKMM_MICRO_VERSION >= 2))) // GTKMM >= 3.91.2 |
520 |
|
bool on_script_treeview_button_release(Gdk::EventButton& button); |
521 |
|
#else |
522 |
void on_script_treeview_button_release(GdkEventButton* button); |
void on_script_treeview_button_release(GdkEventButton* button); |
523 |
|
#endif |
524 |
void on_action_add_script_group(); |
void on_action_add_script_group(); |
525 |
void on_action_add_script(); |
void on_action_add_script(); |
526 |
void on_action_edit_script(); |
void on_action_edit_script(); |
534 |
void show_intruments_tab(); |
void show_intruments_tab(); |
535 |
void show_scripts_tab(); |
void show_scripts_tab(); |
536 |
|
|
537 |
|
void select_prev_instrument(); |
538 |
|
void select_next_instrument(); |
539 |
|
void select_instrument_by_dir(int dir); |
540 |
|
|
541 |
|
void select_prev_region(); |
542 |
|
void select_next_region(); |
543 |
|
|
544 |
|
void select_next_dim_rgn_zone(); |
545 |
|
void select_prev_dim_rgn_zone(); |
546 |
|
void select_add_next_dim_rgn_zone(); |
547 |
|
void select_add_prev_dim_rgn_zone(); |
548 |
|
void select_prev_dimension(); |
549 |
|
void select_next_dimension(); |
550 |
|
|
551 |
|
Serialization::Archive m_serializationArchive; ///< Clipboard content. |
552 |
|
std::vector<Serialization::Archive> m_macros; ///< User configured list of macros. |
553 |
|
|
554 |
|
void copy_selected_dimrgn(); |
555 |
|
void paste_copied_dimrgn(); |
556 |
|
void adjust_clipboard_content(); |
557 |
|
void updateClipboardCopyAvailable(); |
558 |
|
void updateClipboardPasteAvailable(); |
559 |
|
#if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && (GTKMM_MINOR_VERSION > 91 || (GTKMM_MINOR_VERSION == 91 && GTKMM_MICRO_VERSION >= 2))) // GTKMM >= 3.91.2 |
560 |
|
void on_clipboard_owner_change(Gdk::EventOwnerChange& event); |
561 |
|
#else |
562 |
|
void on_clipboard_owner_change(GdkEventOwnerChange* event); |
563 |
|
#endif |
564 |
|
void on_clipboard_get(Gtk::SelectionData& selection_data, guint info); |
565 |
|
void on_clipboard_clear(); |
566 |
|
void on_clipboard_received(const Gtk::SelectionData& selection_data); |
567 |
|
void on_clipboard_received_targets(const std::vector<Glib::ustring>& targets); |
568 |
|
|
569 |
void add_instrument(gig::Instrument* instrument); |
void add_instrument(gig::Instrument* instrument); |
570 |
|
#if !USE_GTKMM_BUILDER |
571 |
Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name, |
Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name, |
572 |
int position = -1); |
int position = -1); |
573 |
void remove_instrument_from_menu(int index); |
void remove_instrument_from_menu(int index); |
574 |
|
#endif |
575 |
|
bool onQueryTreeViewTooltip(int x, int y, bool keyboardTip, const Glib::RefPtr<Gtk::Tooltip>& tooltip); |
576 |
|
|
577 |
ProgressDialog* progress_dialog; |
ProgressDialog* progress_dialog; |
578 |
Loader* loader; |
Loader* loader; |
594 |
bool file_save_as(); |
bool file_save_as(); |
595 |
bool check_if_savable(); |
bool check_if_savable(); |
596 |
|
|
597 |
|
#if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && (GTKMM_MINOR_VERSION > 91 || (GTKMM_MINOR_VERSION == 91 && GTKMM_MICRO_VERSION >= 2))) // GTKMM >= 3.91.2 |
598 |
|
bool on_button_release(Gdk::EventButton& button); |
599 |
|
#else |
600 |
void on_button_release(GdkEventButton* button); |
void on_button_release(GdkEventButton* button); |
601 |
|
#endif |
602 |
void on_instruments_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context); |
void on_instruments_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context); |
603 |
void on_instruments_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&, |
void on_instruments_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&, |
604 |
Gtk::SelectionData& selection_data, guint, guint); |
Gtk::SelectionData& selection_data, guint, guint); |
625 |
void instrument_name_changed(const Gtk::TreeModel::Path& path, |
void instrument_name_changed(const Gtk::TreeModel::Path& path, |
626 |
const Gtk::TreeModel::iterator& iter); |
const Gtk::TreeModel::iterator& iter); |
627 |
void instr_name_changed_by_instr_props(Gtk::TreeModel::iterator& it); |
void instr_name_changed_by_instr_props(Gtk::TreeModel::iterator& it); |
628 |
|
bool instrument_row_visible(const Gtk::TreeModel::const_iterator& iter); |
629 |
sigc::connection instrument_name_connection; |
sigc::connection instrument_name_connection; |
630 |
|
|
631 |
void on_action_combine_instruments(); |
void on_action_combine_instruments(); |
642 |
void __import_queued_samples(); |
void __import_queued_samples(); |
643 |
void __clear(); |
void __clear(); |
644 |
void __refreshEntireGUI(); |
void __refreshEntireGUI(); |
645 |
|
void updateScriptListOfMenu(); |
646 |
|
void assignScript(gig::Script* pScript); |
647 |
|
void dropAllScriptSlots(); |
648 |
|
|
649 |
bool close_confirmation_dialog(); |
bool close_confirmation_dialog(); |
650 |
bool leaving_shared_mode_dialog(); |
bool leaving_shared_mode_dialog(); |
651 |
|
|
652 |
Gtk::Menu* popup_menu; |
Gtk::Menu* popup_menu; |
653 |
|
#if USE_GTKMM_BUILDER |
654 |
|
Gtk::Menu* sample_popup; |
655 |
|
Gtk::Menu* script_popup; |
656 |
|
#endif |
657 |
|
|
658 |
bool on_delete_event(GdkEventAny* event); |
bool on_delete_event(GdkEventAny* event); |
659 |
|
|
660 |
bool first_call_to_drag_data_get; |
bool first_call_to_drag_data_get; |
661 |
|
|
662 |
bool is_copy_samples_unity_note_enabled() const; |
bool is_copy_samples_unity_note_enabled() const; |
663 |
bool is_copy_samples_fine_tune_enabled() const; |
bool is_copy_samples_fine_tune_enabled() const; |
664 |
bool is_copy_samples_loop_enabled() const; |
bool is_copy_samples_loop_enabled() const; |