First page Back Continue Last page Overview Graphics

HelloWorld.cc

  • HelloWorld::HelloWorld()
  • : m_button("Hello World")
  • {
  • // Sets the border width of the window.
  • set_border_width(10);
  • // When the button receives the "clicked" signal it will call the
  • // on_button_clicked() method, defined below.
  • m_button.signal_clicked().connect( SigC::slot(*this, &HelloWorld::on_button_clicked) );
  • // Pack the button into the Window (a container).
  • add(m_button);
  • // Display the widget:
  • m_button.show();
  • }
  • void HelloWorld::on_button_clicked()
  • {
  • std::cout << "Hello World" << std::endl;
  • }

    Notes: