+void
+WindowsVSTPluginUI::top_box_allocated (Gtk::Allocation& a)
+{
+ int h = a.get_height() + 12; // 2 * 6px spacing
+ if (_vst->state()->voffset != h) {
+#ifndef NDEBUG
+ printf("WindowsVSTPluginUI:: update voffset to %d px\n", h);
+#endif
+ _vst->state()->voffset = h;
+ resize_callback ();
+ }
+}
+
+void
+WindowsVSTPluginUI::resize_callback ()
+{
+ void* gtk_parent_window = _vst->state()->gtk_window_parent;
+ if (gtk_parent_window) {
+ int width = _vst->state()->width + _vst->state()->hoffset;
+ int height = _vst->state()->height + _vst->state()->voffset;
+#ifndef NDEBUG
+ printf ("WindowsVSTPluginUI::resize_callback %d x %d\n", width, height);
+#endif
+ set_size_request (width, height);
+ ((Gtk::Window*) gtk_parent_window)->set_size_request (width, height);
+ ((Gtk::Window*) gtk_parent_window)->resize (width, height);
+ fst_move_window_into_view (_vst->state ());
+ }
+}
+