This commit is contained in:
Pcornat 2024-10-24 11:02:04 +02:00
commit dfe1880c08
Signed by: Pcornat
GPG key ID: E0326CC678A00BDD
5 changed files with 125 additions and 0 deletions

23
hello_world.cpp Normal file
View file

@ -0,0 +1,23 @@
//
// Created by postaron on 27/09/24.
//
#include "hello_world.hpp"
#include <iostream>
namespace learn_gtkmm4 {
HelloWorld::HelloWorld() : m_button("Hello world!") {
set_title("Hello world!");
set_default_size(720, 1280);
add_action("Open");
add_action("Quit");
set_show_menubar();
m_button.set_margin(10);
m_button.signal_clicked().connect(sigc::mem_fun(*this, &HelloWorld::on_button_clicked));
set_child(m_button);
}
void HelloWorld::on_button_clicked() {
std::cout << "Hello World" << std::endl;
}
} // learn_gtkmm4