}
}
-- (void)auViewResized:(NSNotification *)notification;
+- (void)auViewResized:(NSNotification *)notification
{
(void) notification; // stop complaints about unusued argument
plugin_ui->cocoa_view_resized();
void
AUPluginUI::cocoa_view_resized ()
{
- GtkRequisition topsize = top_box.size_request ();
NSWindow* window = get_nswindow ();
NSRect windowFrame= [window frame];
NSRect new_frame = [au_view frame];
/* move the au_view down so that it doesn't overlap the top_box contents */
- NSPoint origin = { 0, static_cast<CGFloat> (a.height) };
+ const int spacing = 6; // main vbox spacing
+ const int pad = 4; // box pad
+
+ NSPoint origin = { spacing + pad, static_cast<CGFloat> (a.height) + (2 * spacing) + pad };
[au_view setFrameOrigin:origin];
[view addSubview:au_view positioned:NSWindowBelow relativeTo:NULL];
return 0;
}
+void
+AUPluginUI::grab_focus()
+{
+ if (au_view) {
+ [au_view becomeFirstResponder];
+ }
+}
void
AUPluginUI::forward_key_event (GdkEventKey* ev)
{