init container class

This commit is contained in:
yggverse 2024-08-05 03:32:43 +03:00
parent 47bd3b5b8b
commit 3e24a6fb72
3 changed files with 52 additions and 0 deletions

View File

@ -7,6 +7,7 @@ LDFLAGS = `pkg-config --libs gtk4`
TARGET = bin/Yoda
SRCS = src/main.cpp\
src/app/browser.cpp\
src/app/browser/container.cpp\
src/app/browser/header.cpp
OBJS = $(SRCS:.cpp=.o)

View File

@ -0,0 +1,24 @@
#include "container.h"
namespace app
{
namespace browser
{
// Construct
Container::Container(
Browser *browser
) {
// Init GTK
this->gtk = gtk_box_new(
GTK_ORIENTATION_VERTICAL,
Container::SPACING
);
gtk_widget_show(
GTK_WIDGET(
this->gtk
)
);
}
}
}

View File

@ -0,0 +1,27 @@
#ifndef APP_BROWSER_CONTAINER_H
#define APP_BROWSER_CONTAINER_H
#include "../browser.h"
namespace app
{
class Browser;
namespace browser
{
class Container
{
public:
GtkWidget *gtk;
const gint SPACING = 0;
Container(
Browser *browser
);
};
};
};
#endif