static void make_2nd_level_psf_menu(){
	char tmp_menu[1024];
	char psf_name[LENGTHBUF];
    int istep;
	
	int num_psf =     kemoview_get_PSF_num_loaded();
	int num_fld =     kemoview_get_PSF_num_field();
	int if_psf =      kemoview_get_PSF_field_id();
	int ic_psf =      kemoview_get_PSF_component_id();
	int num_comp =    kemoview_get_PSF_num_component(if_psf);
	int iflag_solid = kemoview_get_PSF_draw_flags(PSFSOLID_TOGGLE);
	int iflag_grid =  kemoview_get_PSF_draw_flags(PSFGRID_TOGGLE);
	
	glut_menu_id->psf_root_menu = glutCreateMenu(psf_handler);
	
	if(num_psf > 1){
		istep = kemoview_get_PSF_file_prefix(psf_name);
		sprintf(tmp_menu, "Current: %s", psf_name);
		glutAddSubMenu(tmp_menu, glut_menu_id->ichoose_current_psf_menu);
	} else {
	};
	
	
	kemoview_get_PSF_field_name(tmp_menu,if_psf);
	if (num_fld > 1) {
		glutAddSubMenu(tmp_menu, glut_menu_id->ichoose_field_menu);
	} else {
		glutAddMenuEntry(tmp_menu, PSF_NOTHING_TODO);
	};
	
	if (num_comp > 1) {
		set_PSF_component_name(num_comp,ic_psf,tmp_menu); 
		glutAddSubMenu(tmp_menu, glut_menu_id->ichoose_comp_menu);
	};
	
	glut_PSF_draw_menu();
	
	if(iflag_solid > 0){glutAddSubMenu("Surface  color", glut_menu_id->ichoose_psf_patchcolor_menu);};
	if(iflag_grid > 0) {glutAddSubMenu("Line color", glut_menu_id->ichoose_psf_linecolor_menu);};
	
	glut_PSF_range_menu();
	
    if(iflag_solid > 0 || iflag_grid > 0){
        glutAddSubMenu("Color and Opacity", glut_menu_id->ichoose_psf_color_menu);
    };
	
	glutAddMenuEntry("Close Current PSF data", PSF_OFF);
	
	return;
};
예제 #2
0
static void make_2nd_level_psf_menu(){
	char tmp_menu[1024];
	char psf_name[LENGTHBUF];
	
	int num_psf =     send_num_loaded_PSF();
	int num_fld =     send_nfield_current_psf();
	int if_psf =      send_draw_field_current_psf();
	int ic_psf =      send_draw_comp_id_current_psf();
	int num_comp =    send_ncomp_current_psf(if_psf);
	int id_coord =    send_coordinate_id_current_psf();
	int iflag_solid = send_kemoview_psf_draw_flags(PSFSOLID_TOGGLE);
	int iflag_grid =  send_kemoview_psf_draw_flags(PSFGRID_TOGGLE);
	
	glut_menu_id->psf_root_menu = glutCreateMenu(psf_handler);
	
	if(num_psf > 1){
		send_current_psf_file_header(psf_name);
		sprintf(tmp_menu, "Current: %s", psf_name);
		glutAddSubMenu(tmp_menu, glut_menu_id->ichoose_current_psf_menu);
	} else {
	};
	
	
	send_current_psf_data_name(tmp_menu,if_psf);
	if (num_fld > 1) {
		glutAddSubMenu(tmp_menu, glut_menu_id->ichoose_field_menu);
	} else {
		glutAddMenuEntry(tmp_menu, PSF_NOTHING_TODO);
	};
	
	if (num_comp > 1) {
		set_PSF_component_name(num_comp,ic_psf,id_coord,tmp_menu); 
		glutAddSubMenu(tmp_menu, glut_menu_id->ichoose_comp_menu);
	};
	
	glut_PSF_draw_menu();

	if(iflag_solid > 0){glutAddSubMenu("Surface  color", glut_menu_id->ichoose_psf_patchcolor_menu);};
	if(iflag_grid > 0) {glutAddSubMenu("Line color", glut_menu_id->ichoose_psf_linecolor_menu);};
	
	glut_PSF_range_menu();
	
	glutAddMenuEntry("Close Current PSF data", PSF_OFF);
	
	return;
};