[gtkmm] Gtk::Widget types


If I have a Gtk::Widget *, is there a way for me to check what type of widget it is ? I am using Gtk2.

For example:

void do_someting (Gtk::Widget *widget)
  if widget is a Gtk::Label then do this ...
    if widget is a Gtk::Button then do this ...

Thanks !

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