|
thanks a lot i have put one drawing aera for one pixbuf, and now its work as i expected it ^^.
for the ctrl + click, i went into the same direction as you suggest. I have add a MenuList on rightclik, but i dont really know how the sigc::mem_fun work exactly, so for the moment i cant know on which item i have clicked on my menu.
do you have any idea to find on which item i just clicked on my MenuList, when i am inside the callback function ?
myDAera::MyDaera { /*some stuff*/ Gtk::Menu::MenuList& menulist = m_Menu_Popup.items();
menulist.push_back( Gtk::Menu_Helpers::MenuElem("Item 1", sigc::mem_fun(*this, &MyDaera::on_menu_file_popup_generic) ) ); menulist.push_back( Gtk::Menu_Helpers::MenuElem("Item 2", sigc::mem_fun(*this, &MyDaera::on_menu_file_popup_generic) ) ); menulist.push_back( Gtk::Menu_Helpers::MenuElem("Item 3", sigc::mem_fun(*this, &MyDaera::on_menu_file_popup_generic) ) ); /*other stuff*/ }
this code is from the gtkmm 2.4 doc inside a bigger exemple, i just extracted what i wanted, ie : MenuList.
edit : just found the good fonctionon the doc : get_active();
Thanks for your time.
|