projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NO-OP: whitespace
[ardour.git]
/
gtk2_ardour
/
keyeditor.h
diff --git
a/gtk2_ardour/keyeditor.h
b/gtk2_ardour/keyeditor.h
index 472b5063f7c4a940049f9f3d9738fafef5f04336..9cbde979ecda6697d2f1c709c1badb3383956aeb 100644
(file)
--- a/
gtk2_ardour/keyeditor.h
+++ b/
gtk2_ardour/keyeditor.h
@@
-25,8
+25,11
@@
#include <gtkmm/buttonbox.h>
#include <gtkmm/notebook.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/buttonbox.h>
#include <gtkmm/notebook.h>
#include <gtkmm/scrolledwindow.h>
-#include <gtkmm/tree
view
.h>
+#include <gtkmm/tree
modelfilter
.h>
#include <gtkmm/treestore.h>
#include <gtkmm/treestore.h>
+#include <gtkmm/treeview.h>
+
+#include "widgets/searchbar.h"
#include "ardour_window.h"
#include "ardour_window.h"
@@
-36,55
+39,71
@@
namespace Gtkmm2ext {
class KeyEditor : public ArdourWindow
{
class KeyEditor : public ArdourWindow
{
-
public:
+public:
KeyEditor ();
void add_tab (std::string const &name, Gtkmm2ext::Bindings&);
KeyEditor ();
void add_tab (std::string const &name, Gtkmm2ext::Bindings&);
-
- protected:
- bool on_key_press_event (GdkEventKey*);
- bool on_key_release_event (GdkEventKey*);
+ void remove_tab (std::string const &name);
+
+ static sigc::signal<void> UpdateBindings;
- private:
+ void disconnect () {
+ _refresh_connection.disconnect ();
+ }
+
+private:
class Tab : public Gtk::VBox
{
class Tab : public Gtk::VBox
{
-
public:
+ public:
Tab (KeyEditor&, std::string const &name, Gtkmm2ext::Bindings*);
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 ();
void unbind ();
void bind (GdkEventKey* release_event, guint pressed_key);
void action_selected ();
-
+ void sort_column_changed ();
+ void tab_mapped ();
+ bool visible_func(const Gtk::TreeModel::const_iterator& iter) const;
+
struct KeyEditorColumns : public Gtk::TreeModel::ColumnRecord {
KeyEditorColumns () {
struct KeyEditorColumns : public Gtk::TreeModel::ColumnRecord {
KeyEditorColumns () {
- add (
action
);
+ add (
name
);
add (binding);
add (path);
add (bindable);
add (binding);
add (path);
add (bindable);
+ add (action);
}
}
- Gtk::TreeModelColumn<std::string>
action
;
+ Gtk::TreeModelColumn<std::string>
name
;
Gtk::TreeModelColumn<std::string> binding;
Gtk::TreeModelColumn<std::string> path;
Gtk::TreeModelColumn<bool> bindable;
Gtk::TreeModelColumn<std::string> binding;
Gtk::TreeModelColumn<std::string> path;
Gtk::TreeModelColumn<bool> bindable;
+ Gtk::TreeModelColumn<Glib::RefPtr<Gtk::Action> > action;
};
};
-
+
Gtk::VBox vpacker;
/* give KeyEditor full access to these. This is just a helper
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;
Gtkmm2ext::Bindings* bindings;
Gtk::ScrolledWindow scroller;
Gtk::TreeView view;
KeyEditor& owner;
std::string name;
Gtkmm2ext::Bindings* bindings;
Gtk::ScrolledWindow scroller;
Gtk::TreeView view;
- Glib::RefPtr<Gtk::TreeStore> model;
+ Glib::RefPtr<Gtk::TreeStore> data_model;
+ Glib::RefPtr<Gtk::TreeModelFilter> filter;
+ Glib::RefPtr<Gtk::TreeModelSort> sorted_filter;
KeyEditorColumns columns;
KeyEditorColumns columns;
+ guint last_keyval;
+
+ 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;
};
friend class Tab;
};
friend class Tab;
-
+
Gtk::VBox vpacker;
Gtk::Notebook notebook;
Gtk::Button unbind_button;
Gtk::VBox vpacker;
Gtk::Notebook notebook;
Gtk::Button unbind_button;
@@
-92,7
+111,10
@@
class KeyEditor : public ArdourWindow
Gtk::HBox reset_box;
Gtk::Button reset_button;
Gtk::Label reset_label;
Gtk::HBox reset_box;
Gtk::Button reset_button;
Gtk::Label reset_label;
- guint last_keyval;
+ ArdourWidgets::SearchBar filter_entry;
+ std::string filter_string;
+ Gtk::Button print_button;
+ Gtk::Label print_label;
typedef std::vector<Tab*> Tabs;
typedef std::vector<Tab*> Tabs;
@@
-101,7
+123,16
@@
class KeyEditor : public ArdourWindow
void unbind ();
void reset ();
void unbind ();
void reset ();
+ void refresh ();
void page_change (GtkNotebookPage*, guint);
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__ */
};
#endif /* __ardour_gtk_key_editor_h__ */