d9fd2f5402
Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
30 lines
706 B
C++
30 lines
706 B
C++
#include "helloworld.h"
|
|
#include <iostream>
|
|
|
|
HelloWorld::HelloWorld()
|
|
: m_button("Hello World") // creates a new button with label "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::mem_fun(*this, &HelloWorld::on_button_clicked));
|
|
|
|
// This packs the button into the Window (a container).
|
|
add(m_button);
|
|
|
|
// The final step is to display this newly created widget...
|
|
m_button.show();
|
|
}
|
|
|
|
HelloWorld::~HelloWorld()
|
|
{
|
|
}
|
|
|
|
void HelloWorld::on_button_clicked()
|
|
{
|
|
std::cout << "Hello World" << std::endl;
|
|
}
|