adding in simple button
This commit is contained in:
+35
@@ -1,3 +1,38 @@
|
||||
build/
|
||||
|
||||
*.so
|
||||
|
||||
.cache/
|
||||
|
||||
# Prerequisites
|
||||
*.d
|
||||
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
*.smod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#include "gtkmm/button.h"
|
||||
#include <gtkmm.h>
|
||||
#include <iostream>
|
||||
|
||||
class MyWindow : public Gtk::Window {
|
||||
public:
|
||||
@@ -7,7 +9,14 @@ public:
|
||||
|
||||
MyWindow::MyWindow() {
|
||||
set_title("Basic application");
|
||||
|
||||
Gtk::Button button("Hello World");
|
||||
button.signal_clicked().connect([] { std::cout << "Hello World\n"; });
|
||||
button.set_label("Hello World");
|
||||
|
||||
set_default_size(800, 450);
|
||||
|
||||
set_child(button);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
Reference in New Issue
Block a user