2024-10-24 11:02:04 +02:00
|
|
|
//
|
|
|
|
// Created by postaron on 27/09/24.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "hello_world.hpp"
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
namespace learn_gtkmm4 {
|
2024-10-28 18:58:19 +01:00
|
|
|
HelloWorld::HelloWorld(const Glib::RefPtr<Gio::Menu>& menuModel) :
|
|
|
|
m_VBox(Gtk::Orientation::VERTICAL), m_menu_bar(menuModel), m_button("Hello world!") {
|
2024-10-24 11:02:04 +02:00
|
|
|
set_title("Hello world!");
|
2024-10-28 18:58:19 +01:00
|
|
|
set_default_size(1280, 720);
|
2024-10-24 11:02:04 +02:00
|
|
|
m_button.set_margin(10);
|
|
|
|
m_button.signal_clicked().connect(sigc::mem_fun(*this, &HelloWorld::on_button_clicked));
|
2024-10-28 18:58:19 +01:00
|
|
|
m_VBox.append(m_menu_bar);
|
|
|
|
m_VBox.append(m_button);
|
|
|
|
set_child(m_VBox);
|
2024-10-24 11:02:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void HelloWorld::on_button_clicked() {
|
|
|
|
std::cout << "Hello World" << std::endl;
|
|
|
|
}
|
|
|
|
} // learn_gtkmm4
|