Yoda/src/app/browser/header.cpp

41 lines
873 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
),
2024-08-05 06:20:55 +03:00
(new header::Bar(this))->gtk // @TODO
2024-08-05 05:56:45 +03:00
);
// Render
2024-08-05 03:15:41 +03:00
gtk_widget_show(
GTK_WIDGET(
this->gtk
)
);
}
}
}