Browse Source

init container class

CPP-GTK4
yggverse 3 months ago
parent
commit
3e24a6fb72
  1. 1
      Makefile
  2. 24
      src/app/browser/container.cpp
  3. 27
      src/app/browser/container.h

1
Makefile

@ -7,6 +7,7 @@ LDFLAGS = `pkg-config --libs gtk4` @@ -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)

24
src/app/browser/container.cpp

@ -0,0 +1,24 @@ @@ -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
)
);
}
}
}

27
src/app/browser/container.h

@ -0,0 +1,27 @@ @@ -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
Loading…
Cancel
Save