aboutsummaryrefslogtreecommitdiff
path: root/examples/hello-world
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hello-world')
-rw-r--r--examples/hello-world/hello.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/hello-world/hello.cpp b/examples/hello-world/hello.cpp
index dd8aa56..5351370 100644
--- a/examples/hello-world/hello.cpp
+++ b/examples/hello-world/hello.cpp
@@ -1,5 +1,7 @@
#include <adwaitamm/adwaitamm.hpp>
+#include <gtkmm.h>
+
auto main(int argc, char ** argv) -> int
{
auto app = Adwaita::Application::create("org.example.Hello");
@@ -8,6 +10,14 @@ auto main(int argc, char ** argv) -> int
auto window = new Adwaita::ApplicationWindow{app};
app->signal_shutdown().connect([window] { delete window; });
+ window->set_title("Hello");
+
+ auto toolbar_view = Adwaita::ToolbarView{};
+ auto label = Gtk::Label{"Hello World"};
+
+ toolbar_view.set_content(label);
+
+ window->set_content(toolbar_view);
window->present();
});