here's what I did to get it to work:
class WinSprdSht : public Gtk::Window
{
...
gboolean hide_widget_on_delete(GdkEventAny* event, Glib::ustring data);
void on_mybutton(Glib::ustring data);
...
Gtk::HeaderBar *m_HdrBar;
Gtk::Window *m_Window;
...
}
WinSprdSht::WinSprdSht( string someTitle, int MaxTabs )
{
...
m_HdrBar = new Gtk::HeaderBar[MaxTabs];
m_Window = new Gtk::Window[MaxTabs];
...
m_HdrBar[nTabs].signal_delete_event().connect(
sigc::bind<Glib::ustring>( sigc::mem_fun(
this, &WinSprdSht::hide_widget_on_delete), SomeTitle) );
...
}
gboolean
WinSprdSht::hide_widget_on_delete( GdkEventAny* event, Glib::ustring data)
{
for(int n = 0; n < nTabs; ++n) {
if( m_HdrBar[n].get_title() == data ) {
m_Window[n].hide();
return true; // return true to prevent default method
}
}
return false;
}
btw, thanks for all the help
John