2024-06-02 22:49:16 +02:00
|
|
|
#include <gtk-4.0/gtk/gtk.h>
|
|
|
|
#include <assert.h>
|
2024-06-03 05:46:01 +02:00
|
|
|
#include "callback.h"
|
2024-06-02 22:49:16 +02:00
|
|
|
|
|
|
|
|
2024-06-04 06:25:47 +02:00
|
|
|
/******************************************************************************/
|
2024-06-09 11:23:42 +02:00
|
|
|
/* S T A T E S */
|
2024-06-04 06:25:47 +02:00
|
|
|
/******************************************************************************/
|
2024-06-03 05:46:01 +02:00
|
|
|
|
2024-06-09 11:23:42 +02:00
|
|
|
/*
|
|
|
|
(exec / edit) X (state / rules / measure) X (observ / interpret / read / write)
|
|
|
|
*/
|
2024-06-03 05:46:01 +02:00
|
|
|
|
2024-06-09 11:23:42 +02:00
|
|
|
// EXEC, EDIT, RUN, STOP, STATE, RULES, MEASURE, OBSERVE, INTERPRET, HELP, CONFIG
|
2024-06-03 05:46:01 +02:00
|
|
|
|
2024-06-09 11:23:42 +02:00
|
|
|
enum {
|
|
|
|
EXEC_STOP, EXEC_RUN,
|
|
|
|
EXEC_STOP_EDIT_RULE, EXEC_RUN_EDIT_RULE,
|
|
|
|
EXEC_STOP_EDIT_MEASURE, EXEC_RUN_EDIT_MEASURE,
|
|
|
|
EDIT_STATE, EDIT_RULE,
|
|
|
|
OBSERVE,
|
|
|
|
INTERPRET,
|
|
|
|
HELP,
|
|
|
|
CONFIGURE
|
|
|
|
};
|
2024-06-04 06:25:47 +02:00
|
|
|
|
2024-06-09 11:23:42 +02:00
|
|
|
static int status = EXEC_STOP;
|
2024-06-04 06:25:47 +02:00
|
|
|
|
|
|
|
/******************************************************************************/
|
2024-06-09 11:23:42 +02:00
|
|
|
/* T R A N S I T I O N S */
|
2024-06-04 06:25:47 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
|
2024-06-03 05:46:01 +02:00
|
|
|
|
2024-06-09 11:23:42 +02:00
|
|
|
int get_exec_edit_mode () {return status;}
|
|
|
|
void set_exec_edit_mode (int prescribed) {status = prescribed;}
|
2024-06-04 06:25:47 +02:00
|
|
|
|
2024-06-09 11:23:42 +02:00
|
|
|
int get_run_xor_stop_exec () {return status;}
|
|
|
|
void set_run_xor_stop_exec (int prescribed) {status = prescribed;}
|
2024-06-07 23:34:08 +02:00
|
|
|
|
2024-06-09 11:23:42 +02:00
|
|
|
int get_observ_interpret () {return status;}
|
|
|
|
void set_observ_interpret (int prescribed) {status = prescribed;}
|
2024-06-07 23:34:08 +02:00
|
|
|
|
2024-06-09 11:23:42 +02:00
|
|
|
// if (0) printf ("status = %d\n", status);
|