Compare commits

...

3 Commits

36 changed files with 157 additions and 83 deletions

View File

@ -0,0 +1 @@
Jean Sirmai,jean,n-guix-port,03.08.2024 17:28,file:///home/jean/.config/libreoffice/4;

View File

@ -0,0 +1 @@
Jean Sirmai,jean,n-guix-port,03.08.2024 17:28,file:///home/jean/.config/libreoffice/4;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View File

@ -37,9 +37,9 @@
/******************************************************************************/
// called by widgets through signal functions
enum fsm_choice_EXEC_EDIT { EXEC, EDIT }; // xor
enum fsm_choice_STATE_RULES_DATA { STATE, RULES, DATA }; // xor
enum fsm_choice_STORE_RESTORE_RESET { STORE, RESTORE, RESET }; // xor
enum fsm_choice_EXEC_EDIT { EXEC, EDIT }; // xor
enum fsm_choice_STATE_RULES_DATA { SYNTH, STATE, RULES, DATA }; // xor
enum fsm_choice_STORE_RESTORE_RESET { STORE, RESTORE, RESET }; // xor
#define n_rules 128 // arbitrary

View File

@ -34,8 +34,8 @@
/******************************************************************************/
/* W I N D O W S */
/******************************************************************************/
// called in init.c
// functions are in topbar.c
// called in dispatch.c
// functions are in topbar.c
void widget_design_main_window (GtkWindow *main_window);
void widget_design_dialog_window (GtkWindow *main_window, GtkWindow *dialog_window);
@ -43,7 +43,7 @@ void widget_design_text_window (GtkWindow *main_window, GtkWindow *text_window
// called in topbar.c
// functions are in init.c
// functions are in dispatch.c
void *widget_get_main_window();
void *widget_get_dialog_window();
@ -51,6 +51,7 @@ void *widget_get_text_window();
// functions are in topbar
void *widget_get_btt_synth();
void *widget_get_btt_state();
void *widget_get_btt_rules();
void *widget_get_btt_data();
@ -64,10 +65,12 @@ void window_header_bar_right (GtkWidget *header_bar);
/******************************************************************************/
// called in signal.c
void *widget_get_synth_page(); // in : src/widget/synth/dispatch.c
void *widget_get_state_page(); // in : src/widget/state/dispatch.c
void *widget_get_rules_page(); // in : src/widget/rules/dispatch.c
void *widget_get_data_page(); // in : src/widget/data /dispatch.c
void *widget_get_stock_page(); // in : src/widget/data /stock.c < to delete
void *widget_get_stock_text (gchar *text_name);
#define W_IMAGE_LOCAL 1920 / 32 // 1920 x 960 ad hoc (pour mon écran)
#define H_IMAGE_LOCAL 800
@ -112,13 +115,12 @@ void *widget_get_selected_rule_images();
/******************************************************************************/
/* D A T A */
/******************************************************************************/
// in : stock.c
// in : data.c
// called by topbar.c.widget_design_text_window()
void *widget_get_stock_text (gchar *text_name);
void *widget_get_measures_page();
void *widget_get_stock_page();
void *widget_get_analysis_page();
void *widget_get_results_page();
void *widget_get_operations_on_results_page();
/******************************************************************************/
@ -138,7 +140,7 @@ void *widget_get_user_rules_tree (); // see "labo.c" for specification of the tr
/******************************************************************************/
// texts in : data / text /
// functions in : widget / stock.c
// used by text_window (see topbar.c))
// used by text_window (see topbar/dispatch.c))
char *widget_get_text_address_theory ();
char *widget_get_text_address_about_commands ();

View File

@ -98,7 +98,7 @@ void fsm_reset_all_situations_transparencies_at_value (int value)
/******************************************************************************/
static char *tab_0 [] = { "EXEC", "EDIT" };
static char *tab_1 [] = { "STATE", "RULES", "DATA" };
static char *tab_1 [] = { "SYNTH", "STATE", "RULES", "DATA" };
static void debug_printing (int choice, int value, int sub_automaton)
{

View File

@ -262,6 +262,11 @@ static void switch_state_rules_data()
{
switch (fsm_get_state_rules_data()) {
case (SYNTH) :
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_get_synth_page()));
break;
case (STATE) :
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_get_state_page()));
@ -289,9 +294,10 @@ void on_toggle_state_rules_data (GtkWidget *toggled_button, gpointer user_data)
= gtk_check_button_get_label (GTK_CHECK_BUTTON (toggled_button));
int is_active = gtk_check_button_get_active (GTK_CHECK_BUTTON (toggled_button));
if ( ! strcmp (toggled_button_name, "state")) fsm_set_state_rules_data (STATE);
if ( ! strcmp (toggled_button_name, "rules")) fsm_set_state_rules_data (RULES);
if ( ! strcmp (toggled_button_name, "data analysis")) fsm_set_state_rules_data (DATA);
if ( ! strcmp (toggled_button_name, "synth")) fsm_set_state_rules_data (SYNTH);
if ( ! strcmp (toggled_button_name, "state")) fsm_set_state_rules_data (STATE);
if ( ! strcmp (toggled_button_name, "rules")) fsm_set_state_rules_data (RULES);
if ( ! strcmp (toggled_button_name, "results")) fsm_set_state_rules_data (DATA);
if (is_active) switch_state_rules_data();
}

View File

@ -37,27 +37,27 @@
#define PARTITION_A 700
#define PARTITION_B 700
static void *widget_get_stock_and_analysis_page()
void *widget_get_data_page()
{
GtkWidget *stock_and_analyse_horizontal_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_paned_set_start_child (GTK_PANED(stock_and_analyse_horizontal_pane), GTK_WIDGET (widget_get_measures_page()));
gtk_paned_set_end_child (GTK_PANED(stock_and_analyse_horizontal_pane), GTK_WIDGET (widget_get_stock_page()));
gtk_paned_set_position (GTK_PANED (stock_and_analyse_horizontal_pane), PARTITION_B);
gtk_paned_set_shrink_start_child (GTK_PANED (stock_and_analyse_horizontal_pane), FALSE);
gtk_paned_set_shrink_end_child (GTK_PANED (stock_and_analyse_horizontal_pane), FALSE);
GtkWidget *measures_and_results = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_paned_set_start_child (GTK_PANED(measures_and_results), GTK_WIDGET (widget_get_measures_page()));
gtk_paned_set_end_child (GTK_PANED(measures_and_results), GTK_WIDGET (widget_get_results_page()));
gtk_paned_set_position (GTK_PANED (measures_and_results), PARTITION_B);
gtk_paned_set_shrink_start_child (GTK_PANED (measures_and_results), FALSE);
gtk_paned_set_shrink_end_child (GTK_PANED (measures_and_results), FALSE);
return stock_and_analyse_horizontal_pane;
return measures_and_results;
}
void *widget_get_data_page()
/*void *widget_get_data_page()
{
GtkWidget *measures_and_data_horizontal_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_paned_set_start_child (GTK_PANED(measures_and_data_horizontal_pane), GTK_WIDGET (widget_get_stock_and_analysis_page()));
gtk_paned_set_end_child (GTK_PANED(measures_and_data_horizontal_pane), GTK_WIDGET (widget_get_analysis_page()));
gtk_paned_set_end_child (GTK_PANED(measures_and_data_horizontal_pane), GTK_WIDGET (widget_get_operations_on_results_page()));
gtk_paned_set_position (GTK_PANED (measures_and_data_horizontal_pane), PARTITION_A);
gtk_paned_set_shrink_start_child (GTK_PANED (measures_and_data_horizontal_pane), FALSE);
gtk_paned_set_shrink_end_child (GTK_PANED (measures_and_data_horizontal_pane), FALSE);
gtk_widget_set_size_request (measures_and_data_horizontal_pane, 1920, 800);
return measures_and_data_horizontal_pane;
}
}*/

View File

@ -58,10 +58,10 @@ void *widget_get_measures_page ()
gtk_box_append (data_box, GTK_WIDGET (frame_rule_topic));
GtkWidget* frame_measures = gtk_frame_new ("measures");
GtkBox *measures_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8));
// GtkBox *measures_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8));
gtk_frame_set_child (GTK_FRAME (frame_measures), GTK_WIDGET (data_box));
gtk_widget_set_size_request (GTK_WIDGET (data_box), 600, 0);
// gtk_widget_set_size_request (GTK_WIDGET (data_box), 200, 0);
return GTK_WIDGET (frame_measures);
}

View File

@ -31,18 +31,18 @@
#include "../../../include/signal.h"
#include "../../../include/widget.h"
void *widget_get_analysis_page () {
void *widget_get_operations_on_results_page () {
GtkWidget *btt_A = gtk_toggle_button_new ();
gtk_button_set_icon_name (GTK_BUTTON (btt_A), "view-refresh-symbolic");
GtkWidget *data_chart = GTK_WIDGET (gtk_picture_new_for_filename
("/home/jean/Gem-Graph/gem-graph-client/data/image/data charts.png"));
// GtkWidget *data_chart = GTK_WIDGET (gtk_picture_new_for_filename
// ("/home/jean/Gem-Graph/gem-graph-client/data/image/data charts.png"));
GtkWidget* frame_analysis = gtk_frame_new ("analysis");
GtkBox *analysis_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8));
// GtkBox *analysis_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8));
gtk_frame_set_child (GTK_FRAME (frame_analysis), GTK_WIDGET (btt_A));
gtk_frame_set_child (GTK_FRAME (frame_analysis), GTK_WIDGET (data_chart));
// gtk_frame_set_child (GTK_FRAME (frame_analysis), GTK_WIDGET (data_chart));
return GTK_WIDGET (frame_analysis);
}

View File

@ -31,36 +31,31 @@
#include "../../../include/signal.h"
#include "../../../include/widget.h"
void *widget_get_stock_page () {
GtkBox *data_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 32));
void *widget_get_results_page () {
GtkBox *data_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
GtkWidget* frame_data_type = gtk_frame_new ("data type");
GtkBox *data_type_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 200));
GtkWidget* frame_data_type = gtk_frame_new ("about the fsm / about the model");
GtkBox *data_type_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
gtk_frame_set_child (GTK_FRAME (frame_data_type), GTK_WIDGET (data_type_box));
gtk_box_append (data_box, GTK_WIDGET (frame_data_type));
gtk_box_append (data_type_box, gtk_button_new_with_label ("repartitions"));
gtk_box_append (data_type_box, gtk_button_new_with_label ("evolutions"));
gtk_box_append (data_type_box, gtk_button_new_with_label ("correlations"));
gtk_box_append (data_type_box, GTK_WIDGET (gtk_picture_new_for_filename
("/home/jean/Gem-Graph/gem-graph-client/data/image/data évolutions parallèles (n > 30) étendu.png")));
gtk_widget_set_size_request (GTK_WIDGET (data_box), 600, 0);
gtk_box_append (data_type_box, gtk_button_new_with_label ("repartitions (1D, 2D)"));
gtk_box_append (data_type_box, GTK_WIDGET (gtk_picture_new_for_filename
("/home/jean/Gem-Graph/gem-graph-client/data/image/data bar graph vertical.png")));
gtk_box_append (data_type_box, gtk_button_new_with_label ("correlations"));
gtk_box_append (data_type_box, GTK_WIDGET (gtk_picture_new_for_filename
("/home/jean/Gem-Graph/gem-graph-client/data/image/data correlations (4, horizontal).png")));
gtk_widget_set_size_request (GTK_WIDGET (data_box), 1800, 700);
return GTK_WIDGET (data_box);
}
void *widget_get_stock_text (gchar *text_address) {
GtkWidget *view = gtk_text_view_new ();
GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
gtk_text_buffer_set_text (buffer, read_file (text_address), -1);
gtk_text_buffer_set_modified (buffer, FALSE);
GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (gtk_scrolled_window_new());
gtk_scrolled_window_set_child (scrolled_window, view);
gtk_scrolled_window_set_policy (scrolled_window, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
return GTK_WIDGET (scrolled_window);
}

View File

@ -35,8 +35,9 @@
void *widget_get_rule_analyse()
{
return gtk_label_new ("________________\n RULE ANALYSIS\n\
controls\n'''''''''''''''''''''''''''''");
return gtk_label_new (" ______________________\n RULE INVESTIGATION\n\
tools\n '''''''''''''''''''''''''''''''''''''''\n\
(camera, transparencies)");
}

View File

@ -38,8 +38,9 @@
// -----------------------------------------------------------------------------
// Below is ^c^v from RMS C manual (p 77) 24 * 256 * 256 * 2 = 3 145 728
//
/*
struct images_bff {GtkWidget *arr[MAX_SIZE]; int top;};
static struct images_bff *my_list = NULL, *babar = NULL;
static struct images_bff *my_list = NULL;//, *babar = NULL;
static struct images_bff *alloc_images_bff ()
{
struct images_bff *p;
@ -63,7 +64,7 @@ static void free_intlist (struct images_bff *p)
// TODO free_intlist (mylist);
// TODO mylist = NULL;
// TODO offsetof (type, field)
//
*/
//
// -----------------------------------------------------------------------
// Below is ^c^v from https://www.geeksforgeeks.org/implement-stack-in-c/
@ -191,7 +192,7 @@ void *widget_get_an_impression_of_what_a_rules_comparator_could_be(){
static GtkWidget *do_rtfd (Stack stack)
static GtkWidget *do_rtfd (Stack stack) // TODO
{
GtkImage *image_insuline = GTK_IMAGE (gtk_image_new_from_resource
("/home/jean/Gem-Graph/gem-graph-client/data/image/insuline.png"));
@ -204,11 +205,20 @@ static GtkWidget *do_rtfd (Stack stack)
// = gdk_paintable_get_current_image (GDK_PAINTABLE (image_insuline));
// Gdk-CRITICAL **: 06:20:06.154: gdk_paintable_get_current_image:
// assertion 'GDK_IS_PAINTABLE (paintable)' failed
GIcon *hello_dream = G_ICON (image_insuline);
//
// it works !!! >>> GIcon *hello_dream = G_ICON (image_insuline);
//
GtkWidget *widget_insuline = GTK_WIDGET (image_insuline);
if (image_insuline_storage_type == GTK_IMAGE_ICON_NAME)
printf("insuline image now at : %p storage_type : %s\n",
&image_insuline, "GTK_IMAGE_ICON_NAME");
push_images_onto_stack (stack); // totalement inutile ici
peek (NULL); // idem
// free_intlist (NULL); // idem
// add_to_mylist (0); // idem
return widget_insuline;
}

View File

@ -52,7 +52,7 @@ void *widget_get_rules_tree_tools ()
GtkBox *rules_tree_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_user_rules_tree()));
gtk_box_append (rules_tree_box, GTK_WIDGET (gtk_picture_new_for_filename
("/home/jean/Gem-Graph/gem-graph-client/data/image/many bars vertical.png")));
("/home/jean/Gem-Graph/gem-graph-client/data/image/data many bars vertical.png")));
gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_rules_use ()));
gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_an_impression_of_what_a_rules_comparator_could_be()));
gtk_widget_set_size_request (GTK_WIDGET (rules_tree_box), W_IMAGE_LOCAL * 7.4, 0);//H_IMAGE_LOCAL);

View File

@ -0,0 +1,37 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Gem-graph client *
* *
* Windows && Headers *
* *
* Copyright © 2021 Libre en Communs <contact@a-lec.org> *
* Copyright © 2021 Adrien Bourmault <neox@a-lec.org> *
* Copyright © 2021 Jean Sirmai <jean@a-lec.org> *
* *
* This file is part of Gem-graph. *
* *
* This program is free software: you can redistribute it and/or modify it *
* under the terms of the GNU Affero General Public License *
* as published by the Free Software Foundation, *
* either version 3 of the License, *
* or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; *
* without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU Affero General Public License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "../../../include/base.h"
#include "../../../include/signal.h"
#include "../../../include/widget.h"
void *widget_get_synth_page() {return GTK_WIDGET (widget_get_space_view());}

View File

@ -37,41 +37,48 @@
/* M A I N W I N D O W T O P B A R ( L E F T ) */
/******************************************************************************/
static GtkButton *btt_STATE, *btt_RULES, *btt_DATA;
static GtkButton *btt_SYNTH, *btt_STATE, *btt_RULES, *btt_DATA;
void *widget_get_btt_synth () {return btt_SYNTH;}
void *widget_get_btt_state () {return btt_STATE;}
void *widget_get_btt_rules () {return btt_RULES;}
void *widget_get_btt_data () {return btt_DATA;}
void window_header_bar_left (GtkWidget *header_bar)
{
gpointer no_local_data = NULL;
gpointer no_local_data = NULL;
GtkButton *btt_XOR_EXEC_EDIT = GTK_BUTTON (gtk_toggle_button_new ());
gtk_button_set_icon_name (btt_XOR_EXEC_EDIT, "system-run-symbolic");
gtk_button_set_icon_name (btt_XOR_EXEC_EDIT, "power-profile-balanced-rtl-symbolic");
g_signal_connect (btt_XOR_EXEC_EDIT, "clicked", G_CALLBACK (on_toggle_exec_edit), no_local_data);
GtkButton *btt_XOR_EXEC_EDIT = GTK_BUTTON (gtk_toggle_button_new ());
gtk_button_set_icon_name (btt_XOR_EXEC_EDIT, "system-run-symbolic");
gtk_button_set_icon_name (btt_XOR_EXEC_EDIT, "power-profile-balanced-rtl-symbolic");
g_signal_connect (btt_XOR_EXEC_EDIT, "clicked", G_CALLBACK (on_toggle_exec_edit), no_local_data);
GtkWidget *any_Label = GTK_WIDGET (gtk_label_new (" | "));
GtkWidget *any_Label = GTK_WIDGET (gtk_label_new (" | "));
GtkCheckButton *group_state_rules_data = GTK_CHECK_BUTTON (gtk_check_button_new ());
GtkCheckButton *group_state_rules_data = GTK_CHECK_BUTTON (gtk_check_button_new ());
btt_STATE = GTK_BUTTON (gtk_check_button_new_with_label ("state"));
g_signal_connect (btt_STATE, "toggled", G_CALLBACK (on_toggle_state_rules_data), no_local_data);
gtk_check_button_set_group (GTK_CHECK_BUTTON (btt_STATE), group_state_rules_data);
btt_SYNTH = GTK_BUTTON (gtk_check_button_new_with_label ("synth"));
g_signal_connect (btt_SYNTH, "toggled", G_CALLBACK (on_toggle_state_rules_data), no_local_data);
gtk_check_button_set_group (GTK_CHECK_BUTTON (btt_SYNTH), group_state_rules_data);
gtk_check_button_set_active (GTK_CHECK_BUTTON (btt_SYNTH), FALSE);
btt_RULES = GTK_BUTTON (gtk_check_button_new_with_label ("rules"));
g_signal_connect (btt_RULES, "toggled", G_CALLBACK (on_toggle_state_rules_data), no_local_data);
gtk_check_button_set_group (GTK_CHECK_BUTTON (btt_RULES), group_state_rules_data);
btt_STATE = GTK_BUTTON (gtk_check_button_new_with_label ("state"));
g_signal_connect (btt_STATE, "toggled", G_CALLBACK (on_toggle_state_rules_data), no_local_data);
gtk_check_button_set_group (GTK_CHECK_BUTTON (btt_STATE), group_state_rules_data);
btt_DATA = GTK_BUTTON (gtk_check_button_new_with_label ("data analysis"));
g_signal_connect (btt_DATA, "toggled", G_CALLBACK (on_toggle_state_rules_data), no_local_data);
gtk_check_button_set_group (GTK_CHECK_BUTTON (btt_DATA), group_state_rules_data);
btt_RULES = GTK_BUTTON (gtk_check_button_new_with_label ("rules"));
g_signal_connect (btt_RULES, "toggled", G_CALLBACK (on_toggle_state_rules_data), no_local_data);
gtk_check_button_set_group (GTK_CHECK_BUTTON (btt_RULES), group_state_rules_data);
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_XOR_EXEC_EDIT));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (any_Label));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_STATE));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_RULES));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_DATA));
btt_DATA = GTK_BUTTON (gtk_check_button_new_with_label ("results"));
g_signal_connect (btt_DATA, "toggled", G_CALLBACK (on_toggle_state_rules_data), no_local_data);
gtk_check_button_set_group (GTK_CHECK_BUTTON (btt_DATA), group_state_rules_data);
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_XOR_EXEC_EDIT));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (any_Label));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_SYNTH));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_STATE));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_RULES));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_DATA));
}

View File

@ -60,3 +60,17 @@ void widget_design_text_window (GtkWindow *main_window, GtkWindow *text_window)
void *widget_get_stock_text (gchar *text_address) {
GtkWidget *view = gtk_text_view_new ();
GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
gtk_text_buffer_set_text (buffer, read_file (text_address), -1);
gtk_text_buffer_set_modified (buffer, FALSE);
GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (gtk_scrolled_window_new());
gtk_scrolled_window_set_child (scrolled_window, view);
gtk_scrolled_window_set_policy (scrolled_window, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
return GTK_WIDGET (scrolled_window);
}