[gtkmm] Entry widget on_insert_at_cursor()?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is this broke or am I just using it wrong, or both?

I can get the other protected member functions working but not this one,
it never seems to be called.

I'm setting up an entry widget for entering 64 bit hex numbers and need
to be able to filter the input as well as catch changes as they are
entered instead of requiring hitting the enter key.

class Entry_64 : public Gtk::Entry
{
public :
~  Entry_64();
~  ~Entry_64();
protected :
~  virtual void on_activate();
~  virtual void on_move_cursor (Gtk::MovementStep step, int count,
~                               bool extend_selection);
~  virtual void on_insert_at_cursor (const Glib::ustring& str);
~  virtual void on_delete_from_cursor (Gtk::DeleteType type, int count);
private :
~  uint64_t data;
};

Entry_64::Entry_64()
{
~  modify_font(Pango::FontDescription("Monospace 10"));
~  set_max_length (18);
~  set_width_chars (13);
}

Entry_64::~Entry_64()
{
}

void
Entry_64::on_insert_at_cursor (const Glib::ustring& str)
{
~  std::cout << __PRETTY_FUNCTION__ << ": entering, " << str << std::endl;
~  return;
}

void
Entry_64::on_activate()
{
~  data = strtoull (get_text().c_str(), NULL, 16);
~  cout << "data = " << hex << data << endl;
~  return;
}

void
Entry_64::on_move_cursor (Gtk::MovementStep step, int count,
~                          bool extend_selection)
{
~  Gtk::Entry::on_move_cursor (step, count, extend_selection);
~  cerr << __PRETTY_FUNCTION__ << endl;
}
void
Entry_64::on_delete_from_cursor (Gtk::DeleteType type, int count)
{
~  Gtk::Entry::on_delete_from_cursor (type, count);
~  cerr << __PRETTY_FUNCTION__ << endl;
}

- --
*************************************************
*   Greg Rogers		Cray Inc.		*
*   grogers cray com	(715)726-4631		*
*************************************************
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/ZyzKs3ZHWtAE+l4RAiAqAJ9gu9V8fV6FigLzVBllMpJT7JdjOACeN+/K
ntLmG252l6LEb3YMj/hwg8I=
=Cjmg
-----END PGP SIGNATURE-----




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]