update header bar menu namespace

This commit is contained in:
yggverse 2024-08-05 18:37:52 +03:00
parent 0d624d3db7
commit 7b8b3b860c
7 changed files with 71 additions and 77 deletions

View file

@ -13,7 +13,7 @@ SRCS = src/main.cpp\
src/app/browser/header.cpp\ src/app/browser/header.cpp\
src/app/browser/header/bar.cpp\ src/app/browser/header/bar.cpp\
src/app/browser/header/bar/title.cpp\ src/app/browser/header/bar/title.cpp\
src/app/browser/menu.cpp src/app/browser/header/bar/menu.cpp
OBJS = $(SRCS:.cpp=.o) OBJS = $(SRCS:.cpp=.o)

View file

@ -20,8 +20,8 @@ namespace app
); );
// Init menu // Init menu
this->menu = new Menu( this->menu = new bar::Menu(
this->header->browser this
); );
gtk_box_append( gtk_box_append(

View file

@ -5,21 +5,19 @@
#include "../header.h" #include "../header.h"
// Requirements // Requirements
#include "../menu.h" #include "bar/menu.h"
#include "bar/title.h" #include "bar/title.h"
namespace app namespace app::browser
{ {
namespace browser
{
class Header; class Header;
class Menu;
namespace header namespace header
{ {
namespace bar namespace bar
{ {
class Menu;
class Title; class Title;
}; };
@ -37,7 +35,7 @@ namespace app
Header *header; Header *header;
// Requirements // Requirements
Menu *menu; bar::Menu *menu;
bar::Title *title; bar::Title *title;
Bar( Bar(
@ -45,7 +43,6 @@ namespace app
); );
}; };
}; };
};
}; };
#endif #endif

View file

@ -0,0 +1,18 @@
#include "menu.h"
namespace app::browser::header::bar
{
// Construct
Menu::Menu(
Bar *bar
) {
// Init GTK
this->gtk = gtk_menu_button_new();
gtk_widget_show(
GTK_WIDGET(
this->gtk
)
);
}
}

View file

@ -0,0 +1,25 @@
#ifndef APP_BROWSER_HEADER_BAR_MENU_H
#define APP_BROWSER_HEADER_BAR_MENU_H
#include "../bar.h"
namespace app::browser::header
{
class Bar;
namespace bar
{
class Menu
{
public:
GtkWidget *gtk;
Menu(
Bar *bar
);
};
};
};
#endif

View file

@ -1,21 +0,0 @@
#include "menu.h"
namespace app
{
namespace browser
{
// Construct
Menu::Menu(
Browser *browser
) {
// Init GTK
this->gtk = gtk_menu_button_new();
gtk_widget_show(
GTK_WIDGET(
this->gtk
)
);
}
}
}

View file

@ -1,25 +0,0 @@
#ifndef APP_BROWSER_MENU_H
#define APP_BROWSER_MENU_H
#include "../browser.h"
namespace app
{
class Browser;
namespace browser
{
class Menu
{
public:
GtkWidget *gtk;
Menu(
Browser *browser
);
};
};
};
#endif