void GLUI_RadioGroup::draw_group( int translate ) { GLUI_DRAWINGSENTINAL_IDIOM GLUI_RadioButton *button; this->int_val = int_val; glMatrixMode(GL_MODELVIEW ); button = (GLUI_RadioButton*) first_child(); while( button != NULL ) { glPushMatrix(); if (translate) { button->translate_to_origin(); } else { glTranslatef(button->x_abs-x_abs, button->y_abs-y_abs,0.0); } if ( button->int_val ) button->draw_checked(); else button->draw_unchecked(); glPopMatrix(); button = (GLUI_RadioButton*) button->next(); } }
void GLUI_RadioGroup::draw_group( int translate ) { GLUI_RadioButton *button; int state, orig; if ( NOT can_draw() ) return; orig = set_to_glut_window(); if ( translate ) state = glui->set_front_draw_buffer(); this->int_val = int_val; glMatrixMode(GL_MODELVIEW ); button = (GLUI_RadioButton*) first_child(); while( button != NULL ) { if ( translate ) { glPushMatrix(); button->translate_to_origin(); } if ( button->int_val ) button->draw_checked(); else button->draw_unchecked(); if ( translate ) glPopMatrix(); button = (GLUI_RadioButton*) button->next(); } if ( translate ) glui->restore_draw_buffer(state); restore_window(orig); }