28 |
# include <Serialization.h> |
# 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> |
41 |
#include <gtkmm/scrolledwindow.h> |
#include <gtkmm/scrolledwindow.h> |
42 |
#include <gtkmm/treestore.h> |
#include <gtkmm/treestore.h> |
43 |
#include <gtkmm/treemodelfilter.h> |
#include <gtkmm/treemodelfilter.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> |
#include <gtkmm/entry.h> |
48 |
#include <gtkmm/notebook.h> |
#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 |
|
|
58 |
#include "regionchooser.h" |
#include "regionchooser.h" |
97 |
StringEntry eSourceForm; |
StringEntry eSourceForm; |
98 |
StringEntry eCommissioned; |
StringEntry eCommissioned; |
99 |
StringEntry eSubject; |
StringEntry eSubject; |
100 |
Gtk::VBox vbox; |
VBox vbox; |
101 |
Gtk::HButtonBox buttonBox; |
HButtonBox buttonBox; |
102 |
Gtk::Button quitButton; |
Gtk::Button quitButton; |
103 |
Table table; |
Table table; |
104 |
|
|
131 |
void set_MIDIProgram(uint32_t value); |
void set_MIDIProgram(uint32_t value); |
132 |
|
|
133 |
sigc::signal<void> sig_name_changed; |
sigc::signal<void> sig_name_changed; |
134 |
Gtk::VBox vbox; |
VBox vbox; |
135 |
Gtk::HButtonBox buttonBox; |
HButtonBox buttonBox; |
136 |
Gtk::Button quitButton; |
Gtk::Button quitButton; |
137 |
Table table; |
Table table; |
138 |
StringEntry eName; |
StringEntry eName; |
239 |
virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->mainWindowH; } |
virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->mainWindowH; } |
240 |
|
|
241 |
protected: |
protected: |
242 |
|
#if USE_GTKMM_BUILDER |
243 |
|
Glib::RefPtr<Gio::SimpleActionGroup> m_actionGroup; |
244 |
|
Glib::RefPtr<Gtk::Builder> m_uiManager; |
245 |
|
#else |
246 |
Glib::RefPtr<Gtk::ActionGroup> actionGroup; |
Glib::RefPtr<Gtk::ActionGroup> actionGroup; |
247 |
Glib::RefPtr<Gtk::UIManager> uiManager; |
Glib::RefPtr<Gtk::UIManager> uiManager; |
248 |
|
#endif |
249 |
|
|
250 |
|
#if USE_GLIB_ACTION |
251 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionMIDIRules; |
252 |
|
|
253 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionCopyDimRgn; |
254 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionPasteDimRgn; |
255 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionAdjustClipboard; |
256 |
|
|
257 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionSampleProperties; |
258 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionAddSample; |
259 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionRemoveSample; |
260 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionViewSampleRefs; |
261 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionReplaceSample; |
262 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionAddSampleGroup; |
263 |
|
|
264 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionAddScriptGroup; |
265 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionAddScript; |
266 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionEditScript; |
267 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionRemoveScript; |
268 |
|
|
269 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleCopySampleUnity; |
270 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleCopySampleTune; |
271 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleCopySampleLoop; |
272 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleStatusBar; |
273 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleRestoreWinDim; |
274 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleSaveWithTempFile; |
275 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleWarnOnExtensions; |
276 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleSyncSamplerSelection; |
277 |
|
Glib::RefPtr<Gio::SimpleAction> m_actionToggleMoveRootNoteWithRegion; |
278 |
|
#endif |
279 |
|
|
280 |
Gtk::Statusbar m_StatusBar; |
Gtk::Statusbar m_StatusBar; |
281 |
Gtk::Label m_AttachedStateLabel; |
Gtk::Label m_AttachedStateLabel; |
317 |
|
|
318 |
sigc::signal<void, gig::Instrument*> switch_sampler_instrument_signal; |
sigc::signal<void, gig::Instrument*> switch_sampler_instrument_signal; |
319 |
|
|
320 |
|
#if !USE_GTKMM_BUILDER |
321 |
void on_instrument_selection_change(Gtk::RadioMenuItem* item); |
void on_instrument_selection_change(Gtk::RadioMenuItem* item); |
322 |
|
#endif |
323 |
void on_sel_change(); |
void on_sel_change(); |
324 |
void region_changed(); |
void region_changed(); |
325 |
void dimreg_changed(); |
void dimreg_changed(); |
360 |
Gtk::TreeModelColumn<Glib::ustring> m_col_scripts; |
Gtk::TreeModelColumn<Glib::ustring> m_col_scripts; |
361 |
} m_Columns; |
} m_Columns; |
362 |
|
|
363 |
Gtk::VBox m_VBox; |
VBox m_VBox; |
364 |
Gtk::HPaned m_HPaned; |
Gtk::HPaned m_HPaned; |
365 |
|
|
366 |
Gtk::ScrolledWindow m_ScrolledWindow; |
Gtk::ScrolledWindow m_ScrolledWindow; |
369 |
Glib::RefPtr<Gtk::ListStore> m_refTreeModel; |
Glib::RefPtr<Gtk::ListStore> m_refTreeModel; |
370 |
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. |
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. |
371 |
|
|
372 |
Gtk::Menu* instrument_menu; |
#if USE_GTKMM_BUILDER |
373 |
|
Gtk::Menu* menuMacro; |
374 |
|
#else |
375 |
|
Gtk::Menu* instrument_menu; // kept for GTKMM 2 version only, will be completely removed in future |
376 |
|
#endif |
377 |
Gtk::Menu* assign_scripts_menu; |
Gtk::Menu* assign_scripts_menu; |
378 |
|
|
379 |
std::map<gig::Sample*,int> sample_ref_count; |
std::map<gig::Sample*,int> sample_ref_count; |
434 |
Gtk::TreeView m_TreeViewScripts; |
Gtk::TreeView m_TreeViewScripts; |
435 |
Glib::RefPtr<ScriptsTreeStore> m_refScriptsTreeModel; |
Glib::RefPtr<ScriptsTreeStore> m_refScriptsTreeModel; |
436 |
|
|
437 |
Gtk::VBox dimreg_vbox; |
VBox dimreg_vbox; |
438 |
Gtk::HBox dimreg_hbox; |
HBox dimreg_hbox; |
439 |
Gtk::Label dimreg_label; |
Gtk::Label dimreg_label; |
440 |
Gtk::CheckButton dimreg_all_regions; |
Gtk::CheckButton dimreg_all_regions; |
441 |
Gtk::CheckButton dimreg_all_dimregs; |
Gtk::CheckButton dimreg_all_dimregs; |
442 |
Gtk::CheckButton dimreg_stereo; |
Gtk::CheckButton dimreg_stereo; |
443 |
|
|
444 |
Gtk::HBox legend_hbox; |
HBox legend_hbox; |
445 |
Gtk::Label labelLegend; |
Gtk::Label labelLegend; |
446 |
Gtk::Image imageNoSample; |
Gtk::Image imageNoSample; |
447 |
Gtk::Label labelNoSample; |
Gtk::Label labelNoSample; |
453 |
Gtk::Label labelSomeLoops; |
Gtk::Label labelSomeLoops; |
454 |
DimRegionEdit dimreg_edit; |
DimRegionEdit dimreg_edit; |
455 |
|
|
456 |
Gtk::VBox m_left_vbox; |
VBox m_left_vbox; |
457 |
Gtk::Notebook m_TreeViewNotebook; |
Gtk::Notebook m_TreeViewNotebook; |
458 |
Gtk::HBox m_searchField; |
HBox m_searchField; |
459 |
Gtk::Label m_searchLabel; |
Gtk::Label m_searchLabel; |
460 |
Gtk::Entry m_searchText; |
Gtk::Entry m_searchText; |
461 |
|
|
491 |
void on_notebook_tab_switched(void* page, guint page_num); |
void on_notebook_tab_switched(void* page, guint page_num); |
492 |
|
|
493 |
// sample right-click popup actions |
// sample right-click popup actions |
494 |
|
#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 |
495 |
|
bool on_sample_treeview_button_release(Gdk::EventButton& button); |
496 |
|
#else |
497 |
void on_sample_treeview_button_release(GdkEventButton* button); |
void on_sample_treeview_button_release(GdkEventButton* button); |
498 |
|
#endif |
499 |
void on_action_sample_properties(); |
void on_action_sample_properties(); |
500 |
void on_action_add_group(); |
void on_action_add_group(); |
501 |
void on_action_add_sample(); |
void on_action_add_sample(); |
505 |
void on_action_remove_unused_samples(); |
void on_action_remove_unused_samples(); |
506 |
|
|
507 |
// script right-click popup actions |
// script right-click popup actions |
508 |
|
#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 |
509 |
|
bool on_script_treeview_button_release(Gdk::EventButton& button); |
510 |
|
#else |
511 |
void on_script_treeview_button_release(GdkEventButton* button); |
void on_script_treeview_button_release(GdkEventButton* button); |
512 |
|
#endif |
513 |
void on_action_add_script_group(); |
void on_action_add_script_group(); |
514 |
void on_action_add_script(); |
void on_action_add_script(); |
515 |
void on_action_edit_script(); |
void on_action_edit_script(); |
545 |
void adjust_clipboard_content(); |
void adjust_clipboard_content(); |
546 |
void updateClipboardCopyAvailable(); |
void updateClipboardCopyAvailable(); |
547 |
void updateClipboardPasteAvailable(); |
void updateClipboardPasteAvailable(); |
548 |
|
#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 |
549 |
|
void on_clipboard_owner_change(Gdk::EventOwnerChange& event); |
550 |
|
#else |
551 |
void on_clipboard_owner_change(GdkEventOwnerChange* event); |
void on_clipboard_owner_change(GdkEventOwnerChange* event); |
552 |
|
#endif |
553 |
void on_clipboard_get(Gtk::SelectionData& selection_data, guint info); |
void on_clipboard_get(Gtk::SelectionData& selection_data, guint info); |
554 |
void on_clipboard_clear(); |
void on_clipboard_clear(); |
555 |
void on_clipboard_received(const Gtk::SelectionData& selection_data); |
void on_clipboard_received(const Gtk::SelectionData& selection_data); |
556 |
void on_clipboard_received_targets(const std::vector<Glib::ustring>& targets); |
void on_clipboard_received_targets(const std::vector<Glib::ustring>& targets); |
557 |
|
|
558 |
void add_instrument(gig::Instrument* instrument); |
void add_instrument(gig::Instrument* instrument); |
559 |
|
#if !USE_GTKMM_BUILDER |
560 |
Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name, |
Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name, |
561 |
int position = -1); |
int position = -1); |
562 |
void remove_instrument_from_menu(int index); |
void remove_instrument_from_menu(int index); |
563 |
|
#endif |
564 |
|
|
565 |
ProgressDialog* progress_dialog; |
ProgressDialog* progress_dialog; |
566 |
Loader* loader; |
Loader* loader; |
582 |
bool file_save_as(); |
bool file_save_as(); |
583 |
bool check_if_savable(); |
bool check_if_savable(); |
584 |
|
|
585 |
|
#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 |
586 |
|
bool on_button_release(Gdk::EventButton& button); |
587 |
|
#else |
588 |
void on_button_release(GdkEventButton* button); |
void on_button_release(GdkEventButton* button); |
589 |
|
#endif |
590 |
void on_instruments_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context); |
void on_instruments_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context); |
591 |
void on_instruments_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&, |
void on_instruments_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&, |
592 |
Gtk::SelectionData& selection_data, guint, guint); |
Gtk::SelectionData& selection_data, guint, guint); |
637 |
bool leaving_shared_mode_dialog(); |
bool leaving_shared_mode_dialog(); |
638 |
|
|
639 |
Gtk::Menu* popup_menu; |
Gtk::Menu* popup_menu; |
640 |
|
#if USE_GTKMM_BUILDER |
641 |
|
Gtk::Menu* sample_popup; |
642 |
|
Gtk::Menu* script_popup; |
643 |
|
#endif |
644 |
|
|
645 |
bool on_delete_event(GdkEventAny* event); |
bool on_delete_event(GdkEventAny* event); |
646 |
|
|