mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
init header class
This commit is contained in:
parent
a67b5ad018
commit
7c5c72a43f
2 changed files with 51 additions and 0 deletions
21
src/Yoda/Browser/Header.cpp
Normal file
21
src/Yoda/Browser/Header.cpp
Normal file
|
|
@ -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
Normal file
30
src/Yoda/Browser/Header.h
Normal file
|
|
@ -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…
Add table
Add a link
Reference in a new issue