determine the the type of an object



Hi,

I'm new to gtk, and i have a problem i couldn't solve by myself, and i
didn't find anything useful about it on the web.

I write a database application, with a toolbar (first, prev, next, etc),
and a notebook with several tabs (representing the tables in the db).
The problem is: when I switch to another tab in the notebook, i want to
reconnect the toolbutton's to the active tab's (record_next,
record_first, etc) functions.

The easyest way, i think, is that i derived my own toolbar calss, and
i've created a function, that gets the widget of the newly activated
tab, so i can nonnect all the toolbuttons to it. Each widget (the tabs)
have the same functions (on_record_next, on_record_first, etc)

So the toolbar reconnect function gets a Gtk::Widget (the active tab),
and i need to know the class of this widget:

// connect the toolbuttons to the widget
void RecordToolbar::reconnect(Gtk::Widget *aWidget)
{
toolbutton_first.signal_clicked().connect( sigc::mem_fun(*aWidget,
&[HERE I NEED THE CLASS OF THE WIDGET]::on_record_first) );
}

Do you now can I solve this problem?

Thanks for advance:

Imre Horvath




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