WIP: une première approximation de la commutation : STATE / RULES / ANALYSE
This commit is contained in:
parent
0706aac1d3
commit
00f88d1c36
45
callback.c
45
callback.c
|
@ -166,49 +166,32 @@ void on_axis_value_change(GtkAdjustment *adjustment, gpointer data)
|
|||
/******************************************************************************/
|
||||
/* B U T T O N S */
|
||||
/******************************************************************************/
|
||||
void on_toggle_exec_edit (GtkWidget *btt_exec_xor_edit, GtkWidget *btt_run_stop_model_exec)
|
||||
{
|
||||
void on_toggle_model_exec (GtkWidget *btt_run_stop_model_exec, gpointer data) {}
|
||||
void on_toggle_observ_interpret (GtkWidget *btt_toggle_observ_interpret, gpointer data) {}
|
||||
void on_toggle_exec_edit (GtkWidget *btt_exec_xor_edit, GtkWidget *btt_run_stop_model_exec) {
|
||||
// gtk_button_set_icon_name (GTK_BUTTON (btt_exec_xor_edit), "power-profile-balanced-rtl-symbolic");
|
||||
// gtk_button_set_label (GTK_BUTTON (btt_run_stop_model_exec), " run ");
|
||||
// gtk_widget_set_sensitive (GTK_WIDGET (btt_run_stop_model_exec), TRUE);
|
||||
|
||||
// gtk_button_set_icon_name (GTK_BUTTON (btt_exec_xor_edit), "document-edit-symbolic");
|
||||
// gtk_button_set_icon_name (GTK_BUTTON (btt_exec_xor_edit), "text-editor-symbolic"); // I hesitate
|
||||
// gtk_button_set_label (GTK_BUTTON (btt_run_stop_model_exec), " off ");
|
||||
// gtk_widget_set_sensitive (GTK_WIDGET (btt_run_stop_model_exec), FALSE);
|
||||
}
|
||||
|
||||
void on_toggle_model_exec (GtkWidget *btt_run_stop_model_exec, gpointer data)
|
||||
{
|
||||
// gtk_button_set_label (GTK_BUTTON (btt_run_stop_model_exec), " run ");
|
||||
// gtk_button_set_label (GTK_BUTTON (btt_run_stop_model_exec), "stop");
|
||||
}
|
||||
|
||||
void on_toggle_STATE_RULES_DATA (GtkWidget *btt_toggle_STATE_RULES_DATA, gpointer data)
|
||||
{
|
||||
const char* current_label = gtk_button_get_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA));
|
||||
// if (! strcmp (current_label, "rules")) printf ("callback.c (line 190) - strcomp +\n");
|
||||
// else printf ("callback.c (line 191) - strcomp -\n");
|
||||
|
||||
// if (! strcmp (current_label, "rules")) gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "state");
|
||||
// else gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "rules");
|
||||
|
||||
if (0) printf ("callback.c (line 191) - current_label = %s\n", current_label);
|
||||
|
||||
if (! strcmp (current_label, " rules ")) gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), " state ");
|
||||
else if (! strcmp (current_label, " state ")) gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "analyse");
|
||||
else gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), " rules ");
|
||||
|
||||
|
||||
// gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "state");
|
||||
// gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "rules");
|
||||
// gtk_window_present (dialog_window);
|
||||
if (! strcmp (current_label, "analyse")) {
|
||||
gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), " state ");
|
||||
window_main_child (main_window, 0);
|
||||
}
|
||||
else if (! strcmp (current_label, " state ")) {
|
||||
gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), " rules ");
|
||||
window_main_child (main_window, 1);
|
||||
}
|
||||
else {
|
||||
gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "analyse");
|
||||
window_main_child (main_window, 2);
|
||||
}
|
||||
|
||||
void on_toggle_observ_interpret (GtkWidget *btt_toggle_observ_interpret, gpointer data)
|
||||
{
|
||||
// gtk_button_set_label (GTK_BUTTON (btt_toggle_observ_interpret), "observe");
|
||||
// gtk_button_set_label (GTK_BUTTON (btt_toggle_observ_interpret), "interpret");
|
||||
}
|
||||
|
||||
void on_SAVE_CURRENT_MODEL_BEFORE_EDITING (GtkWidget *btt_SAVE_CURRENT_MODEL, gpointer data) {
|
||||
|
|
|
@ -177,7 +177,7 @@ void window_header_bar (GtkWindow *window, char *title){
|
|||
GtkButton *run_stop_model_exec = GTK_BUTTON (gtk_button_new_with_label (" run "));
|
||||
g_signal_connect (run_stop_model_exec, "clicked", G_CALLBACK (on_toggle_model_exec), no_local_data);
|
||||
|
||||
GtkButton *btt_toggle_STATE_RULES_DATA = GTK_BUTTON (gtk_button_new_with_label (" rules "));
|
||||
GtkButton *btt_toggle_STATE_RULES_DATA = GTK_BUTTON (gtk_button_new_with_label (" state "));
|
||||
g_signal_connect (btt_toggle_STATE_RULES_DATA, "clicked", G_CALLBACK (on_toggle_STATE_RULES_DATA), no_local_data);
|
||||
|
||||
// GtkButton *observ_interpret = GTK_BUTTON (gtk_button_new_with_label ("data analysis"));
|
||||
|
|
Loading…
Reference in New Issue