void cleanup_options(void) { if (keymap_menu) menu_free(keymap_menu); if (visual_menu) menu_free(visual_menu); if (color_menu) menu_free(color_menu); if (option_menu) menu_free(option_menu); }
void vmivr_menu_authenticate(switch_core_session_t *session, vmivr_profile_t *profile) { switch_channel_t *channel = switch_core_session_get_channel(session); vmivr_menu_t menu = { "std_authenticate" }; int retry; const char *auth_var = NULL; /* Initialize Menu Configs */ menu_init(profile, &menu); if (profile->id && (auth_var = switch_channel_get_variable(channel, "voicemail_authorized")) && switch_true(auth_var)) { profile->authorized = SWITCH_TRUE; } for (retry = menu.ivr_maximum_attempts; switch_channel_ready(channel) && retry > 0 && profile->authorized == SWITCH_FALSE; retry--) { const char *id = profile->id, *password = NULL; char *cmd = NULL; const char *password_mask = switch_event_get_header(menu.event_settings, "Password-Mask"); const char *user_mask = switch_event_get_header(menu.event_settings, "User-Mask"); if (!id) { vmivr_menu_t sub_menu = { "std_authenticate_ask_user" }; /* Initialize Menu Configs */ menu_init(profile, &sub_menu); switch_event_add_header(sub_menu.phrase_params, SWITCH_STACK_BOTTOM, "IVR-Retry-Left", "%d", retry); id = vmivr_menu_get_input_set(session, profile, &sub_menu, user_mask); menu_free(&sub_menu); } if (!password) { vmivr_menu_t sub_menu = { "std_authenticate_ask_password" }; /* Initialize Menu Configs */ menu_init(profile, &sub_menu); switch_event_add_header(sub_menu.phrase_params, SWITCH_STACK_BOTTOM, "IVR-Retry-Left", "%d", retry); password = vmivr_menu_get_input_set(session, profile, &sub_menu, password_mask); menu_free(&sub_menu); } cmd = switch_core_session_sprintf(session, "%s %s %s %s", profile->api_profile, profile->domain, id, password); if (vmivr_api_execute(session, profile->api_auth_login, cmd) == SWITCH_STATUS_SUCCESS) { profile->id = id; profile->authorized = SWITCH_TRUE; } else { ivre_playback_dtmf_buffered(session, switch_event_get_header(menu.event_phrases, "fail_auth"), NULL, NULL, NULL, 0); } } menu_free(&menu); }
int main() { phonebook_item_t* phonebook = NULL; size_t count = 0; //Создаем меню menu_t* main_menu = menu_create(Rus("Главное меню")); if (!main_menu) { return 1; } //Добавляем пункты в меню menu_add_item(main_menu, Rus("Добавить запись"), &add_record, &phonebook, &count); menu_add_item(main_menu, Rus("Добавить тестовые записи"), &add_test_records, &phonebook, &count); menu_add_item(main_menu, Rus("Вывести записи"), &print_records, &phonebook, &count); menu_add_item(main_menu, Rus("Выполнить задание"), &do_work, &phonebook, &count); menu_add_item(main_menu, "Exit", &exit_program, NULL, NULL); //Выполняем меню menu_execute(main_menu, NULL); menu_free(main_menu); return 0; }
void enkf_tui_ranking_menu(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); { menu_type * menu = menu_alloc("Ranking of results" , "Back" , "bB"); menu_item_type * obs_item; { arg_pack_type * arg_pack = arg_pack_alloc(); arg_pack_append_ptr( arg_pack , enkf_main ); menu_add_item(menu , "Create/update misfit table" , "cC" , enkf_tui_ranking_make_misfit_ensemble , arg_pack , arg_pack_free__); menu_add_separator( menu ); obs_item = menu_add_item(menu , "New observation based ranking" , "nN" , enkf_tui_ranking_create_obs , enkf_main , NULL); arg_pack_append_ptr( arg_pack , obs_item ); } menu_add_item(menu , "New data based ranking (Sort: increasing)" , "iI" , enkf_tui_ranking_create_data_increasing , enkf_main , NULL); menu_add_item(menu , "New data based ranking (Sort: decreasing)" , "dD" , enkf_tui_ranking_create_data_decreasing , enkf_main , NULL); menu_add_item(menu , "Show ranking" , "sS" , enkf_tui_ranking_display , enkf_main , NULL); { enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); misfit_ensemble_type * misfit_ensemble = enkf_fs_get_misfit_ensemble( fs ); if (!misfit_ensemble_initialized( misfit_ensemble )) menu_item_disable( obs_item ); } menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_rank , enkf_main , NULL); menu_run(menu); menu_free(menu); } }
int crash_file_check (char *fname) { struct stat st_buf; FILE *f; menu_t *m; if (crash_file_name[0] != '\0') return 0; sprintf (crash_file_name, "%s.CRA", fname); stat (crash_file_name, &st_buf); if (S_ISDIR (st_buf.st_mode)) return 0; f = fopen (crash_file_name, "r"); if (!f) return 0; fclose (f); m = menu_alloc ("A crash file exists for file:\n%s", fname); menu_add_item (m, "Use crash file", 'u', crash_file_handler); menu_add_item (m, "Ignore crash file", 'i', crash_file_handler); display_do_menu (m); menu_free (m); return 1; }
void enkf_tui_analysis_menu(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); menu_type * menu = menu_alloc( "Analysis menu" , "Back" , "bB"); arg_pack_type * arg_pack = arg_pack_alloc(); arg_pack_append_ptr( arg_pack , enkf_main ); arg_pack_append_ptr( arg_pack , menu ); { enkf_tui_analysis_update_title(enkf_main, menu); if (enkf_main_have_obs(enkf_main)) { menu_add_item(menu, "Global scaling of uncertainty", "gG", enkf_tui_analysis_scale_observation_std__, enkf_main, NULL); menu_add_separator(menu); } menu_add_item(menu, "Select analysis module", "sS", enkf_tui_analysis_select_module__, arg_pack, NULL); menu_add_item(menu, "List available modules", "lL", enkf_tui_analysis_list_modules__, enkf_main, NULL); menu_add_item(menu, "Modify analysis module parameters", "mM", enkf_tui_analysis_update_module__, enkf_main, NULL); menu_add_item(menu, "Reload current module (external only)", "rR", enkf_tui_analysis_reload_module__, enkf_main, NULL); } menu_run(menu); menu_free(menu); arg_pack_free(arg_pack); }
static void menu_free (void *_m, void *unused) { int i; menu_item_t *m = (menu_item_t *) _m; if (m->text) free ((char *) m->text); if (m->parent) { // remove self from parent list to avoid double frees for (i = 0; i < m->parent->num_items; i++) if (m->parent->items[i] == m) m->parent->items[i] = 0; } if (m->items) { for (i = 0; i < m->num_items; i++) if (m->items[i]) { m->items[i]->parent = 0; if (m->items[i]->text) Hash_Del (menu_hash, m->items[i]->text); menu_free (m->items[i], 0); } free (m->items); } while (m->pics) { menu_pic_t *p = m->pics; m->pics = p->next; if (p->name) free ((char *) p->name); free (p); } free (m); }
int main(int argc, char *argv[]) { get_environment_settings(); rarch_main_clear_state(); config_set_defaults(); char full_path[1024]; snprintf(full_path, sizeof(full_path), "game:\\CORE.xex"); bool find_libretro_file = rarch_configure_libretro_core(full_path, "game:\\", "game:\\", SYS_CONFIG_FILE, ".xex"); set_default_settings(); rarch_config_load(SYS_CONFIG_FILE, "game:\\", ".xex", find_libretro_file); init_libretro_sym(); video_xdk360.start(); input_xdk360.init(); rarch_input_set_default_keybind_names_for_emulator(); menu_init(); begin_loop: if(g_console.mode_switch == MODE_EMULATION) { bool repeat = false; input_xdk360.poll(NULL); rarch_set_auto_viewport(g_extern.frame_cache.width, g_extern.frame_cache.height); do{ repeat = rarch_main_iterate(); }while(repeat && !g_console.frame_advance_enable); } else if(g_console.mode_switch == MODE_MENU) { menu_loop(); rarch_startup(SYS_CONFIG_FILE); } else goto begin_shutdown; goto begin_loop; begin_shutdown: if(path_file_exists(SYS_CONFIG_FILE)) rarch_config_save(SYS_CONFIG_FILE); menu_free(); video_xdk360.stop(); input_xdk360.free(NULL); rarch_exec(); return 0; }
void vmivr_menu_record_greeting_with_slot(switch_core_session_t *session, vmivr_profile_t *profile) { vmivr_menu_t menu = { "std_record_greeting_with_slot" }; const char *result; int gnum = -1; /* Initialize Menu Configs */ menu_init(profile, &menu); result = vmivr_menu_get_input_set(session, profile, &menu, "X"); if (result) gnum = atoi(result); /* If user entered 0, we don't accept it */ if (gnum > 0) { vmivr_menu_t sub_menu = { "std_record_greeting" }; char *tmp_filepath = NULL; const char *record_format = NULL; switch_status_t status; /* Initialize Menu Configs */ menu_init(profile, &sub_menu); record_format = switch_event_get_header(menu.event_settings, "Record-Format"); tmp_filepath = generate_random_file_name(session, "voicemail_ivr", record_format); status = vmivr_menu_record(session, profile, &sub_menu, tmp_filepath); if (status == SWITCH_STATUS_SUCCESS) { char *cmd = switch_core_session_sprintf(session, "%s %s %s %d %s", profile->api_profile, profile->domain, profile->id, gnum, tmp_filepath); char *str_num = switch_core_session_sprintf(session, "%d", gnum); vmivr_api_execute(session, profile->api_pref_greeting_set, cmd); ivre_playback_dtmf_buffered(session, switch_event_get_header(menu.event_phrases, "selected_slot"), str_num, NULL, NULL, 0); } menu_free(&sub_menu); } menu_free(&menu); }
void enkf_tui_help_menu_cases(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); menu_type * menu = menu_alloc("Help: Manage cases" , "Back" , "bB"); menu_add_helptext(menu , "Use this menu to navgate between cases and to initialize cases. A case has to be initialized before it can be used."); menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_cases , enkf_main , NULL); menu_run(menu); menu_free(menu); }
void enkf_tui_help_menu_misc(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); menu_type * menu = menu_alloc("Help: Miscellanous" , "Back" , "bB"); menu_add_helptext(menu , "This option contains miscellaneous options."); menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_misc , enkf_main , NULL); menu_run(menu); menu_free(menu); }
void enkf_tui_help_menu_export(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); menu_type * menu = menu_alloc("Help: Export results" , "Back" , "bB"); menu_add_helptext(menu , "Use this option to export results after the case has been run."); menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_export , enkf_main , NULL); menu_run(menu); menu_free(menu); }
void enkf_tui_help_menu_table(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); menu_type * menu = menu_alloc("Help: Table of results" , "Back" , "bB"); menu_add_helptext(menu , "This option can generate a table of results after the case has been run."); menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_table , enkf_main , NULL); menu_run(menu); menu_free(menu); }
void enkf_tui_help_menu_simple(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); menu_type * menu = menu_alloc("Help: Simple menu" , "Back" , "bB"); menu_add_helptext(menu , "The top four options in the simple menu will run eclipse simulations. Option s: Sensitivity run: No data conditioning, will initialize all parameters and run one eclipse simulation for each set of different parameters. e: Assimilation run: EnKF updates, will initialize all parameters and run one eclipse simulation for each set of different parameters. The eclipse simulations will run until the first data time step is encountered and condition on data before continuing. a: Assimilation run: Smoother update, will do one pass of the sensitivity run, then condition the parameters to all the data and rerun all experiments. i: Assimilation run: Iterated smoother [RML-EnKF] will iterate the smoother run several times."); menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_main , enkf_main , NULL); menu_run(menu); menu_free(menu); }
void enkf_tui_help_menu_run(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); menu_type * menu = menu_alloc("Help: Run menu" , "Back" , "bB"); menu_add_helptext(menu , "This menu is used to do the main work in ERT. The first option, x: Ensemble run: history, will just run the case without any data conditioning. Options r and s will initiate classical enkf runs. The two options i and t invokes the ensemble kalman smoother."); menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_run , enkf_main , NULL); menu_run(menu); menu_free(menu); }
static void self_cleanup(ObMenu *menu, gpointer data) { menu_clear_entries(menu); while (desktop_menus) { menu_free(desktop_menus->data); desktop_menus = g_slist_delete_link(desktop_menus, desktop_menus); } }
void enkf_tui_help_menu_main(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); { menu_type * menu = menu_alloc("Help: Main menu" , "Back" , "bB"); menu_add_helptext(menu , "Choose the different options from the main menu to read more about the different options."); menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_main , enkf_main , NULL); menu_run(menu); menu_free(menu); } }
/** * menu_init: * @data : Menu context handle. * * Create and initialize menu handle. * * Returns: menu handle on success, otherwise NULL. **/ void *menu_init(const void *data) { menu_handle_t *menu = NULL; menu_ctx_driver_t *menu_ctx = (menu_ctx_driver_t*)data; global_t *global = global_get_ptr(); settings_t *settings = config_get_ptr(); if (!menu_ctx) return NULL; if (!(menu = (menu_handle_t*)menu_ctx->init())) return NULL; strlcpy(settings->menu.driver, menu_ctx->ident, sizeof(settings->menu.driver)); if (!menu_entries_init(menu)) goto error; global->core_info.current = (core_info_t*)calloc(1, sizeof(core_info_t)); if (!global->core_info.current) goto error; #ifdef HAVE_SHADER_MANAGER menu->shader = (struct video_shader*)calloc(1, sizeof(struct video_shader)); if (!menu->shader) goto error; #endif menu->push_help_screen = settings->menu_show_start_screen; menu->help_screen_type = MENU_HELP_WELCOME; settings->menu_show_start_screen = false; if (settings->bundle_assets_extract_enable && settings->bundle_assets_src_path[0] != '\0' && settings->bundle_assets_dst_path[0] != '\0' && settings->bundle_assets_extract_version_current != settings->bundle_assets_extract_last_version ) { rarch_task_push_decompress(settings->bundle_assets_src_path, settings->bundle_assets_dst_path, settings->bundle_assets_dst_path_subdir, NULL, bundle_decompressed, NULL); } menu_shader_manager_init(menu); if (!menu_display_init()) goto error; return menu; error: menu_free(menu); return NULL; }
/** * uninit_drivers: * @flags : Bitmask of drivers to deinitialize. * * Deinitializes drivers. * @flags determines which drivers get deinitialized. **/ void uninit_drivers(int flags) { driver_t *driver = driver_get_ptr(); if (flags & DRIVER_AUDIO) uninit_audio(); if (flags & DRIVER_VIDEO) { global_t *global = global_get_ptr(); if (global->system.hw_render_callback.context_destroy && !driver->video_cache_context) global->system.hw_render_callback.context_destroy(); } #ifdef HAVE_MENU if (flags & DRIVER_MENU) { menu_driver_context_destroy(); if (!driver->menu_data_own) { menu_free_list(driver->menu); menu_free(driver->menu); driver->menu = NULL; } } #endif if (flags & DRIVERS_VIDEO_INPUT) uninit_video_input(); if ((flags & DRIVER_VIDEO) && !driver->video_data_own) driver->video_data = NULL; if ((flags & DRIVER_CAMERA) && !driver->camera_data_own) { uninit_camera(); driver->camera_data = NULL; } if ((flags & DRIVER_LOCATION) && !driver->location_data_own) { uninit_location(); driver->location_data = NULL; } if ((flags & DRIVER_INPUT) && !driver->input_data_own) driver->input_data = NULL; if ((flags & DRIVER_AUDIO) && !driver->audio_data_own) driver->audio_data = NULL; }
/** * uninit_drivers: * @flags : Bitmask of drivers to deinitialize. * * Deinitializes drivers. * @flags determines which drivers get deinitialized. **/ void uninit_drivers(int flags) { driver_t *driver = driver_get_ptr(); #ifdef HAVE_MENU if (flags & DRIVER_MENU) { menu_driver_context_destroy(); if (!driver->menu_data_own) { menu_free(driver->menu); driver->menu = NULL; } } #endif if ((flags & DRIVER_LOCATION) && !driver->location_data_own) { uninit_location(); driver->location_data = NULL; } if ((flags & DRIVER_CAMERA) && !driver->camera_data_own) { uninit_camera(); driver->camera_data = NULL; } if (flags & DRIVER_AUDIO) uninit_audio(); if (flags & DRIVERS_VIDEO_INPUT) uninit_video_input(); if (flags & DRIVER_VIDEO) { const struct retro_hw_render_callback *hw_render = (const struct retro_hw_render_callback*)video_driver_callback(); if (hw_render->context_destroy && !driver->video_cache_context) hw_render->context_destroy(); } if ((flags & DRIVER_VIDEO) && !driver->video_data_own) driver->video_data = NULL; if ((flags & DRIVER_INPUT) && !driver->input_data_own) driver->input_data = NULL; if ((flags & DRIVER_AUDIO) && !driver->audio_data_own) driver->audio_data = NULL; }
void uninit_drivers(void) { uninit_audio(); if (g_extern.system.hw_render_callback.context_destroy && !driver.video_cache_context) g_extern.system.hw_render_callback.context_destroy(); #ifdef HAVE_MENU if (driver.menu && driver.menu_ctx && driver.menu_ctx->context_destroy) driver.menu_ctx->context_destroy(driver.menu); if (!driver.menu_data_own) { menu_free(driver.menu); driver.menu = NULL; } #endif uninit_video_input(); if (!driver.video_data_own) driver.video_data = NULL; #ifdef HAVE_CAMERA if (!driver.camera_data_own) { uninit_camera(); driver.camera_data = NULL; } #endif #ifdef HAVE_LOCATION if (!driver.location_data_own) { uninit_location(); driver.location_data = NULL; } #endif #ifdef HAVE_OSK if (!driver.osk_data_own) { uninit_osk(); driver.osk_data = NULL; } #endif if (!driver.input_data_own) driver.input_data = NULL; if (!driver.audio_data_own) driver.audio_data = NULL; }
void vmivr_menu_preference(switch_core_session_t *session, vmivr_profile_t *profile) { switch_channel_t *channel = switch_core_session_get_channel(session); int retry; vmivr_menu_t menu = { "std_preference" }; /* Initialize Menu Configs */ menu_init(profile, &menu); if (!menu.event_keys_dtmf || !menu.event_phrases) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing Menu Phrases or Keys in menu '%s'\n", menu.name); goto end; } for (retry = menu.ivr_maximum_attempts; switch_channel_ready(channel) && retry > 0; retry--) { menu_instance_init(&menu); switch_event_add_header(menu.phrase_params, SWITCH_STACK_BOTTOM, "IVR-Retry-Left", "%d", retry); ivre_init(&menu.ivre_d, menu.dtmfa); ivre_playback(session, &menu.ivre_d, switch_event_get_header(menu.event_phrases, "menu_options"), NULL, menu.phrase_params, NULL, menu.ivr_entry_timeout); if (menu.ivre_d.result == RES_TIMEOUT) { ivre_playback_dtmf_buffered(session, switch_event_get_header(menu.event_phrases, "timeout"), NULL, NULL, NULL, 0); } else if (menu.ivre_d.result == RES_INVALID) { ivre_playback_dtmf_buffered(session, switch_event_get_header(menu.event_phrases, "invalid"), NULL, NULL, NULL, 0); } else if (menu.ivre_d.result == RES_FOUND) { /* Matching DTMF Key Pressed */ const char *action = switch_event_get_header(menu.event_keys_dtmf, menu.ivre_d.dtmf_stored); /* Reset the try count */ retry = menu.ivr_maximum_attempts; if (action) { if (!strcasecmp(action, "return")) { /* Return to the previous menu */ retry = -1; } else if (!strncasecmp(action, "menu:", 5)) { /* Sub Menu */ void (*fPtr)(switch_core_session_t *session, vmivr_profile_t *profile) = vmivr_get_menu_function(action+5); if (fPtr) { fPtr(session, profile); } } } } menu_instance_free(&menu); } end: menu_free(&menu); }
void enkf_tui_workflow_menu(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); menu_type * menu = menu_alloc("Workflows" , "Back" , "bB"); menu_add_item(menu , "Run workflow" , "rR" , enkf_tui_workflow_run , enkf_main , NULL ); menu_add_item(menu , "Load workflow" , "lL" , enkf_tui_workflow_load , enkf_main , NULL ); menu_add_item(menu , "List available workflows" , "iI" , enkf_tui_workflow_list , enkf_main , NULL ); menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_run , enkf_main , NULL); menu_run(menu); menu_free(menu); }
void enkf_tui_init_menu(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast(arg); menu_type * menu = menu_alloc("Initialize from scratch" , "Back" , "bB"); menu_add_item(menu , "Initialize all members/all parameters" , "1" , enkf_tui_init1 , enkf_main , NULL); menu_add_item(menu , "Initialize all members/one parameter" , "2" , enkf_tui_init2 , enkf_main , NULL); menu_add_item(menu , "Initialize one member/all parameters" , "3" , enkf_tui_init3 , enkf_main , NULL); menu_add_item(menu , "Initialize one member/one parameter" , "4" , enkf_tui_init4 , enkf_main , NULL); menu_add_item(menu , "Initialize interval of ensemble members/all parameters" , "5" , enkf_tui_init5 , enkf_main , NULL); menu_add_item(menu , "Initialize interval of ensemble members/one parameter" , "6" , enkf_tui_init6 , enkf_main , NULL); menu_run(menu); menu_free(menu); }
void clean_up( void ) { sound_free(); game_list_free(); submenu_free(); platform_free(); menu_free(); hint_free(); font_free(); bg_free(); location_free(); event_free(); snap_free(); video_free(); sdl_free(); }
void vmivr_menu_purge(switch_core_session_t *session, vmivr_profile_t *profile) { vmivr_menu_t menu = { "std_menu_purge" }; /* Initialize Menu Configs */ menu_init(profile, &menu); if (profile->id && profile->authorized) { const char *exit_purge = switch_event_get_header(menu.event_settings, "Exit-Purge"); if (switch_true(exit_purge)) { const char *cmd = switch_core_session_sprintf(session, "%s %s %s", profile->api_profile, profile->domain, profile->id); vmivr_api_execute(session, profile->api_msg_purge, cmd); } } menu_free(&menu); }
void enkf_tui_help_menu_cases(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main ); { const char * plot_path = plot_config_get_path( plot_config ); util_make_path( plot_path ); } { menu_type * menu = menu_alloc("Help: Manage cases" , "Back" , "bB"); menu_add_helptext(menu , "Use this menu to navgate between cases and to initialize cases. A case has to be initialized before it can be used."); menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_cases , enkf_main , NULL); menu_run(menu); menu_free(menu); } }
void enkf_tui_help_menu_main(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main ); { const char * plot_path = plot_config_get_path( plot_config ); util_make_path( plot_path ); } { menu_type * menu = menu_alloc("Help: Main menu" , "Back" , "bB"); menu_add_helptext(menu , "Choose the different options from the main menu to read more about the different options."); menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_main , enkf_main , NULL); menu_run(menu); menu_free(menu); } }
void enkf_tui_help_menu_misc(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main ); { const char * plot_path = plot_config_get_path( plot_config ); util_make_path( plot_path ); } { menu_type * menu = menu_alloc("Help: Miscellanous" , "Back" , "bB"); menu_add_helptext(menu , "This option contains miscellaneous options."); menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_misc , enkf_main , NULL); menu_run(menu); menu_free(menu); } }
void enkf_tui_help_menu_table(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main ); { const char * plot_path = plot_config_get_path( plot_config ); util_make_path( plot_path ); } { menu_type * menu = menu_alloc("Help: Table of results" , "Back" , "bB"); menu_add_helptext(menu , "This option can generate a table of results after the case has been run."); menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_table , enkf_main , NULL); menu_run(menu); menu_free(menu); } }