2014-08-16 03:22:00 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
int main (int argc, char *argv[])
|
|
|
|
{
|
|
|
|
GtkWidget *window;
|
|
|
|
GtkWidget *box;
|
|
|
|
GtkWidget *frame;
|
|
|
|
GtkWidget *box3;
|
|
|
|
GtkWidget *view;
|
|
|
|
GtkWidget *button;
|
|
|
|
|
2016-12-28 13:53:22 +00:00
|
|
|
gtk_init ();
|
2014-08-16 03:22:00 +00:00
|
|
|
|
2020-02-14 19:55:36 +00:00
|
|
|
window = gtk_window_new ();
|
2014-08-16 03:22:00 +00:00
|
|
|
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
|
|
|
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
2020-05-02 21:26:54 +00:00
|
|
|
gtk_window_set_child (GTK_WINDOW (window), box);
|
2014-08-16 03:22:00 +00:00
|
|
|
frame = gtk_frame_new (NULL);
|
|
|
|
gtk_container_add (GTK_CONTAINER (box), frame);
|
|
|
|
view = gtk_text_view_new ();
|
|
|
|
gtk_widget_set_vexpand (view, TRUE);
|
|
|
|
gtk_container_add (GTK_CONTAINER (box), view);
|
|
|
|
box3 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
2020-02-26 01:57:20 +00:00
|
|
|
gtk_widget_set_margin_start (box3, 10);
|
|
|
|
gtk_widget_set_margin_end (box3, 10);
|
|
|
|
gtk_widget_set_margin_top (box3, 10);
|
|
|
|
gtk_widget_set_margin_bottom (box3, 10);
|
|
|
|
|
2020-04-10 16:08:16 +00:00
|
|
|
gtk_widget_add_css_class (box3, GTK_STYLE_CLASS_LINKED);
|
2017-01-20 07:02:48 +00:00
|
|
|
button = gtk_button_new_from_icon_name ("document-new-symbolic");
|
2014-08-16 03:22:00 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (box3), button);
|
2017-01-20 07:02:48 +00:00
|
|
|
button = gtk_button_new_from_icon_name ("document-open-symbolic");
|
2014-08-16 03:22:00 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (box3), button);
|
2017-01-20 07:02:48 +00:00
|
|
|
button = gtk_button_new_from_icon_name ("document-save-symbolic");
|
2014-08-16 03:22:00 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (box3), button);
|
|
|
|
|
2020-05-01 17:41:22 +00:00
|
|
|
gtk_frame_set_child (GTK_FRAME (frame), box3);
|
2014-08-16 03:22:00 +00:00
|
|
|
|
2017-01-19 09:02:04 +00:00
|
|
|
gtk_widget_show (GTK_WIDGET (window));
|
2014-08-16 03:22:00 +00:00
|
|
|
|
2020-02-10 03:24:47 +00:00
|
|
|
while (TRUE)
|
|
|
|
g_main_context_iteration (NULL, TRUE);
|
2014-08-16 03:22:00 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|