WIP: in_depth <> machine à états
This commit is contained in:
parent
bbac7d71da
commit
c7bbc8b1e6
|
@ -148,7 +148,7 @@ GtkWidget *get_SPACE_EDIT_controls_box() {
|
|||
|
||||
|
||||
void window_main_child_bottom (GtkBox *page_box){
|
||||
if (get_exec_edit_mode ()) gtk_box_append (page_box, GTK_WIDGET (get_TIME_EXEC_controls_box()));
|
||||
if (! get_exec_edit_mode ()) gtk_box_append (page_box, GTK_WIDGET (get_TIME_EXEC_controls_box()));
|
||||
else gtk_box_append (page_box, GTK_WIDGET (get_SPACE_EDIT_controls_box()));
|
||||
}
|
||||
|
||||
|
|
44
in_depth.c
44
in_depth.c
|
@ -4,36 +4,40 @@
|
|||
|
||||
|
||||
/******************************************************************************/
|
||||
/* EXEC / EDIT */
|
||||
/* S T A T E S */
|
||||
/******************************************************************************/
|
||||
|
||||
enum { EXEC_MODE, EDIT_MODE};
|
||||
static int exec_edit_mode = EXEC_MODE;
|
||||
/*
|
||||
(exec / edit) X (state / rules / measure) X (observ / interpret / read / write)
|
||||
*/
|
||||
|
||||
int get_exec_edit_mode () {return exec_edit_mode;}
|
||||
void set_exec_edit_mode (int prescribed) {exec_edit_mode = prescribed;}
|
||||
// EXEC, EDIT, RUN, STOP, STATE, RULES, MEASURE, OBSERVE, INTERPRET, HELP, CONFIG
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
static int status = EXEC_STOP;
|
||||
|
||||
/******************************************************************************/
|
||||
/* RUN / STOP */
|
||||
/* T R A N S I T I O N S */
|
||||
/******************************************************************************/
|
||||
|
||||
enum { STOP, RUN };
|
||||
static int run_stop = STOP;
|
||||
|
||||
int get_run_xor_stop_exec () {return run_stop;}
|
||||
void set_run_xor_stop_exec (int prescribed) {run_stop = prescribed;}
|
||||
int get_exec_edit_mode () {return status;}
|
||||
void set_exec_edit_mode (int prescribed) {status = prescribed;}
|
||||
|
||||
int get_run_xor_stop_exec () {return status;}
|
||||
void set_run_xor_stop_exec (int prescribed) {status = prescribed;}
|
||||
|
||||
/******************************************************************************/
|
||||
/* STATE / RULES / MEASURES / INTERPRETATIONS */
|
||||
/******************************************************************************/
|
||||
int get_observ_interpret () {return status;}
|
||||
void set_observ_interpret (int prescribed) {status = prescribed;}
|
||||
|
||||
enum { STATE, RULES, MEASURE, OBSERVE, INTERPRET, HELP, CONFIGURE };
|
||||
static int switch_observ_interpret = STATE;
|
||||
|
||||
int get_observ_interpret () {return switch_observ_interpret;}
|
||||
void set_observ_interpret (int prescribed) {switch_observ_interpret = prescribed;}
|
||||
|
||||
// if (0) printf ("switch_observ_interpret = %d\n", switch_observ_interpret);
|
||||
// if (0) printf ("status = %d\n", status);
|
||||
|
|
Loading…
Reference in New Issue