init tab data container

This commit is contained in:
yggverse 2024-08-13 08:07:56 +03:00
parent d9b4983d4f
commit 3918ab9993
6 changed files with 41 additions and 3 deletions

View File

@ -12,6 +12,7 @@ SRCS = src/main.cpp\
src/app/browser/header/tab.cpp\
src/app/browser/main.cpp\
src/app/browser/main/tab.cpp\
src/app/browser/main/tab/data.cpp\
src/app/browser/main/tab/label.cpp\
src/lib/database.cpp\
src/lib/database/session.cpp

View File

@ -4,6 +4,7 @@ src/app/browser/header/menu.cpp
src/app/browser/header/tab.cpp
src/app/browser/main.cpp
src/app/browser/main/tab.cpp
src/app/browser/main/tab/data.cpp
src/app/browser/main/tab/label.cpp
src/lib/database.cpp
src/lib/database/session.cpp

View File

@ -1,4 +1,5 @@
#include "tab.hpp"
#include "tab/data.hpp"
#include "tab/label.hpp"
using namespace app::browser::main;
@ -17,11 +18,9 @@ void Tab::append(
bool open,
bool focus
) {
// Init new tab label
label = new tab::Label();
// Init tab data container @TODO
Gtk::Label * data = new Gtk::Label("data");
data = new tab::Data();
append_page(
* data,

View File

@ -8,6 +8,7 @@ namespace app::browser::main
{
namespace tab
{
class Data;
class Label;
}
@ -15,6 +16,7 @@ namespace app::browser::main
{
public:
tab::Data * data;
tab::Label * label;
Tab();

View File

@ -0,0 +1,16 @@
#include "data.hpp"
using namespace app::browser::main::tab;
Data::Data()
{
set_orientation(
Gtk::Orientation::VERTICAL
);
set_homogeneous(
true
);
}
Data::~Data() = default;

View File

@ -0,0 +1,19 @@
#ifndef APP_BROWSER_MAIN_TAB_DATA_HPP
#define APP_BROWSER_MAIN_TAB_DATA_HPP
#include <glibmm/i18n.h>
#include <gtkmm/box.h>
namespace app::browser::main::tab
{
class Data : public Gtk::Box
{
public:
Data();
~Data();
};
}
#endif // APP_BROWSER_MAIN_TAB_DATA_HPP