Browse Source

init header bar menu

CPP-GTK4
yggverse 3 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
Bar::Bar( Bar::Bar(
Header *header Header *header
) { ) {
// Init dependencies
this->header = header;
// Init GTK // Init GTK
this->gtk = gtk_box_new( this->gtk = gtk_box_new(
GTK_ORIENTATION_HORIZONTAL, GTK_ORIENTATION_HORIZONTAL,
Bar::SPACING 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_show(
GTK_WIDGET( GTK_WIDGET(
this->gtk this->gtk

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

@ -4,12 +4,17 @@
// Dependencies // Dependencies
#include "../header.h" #include "../header.h"
// Requirements
#include "../menu.h"
namespace app namespace app
{ {
namespace browser namespace browser
{ {
class Header; class Header;
class Menu;
namespace header namespace header
{ {
class Bar class Bar
@ -25,6 +30,9 @@ namespace app
// Dependencies // Dependencies
Header *header; Header *header;
// Requirements
Menu *menu;
Bar( Bar(
Header *header Header *header
); );

Loading…
Cancel
Save