mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-12 21:51:20 +00:00
init browser component
This commit is contained in:
parent
1c1b1ea41f
commit
859beb871b
43
src/Yoda/Browser.cpp
Normal file
43
src/Yoda/Browser.cpp
Normal file
@ -0,0 +1,43 @@
|
||||
#include "Browser.h"
|
||||
|
||||
YodaBrowser::YodaBrowser(
|
||||
GtkApplication *application
|
||||
) {
|
||||
this->gtk = gtk_application_window_new(
|
||||
application
|
||||
);
|
||||
|
||||
gtk_window_set_title(
|
||||
GTK_WINDOW(
|
||||
this->gtk
|
||||
),
|
||||
YodaBrowser::TITLE
|
||||
);
|
||||
|
||||
gtk_window_set_default_size(
|
||||
GTK_WINDOW(
|
||||
this->gtk
|
||||
),
|
||||
YodaBrowser::WIDTH,
|
||||
YodaBrowser::HEIGHT
|
||||
);
|
||||
|
||||
GtkWidget *label = gtk_label_new(
|
||||
"Hello, World!"
|
||||
);
|
||||
|
||||
gtk_window_set_child(
|
||||
GTK_WINDOW(
|
||||
this->gtk
|
||||
),
|
||||
label
|
||||
);
|
||||
|
||||
gtk_widget_show(
|
||||
GTK_WIDGET(
|
||||
this->gtk
|
||||
)
|
||||
);
|
||||
|
||||
// @TODO signals
|
||||
}
|
21
src/Yoda/Browser.h
Normal file
21
src/Yoda/Browser.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef YODA_BROWSER_H
|
||||
#define YODA_BROWSER_H
|
||||
|
||||
#include "../main.h"
|
||||
|
||||
class YodaBrowser
|
||||
{
|
||||
public:
|
||||
|
||||
GtkWidget *gtk;
|
||||
|
||||
const guint WIDTH = 640;
|
||||
const guint HEIGHT = 480;
|
||||
const gchar* TITLE = "Yoda";
|
||||
|
||||
YodaBrowser(
|
||||
GtkApplication *application
|
||||
);
|
||||
};
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user