Re: how to set a callback function to an icon in an entry ?

Looking at the documentation for GdkEventButton [1], it seems like it
lets you detect whether the icon was only clicked once, double-clicked
or activated in another way. If you only want a simple click handler, I
assume you can ignore the parameter, or if you want a bit cleaner code,
leave the parameter out of your method declaration entirely and use
sigc::hide [2] to make your functor compatible to the signal, e.g.:

  void MyClass::on_icon_release(Gtk::EntryIconPosition icon_position)


    sigc::mem_fun(this, &MyClass::on_icon_release)));



Am 22.01.2015 um 05:30 schrieb Nicolas Jäger:

On Thu, 22 Jan 2015 02:23:30 +0100
Jonas Platte <jonasplatte gmail com> wrote:

There are the methods signal_icon_press() and signal_icon_release()
[1] in Gtk::Entry (assuming that's what you're talking about). I
think you should be able to connect to one or both of them to create
a functioning "(secondary) icon clicked handler".


that's exactly what I was looking for, thx. I have a question about the
calback functions of these methods. The calback function need a

const GdkEventButton*

parameter. What is this ?

gtkmm-list mailing list
gtkmm-list gnome org

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