/*---------------------------------------------------------------------------* * fxtest1.d - LIBERO dialog data definitions for fxtest1.c. * * Generated by LIBERO 2.4 on 22 Jul, 2004, 16:52. * * Schema file used: lrstudio.c. * *---------------------------------------------------------------------------*/ #define USE_WTP_BROKER /* WTP definitions */ #include "sfl.h" /* SFL definitions */ #include "studio.h" /* Formio API definitions */ #define SYMVAL(n) sym_get_value (session-> symbols, (n), "?") /*- Symbolic constants and event numbers ------------------------------------*/ #define _LR_STOP 0xFFFFL enum { _LR_null_event = -1, /* No event was set */ _LR_call_event = -2, /* Return after call program */ _LR_show_event = -3, /* Return after show form */ terminate_event = -4, /* End the program */ cancel_event = 0, /* Generated from the dialog */ create_event = 1, /* Generated from the dialog */ enter_event = 2, /* Generated from the dialog */ error_event = 3, /* Generated from the dialog */ insecure_event = 4, /* Generated from the dialog */ loop_event = 5, /* Generated from the dialog */ ok_event = 6, /* Generated from the dialog */ return_event = 7, /* Generated from the dialog */ secure_event = 8, /* Generated from the dialog */ test_2_event = 9, /* Generated from the dialog */ test_3_event = 10 /* Generated from the dialog */ }; enum { _LR_STATE_after_init = 0, _LR_STATE_showing_screen = 1, _LR_STATE_creating_record = 2 }; /*- Variables used by dialog interpreter ------------------------------------*/ typedef int event_t; /* Type for dialog entity */ typedef void (fsmfunct) (void); /* Address of FSM function */ static struct { /* Dialog context block */ event_t _LR_event, /* Event for state transition */ _LR_state, /* Current dialog state */ _LR_saved_state, /* Saved dialog state */ _LR_saved_event, /* Saved dialog event */ _LR_index, /* Index into vector table */ _LR_modnbr, /* Index into vector table */ the_next_event, /* Next event from module */ the_exception_event; /* Exception event from module */ Bool exception_raised; /* TRUE if exception raised */ } ctx; static char parent_args [2048]; static char child_args [2048]; static Bool _LR_call_wanted; /* call_the_program() invoked? */ static dbyte *_LR_vecptr; /* Pointer into vector table */ static SESSION *session; /* Current session block */ static event_t the_exception_event; /* Exception event from module */ static event_t the_next_event; /* Exception event from module */ static Bool exception_raised; /* TRUE if exception raised */ static int form_changes; /* Number of modified fields */ /*- Function prototypes -----------------------------------------------------*/ #ifndef MODULE #define MODULE static void /* Libero dialog modules */ #endif static int _LR_enter_state (void); static int _LR_load_context (void); static void _LR_save_context (void); static void _LR_show_the_form (Bool after_error); local request_program_call (char *program); local get_form_event (void); local raise_exception (event_t event); MODULE initialise_the_program (void); MODULE before_showing_form (void); MODULE after_showing_form (void); MODULE before_request_call (void); MODULE after_return_call (void); MODULE call_request_failed (void); MODULE prepare_for_output_only (void); MODULE terminate_the_program (void); MODULE prepare_for_input (void); MODULE set_secure_mode (void); MODULE set_insecure_mode (void); MODULE simulate_program_loop (void); MODULE call_program_test_2 (void); MODULE after_calling_test_2 (void); MODULE call_program_test_3 (void); MODULE after_calling_test_3 (void); /*- Static areas ------------------------------------------------------------*/ static dbyte _LR_nextst [][11] = { { 0,0,0,0,0,0,1,0,0,0,0 }, { 0,2,1,0,1,1,0,1,1,1,0 }, { 1,0,2,0,0,0,0,2,0,2,2 } }; static dbyte _LR_action [][11] = { { 0,0,0,2,0,0,1,0,0,0,0 }, { 0,3,6,0,5,7,0,2,4,8,0 }, { 1,0,6,0,0,0,0,2,0,8,9 } }; static dbyte _LR_vector [][2+1] = { {0}, {0,_LR_STOP}, {1,_LR_STOP}, {2,_LR_STOP}, {3,_LR_STOP}, {4,_LR_STOP}, {_LR_STOP}, {5,_LR_STOP}, {6,7,_LR_STOP}, {8,9,_LR_STOP} }; static fsmfunct *_LR_module [] = { prepare_for_output_only, terminate_the_program, prepare_for_input, set_secure_mode, set_insecure_mode, simulate_program_loop, call_program_test_2, after_calling_test_2, call_program_test_3, after_calling_test_3 };