13
0

permit initial contents of a FloatingTextEntry

This commit is contained in:
Paul Davis 2014-11-05 07:08:17 -05:00
parent f018f3d37a
commit 8641dcdb0c
2 changed files with 7 additions and 3 deletions

View File

@ -25,14 +25,18 @@
#include "i18n.h"
FloatingTextEntry::FloatingTextEntry ()
FloatingTextEntry::FloatingTextEntry (const std::string& initial_contents)
: ArdourWindow ("")
, entry_changed (false)
{
set_name (X_("FloatingTextEntry"));
set_position (Gtk::WIN_POS_MOUSE);
set_border_width (0);
if (!initial_contents.empty()) {
entry.set_text (initial_contents);
}
entry.show ();
entry.signal_changed().connect (sigc::mem_fun (*this, &FloatingTextEntry::changed));
entry.signal_activate().connect (sigc::mem_fun (*this, &FloatingTextEntry::activated));

View File

@ -27,7 +27,7 @@
class FloatingTextEntry : public ArdourWindow
{
public:
FloatingTextEntry ();
FloatingTextEntry (const std::string& initial_contents);
sigc::signal1<void,std::string> use_text;