Example #1
0
//------------------------------------------------------------------------------
// void Create()
//------------------------------------------------------------------------------
void GmatColorPanel::Create()
{
   // get the config object
   wxConfigBase *pConfig = wxConfigBase::Get();
   // SetPath() understands ".."
   pConfig->SetPath(wxT("/SpacePoint Colors"));
   
   Integer bsize = 2; // border size
   
   // Add override color CheckBox
   mOverrideOrbitColorCheckBox =
      new wxCheckBox(this, ID_CHECKBOX, wxT("Override Color For This Segment"),
                     wxDefaultPosition, wxSize(-1, -1), bsize);
   
   // Add orbit and target color button
   mOrbitColorLabel =
      new wxStaticText(this, -1, wxT("Orbit Color"),
                       wxDefaultPosition, wxSize(-1,-1), wxALIGN_CENTRE);
   mOrbitColorCtrl =
      new wxColourPickerCtrl(this, ID_COLOR_CTRL, *wxRED,
                             wxDefaultPosition, wxDefaultSize, 0);
   mTargetColorLabel =
      new wxStaticText(this, -1, wxT("Target Color"),
                       wxDefaultPosition, wxSize(-1,-1), wxALIGN_CENTRE);   
   wxColour targColor = wxTheColourDatabase->Find("STEEL BLUE");
   mTargetColorCtrl =
      new wxColourPickerCtrl(this, ID_COLOR_CTRL, targColor,
                             wxDefaultPosition, wxDefaultSize, 0);
   
   wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxHORIZONTAL);
   colorBoxSizer->Add(mOverrideOrbitColorCheckBox, 0, wxALIGN_CENTER, bsize);
   colorBoxSizer->Add(20, 20);
   colorBoxSizer->Add(mOrbitColorLabel, 0, wxALIGN_CENTER, bsize);
   colorBoxSizer->Add(mOrbitColorCtrl, 0, wxALIGN_CENTER, bsize);
   colorBoxSizer->Add(20, 20);
   colorBoxSizer->Add(mTargetColorLabel, 0, wxALIGN_CENTER, bsize);
   colorBoxSizer->Add(mTargetColorCtrl, 0, wxALIGN_CENTER, bsize);
   
   // To center color buttons, use wxFlexGridSizer
   wxFlexGridSizer *colorFlexSizer = new wxFlexGridSizer(3);
   colorFlexSizer->Add(20, 20);
   colorFlexSizer->Add(colorBoxSizer, 0, wxGROW | wxALIGN_CENTER, 0);
   colorFlexSizer->Add(20,20);
   
   GmatStaticBoxSizer *colorSizer = new GmatStaticBoxSizer(wxVERTICAL, this, "Colors");
   colorSizer->Add(colorFlexSizer, 0, wxALIGN_CENTER, 0);
   
   // Sizer for the page
   wxBoxSizer *pageSizer = new wxBoxSizer(wxVERTICAL);
   pageSizer->Add(colorSizer, 0, wxGROW | wxALIGN_CENTER, bsize);
   this->SetAutoLayout( true );  
   this->SetSizer( pageSizer );
}    
Example #2
0
//------------------------------------------------------------------------------
CompareReportPanel::CompareReportPanel(wxWindow *parent, const wxString &name)
    : wxPanel(parent)
{
   mName = name;
   
   int borderSize = 3;
   
   // create the text ctrl
   mTextCtrl = new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                              wxDefaultPosition, wxDefaultSize,
                              wxTE_DONTWRAP | wxTE_READONLY | wxTE_MULTILINE);
   
   // set font
   mTextCtrl->SetFont( GmatAppData::Instance()->GetFont() );
   
   // create bottom buttons
   theCloseButton =
      new wxButton(this, ID_BUTTON_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0);
   
   // adds the buttons to button sizer
   wxBoxSizer *theButtonSizer = new wxBoxSizer(wxHORIZONTAL);
   theButtonSizer->Add(theCloseButton, 0, wxALIGN_CENTER | wxALL, borderSize);
   
   GmatStaticBoxSizer *theBottomSizer = new GmatStaticBoxSizer(wxVERTICAL, this, wxT(""));
//   wxStaticBoxSizer *theBottomSizer = new wxStaticBoxSizer(wxVERTICAL, this, "");
   theBottomSizer->Add(theButtonSizer, 0, wxALIGN_CENTER | wxALL, borderSize);
   
   wxBoxSizer *thePanelSizer = new wxBoxSizer(wxVERTICAL);
   thePanelSizer->Add(mTextCtrl, 1, wxGROW | wxALL, 1);
   thePanelSizer->Add(theBottomSizer, 0, wxGROW | wxALL, 1);
   
   // tells the enclosing window to adjust to the size of the sizer
   SetAutoLayout( TRUE );
   SetSizer(thePanelSizer); //use the sizer for layout
   thePanelSizer->Fit(this);
   thePanelSizer->SetSizeHints(this); //set size hints to honour minimum size
}
Example #3
0
//------------------------------------------------------------------------------
void BarycenterPanel::Create()
{
   int borderSize = 2;
   //causing VC++ error => wxString emptyList[] = {};
   wxArrayString emptyList;
   
   // 1. Create Add, Remove, Clear buttons box:
   wxBoxSizer *buttonsBoxSizer = new wxBoxSizer(wxVERTICAL);
   addBodyButton = new wxButton( this, ID_BUTTON, wxT("->"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
   removeBodyButton = new wxButton( this, ID_BUTTON, wxT("<-"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
   clearBodyButton = new wxButton( this, ID_BUTTON, wxT("<="), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
   buttonsBoxSizer->Add(addBodyButton, 0, wxALIGN_CENTER|wxALL, borderSize);
   buttonsBoxSizer->Add(removeBodyButton, 0, wxALIGN_CENTER|wxALL, borderSize);
   buttonsBoxSizer->Add(clearBodyButton, 0, wxALIGN_CENTER|wxALL, borderSize);
   
   // 2. Create Available Bodies box:
   GmatStaticBoxSizer* listStaticBoxSizer = new GmatStaticBoxSizer(wxHORIZONTAL, this, "Available Bodies");
   wxArrayString tmpArrayString;
   bodyListBox = theGuiManager->GetCelestialBodyListBox(this, -1, wxSize(180, 200), &mExcludedCelesBodyList);
   listStaticBoxSizer->Add(bodyListBox, 0, wxALIGN_CENTRE|wxALL, borderSize);
   
   // 3. Create Selected Bodies box:
   GmatStaticBoxSizer* selectedStaticBoxSizer = new GmatStaticBoxSizer(wxHORIZONTAL, this, "Selected Bodies");
   bodySelectedListBox = new wxListBox(this, ID_BODY_SEL_LISTBOX, wxDefaultPosition, wxSize(180, 200), //0,
                                       emptyList, wxLB_SINGLE);
   selectedStaticBoxSizer->Add(bodySelectedListBox, 0, wxALIGN_CENTRE|wxALL, borderSize);
   
   // 4. Create Bodies box:
   wxFlexGridSizer *bodyGridSizer = new wxFlexGridSizer(3, 0, 0);
   bodyGridSizer->Add(listStaticBoxSizer, 0, wxALIGN_CENTER|wxALL, borderSize);
   bodyGridSizer->Add(buttonsBoxSizer, 0, wxALIGN_CENTER|wxALL, borderSize);
   bodyGridSizer->Add(selectedStaticBoxSizer, 0, wxALIGN_CENTER|wxALL, borderSize);
   GmatStaticBoxSizer * bodiesStaticBoxSizer = new GmatStaticBoxSizer(wxVERTICAL, this, "Bodies");
   bodiesStaticBoxSizer->Add(bodyGridSizer, 0, wxALIGN_CENTER|wxALL, borderSize);
   
   // 5. Create color panel
   theColorPanel = new GmatColorPanel(this, this, theClonedBarycenter);
   
   // 6. Add to parent sizer:
   theMiddleSizer->Add(bodiesStaticBoxSizer, 0, wxEXPAND|wxALL, borderSize);
   theMiddleSizer->Add(theColorPanel, 0, wxEXPAND|wxALL, borderSize);
}
Example #4
0
//------------------------------------------------------------------------------
// virtual void Create()
//------------------------------------------------------------------------------
void DragInputsDialog::Create()
{
   int bsize = 3; // border size
   
   //-----------------------------------------------------------------
   // user input
   //-----------------------------------------------------------------
   
   solarFluxStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Solar Flux"),
                       wxDefaultPosition, wxDefaultSize, 0);
   solarFluxTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                     wxDefaultPosition, wxSize(150,-1), 0);
   avgSolarFluxStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Average Solar Flux"),
                       wxDefaultPosition, wxDefaultSize, 0);
   avgSolarFluxTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                      wxDefaultPosition, wxSize(150,-1), 0);
   geomagneticIndexStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Geomagnetic Index (Kp)"),
                       wxDefaultPosition, wxDefaultSize, 0);
   historicIndexStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Historic/Near Term"),
                       wxDefaultPosition, wxDefaultSize, 0);
   predictedIndexStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Long-Term Predict"),
                       wxDefaultPosition, wxDefaultSize, 0);
   cssiSpaceWeatherStaticText =
      new wxStaticText(this, ID_TEXT, wxT("CSSISpaceWeatherFile"),
                       wxDefaultPosition, wxDefaultSize, 0);
   schattenFileStaticText =
      new wxStaticText(this, ID_TEXT, wxT("SchattenFile"),
                       wxDefaultPosition, wxDefaultSize, 0);
   schattenErrorStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Schatten Error Model"),
                       wxDefaultPosition, wxDefaultSize, 0);
   schattenTimingStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Schatten Timing Model"),
                       wxDefaultPosition, wxDefaultSize, 0);
   geomagneticIndexTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                     wxDefaultPosition, wxSize(150,-1), 0);
  
   cssiFileTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL_CSSI, wxT(""),
                     wxDefaultPosition, wxSize(150,-1), wxTE_READONLY);
   schattenFileTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL_SCHATTEN, wxT(""),
                     wxDefaultPosition, wxSize(150,-1), wxTE_READONLY);
  
   wxBitmap openBitmap = wxBitmap(OpenFolder_xpm);

   // define dropdowns data for file inputs
   historicInputsArray.Add("ConstantFluxAndGeoMag");
   historicInputsArray.Add("CSSISpaceWeatherFile");
   predictedInputsArray.Add("ConstantFluxAndGeoMag");

   // Turned off for R2015a
//   predictedInputsArray.Add("CSSISpaceWeatherFile");
   predictedInputsArray.Add("SchattenFile");
   schattentimingArray.Add("NominalCycle");
   schattentimingArray.Add("EarlyCycle");
   schattentimingArray.Add("LateCycle");
   schattenErrorArray.Add("Nominal");
   schattenErrorArray.Add("PlusTwoSigma");
   schattenErrorArray.Add("MinusTwoSigma");

   #if __WXMAC__
     int buttonWidth = 40;
   #else
     int buttonWidth = 25;
   #endif
       
   //-----------------------------------------------------------------
   // add to sizer
   //-----------------------------------------------------------------

   // add comobo box to hold model types
   predictedFileComboBox = new wxComboBox( this, ID_MODEL, predictedInputsArray[0], wxDefaultPosition,
                                          wxDefaultSize, predictedInputsArray, wxCB_DROPDOWN|wxCB_READONLY);

   historicFileComboBox = new wxComboBox( this, ID_MODEL, historicInputsArray[0], wxDefaultPosition,
                                          wxDefaultSize, historicInputsArray, wxCB_DROPDOWN|wxCB_READONLY);
   // Model Selection 
   wxFlexGridSizer *modelFileInputFlexGridSizer = new wxFlexGridSizer(2, 1, 0);
   modelFileInputFlexGridSizer->Add(historicIndexStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   modelFileInputFlexGridSizer->Add(historicFileComboBox, 0, wxALIGN_LEFT|wxALL, bsize);
   modelFileInputFlexGridSizer->Add(predictedIndexStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   modelFileInputFlexGridSizer->Add(predictedFileComboBox, 0, wxALIGN_LEFT|wxALL, bsize);
   
   // Data and File selection
   wxFlexGridSizer * dataFilesSizer = new wxFlexGridSizer(2, 3, 0, 0);
   schattenErrorComboBox = new wxComboBox( this, ID_ERROR_SCHATTEN, schattenErrorArray[0], wxDefaultPosition,
                                          wxDefaultSize, schattenErrorArray, wxCB_DROPDOWN|wxCB_READONLY);
   
   wxSize ecbSize(schattenErrorComboBox->GetSize());
   schattenTimingComboBox = new wxComboBox(this, ID_TIMING_SCHATTEN, schattentimingArray[0], wxDefaultPosition,
                                           ecbSize/*wxDefaultSize*/, schattentimingArray, wxCB_DROPDOWN | wxCB_READONLY);
   cssiFileButton = new wxBitmapButton(this, ID_BUTTON_CSSI, openBitmap, wxDefaultPosition, wxSize(buttonWidth, -1));
   schattenFileButton = new wxBitmapButton(this, ID_BUTTON_SCHATTEN, openBitmap, wxDefaultPosition, wxSize(buttonWidth, -1));
   dataFilesSizer->Add(cssiSpaceWeatherStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   dataFilesSizer->Add(cssiFileTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   dataFilesSizer->Add(cssiFileButton, 0, wxALIGN_CENTER|wxALL, bsize);
   dataFilesSizer->Add(schattenFileStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   dataFilesSizer->Add(schattenFileTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   dataFilesSizer->Add(schattenFileButton, 0, wxALIGN_CENTER|wxALL, bsize);

   // constant value stuff
   wxFlexGridSizer *userConstantInputFlexGridSizer = new wxFlexGridSizer(10, 2, 0, 0);
   userConstantInputFlexGridSizer->Add(solarFluxStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   userConstantInputFlexGridSizer->Add(solarFluxTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   userConstantInputFlexGridSizer->Add(avgSolarFluxStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   userConstantInputFlexGridSizer->Add(avgSolarFluxTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   userConstantInputFlexGridSizer->Add(geomagneticIndexStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   userConstantInputFlexGridSizer->Add(geomagneticIndexTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   userConstantInputFlexGridSizer->Add(schattenErrorStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   userConstantInputFlexGridSizer->Add(schattenErrorComboBox, 0, wxALIGN_LEFT|wxALL, bsize);
   userConstantInputFlexGridSizer->Add(schattenTimingStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   userConstantInputFlexGridSizer->Add(schattenTimingComboBox, 0, wxALIGN_LEFT|wxALL, bsize);

   // static boxes to place the data within the main page
   GmatStaticBoxSizer *fileModelInputGroup = new GmatStaticBoxSizer(wxVERTICAL, this, "Model Selection");
   GmatStaticBoxSizer *dataFileInputGroup = new GmatStaticBoxSizer(wxVERTICAL, this, "Files");
   GmatStaticBoxSizer *constantInputGroup = new GmatStaticBoxSizer(wxVERTICAL, this,"Model Configuration");

   // add combo boxes, file input, and constants input fields
   fileModelInputGroup->Add(modelFileInputFlexGridSizer, 0, wxALIGN_LEFT|wxALL, bsize);
   dataFileInputGroup->Add(dataFilesSizer, 0, wxALIGN_LEFT|wxALL, bsize);
   constantInputGroup->Add(userConstantInputFlexGridSizer, 0, wxALIGN_LEFT|wxALL, bsize);
   
   // add all data to the main page 
   wxBoxSizer *mainPageSizer = new wxBoxSizer(wxVERTICAL);
   mainPageSizer->Add(fileModelInputGroup, 0,  wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   mainPageSizer->Add(dataFileInputGroup, 0, wxALIGN_LEFT|wxGROW|wxALL, bsize);
   mainPageSizer->Add(constantInputGroup, 0, wxALIGN_LEFT|wxGROW|wxALL, bsize);
   theMiddleSizer->Add(mainPageSizer, 0, wxALIGN_CENTER|wxALL, bsize);
}
Example #5
0
//------------------------------------------------------------------------------
// void Create()
//------------------------------------------------------------------------------
void BurnThrusterPanel::Create()
{
   #ifdef DEBUG_BURNPANEL_CREATE
   MessageInterface::ShowMessage("BurnThrusterPanel::Create() entered\n");
   #endif

   #if __WXMAC__
   int otherTextWidth = 150;
   #else
   int otherTextWidth = 150;
   #endif

   localObject = NULL;
   
   Integer bsize = 2; // border size
   // get the config object
   wxConfigBase *pConfig = wxConfigBase::Get();
   // SetPath() understands ".."
   pConfig->SetPath(gmatwxT("/Burn Thruster"));
   
   //-----------------------------------------------------------------
   // coordinate system items
   //-----------------------------------------------------------------
   // Coordinate Systems 
   wxStaticText *coordSysLabel =
      new wxStaticText(this, ID_TEXT, gmatwxT(GUI_ACCEL_KEY"Coordinate System"));
   coordSysComboBox  =
      theGuiManager->GetCoordSysComboBox(this, ID_COMBOBOX, wxSize(150,-1));
   coordSysComboBox->SetToolTip(pConfig->Read(_T("CoordinateSystemHint")));
   
   // Addd Local to CoordinateSystem list
   coordSysComboBox->Insert("Local", 0);
   
   // Origin
   originLabel = new wxStaticText(this, ID_TEXT, gmatwxT(GUI_ACCEL_KEY"Origin"));
   originComboBox =
      theGuiManager->GetCelestialBodyComboBox(this, ID_COMBOBOX,
                                              wxSize(150,-1));
   originComboBox->SetToolTip(pConfig->Read(_T("OriginHint")));
   
   // Axes 
   StringArray axesLabels = theObject->GetPropertyEnumStrings("Axes");
   wxArrayString wxAxesLabels = ToWxArrayString(axesLabels);
   
   axisLabel = new wxStaticText(this, ID_TEXT, gmatwxT(GUI_ACCEL_KEY"Axes"));
   
   axesComboBox = 
      new wxComboBox(this, ID_COMBOBOX, gmatwxT(""), wxDefaultPosition, 
                     wxSize(150,-1), wxAxesLabels, wxCB_DROPDOWN|wxCB_READONLY);
   axesComboBox->SetSelection(0);
   axesComboBox->SetToolTip(pConfig->Read(_T("AxesHint")));
   
   //----- Add to sizer
   wxFlexGridSizer *coordSysSizer = new wxFlexGridSizer(3, 0, 0);
   coordSysSizer->Add(coordSysLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   coordSysSizer->Add(coordSysComboBox, 0, wxALIGN_LEFT|wxALL, bsize);
   coordSysSizer->Add(20,20);
   
   coordSysSizer->Add(originLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   coordSysSizer->Add(originComboBox, 0, wxALIGN_LEFT|wxALL, bsize);
   coordSysSizer->Add(20,20);
   
   coordSysSizer->Add(axisLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   coordSysSizer->Add(axesComboBox, 0, wxALIGN_LEFT|wxALL, bsize);
   coordSysSizer->Add(20,20);
   
   GmatStaticBoxSizer *coordSysBoxSizer =
      new GmatStaticBoxSizer(wxVERTICAL, this, "Coordinate System");
   coordSysBoxSizer->Add(coordSysSizer, 0, wxALIGN_CENTER|wxALL, 0);
   
   //-----------------------------------------------------------------
   // thrust vector items
   //-----------------------------------------------------------------
   
   // ThrustDirection1
   XUnitLabel = new wxStaticText(this, ID_TEXT, gmatwxT(""));
   XLabel = new wxStaticText(this, ID_TEXT, gmatwxT("ThrustDirection"GUI_ACCEL_KEY"1"));
   elem1TextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, gmatwxT(""), 
                      wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
   elem1TextCtrl->SetToolTip(pConfig->Read(_T("ThrustDirection1Hint")));
   
   // ThrustDirection2
   YUnitLabel =
      new wxStaticText(this, ID_TEXT, gmatwxT(""));
   YLabel =
      new wxStaticText(this, ID_TEXT, gmatwxT("ThrustDirection"GUI_ACCEL_KEY"2"),
                        wxDefaultPosition,wxDefaultSize, 0);
   elem2TextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, gmatwxT(""), 
                      wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
   elem2TextCtrl->SetToolTip(pConfig->Read(_T("ThrustDirection2Hint")));
   
   // ThrustDirection3
   ZUnitLabel = new wxStaticText(this, ID_TEXT, gmatwxT(""));
   ZLabel = new wxStaticText(this, ID_TEXT, gmatwxT("ThrustDirection"GUI_ACCEL_KEY"3"));
   elem3TextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, gmatwxT(""), 
                     wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
   elem3TextCtrl->SetToolTip(pConfig->Read(_T("ThrustDirection3Hint")));
   
   wxStaticText *dutyCycleLabel = NULL;
   wxStaticText *scaleFactorLabel = NULL;
   
   if (theObject->IsOfType(Gmat::THRUSTER))
   {
      // Thruster Duty Cycle
      dutyCycleLabel =
         new wxStaticText(this, ID_TEXT, gmatwxT("Duty "GUI_ACCEL_KEY"Cycle"));
      dutyCycleTextCtrl =
         new wxTextCtrl(this, ID_TEXTCTRL, gmatwxT(""), 
                        wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
      dutyCycleTextCtrl->SetToolTip(pConfig->Read(_T("DutyCycleHint")));
      
      // Thruster Scale Factor
      scaleFactorLabel =
         new wxStaticText(this, ID_TEXT, gmatwxT("Thrust "GUI_ACCEL_KEY"Scale Factor"));
      scaleFactorTextCtrl =
         new wxTextCtrl(this, ID_TEXTCTRL, gmatwxT(""),
                        wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
      scaleFactorTextCtrl->SetToolTip(pConfig->Read(_T("ThrustScaleFactorHint")));
   }
   
   //----- Add to sizer   
   wxFlexGridSizer *vectorSizer = new wxFlexGridSizer(3, 0, 0);
   vectorSizer->Add(XLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   vectorSizer->Add(elem1TextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   vectorSizer->Add(XUnitLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   
   vectorSizer->Add(YLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   vectorSizer->Add(elem2TextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   vectorSizer->Add(YUnitLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   
   vectorSizer->Add(ZLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   vectorSizer->Add(elem3TextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   vectorSizer->Add(ZUnitLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   
   if (theObject->IsOfType(Gmat::THRUSTER))
   {
      vectorSizer->Add(dutyCycleLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      vectorSizer->Add(dutyCycleTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
      vectorSizer->Add(20,20);
      
      vectorSizer->Add(scaleFactorLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      vectorSizer->Add(scaleFactorTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
      vectorSizer->Add(20,20);
   }
   
   vectorBoxSizer =
      new GmatStaticBoxSizer(wxVERTICAL, this, "Thrust Vector");
   vectorBoxSizer->Add(vectorSizer, 0, wxALIGN_CENTER|wxALL, 0);
   
   //-----------------------------------------------------------------
   // mass change items
   //-----------------------------------------------------------------
   // Decrement mass
   decMassCheckBox =
      new wxCheckBox(this, ID_CHECKBOX, gmatwxT(GUI_ACCEL_KEY"Decrement Mass"),
                     wxDefaultPosition, wxSize(-1, -1), bsize);
   decMassCheckBox->SetToolTip(pConfig->Read(_T("DecrementMassHint")));
   
   //Tank
   tankLabel =
      new wxStaticText(this, ID_TEXT, gmatwxT(GUI_ACCEL_KEY"Tank"));
   tankComboBox =
      theGuiManager->GetFuelTankComboBox(this, ID_COMBOBOX, wxSize(150,-1));
   tankComboBox->SetToolTip(pConfig->Read(_T("TankHint")));
   
   ispLabel = NULL;
   ispTextCtrl = NULL;
   ispUnit = NULL;
   // Isp for ImpulsiveBurn only
   if (theObject->IsOfType(Gmat::IMPULSIVE_BURN))
   {
      ispLabel =
         new wxStaticText(this, ID_TEXT, gmatwxT(GUI_ACCEL_KEY"Isp"));
      ispTextCtrl =
         new wxTextCtrl(this, ID_TEXTCTRL, gmatwxT(""), 
                        wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
      ispTextCtrl->SetToolTip(pConfig->Read(_T("IspHint")));
      ispUnit =
         new wxStaticText(this, ID_TEXT, gmatwxT(" s"));
   }
   
   // Gravitational Acceleration
   gravityAccelLabel =
      new wxStaticText(this, ID_TEXT, gmatwxT(GUI_ACCEL_KEY"GravitationalAccel"));
   gravityAccelTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, gmatwxT(""), 
                     wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
   gravityAccelTextCtrl->SetToolTip(pConfig->Read(_T("GravitationalAccelHint")));
   gravityAccelUnit =
      new wxStaticText(this, ID_TEXT, gmatwxT(" m/s^2"));
   
   // Coefficients for Thruster only
   if (theObject->IsOfType(Gmat::THRUSTER))
   {
//      cCoefButton = new wxButton(this, ID_BUTTON, gmatwxT("Edit "GUI_ACCEL_KEY"Thruster Coef."));
//      cCoefButton->SetToolTip(pConfig->Read(_T("EditThrusterCoefficientHint")));
//      kCoefButton = new wxButton(this, ID_BUTTON, gmatwxT("Edit "GUI_ACCEL_KEY"Impulse Coef."));
//      kCoefButton->SetToolTip(pConfig->Read(_T("EditImpulseCoefficientHint")));
      configButton = new wxButton(this, ID_BUTTON, gmatwxT(""GUI_ACCEL_KEY"Configure Polynomials"));
      configButton->SetToolTip(pConfig->Read(_T("ConfigPolynomialsHint")));
   }
   
   wxBoxSizer *coefSizer = new wxBoxSizer(wxHORIZONTAL);
   if (theObject->IsOfType(Gmat::THRUSTER))
   {
//      coefSizer->Add(cCoefButton, 0, wxALIGN_CENTER|wxALL, 5);
//      coefSizer->Add(kCoefButton, 0, wxALIGN_CENTER|wxALL, 5);
      coefSizer->Add(configButton, 0, wxALIGN_CENTER|wxALL, 5);  // need anther one here?
   }
   
   //----- Add to sizer   
   wxFlexGridSizer *massSizer = new wxFlexGridSizer(3, 0, 0);
   massSizer->Add(decMassCheckBox, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   massSizer->Add(20,20);
   massSizer->Add(20,20);
   
   massSizer->Add(tankLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   massSizer->Add(tankComboBox, 0, wxALIGN_LEFT|wxALL, bsize);
   massSizer->Add(20,20);
   
   if (theObject->IsOfType(Gmat::IMPULSIVE_BURN))
   {
      massSizer->Add(ispLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      massSizer->Add(ispTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
      massSizer->Add(ispUnit, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   }
   
   massSizer->Add(gravityAccelLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   massSizer->Add(gravityAccelTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   massSizer->Add(gravityAccelUnit, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   
   if (theObject->IsOfType(Gmat::THRUSTER))
   {      
      massSizer->Add(20, 20, 0, wxALIGN_LEFT|wxALL, bsize);
      massSizer->Add(20, 20, 0, wxALIGN_LEFT|wxALL, bsize);
      massSizer->Add(20, 20, 0, wxALIGN_LEFT|wxALL, bsize);
   }
   
   GmatStaticBoxSizer *massBoxSizer =
      new GmatStaticBoxSizer(wxVERTICAL, this, "Mass Change");
   massBoxSizer->Add(massSizer, 0, wxALIGN_CENTER|wxALL, 0);
   
   // Handle ElectricThruster items
   GmatStaticBoxSizer *electricBoxSizer = NULL;
   if (theObject->IsOfType("ElectricThruster"))
   {
      electricBoxSizer = new GmatStaticBoxSizer(wxVERTICAL, this, "Thrust Config.");
      // Thrust Model
      thrustModelTxt =
         new wxStaticText( this, ID_TEXT, gmatwxT("Thrust "GUI_ACCEL_KEY"Model"),
                           wxDefaultPosition, wxDefaultSize, 0);
      StringArray thrustModels = theObject->GetPropertyEnumStrings("ThrustModel");
      Integer numModels = thrustModels.size();
      thrustModelArray = new wxString[numModels];
      for (Integer ii=0; ii<numModels; ii++)
         thrustModelArray[ii] = thrustModels[ii].c_str();

      thrustModelCB =
         new wxComboBox( this, ID_COMBOBOX, gmatwxT(thrustModelArray[0]),
            wxDefaultPosition, wxSize(180,-1), numModels, thrustModelArray,
            wxCB_DROPDOWN|wxCB_READONLY );
      thrustModelCB->SetToolTip(pConfig->Read(_T("ThrustModelHint")));

      // Minimum and Maximum Usable Power
      minPowerTxt =
         new wxStaticText( this, ID_TEXT, gmatwxT("Mi"GUI_ACCEL_KEY"nimum Usable Power"),
                           wxDefaultPosition, wxDefaultSize, 0);
      maxPowerTxt =
         new wxStaticText( this, ID_TEXT, gmatwxT("Ma"GUI_ACCEL_KEY"ximum Usable Power"),
                           wxDefaultPosition, wxDefaultSize, 0);
      minPowerTxtCtrl =
         new wxTextCtrl(this, ID_TEXTCTRL, gmatwxT(""), wxDefaultPosition,
                        wxSize(otherTextWidth,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
      maxPowerTxtCtrl =
         new wxTextCtrl(this, ID_TEXTCTRL, gmatwxT(""), wxDefaultPosition,
                        wxSize(otherTextWidth,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));

      minPowerUnits =
         new wxStaticText(this, ID_TEXT, gmatwxT("kW"), wxDefaultPosition, wxDefaultSize, 0);
      maxPowerUnits =
         new wxStaticText(this, ID_TEXT, gmatwxT("kW"), wxDefaultPosition, wxDefaultSize, 0);

      // Efficiency and ISP and Constant Thrust
      efficiencyTxt =
         new wxStaticText( this, ID_TEXT, gmatwxT(""GUI_ACCEL_KEY"Fixed Efficiency"),
                           wxDefaultPosition, wxDefaultSize, 0);
      ispTxt =
         new wxStaticText( this, ID_TEXT, gmatwxT(""GUI_ACCEL_KEY"Isp"),
                           wxDefaultPosition, wxDefaultSize, 0);
      constantThrustTxt =
         new wxStaticText( this, ID_TEXT, gmatwxT(""GUI_ACCEL_KEY"Constant Thrust"),
                           wxDefaultPosition, wxDefaultSize, 0);
      efficiencyTxtCtrl =
         new wxTextCtrl(this, ID_TEXTCTRL, gmatwxT(""), wxDefaultPosition,
                        wxSize(otherTextWidth,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
      ispTxtCtrl =
         new wxTextCtrl(this, ID_TEXTCTRL, gmatwxT(""), wxDefaultPosition,
                        wxSize(otherTextWidth,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
      constantThrustTxtCtrl =
         new wxTextCtrl(this, ID_TEXTCTRL, gmatwxT(""), wxDefaultPosition,
                        wxSize(otherTextWidth,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));

      efficiencyUnits =
         new wxStaticText(this, ID_TEXT, gmatwxT(""), wxDefaultPosition, wxDefaultSize, 0);
      ispUnits =
         new wxStaticText(this, ID_TEXT, gmatwxT("s"), wxDefaultPosition, wxDefaultSize, 0);
      constantThrustUnits =
         new wxStaticText(this, ID_TEXT, gmatwxT("N"), wxDefaultPosition, wxDefaultSize, 0);

      wxFlexGridSizer *electricSizer = new wxFlexGridSizer(3, 0, 0);
      electricSizer->Add(thrustModelTxt, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(thrustModelCB, 0, wxALIGN_LEFT|wxALL, bsize);
      electricSizer->Add(20,20);
      electricSizer->Add(minPowerTxt, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(minPowerTxtCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(minPowerUnits, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(maxPowerTxt, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(maxPowerTxtCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(maxPowerUnits, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(efficiencyTxt, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(efficiencyTxtCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(efficiencyUnits, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(ispTxt, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(ispTxtCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(ispUnits, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(constantThrustTxt, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(constantThrustTxtCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      electricSizer->Add(constantThrustUnits, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);

      electricBoxSizer->Add(electricSizer, 0, wxALIGN_CENTER|wxALL, 0);
   }

   //-----------------------------------------------------------------
   // add to page sizer
   //-----------------------------------------------------------------
   wxBoxSizer *pageSizer = new wxBoxSizer(wxVERTICAL);
   pageSizer->Add(coordSysBoxSizer, 0, wxALIGN_CENTER|wxGROW|wxALL, bsize);
   pageSizer->Add(vectorBoxSizer, 0, wxALIGN_CENTER|wxGROW|wxALL, bsize);
   pageSizer->Add(massBoxSizer, 0, wxALIGN_CENTER|wxGROW|wxALL, bsize);
   
   if (theObject->IsOfType(Gmat::THRUSTER))
   {
      if (theObject->IsOfType("ElectricThruster"))
      {
         pageSizer->Add(electricBoxSizer, 0, wxALIGN_CENTER|wxALL, bsize);
      }
      pageSizer->Add(coefSizer, 0, wxALIGN_CENTER|wxALL, bsize);
   }
   
   theMiddleSizer->Add(pageSizer, 0, wxALIGN_CENTRE|wxALL, bsize);
   
   #ifdef DEBUG_BURNPANEL_CREATE
   MessageInterface::ShowMessage("BurnThrusterPanel::Create() exiting\n");
   #endif
}
Example #6
0
//------------------------------------------------------------------------------
void BallisticsMassPanel::Create()
{
   // get the config object
   wxConfigBase *pConfig = wxConfigBase::Get();
   // SetPath() understands ".."
   pConfig->SetPath(wxT("/Spacecraft Ballistic Mass"));

    wxStaticText *emptyText = new wxStaticText( this, ID_TEXT,
                            wxT(""),
                            wxDefaultPosition, wxDefaultSize, 0 );

    wxStaticBox *item1 = new wxStaticBox( this, -1, wxT("") );
    wxStaticBoxSizer *item0 = new wxStaticBoxSizer( item1, wxVERTICAL );
    GmatStaticBoxSizer *optionsSizer = new GmatStaticBoxSizer( wxVERTICAL, this, wxT("Options") );
    item0->Add(optionsSizer, 1, wxALIGN_LEFT|wxGROW);
    wxFlexGridSizer *item2 = new wxFlexGridSizer( 3, 0, 0 );
    item2->AddGrowableCol(1);

    wxStaticText *dryMassStaticText = new wxStaticText( this, ID_TEXT, 
                            wxT("Dry ") wxT(GUI_ACCEL_KEY) wxT("Mass"), 
                            wxDefaultPosition, wxDefaultSize, 0 );
    item2->Add( dryMassStaticText, 0, wxALIGN_LEFT|wxALL, 5 );

    dryMassTextCtrl = new wxTextCtrl( this, ID_TEXTCTRL, wxT(""), 
                            wxDefaultPosition, wxSize(80,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC) );
    dryMassTextCtrl->SetToolTip(pConfig->Read(wxT("DryMassHint")));
    item2->Add( dryMassTextCtrl, 0, wxALIGN_CENTER|wxALL, 5 );

    wxStaticText *dryMassUnitsText = new wxStaticText( this, ID_TEXT,
                            wxT("Kg"),
                            wxDefaultPosition, wxDefaultSize, 0 );
    item2->Add( dryMassUnitsText, 0, wxALIGN_LEFT|wxALL, 5 );

    wxStaticText *dragCoeffStaticText = new wxStaticText( this, ID_TEXT, 
                            wxT("Coefficient of ") wxT(GUI_ACCEL_KEY) wxT("Drag"), wxDefaultPosition, 
                            wxDefaultSize, 0 );
    item2->Add( dragCoeffStaticText, 0, wxALIGN_LEFT|wxALL, 5 );

    dragCoeffTextCtrl = new wxTextCtrl( this, ID_TEXTCTRL, wxT(""), 
                            wxDefaultPosition, wxSize(80,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC) );
    dragCoeffTextCtrl->SetToolTip(pConfig->Read(wxT("DragCoefficientHint")));
    item2->Add( dragCoeffTextCtrl, 0, wxALIGN_CENTER|wxALL, 5 );
    item2->Add( emptyText, 0, wxALIGN_LEFT|wxALL, 5 );

    wxStaticText *reflectCoeffStaticText = new wxStaticText( this, ID_TEXT, 
                            wxT("Coefficient of ") wxT(GUI_ACCEL_KEY) wxT("Reflectivity"), 
                            wxDefaultPosition, wxDefaultSize, 0 );
    item2->Add( reflectCoeffStaticText, 0, wxALIGN_LEFT|wxALL, 5 );

    reflectCoeffTextCtrl = new wxTextCtrl( this, ID_TEXTCTRL, wxT(""), 
                            wxDefaultPosition, wxSize(80,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC) );
    reflectCoeffTextCtrl->SetToolTip(pConfig->Read(wxT("ReflectivityCoefficientHint")));
    item2->Add( reflectCoeffTextCtrl, 0, wxALIGN_CENTER|wxALL, 5 );
    item2->Add( emptyText, 0, wxALIGN_LEFT|wxALL, 5 );

    wxStaticText *dragAreaStaticText = new wxStaticText( this, ID_TEXT, 
                            wxT("Drag ") wxT(GUI_ACCEL_KEY) wxT("Area"), 
                            wxDefaultPosition, wxDefaultSize, 0 );
    item2->Add( dragAreaStaticText, 0, wxALIGN_LEFT|wxALL, 5 );

    dragAreaTextCtrl = new wxTextCtrl( this, ID_TEXTCTRL, wxT(""), 
                            wxDefaultPosition, wxSize(80,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC) );
    dragAreaTextCtrl->SetToolTip(pConfig->Read(wxT("DragAreaHint")));
    item2->Add( dragAreaTextCtrl, 0, wxALIGN_CENTER|wxALL, 5 );
    wxStaticText *dragAreaUnitsText = new wxStaticText( this, ID_TEXT,
                            wxT("m^2"),
                            wxDefaultPosition, wxDefaultSize, 0 );
    item2->Add( dragAreaUnitsText, 0, wxALIGN_LEFT|wxALL, 5 );

    wxStaticText *srpAreaStaticText = new wxStaticText( this, ID_TEXT, 
                            wxT(GUI_ACCEL_KEY) wxT("SRP Area"), 
                            wxDefaultPosition, wxDefaultSize, 0 );
    item2->Add( srpAreaStaticText, 0, wxALIGN_LEFT|wxALL, 5 );

    srpAreaTextCtrl = new wxTextCtrl( this, ID_TEXTCTRL, wxT(""), 
                            wxDefaultPosition, wxSize(80,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC) );
    srpAreaTextCtrl->SetToolTip(pConfig->Read(wxT("SRPAreaHint")));
    item2->Add( srpAreaTextCtrl, 0, wxALIGN_CENTER|wxALL, 5 );
    wxStaticText *srpAreaUnitsText = new wxStaticText( this, ID_TEXT,
                            wxT("m^2"),
                            wxDefaultPosition, wxDefaultSize, 0 );
    item2->Add( srpAreaUnitsText, 0, wxALIGN_LEFT|wxALL, 5 );

    optionsSizer->Add( item2, 0, wxALIGN_LEFT|wxALL, 5 );

    this->SetAutoLayout( TRUE );  
    this->SetSizer( item0 );
    item0->Fit( this );
    item0->SetSizeHints( this );
}
Example #7
0
//------------------------------------------------------------------------------
// void Create()
//------------------------------------------------------------------------------
void BurnThrusterPanel::Create()
{
   #ifdef DEBUG_BURNPANEL_CREATE
   MessageInterface::ShowMessage("BurnThrusterPanel::Create() entered\n");
   #endif
   
   Integer bsize = 2; // border size
   // get the config object
   wxConfigBase *pConfig = wxConfigBase::Get();
   // SetPath() understands ".."
   pConfig->SetPath(wxT("/Burn Thruster"));
   
   //-----------------------------------------------------------------
   // coordinate system items
   //-----------------------------------------------------------------
   // Coordinate Systems 
   wxStaticText *coordSysLabel =
      new wxStaticText(this, ID_TEXT, wxT(GUI_ACCEL_KEY"Coordinate System"));
   coordSysComboBox  =
      theGuiManager->GetCoordSysComboBox(this, ID_COMBOBOX, wxSize(150,-1));
   coordSysComboBox->SetToolTip(pConfig->Read(_T("CoordinateSystemHint")));
   
   // Addd Local to CoordinateSystem list
   coordSysComboBox->Insert("Local", 0);
   
   // Origin
   originLabel = new wxStaticText(this, ID_TEXT, wxT(GUI_ACCEL_KEY"Origin"));
   originComboBox =
      theGuiManager->GetCelestialBodyComboBox(this, ID_COMBOBOX,
                                              wxSize(150,-1));
   originComboBox->SetToolTip(pConfig->Read(_T("OriginHint")));
   
   // Axes 
   StringArray axesLabels = theObject->GetPropertyEnumStrings("Axes");
   wxArrayString wxAxesLabels = ToWxArrayString(axesLabels);
   
   axisLabel = new wxStaticText(this, ID_TEXT, wxT(GUI_ACCEL_KEY"Axes"));
   
   axesComboBox = 
      new wxComboBox(this, ID_COMBOBOX, wxT(""), wxDefaultPosition, 
                     wxSize(150,-1), wxAxesLabels, wxCB_DROPDOWN|wxCB_READONLY);
   axesComboBox->SetSelection(0);
   axesComboBox->SetToolTip(pConfig->Read(_T("AxesHint")));
   
   //----- Add to sizer
   wxFlexGridSizer *coordSysSizer = new wxFlexGridSizer(3, 0, 0);
   coordSysSizer->Add(coordSysLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   coordSysSizer->Add(coordSysComboBox, 0, wxALIGN_LEFT|wxALL, bsize);
   coordSysSizer->Add(20,20);
   
   coordSysSizer->Add(originLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   coordSysSizer->Add(originComboBox, 0, wxALIGN_LEFT|wxALL, bsize);
   coordSysSizer->Add(20,20);
   
   coordSysSizer->Add(axisLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   coordSysSizer->Add(axesComboBox, 0, wxALIGN_LEFT|wxALL, bsize);
   coordSysSizer->Add(20,20);
   
   GmatStaticBoxSizer *coordSysBoxSizer =
      new GmatStaticBoxSizer(wxVERTICAL, this, "Coordinate System");
   coordSysBoxSizer->Add(coordSysSizer, 0, wxALIGN_CENTER|wxALL, 0);
   
   //-----------------------------------------------------------------
   // thrust vector items
   //-----------------------------------------------------------------
   
   // ThrustDirection1
   XUnitLabel = new wxStaticText(this, ID_TEXT, wxT(""));
   XLabel = new wxStaticText(this, ID_TEXT, wxT("ThrustDirection"GUI_ACCEL_KEY"1"));
   elem1TextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                      wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
   elem1TextCtrl->SetToolTip(pConfig->Read(_T("ThrustDirection1Hint")));
   
   // ThrustDirection2
   YUnitLabel =
      new wxStaticText(this, ID_TEXT, wxT(""));
   YLabel =
      new wxStaticText(this, ID_TEXT, wxT("ThrustDirection"GUI_ACCEL_KEY"2"),
                        wxDefaultPosition,wxDefaultSize, 0);
   elem2TextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                      wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
   elem2TextCtrl->SetToolTip(pConfig->Read(_T("ThrustDirection2Hint")));
   
   // ThrustDirection3
   ZUnitLabel = new wxStaticText(this, ID_TEXT, wxT(""));
   ZLabel = new wxStaticText(this, ID_TEXT, wxT("ThrustDirection"GUI_ACCEL_KEY"3"));
   elem3TextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                     wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
   elem3TextCtrl->SetToolTip(pConfig->Read(_T("ThrustDirection3Hint")));
   
   wxStaticText *dutyCycleLabel = NULL;
   wxStaticText *scaleFactorLabel = NULL;
   
   if (theObject->IsOfType(Gmat::THRUSTER))
   {
      // Thruster Duty Cycle
      dutyCycleLabel =
         new wxStaticText(this, ID_TEXT, wxT("Duty "GUI_ACCEL_KEY"Cycle"));
      dutyCycleTextCtrl =
         new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                        wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
      dutyCycleTextCtrl->SetToolTip(pConfig->Read(_T("DutyCycleHint")));
      
      // Thruster Scale Factor
      scaleFactorLabel =
         new wxStaticText(this, ID_TEXT, wxT("Thrust "GUI_ACCEL_KEY"Scale Factor"));
      scaleFactorTextCtrl =
         new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                        wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
      scaleFactorTextCtrl->SetToolTip(pConfig->Read(_T("ThrustScaleFactorHint")));
   }
   
   //----- Add to sizer   
   wxFlexGridSizer *vectorSizer = new wxFlexGridSizer(3, 0, 0);
   vectorSizer->Add(XLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   vectorSizer->Add(elem1TextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   vectorSizer->Add(XUnitLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   
   vectorSizer->Add(YLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   vectorSizer->Add(elem2TextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   vectorSizer->Add(YUnitLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   
   vectorSizer->Add(ZLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   vectorSizer->Add(elem3TextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   vectorSizer->Add(ZUnitLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   
   if (theObject->IsOfType(Gmat::THRUSTER))
   {
      vectorSizer->Add(dutyCycleLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      vectorSizer->Add(dutyCycleTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
      vectorSizer->Add(20,20);
      
      vectorSizer->Add(scaleFactorLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      vectorSizer->Add(scaleFactorTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
      vectorSizer->Add(20,20);
   }
   
   vectorBoxSizer =
      new GmatStaticBoxSizer(wxVERTICAL, this, "Thrust Vector");
   vectorBoxSizer->Add(vectorSizer, 0, wxALIGN_CENTER|wxALL, 0);
   
   //-----------------------------------------------------------------
   // mass change items
   //-----------------------------------------------------------------
   // Decrement mass
   decMassCheckBox =
      new wxCheckBox(this, ID_CHECKBOX, wxT(GUI_ACCEL_KEY"Decrement Mass"),
                     wxDefaultPosition, wxSize(-1, -1), bsize);
   decMassCheckBox->SetToolTip(pConfig->Read(_T("DecrementMassHint")));
   
   //Tank
   tankLabel =
      new wxStaticText(this, ID_TEXT, wxT(GUI_ACCEL_KEY"Tank"));
   tankComboBox =
      theGuiManager->GetFuelTankComboBox(this, ID_COMBOBOX, wxSize(150,-1));
   tankComboBox->SetToolTip(pConfig->Read(_T("TankHint")));
   
   ispLabel = NULL;
   ispTextCtrl = NULL;
   ispUnit = NULL;
   // Isp for ImpulsiveBurn only
   if (theObject->IsOfType(Gmat::IMPULSIVE_BURN))
   {
      ispLabel =
         new wxStaticText(this, ID_TEXT, wxT(GUI_ACCEL_KEY"Isp"));
      ispTextCtrl =
         new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                        wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
      ispTextCtrl->SetToolTip(pConfig->Read(_T("IspHint")));
      ispUnit =
         new wxStaticText(this, ID_TEXT, wxT(" s"));
   }
   
   // Gravitational Acceleration
   gravityAccelLabel =
      new wxStaticText(this, ID_TEXT, wxT(GUI_ACCEL_KEY"GravitationalAccel"));
   gravityAccelTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                     wxDefaultPosition, wxSize(150,-1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
   gravityAccelTextCtrl->SetToolTip(pConfig->Read(_T("GravitationalAccelHint")));
   gravityAccelUnit =
      new wxStaticText(this, ID_TEXT, wxT(" m/s^2"));
   
   // Coefficients for Thruster only
   if (theObject->IsOfType(Gmat::THRUSTER))
   {
      cCoefButton = new wxButton(this, ID_BUTTON, wxT("Edit "GUI_ACCEL_KEY"Thruster Coef."));
      cCoefButton->SetToolTip(pConfig->Read(_T("EditThrusterCoefficientHint")));
      kCoefButton = new wxButton(this, ID_BUTTON, wxT("Edit "GUI_ACCEL_KEY"Impulse Coef."));
      kCoefButton->SetToolTip(pConfig->Read(_T("EditImpulseCoefficientHint")));
   }
   
   wxBoxSizer *coefSizer = new wxBoxSizer(wxHORIZONTAL);
   if (theObject->IsOfType(Gmat::THRUSTER))
   {
      coefSizer->Add(cCoefButton, 0, wxALIGN_CENTER|wxALL, 5);
      coefSizer->Add(kCoefButton, 0, wxALIGN_CENTER|wxALL, 5);
   }
   
   //----- Add to sizer   
   wxFlexGridSizer *massSizer = new wxFlexGridSizer(3, 0, 0);
   massSizer->Add(decMassCheckBox, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   massSizer->Add(20,20);
   massSizer->Add(20,20);
   
   massSizer->Add(tankLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   massSizer->Add(tankComboBox, 0, wxALIGN_LEFT|wxALL, bsize);
   massSizer->Add(20,20);
   
   if (theObject->IsOfType(Gmat::IMPULSIVE_BURN))
   {
      massSizer->Add(ispLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
      massSizer->Add(ispTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
      massSizer->Add(ispUnit, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   }
   
   massSizer->Add(gravityAccelLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   massSizer->Add(gravityAccelTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   massSizer->Add(gravityAccelUnit, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, bsize);
   
   if (theObject->IsOfType(Gmat::THRUSTER))
   {      
      massSizer->Add(20, 20, 0, wxALIGN_LEFT|wxALL, bsize);
      massSizer->Add(20, 20, 0, wxALIGN_LEFT|wxALL, bsize);
      massSizer->Add(20, 20, 0, wxALIGN_LEFT|wxALL, bsize);
   }
   
   GmatStaticBoxSizer *massBoxSizer =
      new GmatStaticBoxSizer(wxVERTICAL, this, "Mass Change");
   massBoxSizer->Add(massSizer, 0, wxALIGN_CENTER|wxALL, 0);
   
   //-----------------------------------------------------------------
   // add to page sizer
   //-----------------------------------------------------------------
   wxBoxSizer *pageSizer = new wxBoxSizer(wxVERTICAL);
   pageSizer->Add(coordSysBoxSizer, 0, wxALIGN_CENTER|wxGROW|wxALL, bsize);
   pageSizer->Add(vectorBoxSizer, 0, wxALIGN_CENTER|wxGROW|wxALL, bsize);
   pageSizer->Add(massBoxSizer, 0, wxALIGN_CENTER|wxGROW|wxALL, bsize);
   
   if (theObject->IsOfType(Gmat::THRUSTER))
      pageSizer->Add(coefSizer, 0, wxALIGN_CENTER|wxALL, bsize);
   
   theMiddleSizer->Add(pageSizer, 0, wxALIGN_CENTRE|wxALL, bsize);
   
   #ifdef DEBUG_BURNPANEL_CREATE
   MessageInterface::ShowMessage("BurnThrusterPanel::Create() exiting\n");
   #endif
}
Example #8
0
//------------------------------------------------------------------------------
// void Create()
//------------------------------------------------------------------------------
void VaryPanel::Create()
{
   int bsize = 2; // bordersize
   
   // Targeter
   wxStaticText *solverStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Solver"),
                       wxDefaultPosition, wxSize(40, -1), 0);
   
   // Show all user-defined Solvers
   if (inOptimizeCmd)
      mSolverComboBox =
         theGuiManager->GetOptimizerComboBox(this, ID_COMBO, wxSize(180,-1));
   else
      mSolverComboBox =
         theGuiManager->GetBoundarySolverComboBox(this, ID_COMBO, wxSize(180,-1));
   
   // Variable
   wxStaticText *varStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Variable"), 
                       wxDefaultPosition, wxSize(55, -1), 0);
   mVarNameTextCtrl = new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                                     wxDefaultPosition, wxSize(250,-1), 0);
   mViewVarButton = new
      wxButton(this, ID_BUTTON, wxT("Edit"), wxDefaultPosition, wxDefaultSize, 0);
   
   // Initial Value
   wxStaticText *initialStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Initial Value"), 
                       wxDefaultPosition, wxDefaultSize, 0);
   mInitialTextCtrl = new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                                     wxDefaultPosition, wxSize(100,-1), 0);
   
   // Perturbation
   pertStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Perturbation"), 
                       wxDefaultPosition, wxDefaultSize, 0);
   mPertTextCtrl = new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                                  wxDefaultPosition, wxSize(100,-1), 0);
   
   // Lower
   lowerValueStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Lower"), 
                       wxDefaultPosition, wxDefaultSize, 0);
   mLowerValueTextCtrl = new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                                   wxDefaultPosition, wxSize(100,-1), 0);

   // Upper
   upperValueStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Upper"), 
                       wxDefaultPosition, wxDefaultSize, 0);
   mUpperValueTextCtrl = new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                                   wxDefaultPosition, wxSize(100,-1), 0);

   // Max Step
   maxStepStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Max Step"), 
                       wxDefaultPosition, wxDefaultSize, 0);
   mMaxStepTextCtrl = new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                                 wxDefaultPosition, wxSize(100,-1), 0);

   // Additive Scale Factor
   additiveStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Additive Scale Factor"), 
                       wxDefaultPosition, wxDefaultSize, 0);
   mAdditiveTextCtrl = new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                                   wxDefaultPosition, wxSize(100,-1), 0);

   // Multiplicative Scale Factor
   multiplicativeStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Multiplicative Scale Factor"), 
                       wxDefaultPosition, wxDefaultSize, 0);
   mMultiplicativeTextCtrl = new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), 
                                   wxDefaultPosition, wxSize(100,-1), 0);
   
   // wx*Sizers
   wxBoxSizer *panelSizer = new wxBoxSizer(wxVERTICAL);
   GmatStaticBoxSizer *varSetupSizer = new GmatStaticBoxSizer(wxVERTICAL, this, "Variable Setup");
   wxFlexGridSizer *valueGridSizer = new wxFlexGridSizer(6, 0, 0);
   wxBoxSizer *solverBoxSizer = new wxBoxSizer(wxHORIZONTAL);
   wxBoxSizer *variableBoxSizer = new wxBoxSizer(wxHORIZONTAL);
   wxFlexGridSizer *scaleGridSizer = new wxFlexGridSizer(2, 0, 0);
   
   // Add to wx*Sizers
   
   solverBoxSizer->Add(solverStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   solverBoxSizer->Add(mSolverComboBox, 0, wxALIGN_LEFT|wxALL, bsize);
   
   variableBoxSizer->Add(varStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   variableBoxSizer->Add(mVarNameTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   variableBoxSizer->Add(mViewVarButton, 0, wxALIGN_LEFT|wxALL, bsize);
   
   valueGridSizer->Add(40, 20, 0, wxALIGN_LEFT|wxALL, bsize);
   valueGridSizer->Add(initialStaticText, 0, wxALIGN_CENTER|wxALL, bsize);
   valueGridSizer->Add(pertStaticText, 0, wxALIGN_CENTER|wxALL, bsize);
   valueGridSizer->Add(lowerValueStaticText, 0, wxALIGN_CENTER|wxALL, bsize);
   valueGridSizer->Add(upperValueStaticText, 0, wxALIGN_CENTER|wxALL, bsize);
   valueGridSizer->Add(maxStepStaticText, 0, wxALIGN_CENTER|wxALL, bsize);
   
   valueGridSizer->Add(40, 20, 0, wxALIGN_CENTER|wxALL, bsize);
   valueGridSizer->Add(mInitialTextCtrl, 0, wxALIGN_CENTER|wxALL, bsize);
   valueGridSizer->Add(mPertTextCtrl, 0, wxALIGN_CENTER|wxALL, bsize);
   valueGridSizer->Add(mLowerValueTextCtrl, 0, wxALIGN_CENTER|wxALL, bsize);
   valueGridSizer->Add(mUpperValueTextCtrl, 0, wxALIGN_CENTER|wxALL, bsize);
   valueGridSizer->Add(mMaxStepTextCtrl, 0, wxALIGN_CENTER|wxALL, bsize);

   scaleGridSizer->Add(additiveStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   scaleGridSizer->Add(mAdditiveTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   scaleGridSizer->Add(multiplicativeStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   scaleGridSizer->Add(mMultiplicativeTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);

   varSetupSizer->Add(variableBoxSizer, 0, wxALIGN_LEFT|wxALL, bsize);
   varSetupSizer->Add(valueGridSizer, 0, wxALIGN_LEFT|wxALL, bsize);

   panelSizer->Add(solverBoxSizer, 0, wxGROW|wxALIGN_CENTER|wxALL, bsize);
   panelSizer->Add(varSetupSizer, 0, wxGROW|wxALIGN_CENTER|wxALL, bsize);
   panelSizer->Add(scaleGridSizer, 0, wxGROW|wxALIGN_CENTER|wxALL, bsize);

   theMiddleSizer->Add(panelSizer, 0, wxGROW|wxALIGN_CENTER|wxALL, bsize);
}
//------------------------------------------------------------------------------
// virtual void Create()
//------------------------------------------------------------------------------
void RunScriptFolderDialog::Create()
{
   #ifdef DEBUG_RUN_SCRIPT_FOLDER_DIALOG
   MessageInterface::ShowMessage("RunScriptFolderDialog::Create() entered.\n");
   #endif
   
   int bsize = 1;
   
   //------------------------------------------------------
   // save scripts
   //------------------------------------------------------
   mRunFromSavedCheckBox =
      new wxCheckBox(this, ID_CHECKBOX, wxT(" Save scripts to new folder and run from it"),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   wxStaticText *saveScriptsDir =
      new wxStaticText(this, ID_TEXT, wxT("Directory to save scripts:"),
                       wxDefaultPosition, wxDefaultSize, 0);
   
   mSaveScriptsDirTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   mChangeSaveScriptsDirButton =
      new wxButton(this, ID_BUTTON, wxT("Browse"),
                    wxDefaultPosition, wxDefaultSize, 0);
   
   wxBoxSizer *saveScriptsDirSizer = new wxBoxSizer(wxHORIZONTAL);
   saveScriptsDirSizer->Add(saveScriptsDir, 0, wxALIGN_CENTRE|wxALL, bsize);
   saveScriptsDirSizer->Add(mChangeSaveScriptsDirButton, 0, wxALIGN_CENTER|wxALL, bsize);
   
   wxBoxSizer *saveScriptsSizer = new wxBoxSizer(wxVERTICAL);
   saveScriptsSizer->Add(mRunFromSavedCheckBox, 0, wxALIGN_LEFT|wxALL, bsize);
   saveScriptsSizer->Add(saveScriptsDirSizer, 0, wxALIGN_LEFT|wxALL, bsize);
   saveScriptsSizer->Add(mSaveScriptsDirTextCtrl, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   
   //------------------------------------------------------
   // run scripts
   //------------------------------------------------------
   wxStaticText *startingScriptsLabel =
      new wxStaticText(this, ID_TEXT, wxT("Starting script number:"),
                       wxDefaultPosition, wxDefaultSize, 0);
   
   mStartingScriptTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT("1"),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   wxStaticText *numScriptsLabel =
      new wxStaticText(this, ID_TEXT, wxT("Number of scripts to run:"),
                       wxDefaultPosition, wxDefaultSize, 0);
   
   mNumScriptsToRunTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT("1"),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   wxStaticText *filterScriptsLabel =
      new wxStaticText(this, ID_TEXT, wxT("Filter scripts contain:"),
                       wxDefaultPosition, wxDefaultSize, 0);
   
   mFilterStringTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   mExcludeScriptsCheckBox =
      new wxCheckBox(this, ID_CHECKBOX, wxT(" Exclude"),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   wxStaticText *filterScriptsLabel2 =
      new wxStaticText(this, ID_TEXT, wxT("2nd Filter scripts contain:"),
                       wxDefaultPosition, wxDefaultSize, 0);
   
   m2ndFilterStringTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   m2ndExcludeScriptsCheckBox =
      new wxCheckBox(this, ID_CHECKBOX, wxT(" Exclude"),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   wxStaticText *numTimesLabel =
      new wxStaticText(this, ID_TEXT, wxT("Number of times to run each script:"),
                       wxDefaultPosition, wxDefaultSize, 0);
   
   mCreateRunFolderCheckBox =
      new wxCheckBox(this, ID_CHECKBOX, wxT(" Create RUN folder"),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   mNumTimesToRunTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT("1"),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   wxStaticText *currOutDir1 =
      new wxStaticText(this, ID_TEXT, wxT("Current GMAT output directory:"),
                       wxDefaultPosition, wxDefaultSize, 0);
   wxStaticText *currOutDir2 =
      new wxStaticText(this, ID_TEXT, "(ReportFile will use this path if "
                       "it doesn't contain path)",
                       wxDefaultPosition, wxDefaultSize, 0);
   
   mCurrOutDirTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   mChangeCurrOutDirButton =
      new wxButton(this, ID_BUTTON, wxT("Change for this Run"),
                    wxDefaultPosition, wxDefaultSize, 0);
   
   //---------- sizer
   wxFlexGridSizer *runSizer = new wxFlexGridSizer(4, 0, 0);
   runSizer->Add(startingScriptsLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   runSizer->Add(mStartingScriptTextCtrl, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runSizer->Add(5, 20, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runSizer->Add(5, 20, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   
   runSizer->Add(numScriptsLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   runSizer->Add(mNumScriptsToRunTextCtrl, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runSizer->Add(5, 20, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runSizer->Add(5, 20, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   
   runSizer->Add(filterScriptsLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   runSizer->Add(mFilterStringTextCtrl, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runSizer->Add(5, 20, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runSizer->Add(mExcludeScriptsCheckBox, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runSizer->Add(filterScriptsLabel2, 0, wxALIGN_LEFT|wxALL, bsize);
   runSizer->Add(m2ndFilterStringTextCtrl, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runSizer->Add(5, 20, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runSizer->Add(m2ndExcludeScriptsCheckBox, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   
   runSizer->Add(numTimesLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   runSizer->Add(mNumTimesToRunTextCtrl, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runSizer->Add(5, 20, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runSizer->Add(mCreateRunFolderCheckBox, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   
   GmatStaticBoxSizer *runStaticSizer =
      new GmatStaticBoxSizer(wxVERTICAL, this, "Run Scripts");
   
   runStaticSizer->Add(saveScriptsSizer, 0, wxALIGN_LEFT|wxGROW|wxALL, bsize);
   runStaticSizer->Add(20, 3, 0, wxALIGN_LEFT|wxALL, bsize);
   runStaticSizer->Add(runSizer, 0, wxALIGN_LEFT|wxGROW|wxALL, bsize);
   runStaticSizer->Add(currOutDir1, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runStaticSizer->Add(currOutDir2, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runStaticSizer->Add(mCurrOutDirTextCtrl, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   runStaticSizer->Add(mChangeCurrOutDirButton, 0, wxALIGN_CENTER|wxALL, bsize);

   //=================================================================
   #ifdef __ENABLE_COMPARE__
   //=================================================================
   //------------------------------------------------------
   // compare results
   //------------------------------------------------------
   mCompareCheckBox =
      new wxCheckBox(this, ID_CHECKBOX, wxT("Compare results"),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   wxStaticText *tolLabel =
      new wxStaticText(this, ID_TEXT, wxT("Tolerance to be used in flagging:"),
                       wxDefaultPosition, wxDefaultSize, 0);
   
   mAbsTolTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT("1"),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   wxStaticText *replaceLabel =
      new wxStaticText(this, ID_TEXT, wxT("Compare files by replacing \"GMAT\" with:"),
                       wxDefaultPosition, wxDefaultSize, 0);
   
   mReplaceTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(mReplaceString),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   wxStaticText *compDirLabel =
      new wxStaticText(this, ID_TEXT, wxT("Directory to compare:"),
                       wxDefaultPosition, wxDefaultSize, 0);
   
   //---------- sizer
   wxFlexGridSizer *compareSizer = new wxFlexGridSizer(2, 0, 0);
   
   compareSizer->Add(mCompareCheckBox, 0, wxALIGN_LEFT|wxALL, bsize);
   compareSizer->Add(20, 20, 0, wxALIGN_LEFT|wxALL, bsize);
   compareSizer->Add(tolLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   compareSizer->Add(mAbsTolTextCtrl, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   compareSizer->Add(replaceLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   compareSizer->Add(mReplaceTextCtrl, 0, wxALIGN_RIGHT|wxGROW|wxALL, bsize);
   
   mCompareDirTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   mDirBrowseButton =
      new wxButton(this, ID_BUTTON, wxT("Browse"),
                    wxDefaultPosition, wxDefaultSize, 0);
   
   mSaveResultCheckBox =
      new wxCheckBox(this, ID_CHECKBOX, wxT("Save compare results to file"),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   wxStaticText *saveFileLabel =
      new wxStaticText(this, ID_TEXT, wxT("Filename to save:"),
                       wxDefaultPosition, wxDefaultSize, 0);
   
   mSaveFileTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                     wxDefaultPosition, wxDefaultSize, 0);
   
   mSaveBrowseButton =
      new wxButton(this, ID_BUTTON, wxT("Browse"),
                    wxDefaultPosition, wxDefaultSize, 0);
   
   GmatStaticBoxSizer *compareStaticSizer =
      new GmatStaticBoxSizer(wxVERTICAL, this, "Compare Results");
   
   wxBoxSizer *compDirSizer = new wxBoxSizer(wxHORIZONTAL);
   compDirSizer->Add(compDirLabel, 0, wxALIGN_CENTRE|wxGROW|wxALL, bsize);
   compDirSizer->Add(mDirBrowseButton, 0, wxALIGN_CENTRE|wxALL, bsize);
   
   
   wxBoxSizer *saveDirSizer = new wxBoxSizer(wxHORIZONTAL);
   saveDirSizer->Add(saveFileLabel, 0, wxALIGN_CENTRE|wxGROW|wxALL, bsize);
   saveDirSizer->Add(mSaveBrowseButton, 0, wxALIGN_CENTRE|wxALL, bsize);
   
   compareStaticSizer->Add(compareSizer, 0, wxALIGN_LEFT|wxGROW|wxALL, bsize);
   compareStaticSizer->Add(compDirSizer, 0, wxALIGN_LEFT|wxGROW|wxALL, bsize);
   compareStaticSizer->Add(mCompareDirTextCtrl, 0, wxALIGN_LEFT|wxGROW|wxALL, bsize+2);
   compareStaticSizer->Add(20, 3, 0, wxALIGN_CENTRE|wxALL, bsize);
   compareStaticSizer->Add(mSaveResultCheckBox, 0, wxALIGN_LEFT|wxALL, bsize);
   compareStaticSizer->Add(saveDirSizer, 0, wxALIGN_LEFT|wxALL, bsize);
   compareStaticSizer->Add(mSaveFileTextCtrl, 0, wxALIGN_LEFT|wxGROW|wxALL, bsize+2);
   //=================================================================
   #endif
   //=================================================================
   
   //------------------------------------------------------
   // add to page sizer
   //------------------------------------------------------
   wxBoxSizer *pageBoxSizer = new wxBoxSizer(wxVERTICAL);
   pageBoxSizer->Add(runStaticSizer, 0, wxALIGN_CENTRE|wxGROW|wxALL, bsize);
   
   #ifdef __ENABLE_COMPARE__
   pageBoxSizer->Add(compareStaticSizer, 0, wxALIGN_CENTRE|wxGROW|wxALL, bsize);
   #endif
   
   theMiddleSizer->Add(pageBoxSizer, 0, wxALIGN_CENTRE|wxALL, bsize);
   
   #ifdef DEBUG_RUN_SCRIPT_FOLDER_DIALOG
   MessageInterface::ShowMessage("RunScriptFolderDialog::Create() leaving.\n");
   #endif
}
Example #10
0
//------------------------------------------------------------------------------
// virtual void Create()
//------------------------------------------------------------------------------
void SetPathDialog::Create()
{
   #ifdef DEBUG_SETPATH_DIALOG_CREATE
   MessageInterface::ShowMessage(wxT("SetPathDialog::Create() entered.\n"));
   #endif
   
   FileManager *fm = FileManager::Instance();
   mStartupFilePath = (fm->GetFullStartupFilePath()).c_str();
   
   //----- read startup file
   wxButton *readButton =
      new wxButton(this, ID_BUTTON_READ, wxT("Read Other Startup File"),
                   wxDefaultPosition, wxDefaultSize, 0);
   wxStaticText *currFileText =
      new wxStaticText(this, -1, wxT("Current Startup File:"), 
                       wxDefaultPosition, wxDefaultSize, 0 );
   mReadFileTextCtrl =
      new wxTextCtrl(this, -1, wxT(""),
                     wxDefaultPosition, wxSize(350, 20), 0);
   mReadFileTextCtrl->Disable();
   
   //----- write startup file
   wxButton *saveButton =
      new wxButton(this, ID_BUTTON_SAVE, wxT("Save Current Startup File"),
                   wxDefaultPosition, wxDefaultSize, 0);
   mSaveFileTextCtrl =
      new wxTextCtrl(this, -1, wxT(""),
                     wxDefaultPosition, wxSize(350, 20), 0);
   mSaveFileTextCtrl->Disable();
   
   //----- add to sizer
   GmatStaticBoxSizer *startupSizer =
      new GmatStaticBoxSizer(wxVERTICAL, this, wxT("Startup File"));
   startupSizer->Add(readButton, 0, wxALIGN_LEFT|wxALL, 2);
   startupSizer->Add(currFileText, 0, wxALIGN_LEFT|wxALL, 2);
   startupSizer->Add(mReadFileTextCtrl, 0, wxALIGN_CENTER|wxGROW|wxALL, 2);
   startupSizer->Add(saveButton, 0, wxALIGN_LEFT|wxALL, 2);
   startupSizer->Add(mSaveFileTextCtrl, 0, wxALIGN_CENTER|wxGROW|wxALL, 2);
   
   //----- create Notebook
   mPathNotebook =
      new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, wxGROW);
   
   StringArray gmatPaths = fm->GetAllGmatFunctionPaths();
   
   //----- add panels to notebook   
   mGmatFunPathPanel = new MultiPathSetupPanel(mPathNotebook, gmatPaths);
   mPathNotebook->AddPage(mGmatFunPathPanel, wxT("GMAT Function"));
   
   StringArray matlabPaths = fm->GetAllMatlabFunctionPaths();
   mMatlabPathPanel = new MultiPathSetupPanel(mPathNotebook, matlabPaths);
   mPathNotebook->AddPage(mMatlabPathPanel, wxT("MATLAB Function"));
   
   wxString outputPath = fm->GetFullPathname(wxT("OUTPUT_PATH"));
   
   #ifdef DEBUG_SETPATH_DIALOG_CREATE
   MessageInterface::ShowMessage(wxT("   outputPath='%s'\n"), outputPath.c_str());
   #endif
   
   mOutputPathPanel = new SinglePathSetupPanel(mPathNotebook, outputPath.c_str());
   mPathNotebook->AddPage(mOutputPathPanel, wxT("Output"));
   
   theMiddleSizer->Add(startupSizer, 0, wxALIGN_CENTER|wxGROW|wxALL, 5);
   theMiddleSizer->Add(mPathNotebook, 1, wxALIGN_CENTER|wxGROW|wxALL, 5);
}
//------------------------------------------------------------------------------
// void Create()
//------------------------------------------------------------------------------
void GroundTrackPlotPanel::Create()
{
   #if DEBUG_PANEL_CREATE
      MessageInterface::ShowMessage("GroundTrackPlotPanel::Create() entered\n");
   #endif
   
   Integer bsize = 3; // border size
   
   // create axis array
   wxArrayString emptyList;
   wxString axisArray[] = {"X", "-X", "Y", "-Y", "Z", "-Z"};   
   wxArrayString empty;
   wxStaticText *emptyStaticText =
      new wxStaticText( this, -1, wxT("  "), wxDefaultPosition, wxDefaultSize, 0 );   
   
   
   //-----------------------------------------------------------------
   // Platform dependent button size
   //-----------------------------------------------------------------
   #ifdef __WXMAC__
   int arrowW = 40;
   int buttonWidth = 40;
   #ifdef __USE_COLOR_FROM_SUBSCRIBER__
   int colorW = 40;
   #endif
   #else
   int arrowW = 20;
   int buttonWidth = 25;
   #ifdef __USE_COLOR_FROM_SUBSCRIBER__
   int colorW = 25;
   #endif
   #endif
   
   //-----------------------------------------------------------------
   // Drawing Options
   //-----------------------------------------------------------------
   
   // Central body
   wxStaticText *centralBodyLabel =
      new wxStaticText(this, -1, wxT("Central Body"),
                       wxDefaultPosition, wxSize(-1, -1), 0);
   // Central body ComboBox
   mCentralBodyComboBox =
      theGuiManager->GetCelestialBodyComboBox(this, ID_COMBOBOX, wxSize(200,-1));
   
   // Selected object
   wxStaticText *selectedObjectLabel =
      new wxStaticText(this, -1, wxT("Selected Objects"),
                       wxDefaultPosition, wxSize(-1, -1), 0);
   // Selected object CheckListBox
   mObjectCheckListBox =
      theGuiManager->GetSpacePointCheckListBox(this, ID_CHECKLISTBOX, wxSize(200,100),
                                               false, false, true, true);

   #ifdef __USE_COLOR_FROM_SUBSCRIBER__
   //-----------------------------------
   // Drawing color
   wxStaticText *orbitColorLabel =
      new wxStaticText(this, -1, wxT("Orbit Color"),
                       wxDefaultPosition, wxSize(-1,-1), wxALIGN_CENTRE);
   mOrbitColorCtrl =
      new wxColourPickerCtrl(this, ID_COLOR_CTRL, *wxRED,
                             wxDefaultPosition, wxSize(colorW, -1), 0);
   wxStaticText *targetColorLabel =
      new wxStaticText(this, -1, wxT("Target Color"),
                       wxDefaultPosition, wxSize(-1,-1), wxALIGN_CENTRE);   
   wxColour targColor = wxTheColourDatabase->Find("STEEL BLUE");
   mTargetColorCtrl =
      new wxColourPickerCtrl(this, ID_COLOR_CTRL, targColor,
                             wxDefaultPosition, wxSize(colorW, -1), 0);
   
   //-----------------------------------
   // Drawing color sizer
   wxFlexGridSizer *colorSizer = new wxFlexGridSizer(1);
   colorSizer->Add(orbitColorLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   colorSizer->Add(mOrbitColorCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   colorSizer->Add(targetColorLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   colorSizer->Add(mTargetColorCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   #endif

   
   //-----------------------------------
   // Drawing options sizer
   wxFlexGridSizer *drawingOptionFlexSizer = new wxFlexGridSizer(3);
   drawingOptionFlexSizer->Add(centralBodyLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   drawingOptionFlexSizer->Add(mCentralBodyComboBox, 0, wxGROW|wxALIGN_LEFT|wxALL, bsize);
   drawingOptionFlexSizer->Add(10, 2, wxALIGN_LEFT|wxALL, bsize);
   drawingOptionFlexSizer->Add(selectedObjectLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   drawingOptionFlexSizer->Add(mObjectCheckListBox, 0, wxALIGN_LEFT|wxALL, bsize);
   #ifdef __USE_COLOR_FROM_SUBSCRIBER__
   drawingOptionFlexSizer->Add(colorSizer, wxALIGN_LEFT|wxALL, bsize);
   #endif
   
   // Add to drawing option sizer
   GmatStaticBoxSizer *drawingOptionSizer =
      new GmatStaticBoxSizer(wxVERTICAL, this, "Drawing Options");
   drawingOptionSizer->Add(drawingOptionFlexSizer, 0, wxALIGN_LEFT|wxALL, bsize);
   
   //-----------------------------------------------------------------
   // Data Options
   //-----------------------------------------------------------------
   
   // Data collect frequency
   wxStaticText *dataCollectFreqLabel =
      new wxStaticText(this, -1, wxT("Collect data every "),
                       wxDefaultPosition, wxSize(-1,-1), 0);
   mDataCollectFreqTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), wxDefaultPosition,
                     wxSize(200, -1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
   wxStaticText *dataCollectFreqUnit =
      new wxStaticText(this, -1, wxT("step(s)"),
                       wxDefaultPosition, wxSize(-1,-1), 0);
   
   // Plot update frequency
   wxStaticText *updatePlotFreqLabel =
      new wxStaticText(this, -1, wxT("Update plot every "),
                       wxDefaultPosition, wxSize(-1,-1), 0);
   mUpdatePlotFreqTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), wxDefaultPosition,
                     wxSize(200, -1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
   wxStaticText *updatePlotFreqUnit =
      new wxStaticText(this, -1, wxT("cycle(s)"),
                       wxDefaultPosition, wxSize(-1,-1), 0);
   
   // Number of points to redraw
   wxStaticText *numPointsToRedrawLabel =
      new wxStaticText(this, -1, wxT("Num. points to redraw\n(Enter 0 to draw all)"),
                       wxDefaultPosition, wxSize(-1, -1), 0);
   mNumPointsToRedrawTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), wxDefaultPosition,
                     wxSize(200, -1), 0, wxTextValidator(wxGMAT_FILTER_NUMERIC));
   
   // Show plot option
   mShowPlotCheckBox =
      new wxCheckBox(this, ID_CHECKBOX, wxT("Show Plot"),
                     wxDefaultPosition, wxSize(-1, -1), bsize);

   //-----------------------------------
   // Add to data options sizer
   wxFlexGridSizer *dataOptionFlexSizer = new wxFlexGridSizer(3);
   dataOptionFlexSizer->Add(dataCollectFreqLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   dataOptionFlexSizer->Add(mDataCollectFreqTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   dataOptionFlexSizer->Add(dataCollectFreqUnit, 0, wxALIGN_LEFT|wxALL, bsize);
   dataOptionFlexSizer->Add(updatePlotFreqLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   dataOptionFlexSizer->Add(mUpdatePlotFreqTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   dataOptionFlexSizer->Add(updatePlotFreqUnit, 0, wxALIGN_LEFT|wxALL, bsize);
   dataOptionFlexSizer->Add(numPointsToRedrawLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   dataOptionFlexSizer->Add(mNumPointsToRedrawTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   dataOptionFlexSizer->Add(10, 2, 0, wxALIGN_LEFT|wxALL, bsize);
   dataOptionFlexSizer->Add(10, 2, 0, wxALIGN_LEFT|wxALL, bsize);
   dataOptionFlexSizer->Add(mShowPlotCheckBox, 0, wxALIGN_LEFT|wxALL, bsize);
   
   // Add to data option sizer
   GmatStaticBoxSizer *dataOptionSizer =
      new GmatStaticBoxSizer(wxVERTICAL, this, "Data Options");
   dataOptionSizer->Add(dataOptionFlexSizer, 0, wxALIGN_LEFT|wxALL, bsize);
   
   //-----------------------------------------------------------------
   // Other Options
   //-----------------------------------------------------------------
   
   // Solver Iteration ComboBox
   wxStaticText *solverIterLabel =
      new wxStaticText(this, -1, wxT("Solver Iterations"),
                       wxDefaultPosition, wxSize(-1, -1), 0);
   
   // Changed to use emptyList (LOJ: 2014.08.07)
   mSolverIterComboBox =
      new wxComboBox(this, ID_COMBOBOX, wxT(""), wxDefaultPosition,
                     wxSize(200, -1), emptyList, wxCB_READONLY);
   
   // Get Solver Iteration option list from the Subscriber
   const std::string *solverIterList = Subscriber::GetSolverIterOptionList();
   int count = Subscriber::GetSolverIterOptionCount();
   for (int i=0; i<count; i++)
      mSolverIterComboBox->Append(solverIterList[i].c_str());
   
   // Texture map
   wxStaticText *textureMapLabel =
      new wxStaticText(this, -1, wxT("Texture Map"),
                       wxDefaultPosition, wxSize(-1, -1), 0);
   mTextureMapTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(250, -1), 0);
   wxBitmap openBitmap = wxBitmap(OpenFolder_xpm);
   mTextureMapBrowseButton =
      new wxBitmapButton(this, ID_BROWSE_BUTTON, openBitmap, wxDefaultPosition,
                         wxSize(buttonWidth, -1));
   
   //-----------------------------------
   // Other option sizer
   wxFlexGridSizer *otherOptionFlexSizer = new wxFlexGridSizer(3);
   otherOptionFlexSizer->Add(solverIterLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   otherOptionFlexSizer->Add(mSolverIterComboBox, 0, wxALIGN_LEFT|wxALL, bsize);
   otherOptionFlexSizer->Add(10, 2,  0, wxALIGN_LEFT|wxALL, bsize);
   otherOptionFlexSizer->Add(textureMapLabel, 0, wxALIGN_LEFT|wxALL, bsize);
   otherOptionFlexSizer->Add(mTextureMapTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   otherOptionFlexSizer->Add(mTextureMapBrowseButton, 0, wxALIGN_LEFT|wxALL, bsize);
   
   // Add to other option sizer
   GmatStaticBoxSizer *otherOptionSizer =
      new GmatStaticBoxSizer(wxVERTICAL, this, "Other Options");
   otherOptionSizer->Add(otherOptionFlexSizer, 0, wxALIGN_LEFT|wxALL, bsize);   
   
   //-----------------------------------------------------------------
   // Add to page sizer
   //-----------------------------------------------------------------
   wxFlexGridSizer *pageSizer = new wxFlexGridSizer(1);
   pageSizer->Add(drawingOptionSizer, 0, wxGROW|wxALIGN_CENTER|wxALL, bsize);
   pageSizer->Add(dataOptionSizer, 0, wxGROW|wxALIGN_CENTER|wxALL, bsize);
   pageSizer->Add(otherOptionSizer, 0, wxGROW|wxALIGN_CENTER|wxALL, bsize);
   
   //-----------------------------------------------------------------
   // Add to middle sizer
   //-----------------------------------------------------------------
   
   theMiddleSizer->Add(pageSizer, 0, wxALIGN_CENTRE|wxALL, bsize);
   
   #if DEBUG_PANEL_CREATE
   MessageInterface::ShowMessage("GroundTrackPlotPanel::Create() exiting...\n");
   #endif
}
Example #12
0
//------------------------------------------------------------------------------
void SpicePanel::Create()
{
   int bSize     = 2;
//   #if __WXMAC__
//   int buttonWidth = 40;
//   #else
//   int buttonWidth = 25;
//   #endif

//   wxBitmap openBitmap = wxBitmap(OpenFolder_xpm);

   // get the config object
   wxConfigBase *pConfig = wxConfigBase::Get();
   // SetPath() understands ".."
   pConfig->SetPath(wxT("/Spacecraft Spice"));

   // empty the temporary value strings
   naifIdStringWX             = "";
   naifIdRefFrameStringWX     = "";
   spkFileStringWX            = "";
   ckFileStringWX             = "";
   sclkFileStringWX           = "";
   fkFileStringWX             = "";

   wxBoxSizer *spkButtonSizer  = NULL;
   wxBoxSizer *ckButtonSizer   = NULL;
   wxBoxSizer *sclkButtonSizer = NULL;
   wxBoxSizer *fkButtonSizer   = NULL;

   // naif ID for spacecraft
   naifIdStaticText   = new wxStaticText(this, ID_TEXT,wxT(GUI_ACCEL_KEY"NAIF ID"),
                        wxDefaultPosition, wxSize(-1,-1), 0);
   naifIdTextCtrl     = new wxTextCtrl(this, ID_TEXT_CTRL_NAIF_ID, wxT(""),
                        wxDefaultPosition, wxSize(80, -1), 0);
   naifIdTextCtrl->SetToolTip(pConfig->Read(_T("NAIFIDHint")));
   naifIdBlankText    = new wxStaticText(this, ID_TEXT,wxT(""),
                        wxDefaultPosition, wxSize(-1,-1), 0);
   // naif ID of the reference frame for the spacecraft
   naifIdRefFrameStaticText   = new wxStaticText(this, ID_TEXT,wxT("F"GUI_ACCEL_KEY"rame\nNAIF ID"),
                        wxDefaultPosition, wxSize(-1,-1), 0);
   naifIdRefFrameTextCtrl     = new wxTextCtrl(this, ID_TEXT_CTRL_NAIF_ID_REF_FRAME, wxT(""),
                        wxDefaultPosition, wxSize(80, -1), 0);
   naifIdRefFrameTextCtrl->SetToolTip(pConfig->Read(_T("NAIFIDRefFrameHint")));
   naifIdRefFrameBlankText    = new wxStaticText(this, ID_TEXT,wxT(""),
                        wxDefaultPosition, wxSize(-1,-1), 0);
   // SPK file(s)
   wxArrayString emptyList;
   spkFileStaticText   = new wxStaticText(this, ID_TEXT, wxT(GUI_ACCEL_KEY"SPK Files"),
                         wxDefaultPosition, wxSize(-1,-1), 0);
   spkFileListBox      = new wxListBox(this, ID_LIST_BOX_SPK_FILE, wxDefaultPosition, wxSize(150, 100),
                         emptyList, wxLB_EXTENDED|wxLB_NEEDED_SB|wxLB_HSCROLL);
   spkFileListBox->SetToolTip(pConfig->Read(_T("SPKFileListHint")));
   spkFileBrowseButton = new wxButton(this, ID_BROWSE_BUTTON_SPK_FILE, wxT(GUI_ACCEL_KEY"Add"),
                         wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
   spkFileBrowseButton->SetToolTip(pConfig->Read(_T("AddSPKFileHint")));
   spkFileRemoveButton = new wxButton(this, ID_REMOVE_BUTTON_SPK_FILE, wxT(GUI_ACCEL_KEY"Remove"),
                         wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
   spkFileRemoveButton->SetToolTip(pConfig->Read(_T("RemoveSPKFileHint")));
   spkButtonSizer = new wxBoxSizer(wxHORIZONTAL);
   spkButtonSizer->Add(spkFileBrowseButton,0, wxGROW|wxALIGN_CENTRE|wxALL, bSize);
   spkButtonSizer->Add(spkFileRemoveButton,0, wxGROW|wxALIGN_CENTRE|wxALL, bSize);

   // FK file(s)
   fkFileStaticText   = new wxStaticText(this, ID_TEXT, wxT(GUI_ACCEL_KEY"FK Files"),
                         wxDefaultPosition, wxSize(-1,-1), 0);
   fkFileListBox      = new wxListBox(this, ID_LIST_BOX_FK_FILE, wxDefaultPosition, wxSize(150, 100),
                         emptyList, wxLB_EXTENDED|wxLB_NEEDED_SB|wxLB_HSCROLL);
   fkFileListBox->SetToolTip(pConfig->Read(_T("FKFileListHint")));
   fkFileBrowseButton = new wxButton(this, ID_BROWSE_BUTTON_FK_FILE, wxT(GUI_ACCEL_KEY"Add"),
                         wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
   fkFileBrowseButton->SetToolTip(pConfig->Read(_T("AddFKFileHint")));
   fkFileRemoveButton = new wxButton(this, ID_REMOVE_BUTTON_FK_FILE, wxT(GUI_ACCEL_KEY"Remove"),
                         wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
   fkFileRemoveButton->SetToolTip(pConfig->Read(_T("RemoveFKFileHint")));
   fkButtonSizer = new wxBoxSizer(wxHORIZONTAL);
   fkButtonSizer->Add(fkFileBrowseButton,0, wxGROW|wxALIGN_CENTRE|wxALL, bSize);
   fkButtonSizer->Add(fkFileRemoveButton,0, wxGROW|wxALIGN_CENTRE|wxALL, bSize);

   // CK file(s)
   ckFileStaticText   = new wxStaticText(this, ID_TEXT, wxT(GUI_ACCEL_KEY"CK Files"),
                         wxDefaultPosition, wxSize(-1,-1), 0);
   ckFileListBox      = new wxListBox(this, ID_LIST_BOX_CK_FILE, wxDefaultPosition, wxSize(150, 100),
                         emptyList, wxLB_EXTENDED|wxLB_NEEDED_SB|wxLB_HSCROLL);
   ckFileListBox->SetToolTip(pConfig->Read(_T("CKFileListHint")));
   ckFileBrowseButton = new wxButton(this, ID_BROWSE_BUTTON_CK_FILE, wxT(GUI_ACCEL_KEY"Add"),
                         wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
   ckFileBrowseButton->SetToolTip(pConfig->Read(_T("AddCKFileHint")));
   ckFileRemoveButton = new wxButton(this, ID_REMOVE_BUTTON_CK_FILE, wxT(GUI_ACCEL_KEY"Remove"),
                         wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
   ckFileRemoveButton->SetToolTip(pConfig->Read(_T("RemoveCKFileHint")));
   ckButtonSizer = new wxBoxSizer(wxHORIZONTAL);
   ckButtonSizer->Add(ckFileBrowseButton,0, wxGROW|wxALIGN_CENTRE|wxALL, bSize);
   ckButtonSizer->Add(ckFileRemoveButton,0, wxGROW|wxALIGN_CENTRE|wxALL, bSize);

   // SCLK file(s)
   sclkFileStaticText   = new wxStaticText(this, ID_TEXT, wxT("SC"GUI_ACCEL_KEY"LK Files"),
                         wxDefaultPosition, wxSize(-1,-1), 0);
   sclkFileListBox      = new wxListBox(this, ID_LIST_BOX_SCLK_FILE, wxDefaultPosition, wxSize(150, 100),
                         emptyList, wxLB_EXTENDED|wxLB_NEEDED_SB|wxLB_HSCROLL);
   sclkFileListBox->SetToolTip(pConfig->Read(_T("SCLKFileListHint")));
   sclkFileBrowseButton = new wxButton(this, ID_BROWSE_BUTTON_SCLK_FILE, wxT(GUI_ACCEL_KEY"Add"),
                         wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
   sclkFileBrowseButton->SetToolTip(pConfig->Read(_T("AddSCLKFileHint")));
   sclkFileRemoveButton = new wxButton(this, ID_REMOVE_BUTTON_SCLK_FILE, wxT(GUI_ACCEL_KEY"Remove"),
                         wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
   sclkFileRemoveButton->SetToolTip(pConfig->Read(_T("RemoveSCLKFileHint")));
   sclkButtonSizer = new wxBoxSizer(wxHORIZONTAL);
   sclkButtonSizer->Add(sclkFileBrowseButton,0, wxGROW|wxALIGN_CENTRE|wxALL, bSize);
   sclkButtonSizer->Add(sclkFileRemoveButton,0, wxGROW|wxALIGN_CENTRE|wxALL, bSize);

   // sizers

   leftFlexGridSizer = new wxFlexGridSizer(2,0,0);
   leftFlexGridSizer->Add(naifIdStaticText,0, wxGROW|wxALIGN_LEFT|wxALL, bSize);
   leftFlexGridSizer->Add(naifIdTextCtrl,0, wxGROW|wxALIGN_LEFT|wxALL, bSize);
//   leftFlexGridSizer->Add(0, 0);

   leftFlexGridSizer->Add(spkFileStaticText,0, wxGROW|wxALIGN_LEFT|wxALL, bSize);
   leftFlexGridSizer->Add(spkFileListBox,0, wxGROW|wxALIGN_LEFT|wxALL, bSize);
//   leftFlexGridSizer->Add(0, 0);

   leftFlexGridSizer->Add(0, 0);
   leftFlexGridSizer->Add(spkButtonSizer, 0, wxALIGN_CENTRE|wxALL, bSize);
//   leftFlexGridSizer->Add(0, 0);

   leftFlexGridSizer->Add(fkFileStaticText,0, wxGROW|wxALIGN_LEFT|wxALL, bSize);
   leftFlexGridSizer->Add(fkFileListBox,0, wxGROW|wxALIGN_LEFT|wxALL, bSize);
//   leftFlexGridSizer->Add(0, 0);

   leftFlexGridSizer->Add(0, 0);
   leftFlexGridSizer->Add(fkButtonSizer, 0, wxALIGN_CENTRE|wxALL, bSize);
//   leftFlexGridSizer->Add(0, 0);


   rightFlexGridSizer = new wxFlexGridSizer(2,0,0);
   rightFlexGridSizer->Add(naifIdRefFrameStaticText,0, wxGROW|wxALIGN_LEFT|wxALL, bSize);
   rightFlexGridSizer->Add(naifIdRefFrameTextCtrl,0, wxGROW|wxALIGN_LEFT|wxALL, bSize);
//   rightFlexGridSizer->Add(0, 0);

   rightFlexGridSizer->Add(ckFileStaticText,0, wxGROW|wxALIGN_LEFT|wxALL, bSize);
   rightFlexGridSizer->Add(ckFileListBox,0, wxGROW|wxALIGN_LEFT|wxALL, bSize);
//   rightFlexGridSizer->Add(0, 0);

   rightFlexGridSizer->Add(0, 0);
   rightFlexGridSizer->Add(ckButtonSizer, 0, wxALIGN_CENTRE|wxALL, bSize);
//   rightFlexGridSizer->Add(0, 0);

   rightFlexGridSizer->Add(sclkFileStaticText,0, wxGROW|wxALIGN_LEFT|wxALL, bSize);
   rightFlexGridSizer->Add(sclkFileListBox,0, wxGROW|wxALIGN_LEFT|wxALL, bSize);
//   rightFlexGridSizer->Add(0, 0);

   rightFlexGridSizer->Add(0, 0);
   rightFlexGridSizer->Add(sclkButtonSizer, 0, wxALIGN_CENTRE|wxALL, bSize);
//   rightFlexGridSizer->Add(0, 0);
   
   mainBoxSizer = new wxBoxSizer(wxHORIZONTAL);
   
   GmatStaticBoxSizer  *boxSizer1 = new GmatStaticBoxSizer(wxVERTICAL, this, "" );
   boxSizer1->Add(leftFlexGridSizer, 0, wxALIGN_CENTRE|wxALL, bSize);
   
   GmatStaticBoxSizer  *boxSizer2 = new GmatStaticBoxSizer(wxVERTICAL, this, "");
   boxSizer2->Add(rightFlexGridSizer, 0, wxALIGN_CENTRE|wxALL, bSize);
   
   mainBoxSizer->Add(boxSizer1, 1, wxGROW|wxALIGN_CENTRE|wxALL, bSize);
   mainBoxSizer->Add(boxSizer2, 1, wxGROW|wxALIGN_CENTRE|wxALL, bSize);
   
   // Added #if in case if we want to add another layer of lined box for consistency.
   // I like without another layer, too many lines, so set to 0 (LOJ: 2009.11.18) - from CelestialBody
   #if 0
   
   GmatStaticBoxSizer *mainStaticBoxSizer = new GmatStaticBoxSizer(wxVERTICAL, this, "");
   mainStaticBoxSizer->Add(mainBoxSizer, 1, wxGROW|wxALIGN_CENTRE|wxALL, bSize);
   
   this->SetAutoLayout(true);
   this->SetSizer(mainStaticBoxSizer);
   mainStaticBoxSizer->Fit(this);
   mainStaticBoxSizer->SetSizeHints(this);
   
   #else
   
   wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
   mainSizer->Add(mainBoxSizer, 1, wxGROW|wxALIGN_CENTRE|wxALL, bSize);
   
   this->SetAutoLayout(true);
   this->SetSizer(mainSizer);
   mainSizer->Fit(this);
   mainSizer->SetSizeHints(this);
   
   #endif

}
Example #13
0
//------------------------------------------------------------------------------
// void Create()
//------------------------------------------------------------------------------
void ScriptPanel::Create()
{
   int bsize = 2; // border size
   
   // create sizers
   GmatStaticBoxSizer *topSizer = new GmatStaticBoxSizer( wxHORIZONTAL, this, "");
   wxGridSizer *middleSizer = new wxGridSizer( 1, 0, 0 );
   wxBoxSizer *pageSizer = new wxBoxSizer(wxVERTICAL);
   
   //------------------------------------------------------
   // for line number
   //------------------------------------------------------
   wxStaticText *lineNumberText =
      new wxStaticText(this, ID_TEXT, wxT("Go To Line Number:"),
                       wxDefaultPosition, wxDefaultSize, 0);
   
   mLineNumberTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(50, -1),
                     wxTE_PROCESS_ENTER);
      
#ifndef __WXMSW__
   mFileContentsTextCtrl = new
      wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                 wxDefaultPosition, wxDefaultSize,
                 wxTE_MULTILINE);
#else
   mFileContentsTextCtrl = new
      wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                 wxDefaultPosition, wxDefaultSize,
                 wxTE_MULTILINE | wxTE_PROCESS_ENTER | wxTE_RICH2 | wxGROW | wxHSCROLL);
#endif
   
   mFileContentsTextCtrl->SetFont( GmatAppData::Instance()->GetFont() );
   
   //------------------------------------------------------
   // for build and build & run
   //------------------------------------------------------
   mSaveSyncButton =
      new wxButton(this, ID_SYNC_BUTTON, "Save,Sync", wxDefaultPosition, wxDefaultSize, 0);
   mSaveSyncRunButton =
      new wxButton(this, ID_SYNC_BUTTON, "Save,Sync,Run", wxDefaultPosition, wxDefaultSize, 0);   
   
   //------------------------------------------------------
   // add to sizer
   //------------------------------------------------------
   topSizer->Add(lineNumberText, 0, wxALIGN_LEFT | wxALL, bsize);
   topSizer->Add(mLineNumberTextCtrl, 0, wxALIGN_LEFT | wxALL, bsize);
   middleSizer->Add(mFileContentsTextCtrl, 0, wxGROW | wxALIGN_CENTER | wxALL, bsize);
   
   #ifdef __ADD_BUILD_AT_TOP__
   topSizer->Add(80, 20, 0, wxALIGN_LEFT | wxALL, bsize);
   topSizer->Add(mSaveSyncButton, 0, wxALIGN_CENTER | wxALL, bsize);
   topSizer->Add(mSaveSyncRunButton, 0, wxALIGN_CENTER | wxALL, bsize);
   #else
   theButtonSizer->Insert(0, mSaveSyncButton, 0, wxALIGN_LEFT | wxALL, bsize);
   theButtonSizer->Insert(1, mSaveSyncRunButton, 0, wxALIGN_LEFT | wxALL, bsize);
   theButtonSizer->Insert(2, 50, 20);
   #endif
   
   //------------------------------------------------------
   // add to parent sizer
   //------------------------------------------------------
   pageSizer->Add(topSizer, 0, wxGROW | wxALIGN_CENTER | wxALL, bsize);
   pageSizer->Add(middleSizer, 1, wxGROW | wxALIGN_CENTER | wxALL, bsize);
   theMiddleSizer->Add(pageSizer, 1, wxGROW | wxALIGN_CENTER | wxALL, bsize);
}
Example #14
0
//------------------------------------------------------------------------------
// virtual void Create()
//------------------------------------------------------------------------------
void DragInputsDialog::Create()
{
   int bsize = 3; // border size
   
   //-----------------------------------------------------------------
   // user input
   //-----------------------------------------------------------------
   userInputRadioButton =
      new wxRadioButton(this, ID_RADIOBUTTON, wxT("User Input"),
                        wxDefaultPosition, wxDefaultSize, 0);
   solarFluxStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Solar Flux"),
                       wxDefaultPosition, wxDefaultSize, 0);
   solarFluxTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                     wxDefaultPosition, wxSize(150,-1), 0);
   avgSolarFluxStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Average Solar Flux"),
                       wxDefaultPosition, wxDefaultSize, 0);
   avgSolarFluxTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                      wxDefaultPosition, wxSize(150,-1), 0);
   geomagneticIndexStaticText =
      new wxStaticText(this, ID_TEXT, wxT("Geomagnetic Index (Kp)"),
                       wxDefaultPosition, wxDefaultSize, 0);
   geomagneticIndexTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                     wxDefaultPosition, wxSize(150,-1), 0);
   
   //-----------------------------------------------------------------
   // file input
   //-----------------------------------------------------------------
   fileInputRadioButton =
      new wxRadioButton(this, ID_RADIOBUTTON, wxT("File Input (To be implemented)"),
                        wxDefaultPosition, wxDefaultSize, 0);
   //@todo Reading flux file has not been implemented in the base code
   // so disable it for now
   fileInputRadioButton->Disable();
   fileNameStaticText =
      new wxStaticText(this, ID_TEXT, wxT("File Name"),
                       wxDefaultPosition, wxDefaultSize, 0);
   fileNameTextCtrl =
      new wxTextCtrl(this, ID_TEXTCTRL, wxT(""),
                     wxDefaultPosition, wxSize(200,-1), 0);
   browseButton =
      new wxButton(this, ID_BUTTON, wxT("Browse"),
                   wxDefaultPosition, wxDefaultSize, 0);
   
   //-----------------------------------------------------------------
   // add to sizer
   //-----------------------------------------------------------------
   wxFlexGridSizer *userInputFlexGridSizer = new wxFlexGridSizer(2, 0, 0);
   
   userInputFlexGridSizer->Add(userInputRadioButton, 0, wxALIGN_LEFT|wxALL, bsize);
   userInputFlexGridSizer->Add(100, 0, wxALIGN_LEFT|wxALL, bsize);
   userInputFlexGridSizer->Add(solarFluxStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   userInputFlexGridSizer->Add(solarFluxTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   userInputFlexGridSizer->Add(avgSolarFluxStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   userInputFlexGridSizer->Add(avgSolarFluxTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   userInputFlexGridSizer->Add(geomagneticIndexStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   userInputFlexGridSizer->Add(geomagneticIndexTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   
   wxBoxSizer *fileInputSizer = new wxBoxSizer(wxHORIZONTAL);
   
   fileInputSizer->Add(fileNameStaticText, 0, wxALIGN_LEFT|wxALL, bsize);
   fileInputSizer->Add(fileNameTextCtrl, 0, wxALIGN_LEFT|wxALL, bsize);
   fileInputSizer->Add(browseButton, 0, wxALIGN_LEFT|wxALL, bsize);
   
   GmatStaticBoxSizer *userInputGroup = new GmatStaticBoxSizer(wxVERTICAL, this, wxT(""));
   GmatStaticBoxSizer *fileInputGroup = new GmatStaticBoxSizer(wxVERTICAL, this, wxT(""));
   
   userInputGroup->Add(userInputFlexGridSizer, 0, wxALIGN_LEFT|wxALL, bsize);
   fileInputGroup->Add(fileInputRadioButton, 0, wxALIGN_LEFT|wxALL, bsize);
   fileInputGroup->Add(fileInputSizer, 0, wxALIGN_LEFT|wxALL, bsize);
   
   wxBoxSizer *mainPageSizer = new wxBoxSizer(wxVERTICAL);
   mainPageSizer->Add(userInputGroup, 0, wxALIGN_LEFT|wxGROW|wxALL, bsize);
   mainPageSizer->Add(fileInputGroup, 0, wxALIGN_LEFT|wxGROW|wxALL, bsize);
   
   theMiddleSizer->Add(mainPageSizer, 0, wxALIGN_CENTER|wxALL, bsize);
}