OSC: Changed gainVCA to gainfader as VCA is already used.
[ardour.git] / gtk2_ardour / au_pluginui.h
index 6f904804577c61d4ac3e83a7157a241229804b58..883e7e0d6c6d0e93803d13b6ce5bc779ad40a948 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Paul Davis 
+    Copyright (C) 2012 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 #undef require
 #undef verify
 
+#ifdef YES
+#undef YES
+#endif
+#ifdef NO
+#undef NO
+#endif
+
 #include <gtkmm/box.h>
+#include <gtkmm/eventbox.h>
 #include <gtkmm/combobox.h>
 #include <gtkmm/button.h>
 #include <gtkmm/label.h>
@@ -63,8 +71,8 @@ class AUPluginUI : public PlugUIBase, public Gtk::VBox
        AUPluginUI (boost::shared_ptr<ARDOUR::PluginInsert>);
        ~AUPluginUI ();
 
-       gint get_preferred_height () { return prefheight; }
-       gint get_preferred_width () { return prefwidth; }
+       gint get_preferred_width () { return req_width; }
+       gint get_preferred_height () { return req_height; }
        bool start_updating(GdkEventAny*);
        bool stop_updating(GdkEventAny*);
 
@@ -74,11 +82,17 @@ class AUPluginUI : public PlugUIBase, public Gtk::VBox
         bool non_gtk_gui() const { return true; }
 
        void lower_box_realized ();
+       bool lower_box_visibility_notify (GdkEventVisibility*);
+
+       void lower_box_map ();
+       void lower_box_unmap ();
+       void lower_box_size_request (GtkRequisition*);
+       void lower_box_size_allocate (Gtk::Allocation&);
+       gboolean lower_box_expose (GdkEventExpose*);
+
        void cocoa_view_resized ();
        void on_realize ();
-       bool on_map_event (GdkEventAny*);
-       bool on_focus_in_event (GdkEventFocus*);
-       bool on_focus_out_event (GdkEventFocus*);
+       void grab_focus();
        void forward_key_event (GdkEventKey*);
 
        bool on_window_show (const std::string& /*title*/);
@@ -101,10 +115,20 @@ class AUPluginUI : public PlugUIBase, public Gtk::VBox
 
        static std::vector<std::string> automation_mode_strings;
 
+       bool mapped;
+       bool resizable;
+       int  min_width;
+       int  min_height;
+       int  req_width;
+       int  req_height;
+       int  alo_width;
+       int  alo_height;
+
        /* Cocoa */
 
        NSWindow*           cocoa_window;
        NSView*             au_view;
+        NSRect              last_au_frame;
 
        /* Carbon */
 
@@ -125,6 +149,8 @@ class AUPluginUI : public PlugUIBase, public Gtk::VBox
        int parent_cocoa_window ();
        NSWindow* get_nswindow();
 
+       void update_view_size ();
+
        bool plugin_class_valid (Class pluginClass);
 };