2024-08-10 17:57:15 +03:00
|
|
|
#include "header.hpp"
|
2024-08-20 14:38:13 +03:00
|
|
|
#include "header/main.hpp"
|
2024-08-10 17:57:15 +03:00
|
|
|
#include "header/menu.hpp"
|
|
|
|
#include "header/tab.hpp"
|
|
|
|
|
|
|
|
using namespace app::browser;
|
|
|
|
|
|
|
|
Header::Header()
|
|
|
|
{
|
2024-08-12 09:45:22 +03:00
|
|
|
// Init header bar
|
2024-08-10 17:57:15 +03:00
|
|
|
set_show_title_buttons(
|
2024-08-27 16:27:56 +03:00
|
|
|
SHOW_TITLE_BUTTONS
|
2024-08-10 17:57:15 +03:00
|
|
|
);
|
|
|
|
|
2024-08-12 09:45:22 +03:00
|
|
|
// Init menu
|
2024-09-02 16:25:31 +03:00
|
|
|
headerMenu = Gtk::make_managed<header::Menu>();
|
2024-08-12 09:45:22 +03:00
|
|
|
|
2024-08-10 17:57:15 +03:00
|
|
|
pack_start(
|
2024-08-27 16:27:56 +03:00
|
|
|
* headerMenu
|
2024-08-10 17:57:15 +03:00
|
|
|
);
|
|
|
|
|
2024-08-12 09:45:22 +03:00
|
|
|
// Init tab
|
2024-09-02 16:25:31 +03:00
|
|
|
headerTab = Gtk::make_managed<header::Tab>();
|
2024-08-12 09:45:22 +03:00
|
|
|
|
2024-08-10 17:57:15 +03:00
|
|
|
pack_start(
|
2024-08-27 16:27:56 +03:00
|
|
|
* headerTab
|
2024-08-12 09:45:22 +03:00
|
|
|
);
|
2024-08-20 14:38:13 +03:00
|
|
|
|
|
|
|
// Init main widget
|
2024-09-02 16:25:31 +03:00
|
|
|
headerMain = Gtk::make_managed<header::Main>();
|
2024-08-20 14:38:13 +03:00
|
|
|
|
|
|
|
set_title_widget(
|
2024-08-27 16:27:56 +03:00
|
|
|
* headerMain
|
2024-08-20 14:38:13 +03:00
|
|
|
);
|
2024-08-12 09:45:22 +03:00
|
|
|
}
|
|
|
|
|
2024-09-08 07:47:39 +03:00
|
|
|
void Header::refresh(
|
|
|
|
const Glib::ustring & TITLE,
|
|
|
|
const Glib::ustring & SUBTITLE
|
2024-08-20 15:25:31 +03:00
|
|
|
) {
|
2024-08-27 16:27:56 +03:00
|
|
|
headerMain->set_title(
|
2024-09-08 07:47:39 +03:00
|
|
|
TITLE
|
2024-08-20 15:25:31 +03:00
|
|
|
);
|
2024-08-27 16:22:48 +03:00
|
|
|
|
2024-08-27 16:27:56 +03:00
|
|
|
headerMain->set_subtitle(
|
2024-09-08 07:47:39 +03:00
|
|
|
SUBTITLE
|
2024-08-27 16:22:48 +03:00
|
|
|
);
|
2024-08-10 17:57:15 +03:00
|
|
|
}
|