1 #include "gtkmm_hello.h"
4 HelloWorld::HelloWorld()
5 : m_button("Hello World") // creates a new button with the label "Hello World".
7 // Sets the border width of the window.
10 // When the button receives the "clicked" signal, it will call the
11 // hello() method. The hello() method is defined below.
12 m_button.signal_clicked().connect(SigC::slot(*this, &HelloWorld::on_button_clicked));
14 // This packs the button into the Window (a container).
17 // The final step is to display this newly created widget...
21 HelloWorld::~HelloWorld()
25 void HelloWorld::on_button_clicked()
27 std::cout << "Hello World" << std::endl;