コード例 #1
0
//------------------------------------------------------------------------------
void VisualModelPanel::OnBrowseButton(wxCommandEvent& event)
{
   wxString filename, path;
   // Open up a file dialog
   wxFileDialog fileDialog(this, wxT("Please select a model."), modelPath, wxEmptyString,
      wxT("3DS and POV files (*.3ds;*.pov)|*.3ds;*.pov"), wxOPEN);
   //wxFileDialog fileDialog(this, wxT("Please select a 3ds model."), modelPath, wxEmptyString,
      //wxT("3DS files (*.3ds)|*.3ds"), wxOPEN);
   // If it succeeded...
   if (fileDialog.ShowModal() == wxID_OK)
   {
      // Load the model indicated by the path
      filename = fileDialog.GetFilename();
      path = fileDialog.GetPath();
      modelCanvas->LoadModel(path);
      currentSpacecraft->modelFile = path;
      // Reset all of the sliders
      ResetSliders();
      dataChanged = true;
      theScPanel->EnableUpdate(true);
      // Set the textctrl to display the selected filename
      modelTextCtrl->ChangeValue(filename);
	  dataChanged = true;
	  theScPanel->EnableUpdate(true);
	  ToggleInterface(true);
   }
}
コード例 #2
0
ファイル: ctrlpanel_cb.c プロジェクト: sanbee/capps
/*
   Reset the bounds of the 2 axis to that allowed by the plotted
   data.  First reset the bounds in the XPLOT object and then
   reset the sliders (which talk to XYPLOT object to get the bounds).
*/
void Reset_cb(FL_OBJECT *ob, long data)
{
  int i;
  for (i=0;i<GlobalNoOfOverlays;i++)
    fl_set_xyplot_xbounds(CHART[i],0,0);
  /*  fl_set_xyplot_ybounds(CHART[0],0,0);*/
  ResetSliders();
}