From 199198c714c93cec23a0fe55f540c4cd51158ae9 Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 5 Aug 2024 06:41:10 +0300 Subject: [PATCH] init header bar menu --- src/app/browser/header/bar.cpp | 18 ++++++++++++++++++ src/app/browser/header/bar.h | 8 ++++++++ 2 files changed, 26 insertions(+) diff --git a/src/app/browser/header/bar.cpp b/src/app/browser/header/bar.cpp index b18eccba..fd68420a 100644 --- a/src/app/browser/header/bar.cpp +++ b/src/app/browser/header/bar.cpp @@ -10,12 +10,30 @@ namespace app Bar::Bar( Header *header ) { + // Init dependencies + this->header = header; + // Init GTK this->gtk = gtk_box_new( GTK_ORIENTATION_HORIZONTAL, Bar::SPACING ); + // Init menu + this->menu = new Menu( + this->header->browser + ); + + gtk_box_append( + GTK_BOX( + this->gtk + ), + GTK_WIDGET( + this->menu->gtk + ) + ); + + // Render gtk_widget_show( GTK_WIDGET( this->gtk diff --git a/src/app/browser/header/bar.h b/src/app/browser/header/bar.h index 02fc87b4..727716ee 100644 --- a/src/app/browser/header/bar.h +++ b/src/app/browser/header/bar.h @@ -4,12 +4,17 @@ // Dependencies #include "../header.h" +// Requirements +#include "../menu.h" + namespace app { namespace browser { class Header; + class Menu; + namespace header { class Bar @@ -25,6 +30,9 @@ namespace app // Dependencies Header *header; + // Requirements + Menu *menu; + Bar( Header *header );