diff --git a/Makefile b/Makefile index b832d46f..84a8a973 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ SRCS = src/main.cpp\ src/app/browser/container/tab.cpp\ src/app/browser/header.cpp\ src/app/browser/header/bar.cpp\ + src/app/browser/header/bar/title.cpp\ src/app/browser/menu.cpp OBJS = $(SRCS:.cpp=.o) diff --git a/src/app/browser/header/bar.cpp b/src/app/browser/header/bar.cpp index fd68420a..58daa516 100644 --- a/src/app/browser/header/bar.cpp +++ b/src/app/browser/header/bar.cpp @@ -33,6 +33,20 @@ namespace app ) ); + // Init title + this->title = new bar::Title( + this + ); + + gtk_box_append( + GTK_BOX( + this->gtk + ), + GTK_WIDGET( + this->title->gtk + ) + ); + // Render gtk_widget_show( GTK_WIDGET( diff --git a/src/app/browser/header/bar.h b/src/app/browser/header/bar.h index 0c91a4ae..be62fbde 100644 --- a/src/app/browser/header/bar.h +++ b/src/app/browser/header/bar.h @@ -6,6 +6,7 @@ // Requirements #include "../menu.h" +#include "bar/title.h" namespace app { @@ -17,6 +18,11 @@ namespace app namespace header { + namespace bar + { + class Title; + }; + class Bar { public: @@ -32,6 +38,7 @@ namespace app // Requirements Menu *menu; + bar::Title *title; Bar( Header *header diff --git a/src/app/browser/header/bar/title.cpp b/src/app/browser/header/bar/title.cpp new file mode 100644 index 00000000..d9e30dd0 --- /dev/null +++ b/src/app/browser/header/bar/title.cpp @@ -0,0 +1,33 @@ +#include "title.h" + +namespace app +{ + namespace browser + { + namespace header + { + namespace bar + { + // Construct + Title::Title( + Bar *bar + ) { + // Init dependencies + this->bar = bar; + + // Init GTK + this->gtk = gtk_label_new( + Title::LABEL + ); + + // Render + gtk_widget_show( + GTK_WIDGET( + this->gtk + ) + ); + } + } + } + } +} diff --git a/src/app/browser/header/bar/title.h b/src/app/browser/header/bar/title.h new file mode 100644 index 00000000..dad13fb0 --- /dev/null +++ b/src/app/browser/header/bar/title.h @@ -0,0 +1,39 @@ +#ifndef APP_BROWSER_HEADER_BAR_TITLE_H +#define APP_BROWSER_HEADER_BAR_TITLE_H + +// Dependencies +#include "../bar.h" + +namespace app +{ + namespace browser + { + namespace header + { + class Bar; + + namespace bar + { + class Title + { + public: + + // GTK + GtkWidget *gtk; + + // Defaults + const char* LABEL = "Yoda"; + + // Dependencies + Bar *bar; + + Title( + Bar *bar + ); + }; + }; + }; + }; +}; + +#endif \ No newline at end of file