コード例 #1
0
ファイル: p3duibalgstd.cpp プロジェクト: hinike/ngplant
void               P3DBranchingAlgStdPanel::OnMaxNumberChanged
                                      (wxSpinSliderEvent  &event)
 {
  unsigned int OldMinNumber = Alg->GetMinNumber();
  unsigned int OldMaxNumber = Alg->GetMaxNumber();
  unsigned int NewMaxNumber = event.GetIntValue();
  bool         LimitEnabled = Alg->IsMaxLimitEnabled();
  unsigned int NewMinNumber;

  if (OldMinNumber > NewMaxNumber)
   {
    NewMinNumber = NewMaxNumber;

    wxSpinSliderCtrl *SpinSlider = (wxSpinSliderCtrl*)FindWindow(wxID_MIN_NUMBER_CTRL);

    if (SpinSlider != NULL)
     {
      SpinSlider->SetValue(NewMinNumber);
     }
   }
  else
   {
    NewMinNumber = OldMinNumber;
   }

  P3DApp::GetApp()->ExecEditCmd
   (new P3DBAlgStdMinMaxNumberEditCmd
         (Alg,
          NewMinNumber,NewMaxNumber,LimitEnabled,
          OldMinNumber,OldMaxNumber,LimitEnabled));
 }
コード例 #2
0
void               P3DBranchingAlgWingsPanel::OnRotAngleChanged
                                      (wxSpinSliderEvent  &event)
 {
  P3DApp::GetApp()->ExecEditCmd
   (new P3DBAlgWingsFloatParamEditCmd
         (Alg,
          P3DMATH_DEG2RAD((float)(event.GetIntValue())),
          Alg->GetRotationAngle(),
          &P3DBranchingAlgWings::SetRotationAngle));
 }
コード例 #3
0
ファイル: p3duibalgstd.cpp プロジェクト: hinike/ngplant
void               P3DBranchingAlgStdPanel::OnStartRevAngleChanged
                                      (wxSpinSliderEvent  &event)
 {
  P3DApp::GetApp()->ExecEditCmd
   (new P3DBAlgStdFloatParamEditCmd
         (Alg,
          P3DMATH_DEG2RAD((float)(event.GetIntValue())),
          Alg->GetStartRevAngle(),
          &P3DBranchingAlgStd::SetStartRevAngle));
 }
コード例 #4
0
ファイル: p3duibalgstd.cpp プロジェクト: hinike/ngplant
void               P3DBranchingAlgStdPanel::OnMultiplicityChanged
                                      (wxSpinSliderEvent  &event)
 {
  P3DApp::GetApp()->ExecEditCmd
   (new P3DBAlgStdUIntParamEditCmd
         (Alg,
          event.GetIntValue(),
          Alg->GetMultiplicity(),
          &P3DBranchingAlgStd::SetMultiplicity));
 }
コード例 #5
0
void               P3DStemTubePanel::OnProfileResolutionChanged
                                      (wxSpinSliderEvent  &event)
 {
  P3DApp::GetApp()->ExecEditCmd
   (new P3DStemTubeUIntParamEditCmd
         (model,
          event.GetIntValue(),
          model->GetProfileResolution(),
          &P3DStemModelTube::SetProfileResolution));
 }
コード例 #6
0
void               P3DOptGeneralPanel::OnSeedChanged
                                      (wxSpinSliderEvent  &event)
 {
  P3DApp::GetApp()->ExecEditCmd(new P3DEditCmdChangeModelSeed(event.GetIntValue()));
 }