summaryrefslogtreecommitdiff
path: root/gtk2_ardour/floating_text_entry.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-05-21 19:17:11 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:44 -0400
commit428ed8ae1b9df42b91d932242ed51d30d0255c03 (patch)
treef96502be2cd2c6ca7ed0d0963935cbe90699b569 /gtk2_ardour/floating_text_entry.h
parent30d0b2a3546e50d359e712f239a16e08f37d38c7 (diff)
stop playing silly games with widget packing when editing a route name in the edito
Use a FloatingTextEntry instead. All clever functionality from previous implementation has been retained.
Diffstat (limited to 'gtk2_ardour/floating_text_entry.h')
-rw-r--r--gtk2_ardour/floating_text_entry.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/gtk2_ardour/floating_text_entry.h b/gtk2_ardour/floating_text_entry.h
index 116ba34651..596914c317 100644
--- a/gtk2_ardour/floating_text_entry.h
+++ b/gtk2_ardour/floating_text_entry.h
@@ -28,18 +28,27 @@ class FloatingTextEntry : public Gtk::Window
public:
FloatingTextEntry (Gtk::Window* parent, const std::string& initial_contents);
- sigc::signal1<void,std::string> use_text;
+ /* 1st argument to handler is the new text
+ * 2nd argument is 0, 1 or -1 to indicate:
+ * - do not move to next editable field
+ * - move to next editable field
+ * - move to previous editable field.
+ */
+ sigc::signal2<void,std::string,int> use_text;
private:
Gtk::Entry entry;
bool entry_changed;
+ bool by_popup_menu;
/* handlers for Entry events */
- bool entry_focus_out (GdkEventFocus*);
+ bool entry_focus_out (GdkEventFocus*);
bool key_press (GdkEventKey*);
+ bool key_release (GdkEventKey*);
void activated ();
bool button_press (GdkEventButton*);
void changed ();
+ void populate_popup (Gtk::Menu*);
/* handlers for window events */
@@ -48,4 +57,3 @@ class FloatingTextEntry : public Gtk::Window
};
#endif // __ardour_window_h__
-