Update gtk27

This commit is contained in:
daleclack 2020-12-19 17:56:43 +08:00
parent 76ea511d26
commit fcfdf1839d
2 changed files with 9 additions and 5 deletions

View File

@ -1,5 +1,11 @@
#include <gtk/gtk.h>
class Winlayout{
public:
GtkWidget *layout=gtk_layout_new(NULL,NULL);
void put(GtkWidget *child,int x,int y);
};
class GtkWin{
GtkWindow *_window;
public:
@ -19,8 +25,3 @@ class Winheader{
void pack_end(GtkWidget *child);
};
class Winlayout{
public:
GtkWidget *layout=gtk_layout_new(NULL,NULL);
void put(GtkWidget *child,int x,int y);
};

View File

@ -4,11 +4,14 @@
void GtkMain::init(GtkApplication *app){
GtkWin window;
Winheader header;
Winlayout layout;
window.main_window=gtk_application_window_new(app);
window.win_init(400,300);
header.header_init();
window.set_titlebar(header.header);
window.add_widget(layout.layout);
window.show_all();
};