Browse Source

init tab data container

CPP-GTK4
yggverse 4 months ago
parent
commit
3918ab9993
  1. 1
      Makefile
  2. 1
      po/POTFILES.in
  3. 5
      src/app/browser/main/tab.cpp
  4. 2
      src/app/browser/main/tab.hpp
  5. 16
      src/app/browser/main/tab/data.cpp
  6. 19
      src/app/browser/main/tab/data.hpp

1
Makefile

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

1
po/POTFILES.in

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

5
src/app/browser/main/tab.cpp

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

2
src/app/browser/main/tab.hpp

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

16
src/app/browser/main/tab/data.cpp

@ -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;

19
src/app/browser/main/tab/data.hpp

@ -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
Loading…
Cancel
Save