X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fau_pluginui.mm;h=a46021f66fd04cd952133b0f65ea18c61ef16a89;hb=f93ca1349ce3d56ecd9b90c1b6e88971d46d9952;hp=ab14d4aafdb9ecdf1ee557902bb26cf56e94837c;hpb=cb413146428ce5db5e281d70f2b3b7df27c1aaab;p=ardour.git diff --git a/gtk2_ardour/au_pluginui.mm b/gtk2_ardour/au_pluginui.mm index ab14d4aafd..a46021f66f 100644 --- a/gtk2_ardour/au_pluginui.mm +++ b/gtk2_ardour/au_pluginui.mm @@ -1,3 +1,6 @@ +#undef Marker +#define Marker FuckYouAppleAndYourLackOfNameSpaces + #include #include #include @@ -18,6 +21,11 @@ #import #import +#undef Marker + +#include "keyboard.h" +#include "utils.h" +#include "public_editor.h" #include "i18n.h" using namespace ARDOUR; @@ -57,15 +65,27 @@ AUPluginUI::AUPluginUI (boost::shared_ptr insert) /* stuff some stuff into the top of the window */ + HBox* smaller_hbox = manage (new HBox); + + smaller_hbox->pack_start (preset_label, false, false, 10); + smaller_hbox->pack_start (preset_combo, false, false); + smaller_hbox->pack_start (save_button, false, false); + smaller_hbox->pack_start (automation_mode_label, false, false); + smaller_hbox->pack_start (automation_mode_selector, false, false); + smaller_hbox->pack_start (bypass_button, false, true); + + VBox* v1_box = manage (new VBox); + VBox* v2_box = manage (new VBox); + + v1_box->pack_start (*smaller_hbox, false, true); + v2_box->pack_start (focus_button, false, true); + + top_box.set_homogeneous (false); top_box.set_spacing (6); top_box.set_border_width (6); - top_box.pack_end (bypass_button, false, true); - top_box.pack_end (automation_mode_selector, false, false); - top_box.pack_end (automation_mode_label, false, false); - top_box.pack_end (save_button, false, false); - top_box.pack_end (preset_combo, false, false); - top_box.pack_end (preset_label, false, false); + top_box.pack_end (*v2_box, false, false); + top_box.pack_end (*v1_box, false, false); set_spacing (6); pack_start (top_box, false, false); @@ -518,6 +538,8 @@ AUPluginUI::parent_cocoa_window () return -1; } + [win setAutodisplay:YES]; // turn of GTK stuff for this window + Gtk::Container* toplevel = get_toplevel(); if (!toplevel || !toplevel->is_toplevel()) { @@ -530,6 +552,7 @@ AUPluginUI::parent_cocoa_window () NSView* view = gdk_quartz_window_get_nsview (low_box.get_window()->gobj()); + [view setFrame:packFrame]; [view addSubview:packView]; @@ -614,14 +637,16 @@ create_au_gui (boost::shared_ptr plugin_insert, VBox** box) bool AUPluginUI::on_focus_in_event (GdkEventFocus* ev) { - cerr << "au plugin focus in\n"; + //cerr << "au plugin focus in\n"; + //Keyboard::magic_widget_grab_focus (); return false; } bool AUPluginUI::on_focus_out_event (GdkEventFocus* ev) { - cerr << "au plugin focus out\n"; + //cerr << "au plugin focus out\n"; + //Keyboard::magic_widget_drop_focus (); return false; }