mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
init header bar menu
This commit is contained in:
parent
bd05d81a3a
commit
199198c714
2 changed files with 26 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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…
Add table
Add a link
Reference in a new issue