2024-08-11 22:04:34 +03:00
|
|
|
#include "main.hpp"
|
|
|
|
#include "main/tab.hpp"
|
|
|
|
|
|
|
|
using namespace app::browser;
|
|
|
|
|
|
|
|
Main::Main()
|
|
|
|
{
|
|
|
|
// Init container
|
2024-08-12 14:24:28 +03:00
|
|
|
set_orientation(
|
|
|
|
Gtk::Orientation::VERTICAL
|
|
|
|
);
|
|
|
|
|
2024-08-11 22:04:34 +03:00
|
|
|
set_homogeneous(
|
|
|
|
true
|
|
|
|
);
|
|
|
|
|
|
|
|
// Init tabs
|
|
|
|
tab = new main::Tab();
|
|
|
|
|
|
|
|
append(
|
|
|
|
* tab
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2024-08-12 09:45:22 +03:00
|
|
|
Main::~Main()
|
|
|
|
{
|
|
|
|
remove(
|
|
|
|
* tab
|
|
|
|
);
|
|
|
|
|
|
|
|
delete tab;
|
|
|
|
|
|
|
|
tab = nullptr;
|
|
|
|
}
|
|
|
|
|
2024-08-12 18:16:27 +03:00
|
|
|
void Main::tab_append()
|
2024-08-11 22:04:34 +03:00
|
|
|
{
|
|
|
|
tab->append(
|
|
|
|
nullptr,
|
|
|
|
true,
|
|
|
|
true
|
|
|
|
);
|
2024-08-12 19:11:00 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
void Main::tab_close()
|
|
|
|
{
|
|
|
|
tab->close();
|
2024-08-12 20:24:06 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
void Main::tab_close_left()
|
|
|
|
{
|
|
|
|
tab->close_left();
|
|
|
|
};
|
|
|
|
|
|
|
|
void Main::tab_close_right()
|
|
|
|
{
|
|
|
|
tab->close_right();
|
|
|
|
};
|
|
|
|
|
|
|
|
void Main::tab_close_all()
|
|
|
|
{
|
|
|
|
tab->close_all();
|
2024-08-11 22:04:34 +03:00
|
|
|
};
|