Re: [gtkmm] Popup menu



David Vest wrote:

Hello all.

Is it possible to create a MenuElement which have a slot with arguments? I see from the reference documentation that CallSlot is typedef:ed to a Slot0<void>. Is there another way? What I want is to have a dynamic popup-menu that call the same function with different arguments for each MenuElement a push into the MenuList.

Thanks in advance.

David

Hello David,
please look at the SigC::bind template function, it can pass default parameters to a slot. Oh, and don't forget to #include <sigc++/bind.h> ...

HTH,
Tassos




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