Browse Source

init header class

CPP-GTK4
yggverse 5 months ago
parent
commit
7c5c72a43f
  1. 21
      src/Yoda/Browser/Header.cpp
  2. 30
      src/Yoda/Browser/Header.h

21
src/Yoda/Browser/Header.cpp

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
#include "Header.h"
YodaBrowser::Header::Header(
Yoda::Browser *browser
) {
// Init GTK
this->gtk = gtk_header_bar_new();
gtk_header_bar_set_show_title_buttons(
GTK_HEADER_BAR(
this->gtk
),
Header::SHOW_TITLE_BUTTONS
);
gtk_widget_show(
GTK_WIDGET(
this->gtk
)
);
}

30
src/Yoda/Browser/Header.h

@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
#ifndef YODA_BROWSER_HEADER_H
#define YODA_BROWSER_HEADER_H
#include "../../main.h"
#include "../Browser.h"
namespace YodaBrowser
{
class Header
{
public:
// GTK
GtkWidget *gtk;
// Dependencies
Yoda::Browser *browser;
// Defaults
const gboolean SHOW_TITLE_BUTTONS = true;
// Construct
Header(
Yoda::Browser *browser
);
};
};
#endif
Loading…
Cancel
Save