#include <gtkmm.h>
#include <iostream>


class Test : public Glib::Object
{
public:
   Test();
   ~Test()
   {
     std::cout << "delete Test" << std::endl;
   }

   void DoNothing(Glib::RefPtr<Gtk::Action> action)
   {}
};


Test::Test()
{
   std::cout << "new Test" << std::endl;

   Glib::RefPtr<Gtk::Action> action = Gtk::Action::create("Wubble");

   Glib::RefPtr<Gtk::ActionGroup> group = Gtk::ActionGroup::create("new group");

   group->add(action, sigc::bind(sigc::mem_fun(this, &Test::DoNothing), action));
}

void test(void)
{
   Glib::RefPtr<Test> ptr(new Test());

   Gtk::Main::quit();
}


int main(int argc, char **argv)
{
   Gtk::Main myMain(argc, argv);

   myMain.signal_run().connect(sigc::ptr_fun(&test));

   myMain.run();

   return 0;
}

