26 #include <gxw/GxLevelSlider.h> 27 #include <gtkmm/accelmap.h> 35 TextLoggingBox::tab_table TextLoggingBox::tagdefs[] = {
36 {
"colinfo",
"#cccccc"},
37 {
"colwarn",
"#77994f"},
38 {
"colerr",
"#ff8800"},
43 ok_button(Gtk::Stock::OK),
47 highest_unseen_msg_level(-1),
50 set_default_size(640, 320);
53 set_gravity(Gdk::GRAVITY_SOUTH);
54 set_keep_below(
false);
55 set_title(_(
"Logging Window"));
56 set_type_hint(Gdk::WINDOW_TYPE_HINT_UTILITY);
59 box.set_border_width(0);
60 scrollbox.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
64 tbox.set_wrap_mode(Gtk::WRAP_WORD_CHAR);
65 tbox.set_border_width(0);
66 tbox.set_editable(
false);
67 tbox.set_cursor_visible(
false);
68 tbox.set_pixels_above_lines(0);
69 tbox.set_pixels_below_lines(2);
70 tbox.set_justification(Gtk::JUSTIFY_LEFT);
71 tbox.set_left_margin(5);
74 Glib::RefPtr<Gtk::TextBuffer> buffer = tbox.get_buffer();
76 tags[i] = buffer->create_tag(tagdefs[i].tagname);
77 tags[i]->property_foreground() = tagdefs[i].tag_color;
81 box.pack_end(buttonbox, Gtk::PACK_SHRINK);
82 buttonbox.set_layout(Gtk::BUTTONBOX_END);
83 buttonbox.add(ok_button);
84 buttonbox.set_border_width(4);
85 ok_button.set_can_default();
86 ok_button.grab_default();
87 ok_button.signal_clicked().connect(sigc::mem_fun(
this, &TextLoggingBox::hide));
90 tbox.set_size_request(-1, 50);
93 sigc::mem_fun(*
this, &TextLoggingBox::show_msg));
100 bool TextLoggingBox::on_key_press_event(GdkEventKey *event) {
101 if (event->keyval ==
GDK_KEY_Escape && (event->state & Gtk::AccelGroup::get_default_mod_mask()) == 0) {
105 return Gtk::Window::on_key_press_event(event);
108 void TextLoggingBox::on_show() {
110 Gtk::Window::on_show();
113 void TextLoggingBox::on_hide() {
114 highest_unseen_msg_level = -1;
115 Gtk::Window::on_hide();
118 void TextLoggingBox::show_msg(
string msgbuf,
GxLogger::MsgType msgtype,
bool plugged) {
122 Glib::RefPtr<Gtk::TextBuffer> buffer = tbox.get_buffer();
125 const int nlines = 50;
128 int linecount = buffer->get_line_count();
129 if (linecount >= nlines) {
130 Gtk::TextIter iter1 = buffer->get_iter_at_line(0);
131 Gtk::TextIter iter2 = buffer->get_iter_at_line(1);
132 buffer->erase(iter1, iter2);
135 Gtk::TextIter iter = buffer->end();
136 if (buffer->get_char_count() > 0) {
137 iter = buffer->insert(iter,
"\n");
140 buffer->insert_with_tag(iter, msgbuf, tags[msgtype]);
141 scrollbox.get_vadjustment()->set_value(10000);
145 if (msgtype > highest_unseen_msg_level) {
146 highest_unseen_msg_level = msgtype;
159 typedef list<GtkAccelKey> accel_list;
160 unsigned int next_key;
162 static gboolean add_keys_to_list(GtkAccelKey *key, GClosure *cl, gpointer data);
164 KeyFinder(Glib::RefPtr<Gtk::AccelGroup> group);
169 KeyFinder::KeyFinder(Glib::RefPtr<Gtk::AccelGroup> group) {
171 gtk_accel_group_find(group->gobj(), add_keys_to_list,
static_cast<gpointer
>(&l));
174 KeyFinder::~KeyFinder() {
177 gboolean KeyFinder::add_keys_to_list(GtkAccelKey *key, GClosure *cl, gpointer data) {
178 accel_list* l = (accel_list*)data;
179 if (key->accel_mods == GDK_SHIFT_MASK) {
185 int KeyFinder::operator()() {
186 while (next_key <= GDK_z) {
188 for (accel_list::iterator i = l.begin(); i != l.end(); ++i) {
189 if (next_key == i->accel_key) {
211 static unsigned int keysep[];
218 unsigned int TubeKeys::keysep[] = {
219 GDK_a, GDK_b, GDK_c, GDK_d, GDK_e, 0,
221 GDK_g, GDK_h, GDK_i, GDK_j, 0,
222 GDK_k, GDK_l, GDK_m, GDK_n, 0,
223 GDK_o, GDK_p, GDK_q, GDK_r
227 if (ks <
sizeof(keysep)/
sizeof(keysep[0])) {
237 sigc::mem_fun(
this, &GxUiRadioMenu::set_value));
241 Glib::RefPtr<Gtk::UIManager>& uimanager, Glib::RefPtr<Gtk::ActionGroup>& actiongroup) {
245 Glib::ustring s = prefix;
246 Gtk::RadioButtonGroup group;
254 Glib::ustring actname = Glib::ustring::compose(
"Enum_%1.%2", param.
id(), p->
value_id);
255 s += Glib::ustring::compose(
"<menuitem action=\"%1\"/>", actname);
256 Glib::RefPtr<Gtk::RadioAction> act = Gtk::RadioAction::create(group, actname, param.
value_label(*p));
257 act->property_value().set_value(static_cast<int>(param.
getLowerAsFloat())+i);
259 actiongroup->add(act, Gtk::AccelKey(Glib::ustring::compose(
"<shift>%1", (
char)c)));
261 actiongroup->add(act);
264 act->signal_changed().connect(
265 sigc::mem_fun(*
this, &GxUiRadioMenu::on_changed));
271 uimanager->add_ui_from_string(s);
274 void GxUiRadioMenu::set_value(
unsigned int v) {
275 action->set_current_value(v);
278 void GxUiRadioMenu::on_changed(Glib::RefPtr<Gtk::RadioAction> act) {
288 : window(0), tag(), need_thaw(false), size_x(-1), size_y(-1) {
295 void Freezer::freeze(Gtk::Window *w,
int width,
int height) {
302 Glib::RefPtr<Gdk::Window> win = window->get_window();
305 win->freeze_updates();
323 freeze(w, width, -1);
329 if (wd >= width && ht == height) {
332 freeze(w, width, height);
333 w->set_size_request(width, height);
336 bool Freezer::thaw_timeout() {
343 window->set_size_request(-1,-1);
349 void Freezer::do_thaw() {
350 size_x = size_y = -1;
351 Glib::RefPtr<Gdk::Window> win = window->get_window();
357 Glib::signal_idle().connect_once(work);
365 void Freezer::thaw() {
376 Glib::RefPtr<Gdk::Window> win = window->get_window();
377 if (win && win->get_state()) {
382 if (size_x == width) {
383 window->set_size_request(-1,-1);
388 if (size_x <= width && size_y == height) {
389 window->set_size_request(-1,-1);
393 if (!tag.connected()) {
394 tag = Glib::signal_timeout().connect(sigc::mem_fun(*
this, &Freezer::thaw_timeout), 500);
406 gx_engine::GxMachineBase& machine_,
const std::string& id_,
const Glib::ustring& name,
const Glib::ustring& icon_name,
407 const Glib::ustring& label,
const Glib::ustring& tooltip,
409 : Gtk::ToggleAction(name, icon_name, label, tooltip, is_active),
414 sigc::mem_fun(
this, &UiToggleAction::set_active));
427 Gtk::PolicyType hp, vp;
428 w.get_policy(hp, vp);
429 w.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
430 w.set_policy(hp, vp);
437 void MainWindow::maybe_shrink_horizontally(
bool preset_no_rack) {
438 Glib::RefPtr<Gdk::Window> w = window->get_window();
442 int state = w->get_state();
443 if (state & (Gdk::WINDOW_STATE_MAXIMIZED | Gdk::WINDOW_STATE_FULLSCREEN)) {
446 Gtk::Requisition req;
447 window->size_request(req);
449 window->get_position(x, y);
451 geom.min_width = req.width;
452 geom.min_height = req.height;
453 w->set_geometry_hints(geom, Gdk::HINT_MIN_SIZE);
454 if (preset_no_rack) {
455 req.height += options.preset_window_height - preset_scrolledbox->size_request().height;
457 req.height =
std::max(req.height, options.window_height);
459 w->move_resize(x, y, req.width, req.height);
461 freezer.freeze_until_width_update(window, req.width);
465 void MainWindow::on_show_tuner() {
466 bool v = actions.tuner->get_active();
467 on_livetuner_toggled();
468 tunerbox->set_visible(v);
472 void MainWindow::load_widget_pointers() {
473 bld->get_toplevel(
"MainWindow", window);
474 bld->find_widget(
"tunerbox", tunerbox);
475 bld->find_widget(
"vrack_scrolledbox", vrack_scrolledbox);
476 bld->find_widget(
"stereorackcontainerH", stereorackcontainerH);
477 bld->find_widget(
"stereorackcontainerV", stereorackcontainerV);
478 bld->find_widget(
"rackcontainer", rackcontainer);
479 bld->find_widget(
"stereorackbox", stereorackbox);
480 bld->find_widget(
"monorackcontainer", monocontainer);
481 bld->find_widget(
"monoampcontainer:ampdetails", monoampcontainer);
482 bld->find_widget(
"main_vpaned", main_vpaned);
483 bld->find_widget(
"amp_toplevel_box", amp_toplevel_box);
484 bld->find_widget(
"monobox", monobox);
485 bld->find_widget(
"upper_rackbox", upper_rackbox);
486 bld->find_widget(
"preset_scrolledbox", preset_scrolledbox);
487 bld->find_widget(
"preset_box_no_rack", preset_box_no_rack);
488 bld->find_widget(
"effects_frame_paintbox", effects_frame_paintbox);
489 bld->find_widget(
"insert_image", insert_image);
490 bld->find_widget(
"status_image", status_image);
491 bld->find_widget(
"jackd_image", jackd_image);
492 bld->find_widget(
"logstate_image", logstate_image);
493 bld->find_widget(
"menubox", menubox);
494 bld->find_widget(
"show_rack:barbutton", show_rack_button);
495 bld->find_widget(
"rack_order_h:barbutton", rack_order_h_button);
496 bld->find_widget(
"config_mode:barbutton", config_mode_button);
497 bld->find_widget(
"liveplay:barbutton", liveplay_button);
498 bld->find_widget(
"tuner:barbutton", tuner_button);
499 bld->find_widget(
"effects:barbutton", effects_button);
500 bld->find_widget(
"presets:barbutton", presets_button);
501 bld->find_widget(
"compress:barbutton", compress_button);
502 bld->find_widget(
"expand:barbutton", expand_button);
503 bld->find_widget(
"effects_toolpalette", effects_toolpalette);
504 bld->find_widget(
"amp_background:ampbox", amp_background);
505 bld->find_widget(
"tuner_on_off", tuner_on_off);
506 bld->find_widget(
"tuner_mode", tuner_mode);
507 bld->find_widget(
"tuner_reference_pitch", tuner_reference_pitch);
508 bld->find_widget(
"tuner_tuning", tuner_tuning);
509 bld->find_widget(
"tuner_temperament", tuner_temperament);
510 bld->find_widget(
"racktuner", racktuner);
511 bld->find_widget(
"ampdetail_compress:effect_reset", ampdetail_compress);
512 bld->find_widget(
"ampdetail_expand:effect_reset", ampdetail_expand);
513 bld->find_widget(
"ampdetail_mini", ampdetail_mini);
514 bld->find_widget(
"ampdetail_normal", ampdetail_normal);
515 bld->find_widget(
"fastmeterL", fastmeter[0]);
516 bld->find_widget(
"fastmeterR", fastmeter[1]);
517 bld->find_widget(
"preset_status", preset_status);
518 bld->find_widget(
"midi_out_box", midi_out_box);
519 bld->find_widget(
"midi_out_normal", midi_out_normal);
520 bld->find_widget(
"midi_out_mini", midi_out_mini);
521 bld->find_widget(
"midi_out_compress:effect_reset", midi_out_compress);
522 bld->find_widget(
"midi_out_expand:effect_reset", midi_out_expand);
523 bld->find_widget(
"midi_out_presets_mini", midi_out_presets_mini);
524 bld->find_widget(
"midi_out_presets_normal", midi_out_presets_normal);
525 bld->find_widget(
"channel1_button", channel1_button);
526 bld->find_widget(
"channel1_box", channel1_box);
527 bld->find_widget(
"channel2_button", channel2_button);
528 bld->find_widget(
"channel2_box", channel2_box);
529 bld->find_widget(
"channel3_button", channel3_button);
530 bld->find_widget(
"channel3_box", channel3_box);
533 void MainWindow::on_select_preset(
int idx) {
534 keyswitch.process_preset_key(idx);
537 void MainWindow::rebuild_preset_menu() {
538 if (preset_list_merge_id) {
539 uimanager->remove_ui(preset_list_merge_id);
540 uimanager->remove_action_group(preset_list_actiongroup);
541 preset_list_menu_bank.clear();
542 preset_list_merge_id = 0;
543 preset_list_actiongroup.reset();
544 uimanager->ensure_update();
553 preset_list_actiongroup = Gtk::ActionGroup::create(
"PresetList");
555 Glib::ustring s =
"<menubar><menu action=\"PresetsMenu\"><menu action=\"PresetListMenu\">";
558 Glib::ustring actname =
"PresetList_" + i->name;
559 Glib::RefPtr<Gtk::Action> action = Gtk::Action::create(actname, i->name);
560 preset_list_actiongroup->add(
561 action, sigc::bind(sigc::mem_fun(*
this, &MainWindow::on_select_preset), idx));
563 char c = (idx == 9 ?
'0' :
'1'+idx);
564 Gtk::AccelMap::change_entry(action->get_accel_path(), c, Gdk::ModifierType(0),
true);
566 s += Glib::ustring::compose(
"<menuitem action=\"%1\"/>", actname);
568 s +=
"</menu></menu></menubar>";
569 uimanager->insert_action_group(preset_list_actiongroup);
570 preset_list_merge_id = uimanager->add_ui_from_string(s);
571 dynamic_cast<Gtk::MenuItem*
>(uimanager->get_widget(
"/menubar/PresetsMenu/PresetListMenu"))->set_label(_(
"_Bank: ")+preset_list_menu_bank);
574 void MainWindow::show_selected_preset() {
575 keyswitch.deactivate();
580 rebuild_preset_menu();
583 preset_status->set_text(t);
586 bool MainWindow::is_variable_size() {
587 return actions.presets->get_active() || actions.show_rack->get_active();
590 void MainWindow::maybe_change_resizable() {
591 Glib::RefPtr<Gdk::Window> w = window->get_window();
592 if (w && w->get_state() != 0) {
595 if (!is_variable_size() && window->get_resizable()) {
596 window->set_resizable(
false);
597 }
else if (!window->get_resizable()) {
598 window->set_resizable(
true);
602 void MainWindow::set_vpaned_handle() {
604 main_vpaned->get_handle_window()->get_size(w, h);
605 int pos = main_vpaned->get_allocation().get_height() - options.preset_window_height - h;
606 main_vpaned->set_position(pos);
609 void MainWindow::on_show_rack() {
611 if (rackbox_stacked_vertical()) {
612 w = stereorackcontainerV;
616 bool v = options.system_show_rack = actions.show_rack->get_active();
617 actions.rackh->set_sensitive(v);
618 stereorackcontainer.set_visible(v);
619 rack_order_h_button->set_visible(v);
620 compress_button->set_visible(v);
621 expand_button->set_visible(v);
622 if (actions.presets->get_active() && preset_scrolledbox->get_mapped()) {
623 options.preset_window_height = preset_scrolledbox->get_allocation().get_height();
626 midi_out_box->set_visible(actions.midi_out->get_active());
627 options.window_height =
max(options.window_height, window->size_request().height);
628 main_vpaned->set_position(oldpos);
630 monoampcontainer->show();
631 monorackcontainer.show_entries();
632 vrack_scrolledbox->set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_ALWAYS);
633 vrack_scrolledbox->set_size_request(scrl_size_x, scrl_size_y);
634 if (preset_scrolledbox->get_parent() != main_vpaned) {
635 preset_box_no_rack->remove(*preset_scrolledbox);
636 main_vpaned->add(*preset_scrolledbox);
637 change_expand(*preset_box_no_rack,
false);
638 change_expand(*main_vpaned,
true);
640 Glib::RefPtr<Gdk::Window> win = window->get_window();
641 if (!win || win->get_state() == 0) {
642 Gtk::Requisition req;
643 window->size_request(req);
644 req.height =
max(req.height, options.window_height);
645 freezer.freeze_and_size_request(window, req.width, req.height);
646 if (win && actions.presets->get_active()) {
647 freezer.set_slot(sigc::mem_fun(
this, &MainWindow::set_vpaned_handle));
651 if (actions.midi_out->get_active()) {
652 midi_out_box->set_visible(
false);
654 actions.show_plugin_bar->set_active(
false);
655 oldpos = main_vpaned->get_position();
657 monoampcontainer->hide();
658 monorackcontainer.hide_entries();
659 if (preset_scrolledbox->get_parent() == main_vpaned) {
660 main_vpaned->remove(*preset_scrolledbox);
661 preset_box_no_rack->add(*preset_scrolledbox);
662 change_expand(*main_vpaned,
false);
663 change_expand(*preset_box_no_rack,
true);
665 preset_box_no_rack->set_visible(actions.presets->get_active());
666 vrack_scrolledbox->set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_NEVER);
667 vrack_scrolledbox->get_size_request(scrl_size_x, scrl_size_y);
668 vrack_scrolledbox->set_size_request(-1,-1);
669 if (actions.presets->get_active()) {
670 maybe_shrink_horizontally(
true);
672 maybe_shrink_horizontally();
675 maybe_change_resizable();
678 void MainWindow::on_compress_all() {
679 plugin_dict.compress(
true);
680 on_ampdetail_switch(
true,
true);
681 actions.midi_out_plug->set_active(
true);
684 void MainWindow::on_expand_all() {
685 plugin_dict.compress(
false);
686 on_ampdetail_switch(
false,
true);
687 actions.midi_out_plug->set_active(
false);
690 void MainWindow::on_rack_configuration() {
691 bool v = actions.rack_config->get_active();
692 actions.show_plugin_bar->set_sensitive(!v);
693 actions.show_rack->set_sensitive(!v);
694 actions.tuner->set_sensitive(!v);
695 actions.compress->set_sensitive(!v);
696 actions.expand->set_sensitive(!v);
697 actions.live_play->set_sensitive(!v);
698 Gtk::Requisition req;
699 monobox->size_request(req);
700 stereorackcontainer.set_config_mode(v);
701 monorackcontainer.set_config_mode(v);
702 szg_rack_units->set_ignore_hidden(v);
703 bool plugin_bar = actions.show_plugin_bar->get_active();
705 pre_act = actions.presets->get_active();
707 actions.presets->set_active(
false);
709 actions.show_rack->set_active(
true);
710 effects_frame_paintbox->show();
711 upper_rackbox->hide();
712 Gtk::Requisition req2;
713 effects_frame_paintbox->size_request(req2);
714 int width = req.width;
716 if (rackbox_stacked_vertical()) {
719 if (req2.width & 1) {
722 width -= req2.width/2;
725 effects_frame_paintbox->set_size_request(req2.width, -1);
726 monobox->set_size_request(width,-1);
729 effects_frame_paintbox->hide();
731 upper_rackbox->show();
732 effects_frame_paintbox->set_size_request(-1,-1);
733 monobox->set_size_request(-1,-1);
735 actions.presets->set_active(
true);
740 maybe_shrink_horizontally();
744 void MainWindow::on_show_plugin_bar() {
745 bool v = options.system_show_toolbar = actions.show_plugin_bar->get_active();
747 actions.show_rack->set_active(
true);
749 effects_frame_paintbox->set_visible(v);
753 maybe_shrink_horizontally();
757 void MainWindow::move_widget(Gtk::Widget& w, Gtk::Box& b1, Gtk::Box& b2) {
767 int MainWindow::rackbox_stacked_vertical()
const {
768 return !actions.rackh->get_active();
771 void MainWindow::change_expand(Gtk::Widget& w,
bool value) {
772 Gtk::Box *p =
dynamic_cast<Gtk::Box*
>(w.get_parent());
774 unsigned int padding;
775 GtkPackType pack_type;
776 gtk_box_query_child_packing(p->gobj(), w.gobj(), &expand, &fill, &padding, &pack_type);
777 gtk_box_set_child_packing(p->gobj(), w.gobj(), value, value, padding, pack_type);
781 Gtk::Allocation alloc = stereorackcontainer.get_allocation();
782 double lim = alloc.get_y() + alloc.get_height() - pagesize;
786 return min(off+step_size, lim);
790 Gtk::Allocation alloc = monorackcontainer.get_allocation();
791 if (off < alloc.get_y()) {
794 return max(off-step_size,
double(alloc.get_y()));
797 void MainWindow::on_dir_changed() {
798 bool v = options.system_order_rack_h = actions.rackh->get_active();
801 move_widget(stereorackcontainer, *stereorackcontainerV, *stereorackcontainerH);
802 change_expand(*monobox,
true);
803 stereorackbox->show();
805 move_widget(stereorackcontainer, *stereorackcontainerH, *stereorackcontainerV);
806 change_expand(*monobox,
false);
807 stereorackbox->hide();
808 maybe_shrink_horizontally();
812 void MainWindow::on_configure_event(GdkEventConfigure *ev) {
813 if (freezer.check_thaw(ev->width, ev->height)) {
814 if (actions.show_rack->get_active()) {
815 options.window_height = ev->height;
822 if (ch == &monorackcontainer && !actions.rackh->get_active()) {
823 stereorackcontainer.queue_draw();
832 RackBox *MainWindow::add_rackbox_internal(
PluginUI& plugin, Gtk::Widget *mainwidget, Gtk::Widget *miniwidget,
833 bool mini,
int pos,
bool animate, Gtk::Widget *bare) {
838 r->
pack(mainwidget, miniwidget, szg_rack_units);
841 monorackcontainer.add(*manage(r), pos);
843 stereorackcontainer.add(*manage(r), pos);
852 Gtk::Widget *mainwidget = 0;
853 Gtk::Widget *miniwidget = 0;
854 boxbuilder.get_box(pl.
get_id(), mainwidget, miniwidget);
859 boxbuilder.fetch(mainwidget, miniwidget);
862 return add_rackbox_internal(pl, mainwidget, miniwidget, mini, pos, animate);
870 void MainWindow::on_show_values() {
871 options.system_show_value = actions.show_values->get_active();
873 "style \"ShowValue\" {\n" 876 "class \"*GxRegler*\" style:highest \"ShowValue\"\n";
877 gtk_rc_parse_string(s.c_str());
878 gtk_rc_reset_styles(gtk_settings_get_default());
881 void MainWindow::on_preset_action() {
882 bool v = options.system_show_presets = actions.presets->get_active();
883 if (!v && preset_scrolledbox->get_mapped()) {
884 options.preset_window_height = preset_scrolledbox->get_allocation().get_height();
886 maybe_change_resizable();
887 if (v && !actions.show_rack->get_active()) {
888 Glib::RefPtr<Gdk::Window> win = window->get_window();
889 if (!win || win->get_state() == 0) {
890 Gtk::Requisition req;
891 window->size_request(req);
892 freezer.freeze_and_size_request(window, req.width, req.height+options.preset_window_height);
895 preset_box_no_rack->set_visible(v);
896 preset_window->on_preset_select(v, use_animations() && actions.show_rack->get_active(), options.preset_window_height);
903 bool MainWindow::on_my_leave_out(GdkEventCrossing *focus) {
904 Glib::RefPtr<Gdk::Window> wind = window->get_window();
909 bool MainWindow::on_my_enter_in(GdkEventCrossing *focus) {
910 Glib::RefPtr<Gdk::Window> wind = window->get_window();
911 Gdk::Cursor cursor(Gdk::HAND1);
912 wind->set_cursor(cursor);
916 void MainWindow::add_toolitem(
PluginUI& pl, Gtk::ToolItemGroup *gw) {
917 Gtk::ToolItem *tb =
new Gtk::ToolItem();
918 tb->set_use_drag_window(
true);
919 tb->signal_drag_begin().connect(sigc::bind(sigc::mem_fun(*
this, &MainWindow::on_ti_drag_begin), sigc::ref(pl)));
920 tb->signal_drag_end().connect(sigc::mem_fun(*
this, &MainWindow::on_ti_drag_end));
921 tb->signal_drag_data_delete().connect(sigc::bind(sigc::mem_fun(*
this, &MainWindow::on_ti_drag_data_delete), pl.
get_id()));
922 tb->signal_button_press_event().connect(sigc::bind(sigc::mem_fun(*
this, &MainWindow::on_ti_button_press), pl.
get_id()));
923 tb->add_events(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK);
924 tb->signal_leave_notify_event().connect(sigc::mem_fun(*
this, &MainWindow::on_my_leave_out));
925 tb->signal_enter_notify_event().connect(sigc::mem_fun(*
this, &MainWindow::on_my_enter_in));
926 std::vector<Gtk::TargetEntry> listTargets;
928 listTargets.push_back(Gtk::TargetEntry(
"application/x-gtk-tool-palette-item-mono", Gtk::TARGET_SAME_APP, 0));
930 listTargets.push_back(Gtk::TargetEntry(
"application/x-gtk-tool-palette-item-stereo", Gtk::TARGET_SAME_APP, 0));
932 tb->drag_source_set(listTargets, Gdk::BUTTON1_MASK, Gdk::ACTION_MOVE);
933 tb->signal_drag_data_get().connect(sigc::bind(sigc::mem_fun(*
this, &MainWindow::on_ti_drag_data_get), pl.
get_id()));
934 Gtk::Image *img =
new Gtk::Image(pl.
icon);
936 img->set_tooltip_text(pl.
tooltip);
938 tb->add(*manage(img));
941 gw->add(*manage(tb));
945 bool MainWindow::on_visibility_notify(GdkEventVisibility *ev) {
946 bool v = ev->state != GDK_VISIBILITY_FULLY_OBSCURED;
947 if (v == is_visible) {
954 void MainWindow::on_live_play() {
955 live_play->on_live_play(actions.live_play);
958 void MainWindow::on_ti_drag_begin(
const Glib::RefPtr<Gdk::DragContext>& context,
const PluginUI& plugin) {
959 drag_icon =
new DragIcon(plugin, context, options);
962 void MainWindow::on_ti_drag_end(
const Glib::RefPtr<Gdk::DragContext>& context) {
969 void MainWindow::on_ti_drag_data_get(
const Glib::RefPtr<Gdk::DragContext>& context, Gtk::SelectionData& selection,
int info,
int timestamp,
const char *effect_id) {
970 selection.set(*context->get_targets().begin(), effect_id);
974 Gtk::ToolItem *toolitem = plugin_dict[name]->toolitem;
980 void MainWindow::on_ti_drag_data_delete(
const Glib::RefPtr<Gdk::DragContext>& context,
const char *effect_id) {
981 hide_effect(effect_id);
984 bool MainWindow::on_ti_button_press(GdkEventButton *ev,
const char *effect_id) {
985 if (ev->type == GDK_2BUTTON_PRESS) {
986 get_plugin(effect_id)->display_new();
992 void MainWindow::on_tp_drag_data_received(
const Glib::RefPtr<Gdk::DragContext>& context,
int x,
int y,
const Gtk::SelectionData& data,
int info,
int timestamp) {
993 Glib::ustring
id = data.get_data_as_string();
997 p->
group->set_collapsed(
false);
1000 void MainWindow::jack_connection() {
1001 bool v = actions.jackserverconnection->get_active();
1002 if (!connect_jack(v)) {
1003 actions.jackserverconnection->set_active(!v);
1007 void MainWindow::on_portmap_response(
int) {
1008 actions.jackports->set_active(
false);
1011 void MainWindow::on_portmap_activate() {
1016 if (actions.jackports->get_active()) {
1017 if (portmap_window) {
1021 portmap_window->signal_response().connect(
1022 sigc::mem_fun(*
this, &MainWindow::on_portmap_response));
1024 if (!portmap_window) {
1027 delete portmap_window;
1032 void MainWindow::on_miditable_toggle() {
1036 void MainWindow::change_skin(Glib::RefPtr<Gtk::RadioAction> action) {
1037 set_new_skin(options.skin[action->get_current_value()]);
1040 void MainWindow::set_new_skin(
const Glib::ustring& skin_name) {
1041 if (!skin_name.empty()) {
1042 options.skin_name = skin_name;
1043 string rcfile = options.get_style_filepath(
1044 "gx_head_" + skin_name +
".rc");
1045 gtk_rc_parse(rcfile.c_str());
1046 gtk_rc_reset_styles(gtk_settings_get_default());
1051 void MainWindow::add_skin_menu() {
1052 Glib::ustring s =
"<menubar><menu action=\"OptionsMenu\"><menu action=\"SkinMenu\">";
1054 Gtk::RadioButtonGroup sg;
1055 for (vector<Glib::ustring>::iterator i = options.skin.skin_list.begin();
1056 i != options.skin.skin_list.end();
1058 Glib::ustring name = *i;
1059 Glib::ustring actname = Glib::ustring::compose(
"ChangeSkin_%1", name);
1060 s += Glib::ustring::compose(
"<menuitem action=\"%1\"/>", actname);
1061 Glib::RefPtr<Gtk::RadioAction> action = Gtk::RadioAction::create(sg, actname, name);
1062 if (name == options.skin_name) {
1063 action->set_active(
true);
1065 actions.group->add(action);
1067 actions.skin = action;
1069 action->property_value().set_value(idx++);
1071 actions.skin->signal_changed().connect(
1072 sigc::mem_fun(*
this, &MainWindow::change_skin));
1073 s.append(
"</menu></menu></menubar>");
1074 uimanager->add_ui_from_string(s);
1083 void MainWindow::user_disable_latency_warn(Gtk::CheckButton* disable_warn) {
1084 options.no_warn_latency = disable_warn->get_active();
1087 int MainWindow::gx_wait_latency_warn() {
1088 Gtk::Dialog warn_dialog;
1090 warn_dialog.property_destroy_with_parent().set_value(
true);
1092 Gtk::VBox box(0, 4);
1093 Gtk::Label labelt(_(
"\nWARNING\n"));
1095 _(
"CHANGING THE JACK_BUFFER_SIZE ON THE FLY \n" 1096 "MAY CAUSE UNPREDICTABLE EFFECTS \n" 1097 "TO OTHER RUNNING JACK APPLICATIONS. \n" 1098 "DO YOU WANT TO PROCEED ?"));
1099 Gdk::Color colorGreen(
"#969292");
1100 labelt1.modify_fg(Gtk::STATE_NORMAL, colorGreen);
1101 Pango::FontDescription font = labelt1.get_style()->get_font();
1102 font.set_size(10*Pango::SCALE);
1103 font.set_weight(Pango::WEIGHT_BOLD);
1104 labelt1.modify_font(font);
1106 Gdk::Color colorWhite(
"#ffffff");
1107 labelt.modify_fg(Gtk::STATE_NORMAL, colorWhite);
1108 font = labelt.get_style()->get_font();
1109 font.set_size(14*Pango::SCALE);
1110 font.set_weight(Pango::WEIGHT_BOLD);
1111 labelt.modify_font(font);
1116 Gtk::HBox box1(0, 4);
1117 Gtk::HBox box2(0, 4);
1119 Gtk::CheckButton disable_warn;
1120 disable_warn.signal_clicked().connect(
1122 sigc::mem_fun(*
this, &MainWindow::user_disable_latency_warn),
1126 _(
"Don't bother me again with such a question, " 1127 "I know what I am doing"));
1133 box1.add(disable_warn);
1135 warn_dialog.get_vbox()->add(box);
1137 labelt2.modify_fg(Gtk::STATE_NORMAL, colorWhite);
1139 font = labelt2.get_style()->get_font();
1140 font.set_size(8*Pango::SCALE);
1141 font.set_weight(Pango::WEIGHT_NORMAL);
1142 labelt2.modify_font(font);
1146 return warn_dialog.run();
1149 void MainWindow::change_latency(Glib::RefPtr<Gtk::RadioAction> action) {
1157 _(
"Jack Buffer Size setting"),
1158 _(
"we are not a jack gxjack.client, server may be down")
1162 jack_nframes_t buf_size = action->get_current_value();
1166 if (!options.no_warn_latency && gx_wait_latency_warn() !=
kChangeLatency) {
1167 Glib::signal_idle().connect_once(
1169 sigc::mem_fun(action.operator->(), &Gtk::RadioAction::set_current_value), jack->
get_jack_bs()));
1171 if (jack_set_buffer_size(jack->
client, buf_size) != 0)
1173 _(
"Could not change latency"));
1176 _(
"Jack Buffer Size"),
1177 boost::format(_(
"latency is %1%")) % jack_get_buffer_size(jack->
client));
1180 void MainWindow::add_latency_menu() {
1181 Glib::ustring s =
"<menubar><menu action=\"EngineMenu\"><menu action=\"JackLatency\">";
1182 Gtk::RadioButtonGroup group;
1183 const int min_pow = 4;
1184 const int max_pow = 13;
1185 int jack_buffer_size = 16;
1186 for (
int i = 0; i <= max_pow-min_pow; ++i) {
1188 Glib::ustring actname = Glib::ustring::compose(
"Latency_%1", name);
1189 s += Glib::ustring::compose(
"<menuitem action=\"%1\"/>", actname);
1190 Glib::RefPtr<Gtk::RadioAction> action = Gtk::RadioAction::create(group, actname, name);
1191 actions.group->add(action);
1193 action->signal_changed().connect(
1194 sigc::mem_fun(*
this, &MainWindow::change_latency));
1195 actions.latency = action;
1197 action->property_value().set_value(jack_buffer_size);
1198 jack_buffer_size *= 2;
1200 s.append(
"</menu></menu></menubar>");
1201 uimanager->add_ui_from_string(s);
1204 void MainWindow::set_latency() {
1211 actions.latency->set_current_value(n);
1213 if (n > 1023) actions.osc_buffer_menu->set_sensitive(
false);
1214 else actions.osc_buffer_menu->set_sensitive(
true);
1218 GError *error = NULL;
1219 gtk_show_uri(gdk_screen_get_default(),
"http://guitarix.sourceforge.net/forum/",
1220 gtk_get_current_event_time(), &error);
1224 _(
"failed to load online help "));
1225 g_error_free(error);
1235 static string about;
1236 if (about.empty()) {
1237 about +=_(
"<b>Guitarix:gx_head</b> (");
1238 about += GX_VERSION;
1240 _(
")\n\nThis Application is to a large extent provided" 1241 "\nwith the marvelous faust compiler.Yann Orlary" 1242 "\n(http://faust.grame.fr/)" 1243 "\n\nA large part is based on the work of Julius Orion Smith" 1244 "\n(htttp://ccrma.stanford.edu/realsimple/faust/)" 1245 "\nand Albert Graef\n(http://q-lang.sourceforge.net/examples.html#Faust)" 1250 _(
"for impulse response it use zita-convolver" 1251 "\nby Fons Adriaensen" 1252 "\n(http://www.kokkinizita.net/linuxaudio/index.html)" 1253 "\n\nThe included IR-files are contributed by" 1254 "\nDavid Fau Casquel (BESTPLUGINS)" 1255 "\nhome: http://www.youtube.com/bestplugins" 1256 "\n\nauthors: Hermann Meyer <brummer-@web.de>" 1257 "\nauthors: James Warden <warjamy@yahoo.com>" 1258 "\nauthors: Andreas Degert <andreas.degert@googlemail.com>" 1259 "\nauthors: Pete Shorthose <pshorthose@gmail.com>" 1260 "\nauthors: Markus Schmidt <schmidt@boomshop.net>" 1261 "\n\nwebsite: http://guitarix.org/\n");
1267 void MainWindow::set_tooltips() {
1268 options.system_show_tooltips = actions.tooltips->get_active();
1269 gtk_settings_set_long_property(
1270 gtk_settings_get_default(),
"gtk-enable-tooltips", options.system_show_tooltips,
1271 "gx_head menu-option");
1274 void MainWindow::set_animations() {
1275 options.system_animations = actions.animations->get_active();
1278 void MainWindow::on_select_jack_control() {
1279 if (select_jack_control) {
1280 select_jack_control->present();
1283 select_jack_control->signal_close().connect(
1284 sigc::mem_fun(*
this, &MainWindow::delete_select_jack_control));
1285 select_jack_control->set_transient_for(*window);
1286 select_jack_control->show();
1290 void MainWindow::delete_select_jack_control() {
1291 delete select_jack_control;
1292 select_jack_control = 0;
1296 void MainWindow::on_log_activate() {
1297 if (actions.loggingbox->get_active()) {
1299 window->get_position(rxorg, ryorg);
1300 fLoggingWindow.move(rxorg+5, ryorg+272);
1301 fLoggingWindow.show_all();
1302 on_msg_level_changed();
1304 fLoggingWindow.hide();
1308 bool MainWindow::on_log_activated(GdkEventButton* ev) {
1309 if (ev->type == GDK_BUTTON_PRESS && ev->button == 1) {
1310 if (!actions.loggingbox->get_active()) {
1311 actions.loggingbox->set_active(
true);
1313 window->get_position(rxorg, ryorg);
1314 fLoggingWindow.move(rxorg+5, ryorg+272);
1315 fLoggingWindow.show_all();
1316 on_msg_level_changed();
1318 fLoggingWindow.hide();
1319 actions.loggingbox->set_active(
false);
1325 void MainWindow::on_engine_toggled() {
1327 if (actions.engine_mute->get_active()) {
1329 }
else if (actions.engine_bypass->get_active()) {
1337 void MainWindow::set_switcher_controller() {
1343 void MainWindow::on_show_midi_out() {
1345 if (actions.midi_out->get_active()) {
1346 actions.show_rack->set_active(
true);
1347 midi_out_box->set_visible(
true);
1349 midi_out_box->set_visible(
false);
1355 void MainWindow::on_show_midi_out_plug() {
1356 if (actions.midi_out_plug->get_active()) {
1357 midi_out_normal->hide();
1358 midi_out_mini->show();
1360 midi_out_mini->hide();
1361 midi_out_normal->show();
1365 void MainWindow::on_midi_out_channel_toggled(Gtk::RadioButton *rb, Gtk::Container *c) {
1366 c->set_visible(rb->get_active());
1369 void MainWindow::on_livetuner_toggled() {
1370 if (actions.livetuner->get_active()) {
1371 if (actions.live_play->get_active()) {
1372 live_play->display_tuner(
true);
1373 racktuner->set_sensitive(
false);
1376 live_play->display_tuner(
false);
1377 if (actions.tuner->get_active()) {
1378 racktuner->set_sensitive(
true);
1385 live_play->display_tuner(
false);
1386 racktuner->set_sensitive(
false);
1391 void MainWindow::create_actions() {
1393 actions.group = Gtk::ActionGroup::create(
"Main");
1397 actions.group->add(Gtk::Action::create(
"EngineMenu",_(
"_Engine")));
1398 actions.jack_latency_menu = Gtk::Action::create(
"JackLatency",_(
"_Latency"));
1399 actions.group->add(actions.jack_latency_menu);
1400 actions.osc_buffer_menu = Gtk::Action::create(
"OscBuffer",_(
"Osc. Buffer-size"));
1401 actions.group->add(actions.osc_buffer_menu);
1403 actions.group->add(Gtk::Action::create(
"PresetsMenu",_(
"_Presets")));
1404 actions.group->add(Gtk::Action::create(
"PresetListMenu",
"--"));
1405 actions.group->add(Gtk::Action::create(
"PluginsMenu",_(
"P_lugins")));
1406 actions.group->add(Gtk::Action::create(
"MonoPlugins",_(
"_Mono Plugins")));
1407 actions.group->add(Gtk::Action::create(
"StereoPlugins",_(
"_Stereo Plugins")));
1408 actions.group->add(Gtk::Action::create(
"TubeMenu",_(
"_Tube")));
1409 actions.group->add(Gtk::Action::create(
"OptionsMenu",_(
"_Options")));
1410 actions.group->add(Gtk::Action::create(
"SkinMenu", _(
"_Skin...")));
1411 actions.group->add(Gtk::Action::create(
"AboutMenu",_(
"_About")));
1416 actions.jackserverconnection = Gtk::ToggleAction::create(
"JackServerConnection", _(
"Jack Server _Connection"));
1418 actions.jackserverconnection,
1419 sigc::mem_fun(*
this, &MainWindow::jack_connection));
1421 actions.jackports = Gtk::ToggleAction::create(
"JackPorts", _(
"Jack _Ports"));
1424 sigc::mem_fun(*
this, &MainWindow::on_portmap_activate));
1426 actions.midicontroller = Gtk::ToggleAction::create(
"MidiController", _(
"M_idi Controller"));
1428 actions.midicontroller,
1429 sigc::mem_fun(*
this, &MainWindow::on_miditable_toggle));
1431 actions.engine_mute = Gtk::ToggleAction::create(
"EngineMute", _(
"Engine _Mute"));
1432 actions.group->add(actions.engine_mute);
1433 actions.engine_mute_conn = actions.engine_mute->signal_toggled().connect(
1434 sigc::mem_fun(*
this, &MainWindow::on_engine_toggled));
1436 actions.engine_bypass = Gtk::ToggleAction::create(
"EngineBypass", _(
"Engine _Bypass"));
1437 actions.group->add(actions.engine_bypass);
1438 actions.engine_bypass_conn = actions.engine_bypass->signal_toggled().connect(
1439 sigc::mem_fun(*
this, &MainWindow::on_engine_toggled));
1441 actions.quit = Gtk::Action::create(
"Quit",_(
"_Quit"));
1444 sigc::hide_return(sigc::mem_fun(
this, &MainWindow::on_quit)));
1449 actions.presets = Gtk::ToggleAction::create(
1450 "Presets",_(
"_Preset Selection"));
1451 actions.group->add(actions.presets,
1452 sigc::mem_fun(*
this, &MainWindow::on_preset_action));
1454 actions.show_plugin_bar = Gtk::ToggleAction::create(
1455 "ShowPluginBar",_(
"Show Plugin _Bar"));
1456 actions.group->add(actions.show_plugin_bar,
1457 sigc::mem_fun(*
this, &MainWindow::on_show_plugin_bar));
1459 actions.show_rack = Gtk::ToggleAction::create(
1460 "ShowRack",_(
"Show _Rack"),
"",
true);
1461 actions.group->add(actions.show_rack,
1462 sigc::mem_fun(*
this, &MainWindow::on_show_rack));
1464 actions.loggingbox = Gtk::ToggleAction::create(
"LoggingBox", _(
"Show _Logging Box"));
1467 sigc::mem_fun(*
this, &MainWindow::on_log_activate));
1469 actions.live_play = Gtk::ToggleAction::create(
"Liveplay",_(
"Live _Display"));
1470 actions.group->add(actions.live_play,
1471 sigc::mem_fun(*
this, &MainWindow::on_live_play));
1473 actions.meterbridge = Gtk::ToggleAction::create(
"Meterbridge", _(
"_Meterbridge"));
1476 actions.meterbridge,
1478 sigc::ref(actions.meterbridge), sigc::ref(*jack)));
1480 actions.group->add(actions.meterbridge);
1484 machine,
"ui.racktuner",
"LiveTuner",
"??");
1485 actions.group->add(actions.livetuner);
1486 actions.livetuner->signal_toggled().connect(
1487 sigc::mem_fun(
this, &MainWindow::on_livetuner_toggled));
1490 machine,
"ui.midi_out",
"MidiOut", _(
"M_idi Out"));
1493 sigc::mem_fun(
this, &MainWindow::on_show_midi_out));
1496 machine,
"midi_out.s_h",
"MidiOutSH",
"??");
1498 actions.midi_out_plug,
1499 sigc::mem_fun(
this, &MainWindow::on_show_midi_out_plug));
1505 machine,
"system.show_tuner",
"Tuner",_(
"_Tuner"));
1506 actions.group->add(actions.tuner,
1507 sigc::mem_fun(*
this, &MainWindow::on_show_tuner));
1509 actions.rack_config = Gtk::ToggleAction::create(
"RackConfig", _(
"R_ack Configuration"));
1510 actions.group->add(actions.rack_config,
1511 sigc::mem_fun(*
this, &MainWindow::on_rack_configuration));
1513 actions.compress = Gtk::Action::create(
"Compress",_(
"C_ompress all"));
1514 actions.group->add(actions.compress,
1515 sigc::mem_fun(*
this, &MainWindow::on_compress_all));
1517 actions.expand = Gtk::Action::create(
"Expand",_(
"E_xpand all"));
1518 actions.group->add(actions.expand,
1519 sigc::mem_fun(*
this, &MainWindow::on_expand_all));
1521 actions.rackh = Gtk::ToggleAction::create(
1522 "RackH", _(
"Order Rack _Horizontally"));
1523 actions.group->add(actions.rackh,
1524 sigc::mem_fun(*
this, &MainWindow::on_dir_changed));
1529 actions.show_values = Gtk::ToggleAction::create(
1530 "ShowValues",_(
"_Show _Values"),
"",
true);
1531 actions.group->add(actions.show_values,
1532 sigc::mem_fun(*
this, &MainWindow::on_show_values));
1534 actions.tooltips = Gtk::ToggleAction::create(
1535 "ShowTooltips", _(
"Show _Tooltips"),
"",
true);
1538 sigc::mem_fun(
this, &MainWindow::set_tooltips));
1541 machine,
"system.midi_in_preset",
"MidiInPresets", _(
"Include MIDI in _presets"));
1542 actions.group->add(actions.midi_in_presets);
1544 actions.jackstartup = Gtk::Action::create(
"JackStartup", _(
"_Jack Startup Control"));
1546 actions.jackstartup,
1547 sigc::mem_fun(*
this, &MainWindow::on_select_jack_control));
1549 actions.loadladspa = Gtk::Action::create(
"LoadLADSPA", _(
"LADSPA/LV2 Pl_ugins"));
1552 sigc::mem_fun(
this, &MainWindow::on_load_ladspa));
1554 actions.group->add(Gtk::Action::create(
"ResetAll", _(
"Reset _All Parameters")),
1557 actions.animations = Gtk::ToggleAction::create(
1558 "Animations", _(
"_Use Animations"),
"",
true);
1559 actions.group->add(actions.animations,
1560 sigc::mem_fun(
this, &MainWindow::set_animations));
1562 actions.group->add(Gtk::Action::create(
"SetPresetSwitcher", _(
"L_iveplay Midi Switch")),
1563 sigc::mem_fun(
this, &MainWindow::set_switcher_controller));
1568 actions.group->add(Gtk::Action::create(
"Help", _(
"_Help")),
1570 actions.group->add(Gtk::Action::create(
"About", _(
"_About")),
1574 actions.jack_latency_menu->set_visible(
false);
1575 actions.jackserverconnection->set_visible(
false);
1576 actions.jackports->set_visible(
false);
1577 actions.meterbridge->set_visible(
false);
1582 int get_current_workarea_height_from_desktop(GdkWindow *root) {
1584 GdkAtom actual_type, atom_cardinal;
1589 atom_cardinal = gdk_atom_intern(
"CARDINAL",
false);
1590 if (!gdk_property_get(
1591 root, gdk_atom_intern(
"_NET_CURRENT_DESKTOP",
false), atom_cardinal,
1592 0, 1,
false, &actual_type, &actual_format, &num_items,
1593 (guchar**)&ret_data_ptr)) {
1596 idx = *ret_data_ptr * 4 + 3;
1597 g_free(ret_data_ptr);
1598 if (!gdk_property_get(
1599 root, gdk_atom_intern(
"_NET_WORKAREA",
false), atom_cardinal,
1600 idx, 1,
false, &actual_type, &actual_format, &num_items,
1601 (guchar**)&ret_data_ptr)) {
1604 if (idx >= num_items) {
1608 int height = *ret_data_ptr;
1609 g_free(ret_data_ptr);
1613 int get_current_workarea_height() {
1615 GdkWindow *root = gdk_get_default_root_window();
1616 int height = get_current_workarea_height_from_desktop(root);
1620 int x, y, width, depth;
1621 gdk_window_get_geometry(root, &x, &y, &width, &height, &depth);
1634 void MainWindow::clear_box(Gtk::Container& box) {
1635 std::vector<Gtk::Widget*> l = box.get_children();
1636 for (std::vector<Gtk::Widget*>::iterator p = l.begin(); p != l.end(); ++p) {
1641 void MainWindow::make_icons(
bool force) {
1642 Gtk::OffscreenWindow w;
1643 w.set_type_hint(Gdk::WINDOW_TYPE_HINT_DOCK);
1644 Glib::RefPtr<Gdk::Screen> screen = w.get_screen();
1645 Glib::RefPtr<Gdk::Colormap> rgba = screen->get_rgba_colormap();
1647 w.set_colormap(rgba);
1651 Glib::RefPtr<Gtk::SizeGroup> sz = Gtk::SizeGroup::create(Gtk::SIZE_GROUP_BOTH);
1652 std::vector<std::pair<PluginUI*,Gtk::Widget*> > l;
1653 for (std::map<std::string, PluginUI*>::iterator i = plugin_dict.begin(); i != plugin_dict.end(); ++i) {
1654 if (!force && i->second->icon) {
1659 r->set_no_show_all(
true);
1662 l.push_back(std::pair<PluginUI*,Gtk::Widget*>(i->second, r));
1665 l.begin()->second->show();
1666 if (vb.size_request().width < 110) {
1667 vb.set_size_request(110, -1);
1670 for (std::vector<std::pair<PluginUI*,Gtk::Widget*> >::iterator i = l.begin(); i != l.end(); ++i) {
1673 w.get_window()->process_updates(
true);
1674 i->first->icon = w.get_pixbuf();
1675 if (i->first->toolitem) {
1676 dynamic_cast<Gtk::Image*
>(i->first->toolitem->get_child())->
set(i->first->icon);
1683 hanl = gtk_widget_render_icon(GTK_WIDGET(window->gobj()),
"handle_left", (GtkIconSize)-1, NULL);
1684 hanr = gtk_widget_render_icon(GTK_WIDGET(window->gobj()),
"handle_right", (GtkIconSize)-1, NULL);
1685 gint wl = gdk_pixbuf_get_width(hanl);
1686 gint wr = gdk_pixbuf_get_width(hanr);
1687 g_object_unref(hanl);
1688 g_object_unref(hanr);
1689 bld->find_widget(
"amp_padding", vbam);
1690 vbam->set_padding(0, 4, wl, wr);
1691 bld->find_widget(
"tuner_padding", vbam);
1692 vbam->set_padding(0, 4, wl, wr);
1693 bld->find_widget(
"details_padding", vbam);
1694 vbam->set_padding(0, 4, wl, wr);
1699 virtual void on_plugin_preset_popup();
1702 const Glib::ustring& tooltip=
"")
1707 void JConvPluginUI::on_plugin_preset_popup() {
1709 &
main.get_machine().get_parameter(std::string(get_id())+
".convolver"));
1712 Glib::ustring::size_type n = name.find_last_of(
'.');
1713 if (n != Glib::ustring::npos) {
1716 main.plugin_preset_popup(plugin->get_pdef(), name);
1727 plugin_dict.remove(pui);
1729 uimanager->ensure_update();
1734 Gtk::ToolItemGroup * group = groupmap[group_id];
1735 if (group->get_n_items() == 0) {
1736 Glib::ustring groupname = Glib::ustring::compose(
"PluginCategory_%1", group_id);
1737 Glib::RefPtr<Gtk::Action> act = actions.group->get_action(groupname);
1738 actions.group->remove(actions.group->get_action(groupname));
1739 groupmap.erase(group_id);
1752 add_plugin_menu_entry(pui);
1758 void MainWindow::on_ladspa_finished(
bool reload,
bool quit) {
1760 machine.commit_ladspa_changes();
1763 Glib::signal_idle().connect(sigc::mem_fun(
this, &MainWindow::delete_ladspalist_window));
1767 bool MainWindow::delete_ladspalist_window() {
1768 if (ladspalist_window) {
1770 delete ladspalist_window;
1771 ladspalist_window = 0;
1776 void MainWindow::on_load_ladspa() {
1777 if (ladspalist_window) {
1778 ladspalist_window->present();
1780 ladspalist_window =
new ladspa::PluginDisplay(machine, gx_head_icon, sigc::mem_fun(
this, &MainWindow::on_ladspa_finished));
1788 p.push_back(
new PluginUI(*
this,
id, tooltip));
1791 #ifdef accel_keys_for_plugins 1792 struct accel_search {
1797 static void accel_search_callback(gpointer data,
const gchar *accel_path, guint accel_key, GdkModifierType accel_mods, gboolean changed) {
1798 accel_search *s =
static_cast<accel_search*
>(data);
1799 if (accel_key == s->key && accel_mods == 0) {
1804 static bool accel_map_has_key(
unsigned int accel_key) {
1808 gtk_accel_map_foreach_unfiltered(gpointer(&s), accel_search_callback);
1812 static bool accel_map_next_key(
unsigned int *accel_key) {
1813 while (*accel_key <= GDK_z) {
1814 if (!accel_map_has_key(*accel_key)) {
1827 : group(g), plugins(p) {}
1830 Gtk::ToolItemGroup *MainWindow::add_plugin_category(
const char *group,
bool collapse) {
1831 std::map<Glib::ustring, Gtk::ToolItemGroup*>::iterator it = groupmap.find(group);
1832 if (it != groupmap.end()) {
1835 Glib::ustring ui_template =
1836 "<menubar><menu action=\"PluginsMenu\"><menu action=\"%1Plugins\"><menu action=\"%2\">" 1837 "</menu></menu></menu></menubar>";
1838 Glib::ustring groupname = Glib::ustring::compose(
"PluginCategory_%1", group);
1839 uimanager->add_ui_from_string(Glib::ustring::compose(ui_template,
"Mono", groupname));
1840 uimanager->add_ui_from_string(Glib::ustring::compose(ui_template,
"Stereo", groupname));
1841 actions.group->add(Gtk::Action::create(groupname, gettext(group)));
1842 Gtk::ToolItemGroup *gw =
new Gtk::ToolItemGroup(gettext(group));
1843 groupmap[group] = gw;
1844 gw->set_collapsed(collapse);
1845 effects_toolpalette->add(*manage(gw));
1846 effects_toolpalette->set_exclusive(*gw,
true);
1847 effects_toolpalette->set_expand(*gw,
true);
1851 Glib::ustring MainWindow::add_plugin_menu_entry(
PluginUI *pui) {
1852 Glib::ustring ui_template =
1853 "<menubar><menu action=\"PluginsMenu\"><menu action=\"%1Plugins\"><menu action=\"%2\">" 1854 "<menuitem action=\"%3\"/>" 1855 "</menu></menu></menu></menubar>";
1857 Glib::ustring groupname = Glib::ustring::compose(
"PluginCategory_%1", group);
1858 Glib::ustring actionname = Glib::ustring::compose(
"Plugin_%1", pui->
get_id());
1860 pui->
set_ui_merge_id(uimanager->add_ui_from_string(Glib::ustring::compose(ui_template, tp, groupname, actionname)));
1865 void MainWindow::register_plugin(
PluginUI *pui) {
1866 plugin_dict.add(pui);
1867 Gtk::ToolItemGroup *gw = add_plugin_category(pui->
get_category());
1868 Glib::ustring actionname = add_plugin_menu_entry(pui);
1869 add_toolitem(*pui, gw);
1870 Glib::RefPtr<Gtk::ToggleAction> act = Gtk::ToggleAction::create(actionname, pui->
get_name());
1871 actions.group->add(act);
1872 #ifdef accel_keys_for_plugins 1873 unsigned int key = GDK_a;
1874 if (accel_map_next_key(&key)) {
1875 Gtk::AccelMap::add_entry(act->get_accel_path(), key, Gdk::ModifierType(0));
1880 act->set_active(
true);
1885 void MainWindow::fill_pluginlist() {
1888 add_plugin_category(
N_(
"Tone Control"),
false);
1889 add_plugin_category(
N_(
"Distortion"));
1890 add_plugin_category(
N_(
"Fuzz"));
1891 add_plugin_category(
N_(
"Reverb"));
1892 add_plugin_category(
N_(
"Echo / Delay"));
1893 add_plugin_category(
N_(
"Modulation"));
1894 add_plugin_category(
N_(
"Guitar Effects"));
1895 add_plugin_category(
N_(
"Misc"));
1897 std::vector<PluginUI*> p;
1902 machine.pluginlist_append_rack(builder);
1905 for (std::vector<PluginUI*>::iterator v = p.begin(); v != p.end(); ++v) {
1906 register_plugin(*v);
1914 int MainWindow::start_jack() {
1919 int wait_after_connect = 0;
1922 if (v_id ==
"autostart") {
1926 if (v_id ==
"other") {
1927 cmd = machine.get_parameter(
"ui.jack_starter").getString().get_value();
1931 }
else if (v_id ==
"qjackctl") {
1932 wait_after_connect = 500000;
1933 cmd =
"qjackctl --start";
1938 for (
int i = 0; i < 10; i++) {
1946 string(_(
"I really tried to get jack up and running, sorry ... ")));
1950 bool MainWindow::connect_jack(
bool v, Gtk::Window *splash) {
1962 bool ask = machine.get_parameter_value<
bool>(
"ui.ask_for_jack_starter");
1964 switch (start_jack()) {
1965 case 1:
return true;
1966 case -1:
return false;
1977 return start_jack() == 1;
1980 void MainWindow::on_jack_client_changed() {
1988 bool v = (jack->
client != 0);
1992 actions.jackserverconnection->set_active(v);
1993 Glib::ustring s =
"Guitarix: ";
1999 window->set_title(s);
2000 actions.jack_latency_menu->set_sensitive(v);
2001 actions.engine_mute->set_sensitive(v);
2002 actions.engine_bypass->set_sensitive(v);
2003 status_image->set_sensitive(v);
2005 jackd_image->set(pixbuf_jack_disconnected);
2007 jackd_image->set(pixbuf_jack_connected);
2014 actions.engine_mute_conn.block();
2015 actions.engine_mute->set_active(
true);
2016 actions.engine_mute_conn.unblock();
2017 status_image->set(pixbuf_off);
2018 machine.msend_midi_cc(0xB0,120,127,3);
2021 actions.engine_mute_conn.block();
2022 actions.engine_bypass_conn.block();
2023 actions.engine_mute->set_active(
false);
2024 actions.engine_bypass->set_active(
false);
2025 actions.engine_mute_conn.unblock();
2026 actions.engine_bypass_conn.unblock();
2027 status_image->set(pixbuf_on);
2028 machine.msend_midi_cc(0xB0,120,0,3);
2031 actions.engine_mute_conn.block();
2032 actions.engine_bypass_conn.block();
2033 actions.engine_mute->set_active(
false);
2034 actions.engine_bypass->set_active(
true);
2035 actions.engine_mute_conn.unblock();
2036 actions.engine_bypass_conn.unblock();
2037 status_image->set(pixbuf_bypass);
2043 static struct TuningTab {
2049 {
"Standard",
"E",
false, {40, 45, 50, 55, 59, 64}},
2050 {
"Standard/Es",
"Es",
true, {39, 44, 49, 54, 58, 63}},
2051 {
"Open E",
"E",
false, {40, 47, 52, 56, 59, 64}},
2052 {
"Drop D",
"D",
false, {38, 45, 50, 55, 59, 64}},
2053 {
"Half Step Down",
"E",
false, {39, 44, 49, 54, 58, 63}},
2054 {
"Full Step Down",
"D",
false, {38, 43, 48, 53, 57, 62}},
2055 {
"1 and 1/2 Steps Down",
"E",
false, {37, 42, 47, 52, 56, 61}},
2056 {
"Double Drop D",
"D",
false, {38, 45, 50, 55, 59, 62}},
2057 {
"Drop C",
"C",
false, {36, 43, 48, 53, 57, 62}},
2058 {
"Drop C#",
"C#",
false, {37, 44, 49, 54, 58, 63}},
2059 {
"Drop B",
"B",
false, {35, 42, 47, 52, 56, 61}},
2060 {
"Drop A#",
"A#",
false, {34, 41, 46, 51, 55, 60}},
2061 {
"Drop A",
"A",
false, {33, 40, 45, 50, 54, 59}},
2062 {
"Open D",
"D",
false, {38, 45, 50, 54, 57, 62}},
2063 {
"Open D Minor",
"D",
false, {38, 45, 50, 53, 57, 62}},
2064 {
"Open G",
"G",
false, {38, 43, 50, 55, 59, 62}},
2065 {
"Open G Minor",
"G",
false, {38, 43, 50, 55, 58, 62}},
2066 {
"Open C",
"C",
false, {36, 43, 48, 55, 60, 64}},
2067 {
"Open C#",
"C#",
false, {37, 42, 59, 52, 56, 61}},
2068 {
"Open C Minor",
"C",
false, {36, 43, 48, 55, 60, 63}},
2069 {
"Open E7",
"E7",
false, {40, 44, 50, 52, 59, 64}},
2070 {
"Open E Minor7",
"E",
false, {40, 47, 50, 55, 59, 64}},
2071 {
"Open G Major7",
"G",
false, {38, 43, 50, 54, 59, 62}},
2072 {
"Open A Minor",
"A",
false, {40, 45, 52, 57, 60, 64}},
2073 {
"Open A Minor7",
"A",
false, {40, 45, 52, 55, 60, 64}},
2074 {
"Open A",
"A",
false, {40, 45, 49, 52, 57, 64}},
2075 {
"C Tuning",
"C",
false, {36, 41, 46, 51, 55, 60}},
2076 {
"C# Tuning",
"C#",
false, {37, 42, 47, 52, 56, 61}},
2077 {
"Bb Tuning",
"Bb",
false, {34, 39, 44, 49, 53, 58}},
2078 {
"A to A (Baritone)",
"A",
false, {33, 38, 43, 48, 52, 57}},
2079 {
"Open Dsus2",
"D",
false, {38, 45, 50, 55, 57, 62}},
2080 {
"Open Gsus2",
"G",
false, {38, 43, 50, 55, 60, 62}},
2081 {
"G6",
"G6",
false, {38, 43, 50, 55, 59, 64}},
2082 {
"Modal G",
"G",
false, {38, 43, 50, 55, 60, 62}},
2083 {
"Overtone",
"E",
false, {48, 52, 55, 58, 60, 62}},
2084 {
"Pentatonic",
"E",
false, {45, 48, 50, 52, 55, 69}},
2085 {
"Minor Third",
"E",
false, {48, 51, 54, 57, 60, 63}},
2086 {
"Major Third",
"E",
false, {48, 52, 56, 60, 64, 68}},
2087 {
"All Fourths",
"E",
false, {40, 45, 50, 55, 60, 65}},
2088 {
"Augmented Fourths",
"E",
false, {36, 42, 48, 54, 60, 66}},
2089 {
"Slow Motion",
"E",
false, {38, 43, 50, 53, 60, 62}},
2090 {
"Admiral",
"E",
false, {36, 43, 50, 55, 59, 60}},
2091 {
"Buzzard",
"E",
false, {36, 41, 48, 55, 58, 65}},
2092 {
"Face",
"E",
false, {36, 43, 50, 55, 57, 62}},
2093 {
"Four and Twenty",
"E",
false, {38, 45, 50, 50, 57, 62}},
2094 {
"Ostrich",
"E",
false, {38, 50, 50, 50, 62, 62}},
2095 {
"Capo 200",
"E",
false, {36, 43, 50, 51, 62, 63}},
2096 {
"Balalaika",
"E",
false, {40, 45, 50, 52, 52, 57}},
2097 {
"Cittern One",
"E",
false, {36, 41, 48, 55, 60, 62}},
2098 {
"Cittern Two",
"E",
false, {36, 43, 48, 55, 60, 67}},
2099 {
"Dobro",
"E",
false, {43, 47, 50, 55, 59, 62}},
2100 {
"Lefty",
"E",
false, {64, 59, 55, 50, 45, 40}},
2101 {
"Mandoguitar",
"E",
false, {36, 43, 50, 57, 64, 71}},
2102 {
"Rusty Cage",
"E",
false, {35, 45, 50, 55, 59, 64}},
2103 {
"Hardcore",
"C",
false, {36, 43, 48, 53, 57, 58}},
2105 int mode = tuner_tuning->get_value();
2109 for (
int i = 0; i < 6; ++i) {
2110 tuner.
push_note(tuning_tab[mode-1].notes[i], 69, 12);
2118 Glib::ustring tet = options.get_tuner_tet();
2120 if (tet.find(
"12") !=Glib::ustring::npos) t=0;
2121 else if (tet.find(
"19") !=Glib::ustring::npos) t=1;
2122 else if (tet.find(
"24") !=Glib::ustring::npos) t=2;
2123 else if (tet.find(
"31") !=Glib::ustring::npos) t=3;
2124 else if (tet.find(
"53") !=Glib::ustring::npos) t=4;
2125 else t = tuner_temperament->get_value();
2126 machine.set_parameter_value(
"racktuner.temperament", t);
2132 Glib::ustring ref = options.get_tuner_ref();
2133 float t = atof(ref.c_str());
2134 machine.set_parameter_value(
"ui.tuner_reference_pitch", t);
2139 void MainWindow::setup_tuner_temperament(
Gxw::RackTuner& tuner) {
2149 tuner_mode->signal_value_changed().connect(
2152 sigc::mem_fun(*tuner_mode, &Gxw::Selector::get_value)));
2153 tuner_reference_pitch->signal_value_changed().connect(
2156 sigc::mem_fun(*tuner_reference_pitch, &Gxw::ValueDisplay::get_value)));
2157 tuner_tuning->signal_value_changed().connect(
2158 sigc::bind(sigc::mem_fun(*
this, &MainWindow::set_tuning), sigc::ref(tuner)));
2159 tuner_temperament->signal_value_changed().connect(
2160 sigc::bind(sigc::mem_fun(*
this, &MainWindow::setup_tuner_temperament), sigc::ref(tuner)));
2164 bool MainWindow::on_toggle_mute(GdkEventButton* ev) {
2165 if (ev->type == GDK_BUTTON_PRESS && ev->button == 1) {
2175 bool MainWindow::on_toggle_insert(GdkEventButton* ev) {
2176 if (ev->type == GDK_BUTTON_PRESS && ev->button == 1) {
2177 if (machine.get_parameter_value<
bool>(
"engine.insert")) {
2178 insert_image->set(pixbuf_insert_off);
2179 machine.set_parameter_value(
"engine.insert",
false);
2180 machine.set_jack_insert(
true);
2182 insert_image->set(pixbuf_insert_on);
2183 machine.set_parameter_value(
"engine.insert",
true);
2184 machine.set_jack_insert(
false);
2190 bool MainWindow::on_jackserverconnection(GdkEventButton* ev) {
2191 if (ev->type == GDK_BUTTON_PRESS && ev->button == 1) {
2192 bool v = actions.jackserverconnection->get_active();
2193 actions.jackserverconnection->set_active(!v);
2198 void MainWindow::on_msg_level_changed() {
2199 switch (fLoggingWindow.get_unseen_msg_level()) {
2202 default: logstate_image->set(pixbuf_log_grey);
break;
2210 void MainWindow::on_ampdetail_switch(
bool compress,
bool setparam) {
2212 ampdetail_normal->hide();
2213 ampdetail_mini->show();
2215 ampdetail_mini->hide();
2216 ampdetail_normal->show();
2219 machine.set_parameter_value(
"ui.mp_s_h", compress);
2227 void MainWindow::set_osc_size() {
2229 if (options.mul_buffer > 0) {
2230 actions.osc_buffer_size->set_current_value(options.mul_buffer);
2234 void MainWindow::change_osc_buffer(Glib::RefPtr<Gtk::RadioAction> action) {
2236 if (!jack || jack->
client) {
2237 options.mul_buffer = action->get_current_value();
2238 on_oscilloscope_activate(
false);
2239 machine.set_oscilloscope_mul_buffer(options.mul_buffer);
2240 on_oscilloscope_activate(
true);
2246 void MainWindow::add_osc_size_menu() {
2247 Glib::ustring s =
"<menubar><menu action=\"OptionsMenu\"><menu action=\"OscBuffer\">";
2248 Gtk::RadioButtonGroup group;
2249 int osc_buffer_size = 1;
2250 for (
int i = 1; i <= 6; ++i) {
2252 Glib::ustring actname = Glib::ustring::compose(
"buffer size %1", name);
2253 s += Glib::ustring::compose(
"<menuitem action=\"%1\"/>", actname);
2254 Glib::RefPtr<Gtk::RadioAction> action = Gtk::RadioAction::create(group, actname, name);
2255 actions.group->add(action);
2257 action->signal_changed().connect(
2258 sigc::mem_fun(*
this, &MainWindow::change_osc_buffer));
2259 actions.osc_buffer_size = action;
2261 action->property_value().set_value(osc_buffer_size);
2264 s.append(
"</menu></menu></menubar>");
2265 uimanager->add_ui_from_string(s);
2268 void MainWindow::on_show_oscilloscope(
bool v) {
2271 Glib::signal_timeout().connect(
2272 sigc::mem_fun(*
this, &MainWindow::on_refresh_oscilloscope), 60);
2276 void MainWindow::set_waveview_buffer(
unsigned int size) {
2277 fWaveView.set_frame(machine.get_oscilloscope_buffer(), size);
2280 void MainWindow::on_oscilloscope_post_pre(
int post_pre) {
2284 fWaveView.set_multiplicator(20.,60.);
2288 int MainWindow::on_oscilloscope_activate(
bool start) {
2290 machine.clear_oscilloscope_buffer();
2291 fWaveView.queue_draw();
2296 bool MainWindow::on_refresh_oscilloscope() {
2299 jack_nframes_t bsize;
2300 machine.get_oscilloscope_info(load, frames, is_rt, bsize);
2303 jack_nframes_t bsize;
2306 if (!oc.bsize || oc.load != load) {
2309 (boost::format(_(
"DSP Load %1% %%")) % oc.load).str().c_str(),
2310 Gtk::CORNER_TOP_LEFT);
2312 if (!oc.bsize || oc.frames != frames) {
2315 (boost::format(_(
"HT Frames %1%")) % oc.frames).str().c_str(),
2316 Gtk::CORNER_BOTTOM_LEFT);
2318 if (!oc.bsize || oc.rt != is_rt) {
2321 oc.rt ? _(
"RT Mode YES ") : _(
"RT mode <span color=\"#cc1a1a\">NO</span>"),
2322 Gtk::CORNER_BOTTOM_RIGHT);
2324 if (!oc.bsize || oc.bsize != bsize) {
2327 (boost::format(_(
"Latency %1%")) % oc.bsize).str().c_str(),
2328 Gtk::CORNER_TOP_RIGHT);
2330 fWaveView.queue_draw();
2331 return machine.oscilloscope_plugin_box_visible();
2337 return 20.*log10(power);
2340 bool MainWindow::refresh_meter_level(
float falloff) {
2341 const unsigned int channels =
sizeof(fastmeter)/
sizeof(fastmeter[0]);
2343 if (jack && !jack->
client) {
2348 static float old_peak_db[channels] = {-INFINITY, -INFINITY};
2351 float level[channels];
2352 machine.maxlevel_get(channels, level);
2353 for (
unsigned int c = 0; c < channels; c++) {
2356 float peak_db = -INFINITY;
2361 if (peak_db < old_peak_db[c]) {
2362 peak_db =
max(peak_db, old_peak_db[c] - falloff);
2364 fastmeter[c]->set(log_meter(peak_db));
2365 old_peak_db[c] = peak_db;
2370 bool MainWindow::survive_jack_shutdown() {
2383 _(
"jack has bumped us out!! "));
2384 actions.jackserverconnection->set_active(
true);
2390 actions.jackserverconnection->set_active(
false);
2393 _(
"jack has bumped us out!! "));
2399 void MainWindow::gx_jack_is_down() {
2400 actions.jackserverconnection->set_active(
false);
2401 Glib::signal_timeout().connect(
2402 sigc::mem_fun(*
this, &MainWindow::survive_jack_shutdown),
2403 200, Glib::PRIORITY_LOW);
2406 #ifdef HAVE_JACK_SESSION 2407 void MainWindow::jack_session_event() {
2412 const char *statefile =
"gx_head.state";
2413 jack_session_event_t *
event = jack->get_last_session_event();
2415 machine.set_statefilename(
string(event->session_dir) + statefile);
2416 machine.save_to_state();
2419 string cmd(options.get_path_to_program());
2421 string cmd(
"guitarix");
2424 cmd +=
event->client_uuid;
2426 cmd += jack->get_uuid_insert();
2427 cmd +=
" -f ${SESSION_DIR}";
2429 event->command_line = strdup(cmd.c_str());
2431 JackSessionEventType tp =
event->type;
2432 if (jack->return_last_session_event() == 0) {
2433 if (tp == JackSessionSaveAndQuit) {
2439 void MainWindow::jack_session_event_ins() {
2444 jack_session_event_t *
event = jack->get_last_session_event_ins();
2446 event->command_line = strdup(
"true ${SESSION_DIR}");
2447 JackSessionEventType tp =
event->type;
2448 if (jack->return_last_session_event_ins() == 0) {
2449 if (tp == JackSessionSaveAndQuit) {
2456 void MainWindow::set_in_session() {
2462 machine.disable_autosave(
true);
2466 void MainWindow::systray_menu(guint button, guint32 activate_time) {
2467 Gtk::Menu *menu =
dynamic_cast<Gtk::MenuItem*
>(uimanager->get_widget(
"/menubar/EngineMenu"))->get_submenu();
2468 menu->popup(2, gtk_get_current_event_time());
2474 status_icon->set(gx_head_midi);
2478 status_icon->set(gx_head_icon);
2481 status_icon->set(gx_head_warn);
2488 bool MainWindow::on_window_state_changed(GdkEventWindowState* event) {
2489 if (event->changed_mask & event->new_window_state & (Gdk::WINDOW_STATE_ICONIFIED|Gdk::WINDOW_STATE_WITHDRAWN)) {
2490 window->get_window()->get_root_origin(options.mainwin_x, options.mainwin_y);
2495 void MainWindow::hide_extended_settings() {
2497 (window->get_window()->get_state()
2498 & (Gdk::WINDOW_STATE_ICONIFIED|Gdk::WINDOW_STATE_WITHDRAWN))) {
2499 window->move(options.mainwin_x, options.mainwin_y);
2515 int port = options.get_rpcport();
2517 machine.start_socket(sigc::ptr_fun(Gtk::Main::quit), options.get_rpcaddress(), port);
2519 if (options.get_liveplaygui()) liveplay_button->set_active();
2523 if (options.get_liveplaygui()) liveplay_button->set_active();
2529 bool MainWindow::on_meter_button_release(GdkEventButton* ev) {
2530 if (ev->button == 1) {
2531 for (
unsigned int i = 0; i <
sizeof(fastmeter)/
sizeof(fastmeter[0]); i++) {
2532 fastmeter[i]->clear();
2539 void MainWindow::display_preset_msg(
const Glib::ustring& bank,
const Glib::ustring& preset) {
2540 preset_status->set_text(bank +
" / " + preset);
2543 bool MainWindow::on_key_press_event(GdkEventKey *event) {
2544 if ((event->state & Gtk::AccelGroup::get_default_mod_mask()) != 0) {
2548 keyswitch.process_preset_key(event->keyval ==
GDK_KEY_0 ? 9 : event->keyval -
GDK_KEY_1);
2556 keyswitch.process_bank_key(event->keyval -
GDK_KEY_a);
2562 bool MainWindow::on_quit() {
2563 if (ladspalist_window && !ladspalist_window->check_exit()) {
2566 machine.stop_socket();
2571 void MainWindow::amp_controls_visible(Gtk::Range *rr) {
2573 bool v = abs(rr->get_value() - machine.get_parameter(
"tube.select").getUpperAsFloat()) < 0.5;
2574 const char *knobs1[] = {
"gxmediumknobpregain",
"gxmediumknobdrive",
"gxmediumknobdist",
"gxmediumknobgain",
"labelpregain:effekt_label",
"labeldrive:effekt_label",
"labeldist:effekt_label",
"labelgain:effekt_label"};
2575 const char *knobs2[] = {
"gxbigknobgain",
"labelgain2:effekt_label"};
2576 for (
unsigned int i = 0; i <
sizeof(knobs1)/
sizeof(knobs1[1]); ++i) {
2578 bld->find_widget(knobs1[i], w);
2581 for (
unsigned int i = 0; i <
sizeof(knobs2)/
sizeof(knobs2[1]); ++i) {
2583 bld->find_widget(knobs2[i], w);
2589 Gtk::Window *splash,
const Glib::ustring& title)
2590 : sigc::trackable(),
2604 preset_list_menu_bank(),
2605 preset_list_merge_id(0),
2606 preset_list_actiongroup(),
2611 convolver_filename_label(),
2612 convolver_mono_filename_label(),
2613 gx_head_icon(Gdk::Pixbuf::create_from_file(options.get_pixmap_filepath(
"gx_head.png"))),
2614 boxbuilder(machine_, fWaveView, convolver_filename_label, convolver_mono_filename_label, gx_head_icon),
2616 select_jack_control(0),
2618 amp_radio_menu(machine_,
"tube.select"),
2619 pixbuf_insert_on(Gdk::Pixbuf::create_from_file(options.get_pixmap_filepath(
"insert_on.png"))),
2620 pixbuf_insert_off(Gdk::Pixbuf::create_from_file(options.get_pixmap_filepath(
"insert_off.png"))),
2621 pixbuf_on(Gdk::Pixbuf::create_from_file(options.get_pixmap_filepath(
"gx_on.png"))),
2622 pixbuf_off(Gdk::Pixbuf::create_from_file(options.get_pixmap_filepath(
"gx_off.png"))),
2623 pixbuf_bypass(Gdk::Pixbuf::create_from_file(options.get_pixmap_filepath(
"gx_bypass.png"))),
2624 pixbuf_jack_connected(Gdk::Pixbuf::create_from_file(options.get_pixmap_filepath(
"jackd_on.png"))),
2625 pixbuf_jack_disconnected(Gdk::Pixbuf::create_from_file(options.get_pixmap_filepath(
"jackd_off.png"))),
2626 pixbuf_log_grey(Gdk::Pixbuf::create_from_file(options.get_pixmap_filepath(
"gx_log_grey.png"))),
2627 pixbuf_log_yellow(Gdk::Pixbuf::create_from_file(options.get_pixmap_filepath(
"gx_log_yellow.png"))),
2628 pixbuf_log_red(Gdk::Pixbuf::create_from_file(options.get_pixmap_filepath(
"gx_log_red.png"))),
2630 status_icon(Gtk::StatusIcon::
create(gx_head_icon)),
2631 gx_head_midi(Gdk::Pixbuf::create_from_file(options.get_pixmap_filepath(
"gx_head-midi.png"))),
2632 gx_head_warn(Gdk::Pixbuf::create_from_file(options.get_pixmap_filepath(
"gx_head-warn.png"))),
2634 keyswitch(machine, sigc::mem_fun(this, &
MainWindow::display_preset_msg)),
2636 ladspalist_window(),
2637 szg_rack_units(Gtk::SizeGroup::
create(Gtk::SIZE_GROUP_HORIZONTAL)) {
2639 convolver_filename_label.set_ellipsize(Pango::ELLIPSIZE_END);
2640 convolver_mono_filename_label.set_ellipsize(Pango::ELLIPSIZE_END);
2654 const char *id_list[] = {
"MainWindow",
"amp_background:ampbox",
"bank_liststore",
"target_liststore",
2655 "bank_combo_liststore", 0 };
2656 bld = gx_gui::GxBuilder::create_from_file(options_.
get_builder_filepath(
"mainpanel.glade"), &machine, id_list);
2657 load_widget_pointers();
2658 rackcontainer->set_homogeneous(
true);
2659 szg_rack_units->add_widget(*ampdetail_mini);
2660 szg_rack_units->add_widget(*ampdetail_normal);
2663 clear_box(*monocontainer);
2664 clear_box(*stereorackcontainerH);
2665 clear_box(*stereorackcontainerV);
2666 clear_box(*preset_box_no_rack);
2669 left_column = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
2670 Gtk::ScrolledWindow *swe;
2671 bld->find_widget(
"scrolledwindow_effects", swe);
2672 gtk_size_group_add_widget(
left_column, GTK_WIDGET(swe->gobj()));
2674 bld->find_widget(
"presets:barbutton", pb);
2675 gtk_size_group_add_widget(
left_column, GTK_WIDGET(pb->gobj()));
2681 uimanager = Gtk::UIManager::create();
2682 uimanager->insert_action_group(actions.
group);
2690 add_osc_size_menu();
2691 amp_radio_menu.
setup(
"<menubar><menu action=\"TubeMenu\">",
"</menu></menubar>",uimanager,actions.
group);
2694 Gtk::Widget *menubar = uimanager->get_widget(
"/menubar");
2695 actions.
accels = uimanager->get_accel_group();
2696 menubox->pack_start(*menubar);
2697 window->add_accel_group(actions.
accels);
2698 window->set_icon(gx_head_icon);
2704 window->signal_window_state_event().connect(
2705 sigc::mem_fun(*
this, &MainWindow::on_window_state_changed));
2706 window->signal_delete_event().connect(
2707 sigc::hide(sigc::mem_fun(
this, &MainWindow::on_quit)));
2708 window->signal_configure_event().connect_notify(
2709 sigc::mem_fun(*
this, &MainWindow::on_configure_event));
2710 window->signal_visibility_notify_event().connect(
2711 sigc::mem_fun(*
this, &MainWindow::on_visibility_notify));
2712 window->signal_key_press_event().connect(
2713 sigc::mem_fun(*
this, &MainWindow::on_key_press_event));
2718 status_icon->signal_activate().connect(
2719 sigc::mem_fun(*
this, &MainWindow::hide_extended_settings));
2720 status_icon->signal_popup_menu().connect(
2721 sigc::mem_fun(*
this, &MainWindow::systray_menu));
2724 stereorackcontainerV->pack_start(stereorackcontainer, Gtk::PACK_EXPAND_WIDGET);
2725 monocontainer->pack_start(monorackcontainer, Gtk::PACK_EXPAND_WIDGET);
2733 jack->
shutdown.connect(sigc::mem_fun(*
this, &MainWindow::gx_jack_is_down));
2734 jack->signal_buffersize_change().connect(
2735 sigc::mem_fun(*
this, &MainWindow::set_latency));
2736 jack->signal_client_change().connect(
2737 sigc::mem_fun(*
this, &MainWindow::on_jack_client_changed));
2738 #ifdef HAVE_JACK_SESSION 2739 jack->session.connect(sigc::mem_fun(*
this, &MainWindow::jack_session_event));
2740 jack->session_ins.connect(sigc::mem_fun(*
this, &MainWindow::jack_session_event_ins));
2748 sigc::mem_fun(*
this, &MainWindow::on_engine_state_change));
2750 sigc::mem_fun(*
this, &MainWindow::overload_status_changed));
2752 sigc::mem_fun(
this, &MainWindow::on_plugin_changed));
2757 sigc::mem_fun(*
this, &MainWindow::rebuild_preset_menu));
2759 sigc::mem_fun(*
this, &MainWindow::show_selected_preset));
2768 std::vector<Gtk::TargetEntry> listTargets;
2769 listTargets.push_back(Gtk::TargetEntry(
"application/x-guitarix-mono", Gtk::TARGET_SAME_APP, 1));
2770 listTargets.push_back(Gtk::TargetEntry(
"application/x-guitarix-stereo", Gtk::TARGET_SAME_APP, 2));
2771 effects_toolpalette->drag_dest_set(listTargets, Gtk::DEST_DEFAULT_ALL, Gdk::ACTION_MOVE);
2772 effects_toolpalette->signal_drag_data_received().connect(sigc::mem_fun(*
this, &MainWindow::on_tp_drag_data_received));
2778 jackd_image->set(pixbuf_jack_disconnected);
2779 jackd_image->get_parent()->signal_button_press_event().connect(
2780 sigc::mem_fun(*
this, &MainWindow::on_jackserverconnection));
2788 jackd_image->hide();
2794 setup_tuner(*racktuner);
2795 tuner_on_off->set_name(
"effect_on_off");
2796 tuner_on_off->signal_toggled().connect(
2798 sigc::mem_fun(*racktuner, &Gxw::RackTuner::set_sensitive),
2799 sigc::mem_fun(*tuner_on_off, &Gxw::Switch::get_active)));
2807 sigc::mem_fun(*
this, &MainWindow::on_oscilloscope_post_pre));
2809 sigc::mem_fun(*
this, &MainWindow::on_show_oscilloscope));
2811 sigc::mem_fun(*
this, &MainWindow::on_oscilloscope_activate));
2813 sigc::mem_fun(*
this, &MainWindow::set_waveview_buffer));
2818 for (
unsigned int i = 0; i <
sizeof(fastmeter)/
sizeof(fastmeter[0]); ++i) {
2819 fastmeter[i]->signal_button_release_event().connect(
2820 sigc::mem_fun(*
this, &MainWindow::on_meter_button_release));
2821 fastmeter[i]->set_tooltip_text(_(
"Overall Rack output"));
2823 const float meter_falloff = 27;
2824 const float meter_display_timeout = 60;
2825 const float falloff = meter_falloff * meter_display_timeout * 0.001;
2826 Glib::signal_timeout().connect(
2827 sigc::bind(sigc::mem_fun(
this, &MainWindow::refresh_meter_level), falloff),
2828 meter_display_timeout);
2833 ampdetail_compress->signal_clicked().connect(
2834 sigc::bind(sigc::mem_fun(*
this, &MainWindow::on_ampdetail_switch),
true,
true));
2835 ampdetail_expand->signal_clicked().connect(
2836 sigc::bind(sigc::mem_fun(*
this, &MainWindow::on_ampdetail_switch),
false,
true));
2838 sigc::bind(sigc::mem_fun(*
this, &MainWindow::on_ampdetail_switch),
false));
2843 midi_out_compress->signal_clicked().connect(
2845 sigc::mem_fun(actions.
midi_out_plug.operator->(), &Gtk::ToggleAction::set_active),
2847 midi_out_expand->signal_clicked().connect(
2849 sigc::mem_fun(actions.
midi_out_plug.operator->(), &Gtk::ToggleAction::set_active),
2851 midi_out_presets_mini->signal_clicked().connect(
2855 midi_out_presets_normal->signal_clicked().connect(
2859 channel1_button->signal_toggled().connect(
2861 sigc::mem_fun(
this, &MainWindow::on_midi_out_channel_toggled),
2862 channel1_button, channel1_box));
2863 channel2_button->signal_toggled().connect(
2865 sigc::mem_fun(
this, &MainWindow::on_midi_out_channel_toggled),
2866 channel2_button, channel2_box));
2867 channel3_button->signal_toggled().connect(
2869 sigc::mem_fun(
this, &MainWindow::on_midi_out_channel_toggled),
2870 channel3_button, channel3_box));
2875 status_image->set(pixbuf_on);
2877 status_image->get_parent()->signal_button_press_event().connect(
2878 sigc::mem_fun(*
this, &MainWindow::on_toggle_mute));
2879 on_engine_state_change(machine.
get_state());
2884 insert_image->set(pixbuf_insert_on);
2886 insert_image->get_parent()->signal_button_press_event().connect(
2887 sigc::mem_fun(*
this, &MainWindow::on_toggle_insert));
2892 gtk_activatable_set_related_action(GTK_ACTIVATABLE(show_rack_button->gobj()), GTK_ACTION(actions.
show_rack->gobj()));
2893 gtk_activatable_set_related_action(GTK_ACTIVATABLE(rack_order_h_button->gobj()), GTK_ACTION(actions.
rackh->gobj()));
2894 gtk_activatable_set_related_action(GTK_ACTIVATABLE(config_mode_button->gobj()), GTK_ACTION(actions.
rack_config->gobj()));
2895 gtk_activatable_set_related_action(GTK_ACTIVATABLE(liveplay_button->gobj()),GTK_ACTION(actions.
live_play->gobj()));
2896 gtk_activatable_set_related_action(GTK_ACTIVATABLE(tuner_button->gobj()),GTK_ACTION(actions.
tuner->gobj()));
2897 gtk_activatable_set_related_action(GTK_ACTIVATABLE(effects_button->gobj()), GTK_ACTION(actions.
show_plugin_bar->gobj()));
2898 gtk_activatable_set_related_action(GTK_ACTIVATABLE(presets_button->gobj()), GTK_ACTION(actions.
presets->gobj()));
2899 gtk_activatable_set_related_action(GTK_ACTIVATABLE(compress_button->gobj()), GTK_ACTION(actions.
compress->gobj()));
2900 gtk_activatable_set_related_action(GTK_ACTIVATABLE(expand_button->gobj()), GTK_ACTION(actions.
expand->gobj()));
2920 fLoggingWindow.set_transient_for(*window);
2921 fLoggingWindow.set_icon(gx_head_icon);
2923 sigc::mem_fun(*
this, &MainWindow::on_msg_level_changed));
2924 fLoggingWindow.signal_hide().connect(
2926 sigc::mem_fun(actions.
loggingbox.operator->(), &Gtk::ToggleAction::set_active),
2928 on_msg_level_changed();
2929 logstate_image->get_parent()->signal_button_press_event().connect(
2930 sigc::mem_fun(*
this, &MainWindow::on_log_activated));
2947 plugin_dict.
add(mainamp_plugin);
2948 mainamp_plugin->
rackbox = add_rackbox_internal(*mainamp_plugin, 0, 0,
false, -1,
false, amp_background);
2950 effects_toolpalette->show();
2970 if (!title.empty()) {
2971 window->set_title(title);
2987 if (!connect_jack(
true, splash)) {
2990 jack->signal_client_change()();
3006 bld->find_widget(
"gxselector1:amp_selector", rr);
3007 rr->signal_value_changed().connect(
3009 sigc::mem_fun(
this, &MainWindow::amp_controls_visible),
3011 amp_controls_visible(rr);
3015 insert_image->set(pixbuf_insert_on);
3018 insert_image->set(pixbuf_insert_off);
3021 if (!options.
get_tuner_tet().empty()) set_tuner_tet(*racktuner);
3022 if (!options.
get_tuner_ref().empty()) set_tuner_ref(*racktuner);
3027 #if false // set true to generate a new keyboard accel file 3028 gtk_accel_map_add_filter(
"<Actions>/Main/ChangeSkin_*");
3029 gtk_accel_map_add_filter(
"<Actions>/Main/Enum_tube.select.*");
3030 gtk_accel_map_add_filter(
"<Actions>/Main/Latency_*");
3031 gtk_accel_map_add_filter(
"<Actions>/Main/Plugin_*");
3032 gtk_accel_map_add_filter(
"<Actions>/PresetList/PresetList_*");
3038 Glib::RefPtr<Gdk::Window> win = window->get_window();
3042 if (actions.
presets->get_active()) {
3047 delete preset_window;
virtual GxEngineState get_state()=0
virtual gx_system::PresetFileGui * get_current_bank_file()=0
void gx_print_info(const char *, const std::string &)
CmdConnection::msg_type start
void set_jack_down(bool v)
double stop_at_mono_top(double off, double step_size)
void set_streaming(bool p1)
Glib::RefPtr< Gtk::ToggleAction > get_action()
virtual sigc::signal< void, int > & signal_oscilloscope_post_pre()=0
int get_idle_thread_timeout() const
void set_display_flat(bool p1)
Glib::RefPtr< UiBoolToggleAction > midi_out_plug
void freeze_and_size_request(Gtk::Window *w, int width, int height)
void add_icon(const std::string &name)
bool get_clear_rc() const
virtual sigc::signal< void, GxEngineState > & signal_state_change()=0
static Glib::RefPtr< UiToggleAction > create(gx_engine::GxMachineBase &machine, const std::string &id, const Glib::ustring &name, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring(), bool is_active=false)
virtual sigc::signal< void > & signal_presetlist_changed()=0
virtual sigc::signal< void, bool > & signal_oscilloscope_visible()=0
void display(bool v, bool animate)
virtual Parameter & get_parameter(const std::string &id)=0
void set_temperament(int p1)
void set_ui_merge_id(Gtk::UIManager::ui_merge_id id)
virtual void set_state(GxEngineState state)=0
int gx_system_call(const std::string &, bool devnull=false, bool escape=false)
static void rt_watchdog_set_limit(int limit)
static bool is_registered(gx_engine::GxMachineBase &m, const char *name)
Glib::RefPtr< Gtk::ToggleAction > show_values
virtual sigc::signal< void, unsigned int > & signal_oscilloscope_size_change()=0
Glib::RefPtr< Gdk::Pixbuf > icon
void plugin_preset_popup(const PluginDef *pdef)
virtual void set_init_values()=0
bool check_thaw(int width, int height)
void set_reference_pitch(double p1)
bool system_show_tooltips
GtkSizeGroup * left_column
virtual void tuner_used_for_display(bool on)=0
Glib::RefPtr< Gtk::ToggleAction > tooltips
virtual gx_jack::GxJack * get_jack()=0
jack_nframes_t get_jack_bs()
std::vector< Position >::iterator iterator
Glib::RefPtr< Gtk::ToggleAction > rackh
void hide_effect(const std::string &name)
UiToggleAction(gx_engine::GxMachineBase &machine_, const std::string &id, const Glib::ustring &name, const Glib::ustring &icon_name, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring(), bool is_active=false)
const Glib::ustring & get_jack_uuid() const
void set_on_off(bool v) const
const string & id() const
void pack(Gtk::Widget *mainbox, Gtk::Widget *minibox, const Glib::RefPtr< Gtk::SizeGroup > &szg)
virtual bool setting_is_preset()=0
double stop_at_stereo_bottom(double off, double step_size, double pagesize)
Glib::RefPtr< Gtk::ToggleAction > rack_config
const char * get_name() const
Glib::RefPtr< Gtk::ToggleAction > show_rack
static Gtk::Widget * create_icon_widget(const PluginUI &plugin, gx_system::CmdlineOptions &options)
Glib::RefPtr< Gtk::ToggleAction > animations
std::string get_style_filepath(const std::string &basename) const
void gx_print_error(const char *, const std::string &)
Gtk::ToolItemGroup * group
gx_engine::Plugin * plugin
Glib::RefPtr< Gtk::ActionGroup > group
static GxLogger & get_logger()
Glib::SignalProxy1< void, bool > signal_poll_status_changed()
Glib::RefPtr< Gtk::Action > expand
void add_plugin(std::vector< PluginUI * > &p, const char *id, const Glib::ustring &tooltip_="")
virtual bool load_unit(gx_gui::UiBuilderImpl &builder, PluginDef *pdef)=0
Glib::SignalProxy0< void > signal_frequency_poll()
float power2db(float power)
const std::string & getIRFile() const
T get_parameter_value(const std::string &id)
virtual const Glib::ustring & get_current_bank()=0
std::string get_user_filepath(const std::string &basename) const
RackBox * add_rackbox(PluginUI &pl, bool mini=false, int pos=-1, bool animate=false)
sigc::signal< void > & signal_msg_level_changed()
virtual float get_tuner_freq()=0
MainWindow(gx_engine::GxMachineBase &machine, gx_system::CmdlineOptions &options, Gtk::Window *splash, const Glib::ustring &title)
static GxExit & get_instance()
static void toggle(gx_engine::GxMachineBase &machine, Glib::RefPtr< Gtk::ToggleAction > item)
msg_signal & signal_message()
virtual sigc::signal< void, Plugin *, PluginChange::pc > & signal_plugin_changed()=0
JConvPluginUI(MainWindow &main, const char *id, const Glib::ustring &tooltip="")
virtual void set_parameter_value(const std::string &id, int value)=0
void set_action(Glib::RefPtr< Gtk::ToggleAction > &act)
virtual sigc::signal< void > & signal_selection_changed()=0
const Glib::ustring & get_tuner_ref()
std::string to_string(const T &t)
std::vector< PluginUI * > * plugins
Glib::RefPtr< Gtk::ToggleAction > live_play
void connect_midi_controller(Gtk::Widget *w, const std::string &id, gx_engine::GxMachineBase &machine)
PluginType get_type() const
bool plugins_by_name_less(PluginUI *a, PluginUI *b)
Glib::RefPtr< Gtk::AccelGroup > accels
void set_slot(sigc::slot< void > w)
bool get_opt_save_on_exit() const
const GxJConvSettings & get_value() const
const char * get_id() const
void unset_ui_merge_id(Glib::RefPtr< Gtk::UIManager > uimanager)
void gx_print_warning(const char *, const std::string &)
Glib::RefPtr< UiBoolToggleAction > tuner
const Glib::ustring & get_tuner_tet()
virtual void disable_autosave(bool v)=0
bool gx_start_jack_dialog(Glib::RefPtr< Gdk::Pixbuf > gw_ib)
void exit_program(std::string msg="", int errcode=1)
const string & get_instancename()
int main(int argc, char *argv[])
static void start_stop(Glib::RefPtr< Gtk::ToggleAction > &action, gx_jack::GxJack &jack)
Glib::Dispatcher shutdown
Glib::RefPtr< Gtk::ToggleAction > presets
virtual Plugin * pluginlist_lookup_plugin(const std::string &id) const =0
std::string get_builder_filepath(const std::string &basename) const
EnumParameter & getEnum()
bool gx_jack_connection(bool connect, bool startserver, int wait_after_connect, const gx_system::CmdlineOptions &opt)
Glib::RefPtr< Gtk::ToggleAction > show_plugin_bar
virtual void set_jack_insert(bool v)=0
void push_note(int p1, int p2, int p3)
virtual const Glib::ustring & get_current_name()=0
Gxw::RackTuner & get_tuner()
const char * get_category()
virtual sigc::signal< int, bool > & signal_oscilloscope_activation()=0
static const char * value_label(const value_pair &vp)
virtual bool midi_get_config_mode(int *ctl=0)=0
virtual const value_pair * getValueNames() const
sigc::signal< void, T > & signal_parameter_value(const std::string &id)
void update_scrolled_window(Gtk::ScrolledWindow &w)
int gx_message_popup(const char *)
void resize_finished(RackContainer *ch)
const value_pair & get_pair()
void set_accelgroup(Glib::RefPtr< Gtk::AccelGroup > accels_)
virtual void loadstate()=0
PluginDesc(const Glib::ustring &g, std::vector< PluginUI * > *p)
Glib::RefPtr< Gtk::Action > compress
Glib::RefPtr< Gtk::ToggleAction > loggingbox
static PortMapWindow * create(gx_engine::GxMachineBase &machine, Glib::RefPtr< Gtk::AccelGroup > ag)
sigc::signal< void, MidiAudioBuffer::Load > & signal_jack_load_change()
static SelectJackControlPgm * create(gx_system::CmdlineOptions &opt, gx_engine::GxMachineBase &machine)
virtual float getLowerAsFloat() const
void freeze_until_width_update(Gtk::Window *w, int width)