void SettingsPanel::onCheckBoxLaserOutput( Gwen::Controls::Base* pControl ){ Gwen::Controls::CheckBox* pCheckBox = ( Gwen::Controls::CheckBox* ) pControl; string controlName = pControl->GetName().c_str(); if (controlName.compare("Draw Lines") == 0){ mIldaFrame->params.draw.lines = pCheckBox->IsChecked() == 1; // console() << "mIldaFrame->params.draw.lines : " << mIldaFrame->params.draw.lines << std::endl; } else if (controlName.compare("Show Frame") == 0){ mLaserPreview3D->paramsView.showFrame = pCheckBox->IsChecked() == 1; } else if (controlName.compare("Draw Points") == 0){ mIldaFrame->params.draw.points = pCheckBox->IsChecked() == 1; } else if (controlName.compare("Show Dots on Gauze") == 0){ mLaserPreview3D->paramsView.showDotsOnGauze = pCheckBox->IsChecked() == 1; } else if (controlName.compare("Show Lines on Gauze") == 0){ mLaserPreview3D->paramsView.showLinesOnGauze = pCheckBox->IsChecked() == 1; } else if (controlName.compare("Show Rays") == 0){ mLaserPreview3D->paramsView.showRays = pCheckBox->IsChecked() == 1; } else if (controlName.compare("Show Fans") == 0){ mLaserPreview3D->paramsView.showFans = pCheckBox->IsChecked() == 1; } }
GWEN_CONTROL_INLINE( Checkbox, GUnit ) { Gwen::Controls::CheckBox* check = new Gwen::Controls::CheckBox( this ); check->SetPos( 10, 10 ); check->onChecked.Add( this, &Checkbox::OnChecked ); check->onUnChecked.Add( this, &Checkbox::OnUnchecked ); check->onCheckChanged.Add( this, &Checkbox::OnCheckChanged ); Gwen::Controls::CheckBoxWithLabel* labeled = new Gwen::Controls::CheckBoxWithLabel( this ); labeled->SetPos( 10, 10 ); labeled->Label()->SetText( "Labeled CheckBox" ); labeled->Checkbox()->onChecked.Add( this, &Checkbox::OnChecked ); labeled->Checkbox()->onUnChecked.Add( this, &Checkbox::OnUnchecked ); labeled->Checkbox()->onCheckChanged.Add( this, &Checkbox::OnCheckChanged ); Gwen::Align::PlaceBelow( labeled, check, 10 ); }
GWEN_CONTROL_INLINE( Checkbox, GUnit ) { Gwen::Controls::CheckBox* check = new Gwen::Controls::CheckBox( this ); check->SetPos( 10, 10 ); check->onChecked.Add( this, &Checkbox::OnChecked ); check->onUnChecked.Add( this, &Checkbox::OnUnchecked ); check->onCheckChanged.Add( this, &Checkbox::OnCheckChanged ); Gwen::Controls::CheckBoxWithLabel* labeled = new Gwen::Controls::CheckBoxWithLabel( this ); labeled->SetPos( 10, 30 ); labeled->Label()->SetText( "Labeled CheckBox" ); labeled->Checkbox()->onChecked.Add( this, &Checkbox::OnChecked ); labeled->Checkbox()->onUnChecked.Add( this, &Checkbox::OnUnchecked ); labeled->Checkbox()->onCheckChanged.Add( this, &Checkbox::OnCheckChanged ); { Gwen::Controls::CheckBox* check = new Gwen::Controls::CheckBox( this ); check->SetPos( 10, 54 ); check->SetDisabled( true ); } }
void OnCheckChangedStiffnessWarping (Gwen::Controls::Base* pControl) { Gwen::Controls::CheckBox* labeled = (Gwen::Controls::CheckBox* )pControl; bool checked = labeled->IsChecked(); //m_app->m_stiffness_warp_on = checked; }