Esempio n. 1
0
void glut_fline_color_comp_select() {
	int i;
	char tmp_menu[1024];
	int if_fline = send_if_draw_fline();
	int ic_fline = send_ic_draw_fline();
	int ndir = send_ncomp_fline(if_fline);
	
	for ( i = 0; i< ndir; i++) {
		if( i != ic_fline){
			sprintf(tmp_menu, "component: %d", (i+1) ); 
			/*puts(tmp_menu); */
			glutAddMenuEntry(tmp_menu,i);
		};
	};
	glutAddMenuEntry("magnitude \n",ndir);
	
	return;
};
Esempio n. 2
0
static void make_2nd_level_fline_menu(){
	char tmp_menu[1024];
	
	int num_fld =  send_nfield_fline();
	int if_fline = send_if_draw_fline();
	int ic_fline = send_ic_draw_fline();
	int num_comp = send_ncomp_fline(if_fline);
	int itype_fline = send_fline_type_flag();
	
	glut_menu_id->fline_root_menu = glutCreateMenu(fline_handler);
	
	send_fline_data_name(tmp_menu, if_fline);
	if(num_fld > 1){
		glutAddSubMenu(tmp_menu, glut_menu_id->ichoose_fline_c_menu);
	} else {
		glutAddMenuEntry(tmp_menu, PSF_NOTHING_TODO);
	};
	
	if (num_comp > 1) {
		sprintf(tmp_menu, "Current component: %d", (ic_fline+1) ); 
		glutAddSubMenu(tmp_menu, glut_menu_id->ichoose_comp_menu);
	};
	
	glutAddSubMenu("Line color type", glut_menu_id->ichoose_fline_col_type_menu);

	if (itype_fline == IFLAG_PIPE) {
		glutAddMenuEntry("Draw lines",          ISET_FLINE_TYPE);
	} else {
		glutAddMenuEntry("Draw tubes",          ISET_FLINE_TYPE);
	}

	
	glutAddMenuEntry("Set line thickness",     ISET_FLINE_THICK);
	glutAddMenuEntry("Set range",     ISET_RANGE);
	
	glutAddMenuEntry("Delete Fieldline data",   FLINE_OFF);
	
	return;
};