Browse Source

init header bar menu

CPP-GTK4
yggverse 5 months ago
parent
commit
199198c714
  1. 18
      src/app/browser/header/bar.cpp
  2. 8
      src/app/browser/header/bar.h

18
src/app/browser/header/bar.cpp

@ -10,12 +10,30 @@ namespace app @@ -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

8
src/app/browser/header/bar.h

@ -4,12 +4,17 @@ @@ -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 @@ -25,6 +30,9 @@ namespace app
// Dependencies
Header *header;
// Requirements
Menu *menu;
Bar(
Header *header
);

Loading…
Cancel
Save