mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
init new tab button
This commit is contained in:
parent
00920d39a9
commit
2fc4ac9541
5 changed files with 79 additions and 0 deletions
29
src/app/browser/header/tab.cpp
Normal file
29
src/app/browser/header/tab.cpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include "tab.h"
|
||||
|
||||
namespace app::browser::header
|
||||
{
|
||||
// Construct
|
||||
Tab::Tab(
|
||||
Header *header
|
||||
) {
|
||||
// Init dependencies
|
||||
this->header = header;
|
||||
|
||||
// Init GTK
|
||||
this->gtk = gtk_button_new();
|
||||
|
||||
gtk_button_set_label (
|
||||
GTK_BUTTON(
|
||||
this->gtk
|
||||
),
|
||||
Tab::LABEL
|
||||
);
|
||||
|
||||
// Render
|
||||
gtk_widget_show(
|
||||
GTK_WIDGET(
|
||||
this->gtk
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
34
src/app/browser/header/tab.h
Normal file
34
src/app/browser/header/tab.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#ifndef APP_BROWSER_HEADER_TAB_H
|
||||
#define APP_BROWSER_HEADER_TAB_H
|
||||
|
||||
// Dependencies
|
||||
#include "../header.h"
|
||||
|
||||
namespace app::browser
|
||||
{
|
||||
class Header;
|
||||
|
||||
namespace header
|
||||
{
|
||||
class Tab
|
||||
{
|
||||
public:
|
||||
|
||||
// GTK
|
||||
GtkWidget *gtk;
|
||||
|
||||
// Dependencies
|
||||
Header *header;
|
||||
|
||||
// Defaults
|
||||
const gchar *LABEL = "New tab";
|
||||
|
||||
// Constructor
|
||||
Tab(
|
||||
Header *header
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue