Fix gmsynth detection
[ardour.git] / gtk2_ardour / keyeditor.h
index 2a612160fae72ea34d1d09c5dbfa8e92b84c8981..9cbde979ecda6697d2f1c709c1badb3383956aeb 100644 (file)
 #include <gtkmm/buttonbox.h>
 #include <gtkmm/notebook.h>
 #include <gtkmm/scrolledwindow.h>
-#include <gtkmm/treeview.h>
+#include <gtkmm/treemodelfilter.h>
 #include <gtkmm/treestore.h>
-#include "gtkmm2ext/searchbar.h"
+#include <gtkmm/treeview.h>
+
+#include "widgets/searchbar.h"
 
 #include "ardour_window.h"
 
@@ -37,19 +39,25 @@ namespace Gtkmm2ext {
 
 class KeyEditor : public ArdourWindow
 {
-  public:
+public:
        KeyEditor ();
 
        void add_tab (std::string const &name, Gtkmm2ext::Bindings&);
        void remove_tab (std::string const &name);
 
-       private:
+       static sigc::signal<void> UpdateBindings;
+
+       void disconnect () {
+               _refresh_connection.disconnect ();
+       }
+
+private:
        class Tab : public Gtk::VBox
        {
-               public:
+       public:
                Tab (KeyEditor&, std::string const &name, Gtkmm2ext::Bindings*);
 
-               void populate ();
+               uint32_t populate ();
                void unbind ();
                void bind (GdkEventKey* release_event, guint pressed_key);
                void action_selected ();
@@ -74,8 +82,8 @@ class KeyEditor : public ArdourWindow
 
                Gtk::VBox vpacker;
                /* give KeyEditor full access to these. This is just a helper
-                  class with no special semantics
-               */
+                * class with no special semantics
+                */
 
                KeyEditor& owner;
                std::string name;
@@ -88,7 +96,7 @@ class KeyEditor : public ArdourWindow
                KeyEditorColumns columns;
                guint last_keyval;
 
-               protected:
+       protected:
                bool key_press_event (GdkEventKey*);
                bool key_release_event (GdkEventKey*);
                Gtk::TreeModel::iterator find_action_path (Gtk::TreeModel::const_iterator begin, Gtk::TreeModel::const_iterator end, const std::string& path) const;
@@ -103,8 +111,10 @@ class KeyEditor : public ArdourWindow
        Gtk::HBox reset_box;
        Gtk::Button reset_button;
        Gtk::Label reset_label;
-       Gtkmm2ext::SearchBar filter_entry;
+       ArdourWidgets::SearchBar filter_entry;
        std::string filter_string;
+       Gtk::Button print_button;
+       Gtk::Label print_label;
 
        typedef std::vector<Tab*> Tabs;
 
@@ -113,12 +123,16 @@ class KeyEditor : public ArdourWindow
 
        void unbind ();
        void reset ();
+       void refresh ();
        void page_change (GtkNotebookPage*, guint);
 
        unsigned int sort_column;
        Gtk::SortType sort_type;
        void toggle_sort_type ();
        void search_string_updated (const std::string&);
+       void print () const;
+
+       sigc::connection _refresh_connection;
 };
 
 #endif /* __ardour_gtk_key_editor_h__ */