Yoda/src/app/browser/header.cpp

41 lines
875 B
C++
Raw Normal View History

2024-08-05 03:15:41 +03:00
#include "header.h"
namespace app
{
namespace browser
{
// Construct
Header::Header(
Browser *browser
) {
2024-08-05 05:56:45 +03:00
// Init dependencies
this->browser = browser;
2024-08-05 03:15:41 +03:00
// Init GTK
this->gtk = gtk_header_bar_new();
gtk_header_bar_set_show_title_buttons(
GTK_HEADER_BAR(
this->gtk
),
Header::SHOW_TITLE_BUTTONS
);
2024-08-05 05:56:45 +03:00
// Init title widget
gtk_header_bar_set_title_widget(
GTK_HEADER_BAR(
this->gtk
),
(new Menu(this->browser))->gtk // @TODO
);
// Render
2024-08-05 03:15:41 +03:00
gtk_widget_show(
GTK_WIDGET(
this->gtk
)
);
}
}
}