void wxGridCellFloatEditor::Create(wxWindow* parent,
                                   wxWindowID id,
                                   wxEvtHandler* evtHandler)
{
    wxGridCellTextEditor::Create(parent, id, evtHandler);

#if wxUSE_VALIDATORS
    Text()->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
#endif
}
void PermutationCounterDlg::CreateControls()
{    
    wxXmlResource::Get()->
		LoadDialog(this, GetParent(), "IDD_PERMUTATION_COUNT");
    m_number = XRCCTRL(*this, "IDC_EDIT_ORDEROFCONTIGUITY", wxTextCtrl);
    // Set validators
    if (FindWindow(XRCID("IDC_EDIT_ORDEROFCONTIGUITY")))
        FindWindow(XRCID("IDC_EDIT_ORDEROFCONTIGUITY"))->
			SetValidator(wxTextValidator(wxFILTER_NUMERIC, & s_int) );
}
Exemple #3
0
void mainwin::CreateControls()
{
////@begin mainwin content construction
    if (!wxXmlResource::Get()->LoadDialog(this, GetParent(), wxT("ID_MAINWIN")))
        wxLogError(wxT("Missing wxXmlResource::Get()->Load() in OnInit()?"));
    // Set validators
    if (FindWindow(XRCID("ID_TEXTCTRL")))
        FindWindow(XRCID("ID_TEXTCTRL"))->SetValidator( wxTextValidator(wxFILTER_NONE, & m_sourcemac) );
    if (FindWindow(XRCID("ID_TEXTCTRL1")))
        FindWindow(XRCID("ID_TEXTCTRL1"))->SetValidator( wxTextValidator(wxFILTER_NONE, & m_desmac) );
    if (FindWindow(XRCID("ID_TEXTCTRL2")))
        FindWindow(XRCID("ID_TEXTCTRL2"))->SetValidator( wxTextValidator(wxFILTER_NONE, & m_userdata) );
    if (FindWindow(XRCID("ID_TEXTCTRL4")))
        FindWindow(XRCID("ID_TEXTCTRL4"))->SetValidator( wxTextValidator(wxFILTER_NONE, & m_seedstr) );
////@end mainwin content construction

    // Create custom windows not generated automatically here.
////@begin mainwin content initialisation
////@end mainwin content initialisation
}
void SaveSelectionDlg::CreateControls()
{
	if (grid_base->IsTimeVariant()) {
		wxXmlResource::Get()->LoadDialog(this, GetParent(),
										 "IDD_SAVE_SELECTION_TM");
	} else {
		wxXmlResource::Get()->LoadDialog(this, GetParent(),
										 "IDD_SAVE_SELECTION");
	}

	m_save_field_choice =
		wxDynamicCast(FindWindow(XRCID("ID_SAVE_FIELD_CHOICE")), wxChoice);
	m_save_field_choice_tm = 0;
	if (FindWindow(XRCID("ID_SAVE_FIELD_CHOICE_TM"))) {
		m_save_field_choice_tm =
			wxDynamicCast(FindWindow(XRCID("ID_SAVE_FIELD_CHOICE_TM")),
											wxChoice);
	}

	m_sel_check_box = wxDynamicCast(FindWindow(XRCID("ID_SEL_CHECK_BOX")),
									wxCheckBox); 
	
	m_sel_val_text = wxDynamicCast(FindWindow(XRCID("ID_SEL_VAL_TEXT")),
								   wxTextCtrl);
	m_sel_val_text->Clear();
	m_sel_val_text->AppendText("1");
	m_sel_val_text->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
	
	m_unsel_check_box = wxDynamicCast(FindWindow(XRCID("ID_UNSEL_CHECK_BOX")),
									  wxCheckBox); 
	
	m_unsel_val_text = wxDynamicCast(FindWindow(XRCID("ID_UNSEL_VAL_TEXT")),
									 wxTextCtrl);	
	m_unsel_val_text->Clear();
	m_unsel_val_text->AppendText("0");
	m_unsel_val_text->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
	
	m_apply_save_button = wxDynamicCast(
						FindWindow(XRCID("ID_APPLY_SAVE_BUTTON")), wxButton);
	m_apply_save_button->Disable();
}
void WindowLevelToolPanel::CreateControls()
{    
  ////@begin WindowLevelToolPanel content construction
  if (!wxXmlResource::Get()->LoadPanel(this, GetParent(), _T("ID_WINDOWLEVELTOOLPANEL")))
    wxLogError(wxT("Missing wxXmlResource::Get()->Load() in OnInit()?"));

  mMinValue = XRCCTRL(*this, "ID_MIN_TEXTCTRL", wxTextCtrl);
  mMaxValue = XRCCTRL(*this, "ID_MAX_TEXTCTRL", wxTextCtrl);
  mWindowValue = XRCCTRL(*this, "ID_WINDOW_TEXTCTRL", wxTextCtrl);
  mWindowSlider = XRCCTRL(*this, "ID_WINDOW_SLIDER", wxSlider);
  mLevelValue = XRCCTRL(*this, "ID_LEVEL_TEXTCTRL", wxTextCtrl);
  mLevelSlider = XRCCTRL(*this, "ID_LEVEL_SLIDER", wxSlider);
  // Set validators
  if (FindWindow(XRCID("ID_MIN_TEXTCTRL")))
    FindWindow(XRCID("ID_MIN_TEXTCTRL"))->
      SetValidator( wxTextValidator(wxFILTER_NUMERIC) );
  if (FindWindow(XRCID("ID_MAX_TEXTCTRL")))
    FindWindow(XRCID("ID_MAX_TEXTCTRL"))->
      SetValidator( wxTextValidator(wxFILTER_NUMERIC) );
  if (FindWindow(XRCID("ID_WINDOW_TEXTCTRL")))
    FindWindow(XRCID("ID_WINDOW_TEXTCTRL"))->
      SetValidator( wxTextValidator(wxFILTER_NUMERIC) );
  if (FindWindow(XRCID("ID_LEVEL_TEXTCTRL")))
    FindWindow(XRCID("ID_LEVEL_TEXTCTRL"))->
      SetValidator( wxTextValidator(wxFILTER_NUMERIC) );
  ////@end WindowLevelToolPanel content construction

#ifndef _WIN32
  // Create custom windows not generated automatically here.
  ////@begin WindowLevelToolPanel content initialisation
  mHistoWindow = new wxWindow(this, (wxWindowID) -1,
			      wxPoint(0, 0), wxSize(nbins_, 125),
			      wxSUNKEN_BORDER, wxString(wxT("Histogram")));
  ////@end WindowLevelToolPanel content initialisation

  // Storage for the histogram image.
  histogram_image_data_ = (unsigned char *)
    malloc( sizeof(unsigned char) * nbins_ * 125 * 3 );
#endif
}
Exemple #6
0
ValueDlg::ValueDlg(wxWindow* pParent, wxString& Name, u_int Value)
: wxDialog(pParent, -1, "Edit String", wxDefaultPosition, wxSize(300,140))
{
  m_Name = Name;
  m_Value.sprintf("%d", Value);
  m_pName= new wxStaticText(this, -1, "Name:", wxPoint(20, 20));
  m_pNameText = new wxTextCtrl(this, -1, "", wxPoint(60, 20), wxDefaultSize, 0, wxTextValidator(wxFILTER_NONE, &m_Name));
  m_pNameText->SetEditable(false);
  m_pValue = new wxStaticText(this, -1, "Value:", wxPoint(20, 50));
  m_pValueText = new wxTextCtrl(this, -1, m_Value, wxPoint(60, 50), wxDefaultSize, 0, wxTextValidator(wxFILTER_NUMERIC, &m_Value));
  m_pOK = new wxButton(this, wxID_OK, "OK", wxPoint(60, 80));
  m_pCancel = new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(160, 80));
}
void ProxyPasswordDialog::CreateControls()
{    
////@begin ProxyPasswordDialog content construction
    if (!wxXmlResource::Get()->LoadDialog(this, GetParent(), _T("ID_PROXYPASSWORDDIALOG")))
        wxLogError(wxT("Missing wxXmlResource::Get()->Load() in OnInit()?"));
    // Set validators
    if (FindWindow(XRCID("ID_TEXTCTRL_PROXYPASS2")))
        FindWindow(XRCID("ID_TEXTCTRL_PROXYPASS2"))->SetValidator( wxTextValidator(wxFILTER_NONE, & m_sPassword) );
////@end ProxyPasswordDialog content construction

    // Create custom windows not generated automatically here.
    if (FindWindow(XRCID("ID_TEXTCTRL_PROXYPASS2")))
        FindWindow(XRCID("ID_TEXTCTRL_PROXYPASS2"))->SetFocus();
}
Exemple #8
0
void HistoEqFilter::CreateControls()
{    
////@begin HistoEqFilter content construction
    if (!wxXmlResource::Get()->LoadPanel(this, GetParent(), _T("ID_HISTOEQFILTER")))
        wxLogError(wxT("Missing wxXmlResource::Get()->Load() in OnInit()?"));
    mIgnore = XRCCTRL(*this, "IGNORE", wxSpinCtrl);
    mAlpha = XRCCTRL(*this, "ID_TEXTCTRL", wxTextCtrl);
    // Set validators
    if (FindWindow(XRCID("ID_TEXTCTRL")))
        FindWindow(XRCID("ID_TEXTCTRL"))->SetValidator( wxTextValidator(wxFILTER_NUMERIC) );
////@end HistoEqFilter content construction

    // Create custom windows not generated automatically here.
////@begin HistoEqFilter content initialisation
////@end HistoEqFilter content initialisation
}
void IntensityCorrectionFilterPanel::CreateControls()
{    
////@begin IntensityCorrectionFilterPanel content construction
    if (!wxXmlResource::Get()->LoadPanel(this, GetParent(), _T("ID_INTENSITYCORRECTIONFILTER")))
        wxLogError(wxT("Missing wxXmlResource::Get()->Load() in OnInit()?"));
    mOrder = XRCCTRL(*this, "ID_ORDER", wxSpinCtrl);
    mEdge = XRCCTRL(*this, "ID_EDGE", wxTextCtrl);
    mPercentage = XRCCTRL(*this, "ID_GAUGE1", wxGauge);
    // Set validators
    if (FindWindow(XRCID("ID_EDGE")))
        FindWindow(XRCID("ID_EDGE"))->SetValidator( wxTextValidator(wxFILTER_NUMERIC) );
////@end IntensityCorrectionFilterPanel content construction

    // Create custom windows not generated automatically here.
////@begin IntensityCorrectionFilterPanel content initialisation
////@end IntensityCorrectionFilterPanel content initialisation
}
void RdpPropertyDialog::CreateControls()
{
////@begin RdpPropertyDialog content construction
    if (!wxXmlResource::Get()->LoadDialog(this, GetParent(), _T("ID_DIALOG_SETTINGS_RDP")))
        wxLogError(wxT("Missing wxXmlResource::Get()->Load() in OnInit()?"));
    m_pCtrlAutologin = XRCCTRL(*this, "ID_RADIOBUTTON_RDP_AUTOLOGIN", wxRadioButton);
    m_pCtrlUsername = XRCCTRL(*this, "ID_TEXTCTRL_RDP_USERNAME", wxTextCtrl);
    m_pCtrlPassword = XRCCTRL(*this, "ID_TEXTCTRL_RDP_PASSWORD", wxTextCtrl);
    m_pCtrlRememberPassword = XRCCTRL(*this, "ID_CHECKBOX_RDP_REMEMBER_PWD", wxCheckBox);
    m_pCtrlRunApplication = XRCCTRL(*this, "ID_RADIOBUTTON_RDP_RUNAPP", wxRadioButton);
    m_pCtrlApplicationString = XRCCTRL(*this, "ID_TEXTCTRL_RDP_APPLICATION", wxTextCtrl);
    // Set validators
    if (FindWindow(XRCID("ID_TEXTCTRL_RDP_HOST")))
        FindWindow(XRCID("ID_TEXTCTRL_RDP_HOST"))->SetValidator( wxGenericValidator(& m_sHostname) );
    if (FindWindow(XRCID("ID_TEXTCTRL_RDP_DOMAIN")))
        FindWindow(XRCID("ID_TEXTCTRL_RDP_DOMAIN"))->SetValidator( wxTextValidator(wxFILTER_NONE, & m_sRdpDomain) );
    if (FindWindow(XRCID("ID_RADIOBUTTON_RDP_WINLOGON")))
        FindWindow(XRCID("ID_RADIOBUTTON_RDP_WINLOGON"))->SetValidator( wxGenericValidator(& m_bShowWinLogon) );
    if (FindWindow(XRCID("ID_RADIOBUTTON_RDP_NXAUTH")))
        FindWindow(XRCID("ID_RADIOBUTTON_RDP_NXAUTH"))->SetValidator( wxGenericValidator(& m_bUseNxAuth) );
    if (FindWindow(XRCID("ID_RADIOBUTTON_RDP_AUTOLOGIN")))
        FindWindow(XRCID("ID_RADIOBUTTON_RDP_AUTOLOGIN"))->SetValidator( wxGenericValidator(& m_bAutoLogin) );
    if (FindWindow(XRCID("ID_TEXTCTRL_RDP_USERNAME")))
        FindWindow(XRCID("ID_TEXTCTRL_RDP_USERNAME"))->SetValidator( wxGenericValidator(& m_sUsername) );
    if (FindWindow(XRCID("ID_TEXTCTRL_RDP_PASSWORD")))
        FindWindow(XRCID("ID_TEXTCTRL_RDP_PASSWORD"))->SetValidator( wxGenericValidator(& m_sPassword) );
    if (FindWindow(XRCID("ID_CHECKBOX_RDP_REMEMBER_PWD")))
        FindWindow(XRCID("ID_CHECKBOX_RDP_REMEMBER_PWD"))->SetValidator( wxGenericValidator(& m_bRememberPassword) );
    if (FindWindow(XRCID("ID_RADIOBUTTON_RDP_DESKTOP")))
        FindWindow(XRCID("ID_RADIOBUTTON_RDP_DESKTOP"))->SetValidator( wxGenericValidator(& m_bRunDesktop) );
    if (FindWindow(XRCID("ID_RADIOBUTTON_RDP_RUNAPP")))
        FindWindow(XRCID("ID_RADIOBUTTON_RDP_RUNAPP"))->SetValidator( wxGenericValidator(& m_bRunApplication) );
    if (FindWindow(XRCID("ID_TEXTCTRL_RDP_APPLICATION")))
        FindWindow(XRCID("ID_TEXTCTRL_RDP_APPLICATION"))->SetValidator( wxGenericValidator(& m_sRunCommand) );
////@end RdpPropertyDialog content construction

    if (!m_bStorePasswords)
        m_pCtrlRememberPassword->Enable(false);

////@begin RdpPropertyDialog content initialisation
////@end RdpPropertyDialog content initialisation
    UpdateDialogConstraints();
}
Exemple #11
0
MainWindow::MainWindow(const wxString& title, App * parent)
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(650, 350)) {
    this->parent = parent;
    //(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox")
    this->messageDialog = new MessageDialog(this, wxWindow::NewControlId(), _("Send message to node") );
    menubar = new wxMenuBar;
    file = new wxMenu;
    file->Append(wxID_EXECUTE, wxT("&Execute"));
    file->Append(wxID_CONVERT, wxT("&Compile"));
    file->Append(wxID_ABORT, wxT("&Kill"));
    file->AppendSeparator();
    file->Append(wxID_EXIT, wxT("&Quit"));
    network = new wxMenu;
    menubar->Append(file, wxT("&Program"));
    file = new wxMenu;
    file->Append(VLPMenu_Connect, wxT("&Connect"));
    file->Append(VLPMenu_Disconnect, wxT("&Disconnect"));
    file->Append(VLPMenu_SendMessage, wxT("&Send message"));

    menubar->Append(file, wxT("&Network"));
    SetMenuBar(menubar);
    text = new wxTextCtrl(this, TEXT_Main, "", wxDefaultPosition, wxDefaultSize,
            wxTE_MULTILINE | wxTE_READONLY, wxTextValidator(wxFILTER_NONE), wxTextCtrlNameStr);


    Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED,
            wxCommandEventHandler(MainWindow::OnQuit));
    
    Connect(wxID_CONVERT, wxEVT_COMMAND_MENU_SELECTED,
            wxCommandEventHandler(MainWindow::OnCompile));
    Connect(wxID_EXECUTE, wxEVT_COMMAND_MENU_SELECTED,
            wxCommandEventHandler(MainWindow::OnExecute));
    Connect(wxID_ABORT, wxEVT_COMMAND_MENU_SELECTED,
            wxCommandEventHandler(MainWindow::OnKill));
    Connect(VLPMenu_Connect, wxEVT_COMMAND_MENU_SELECTED,
            wxCommandEventHandler(MainWindow::OnConnect));
    Connect(VLPMenu_Disconnect, wxEVT_COMMAND_MENU_SELECTED,
            wxCommandEventHandler(MainWindow::OnDisconnect));
    Connect(VLPMenu_SendMessage, wxEVT_COMMAND_MENU_SELECTED,
            wxCommandEventHandler(MainWindow::OnSendMessage));
    Centre();
}
void ITKCurvatureAnistopricDiffusionFilter::CreateControls()
{    
////@begin ITKCurvatureAnistopricDiffusionFilter content construction
    if (!wxXmlResource::Get()->LoadPanel(this, GetParent(), _T("ID_ITKCURVATUREANISTOPRICDIFFUSIONFILTER")))
        wxLogError(wxT("Missing wxXmlResource::Get()->Load() in OnInit()?"));
    mIterations = XRCCTRL(*this, "SPIN_ITERATIONS", wxSpinCtrl);
    mTimeSteps = XRCCTRL(*this, "TEXT_TIMESTEPS", wxTextCtrl);
    mConductance = XRCCTRL(*this, "SPIN_CONDUCTANCE", wxSpinCtrl);
    mPercentage = XRCCTRL(*this, "ID_GAUGE", wxGauge);
    // Set validators
    if (FindWindow(XRCID("TEXT_TIMESTEPS")))
        FindWindow(XRCID("TEXT_TIMESTEPS"))->SetValidator( wxTextValidator(wxFILTER_NUMERIC) );
////@end ITKCurvatureAnistopricDiffusionFilter content construction

    mIterations->SetRange(1, 100);
    mTimeSteps->SetValue(wxT("0.0625"));
    mConductance->SetRange(1, 1024);
    // Create custom windows not generated automatically here.
////@begin ITKCurvatureAnistopricDiffusionFilter content initialisation
////@end ITKCurvatureAnistopricDiffusionFilter content initialisation
}
Exemple #13
0
SliderDialog::SliderDialog(wxWindow * parent, wxWindowID id,
                           const wxString & title,
                           wxPoint position,
                           wxSize size,
                           int style,
                           float value,
                           float line,
                           float page):
   wxDialog(parent,id,title,position),
   mStyle(style)
{
   SetName(GetTitle());
   ShuttleGui S(this, eIsCreating);

   S.StartVerticalLay();
   {
      mTextCtrl = S.AddTextBox(wxEmptyString,
                               wxEmptyString,
                               15);
      mTextCtrl->SetValidator(wxTextValidator(wxFILTER_NUMERIC));

      mSlider = new ASlider(this,
                            wxID_ANY,
                            title,
                            wxDefaultPosition,
                            size,
                            style,
                            false);
      mSlider->SetScroll(line, page);
      S.AddWindow(mSlider, wxEXPAND);
   }
   S.EndVerticalLay();

   S.AddStandardButtons(eOkButton | eCancelButton);

   Fit();

   mSlider->Set(value);
}
void dlgUser::SetupVarEditor(int var)
{
    if (var >= 0 && varInfo.Count() > 0)
    {
        wxStringTokenizer vals(varInfo.Item(var));
        wxString typ=vals.GetNextToken();

        if (typ == wxT("bool"))
        {
            txtValue->Hide();
            chkValue->Show();
        }
        else
        {
            chkValue->Hide();
            txtValue->Show();
            if (typ == wxT("string"))
                txtValue->SetValidator(wxTextValidator());
            else
                txtValue->SetValidator(numericValidator);
        }
    }
}
Exemple #15
0
szViszioAddParam::szViszioAddParam(TSzarpConfig *_ipk,
	wxWindow *parent, wxWindowID id, const wxString &title):
        wxDialog(parent, id, title)
{
    this->ipk = _ipk;
    ps = NULL;

    wxBoxSizer *top_sizer = new wxBoxSizer(wxVERTICAL);

    wxStaticBoxSizer *param_sizer = new wxStaticBoxSizer(
        new wxStaticBox(this, wxID_ANY, _("Parameter")), wxVERTICAL);

    param_sizer->Add(new wxTextCtrl(this, ID_TC_PARNAME, _T(""),
                                    wxDefaultPosition, wxDefaultSize, wxTE_READONLY,
                                    wxTextValidator(wxFILTER_NONE, &g_data.m_probe.m_parname)),
                     0, wxGROW | wxALL, 8);

    wxBoxSizer *paramt_sizer = new wxBoxSizer(wxHORIZONTAL);

    paramt_sizer->Add(new wxButton(this, ID_B_PARAM, _("Choose parameter")),
                      0, wxALIGN_CENTER | wxALL, 8);

    param_sizer->Add(paramt_sizer, 1, wxEXPAND | wxALL, 8);
    top_sizer->Add(param_sizer, 0, wxGROW | wxALL, 8);

    wxBoxSizer *but_sizer = new wxBoxSizer(wxHORIZONTAL);
    but_sizer->Add(CreateButtonSizer(wxOK|wxCANCEL/*|wxHELP*/), 0,
                   wxALL | wxALIGN_CENTER, 8);

    top_sizer->Add(but_sizer, 0, wxALL | wxALIGN_CENTER, 8);


    this->SetSizer(top_sizer);
    ps = new szParSelect(this->ipk, this, wxID_ANY, _("Viszio->Add->Param"),
                         TRUE, TRUE, false, false,true);
    top_sizer->Fit(this);
}
Exemple #16
0
wxSizer *AvcCompressorDialog::MakeAvcCompressorDialog(wxWindow * parent, bool call_fit,
														bool set_sizer)
{
	wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
	wxStaticBoxSizer *group;
	wxBoxSizer *boxSizer;
	wxStaticText *staticText;
	//wxTextCtrl *textCtrl;
	wxButton *button;
	wxFlexGridSizer *flexGridSizer;

	staticText =
       new wxStaticText(parent, ID_TEXT,
                        wxT("Automatic Volume Control by Vincent A. Busam"),
                        wxDefaultPosition, wxDefaultSize, 0);
	mainSizer->Add(staticText, 0, wxALIGN_CENTRE | wxALL, 5);

	// 0.  Box Sizer for horizontal components
	wxBoxSizer *horizontalSizer = new wxBoxSizer(wxHORIZONTAL);

	// 1.  Box Sizer for leftmost group of controls
	wxBoxSizer *leftSizer = new wxBoxSizer(wxVERTICAL);

	// 1.1  Group Box for adjustment window settings

	group = new wxStaticBoxSizer(new wxStaticBox(parent, -1,
                                                wxT("Adjustment Settings")), wxVERTICAL);
	flexGridSizer = new wxFlexGridSizer(2, 0, 0);

	// 1.1.1  Adjustment Window
	staticText =
       new wxStaticText(parent, ID_TEXT, wxT("Adjustment Window:"),
                        wxDefaultPosition, wxDefaultSize, 0 );
	flexGridSizer->Add(staticText, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, 5);

	mctlAdjWin =
       new wxTextCtrl(parent, ID_ADJWINTEXT, "", wxDefaultPosition,
                      wxSize(40, -1), 0,
					  wxTextValidator(wxFILTER_NUMERIC, &mstrAdjWin ) );
	flexGridSizer->Add(mctlAdjWin, 0, wxALIGN_CENTRE | wxALL, 5);

	// 1.1.2  Adjustment Delay
	staticText =
       new wxStaticText(parent, ID_TEXT, wxT("Adjustment Delay:"),
                        wxDefaultPosition, wxDefaultSize, 0);
	flexGridSizer->Add(staticText, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, 5);

	mctlDelay =
       new wxTextCtrl(parent, ID_DELAYTEXT, "", wxDefaultPosition,
                      wxSize(40, -1), 0,
					  wxTextValidator(wxFILTER_NUMERIC, &mstrDelay ));
	flexGridSizer->Add(mctlDelay, 0, wxALIGN_CENTRE | wxALL, 5);

	// 1.1.3  Min Change Window
   /* i18n-hint: the minimum size of the window that is changed */
	staticText =
       new wxStaticText(parent, ID_TEXT, wxT("Minimum Change Window:"),
                        wxDefaultPosition, wxDefaultSize, 0);
	flexGridSizer->Add(staticText, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, 5);

	mctlChangeWin =
       new wxTextCtrl(parent, ID_CHANGEWINTEXT, "", wxDefaultPosition,
                      wxSize(40, -1), 0,
					  wxTextValidator(wxFILTER_NUMERIC, &mstrChangeWin ));
	flexGridSizer->Add(mctlChangeWin, 0, wxALIGN_CENTRE | wxALL, 5);

	// 1.1.4  Min Change %
	staticText =
       new wxStaticText(parent, ID_TEXT, wxT("Minimum Change %:"),
                        wxDefaultPosition, wxDefaultSize, 0);
	flexGridSizer->Add(staticText, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, 5);

	mctlMinPct =
       new wxTextCtrl(parent, ID_MINPCTTEXT, "", wxDefaultPosition,
                      wxSize(40, -1), 0,
					  wxTextValidator(wxFILTER_NUMERIC, &mstrMinPct ));
	 flexGridSizer->Add(mctlMinPct, 0, wxALIGN_CENTRE | wxALL, 5);

	// 1.1.end  Add group
	group->Add( flexGridSizer, 0,  wxALIGN_CENTRE|wxALL, 5 );

	leftSizer->Add( group, 0, wxALIGN_TOP |wxALL, 5 );

   // DMM: the following text box is too difficult to translate as-is.  Taken out of
   // i18n for now.

	// 1.2 area under group box
	staticText =
       new wxStaticText(parent, ID_TEXT,
                        ("Above values are in samples.\n"
						  "Adjustment Window defines number of \nsamples in moving average.\n"
						  "Change window defines minimum time \nbetween volume changes.\n"
						  "Minimum % change of volume adjustment \nbefore making a volume change.\n"
						  "Grid at right determines how much to amplify \neach volume level.\n"
						  "For more information see: \n"
						  "http://www.busam.com/skyland/iavc\n"
						  "7/21/02: WAV and MP3 files both work."
						 ),
                        wxDefaultPosition, wxDefaultSize, 0);
	leftSizer->Add(staticText, 0, wxALIGN_CENTRE | wxALL, 5);

	// 1.end
	horizontalSizer->Add( leftSizer, 0, wxALIGN_TOP |wxALL, 5 );

	// 2.  Group Box for volume settings

	group = new wxStaticBoxSizer(new wxStaticBox(parent, -1,
                                                wxT("Amplification Settings")), wxVERTICAL);

	// 2.1  Add one row each time through loop

	flexGridSizer = new wxFlexGridSizer(3, 0, 0);

	staticText =
       new wxStaticText(parent, ID_TEXT, _("Enabled"),
                        wxDefaultPosition, wxDefaultSize, 0);
	flexGridSizer->Add(staticText, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, 5);

	staticText =
       new wxStaticText(parent, ID_TEXT, wxT("Original Value"),
                        wxDefaultPosition, wxDefaultSize, 0);
	flexGridSizer->Add(staticText, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, 5);

	staticText =
       new wxStaticText(parent, ID_TEXT, wxT("New Value"),
                        wxDefaultPosition, wxDefaultSize, 0);
	flexGridSizer->Add(staticText, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, 5);

	for ( int i = 0 ; i < NUM_CURVE_POINTS ; ++i )
	{
		mctlCheckBoxes[i] =
		   new wxCheckBox(parent, ID_FIRST_CURVE_CHECK + i, "", wxDefaultPosition,
						  wxSize(40, -1), 0);
		flexGridSizer->Add(mctlCheckBoxes[i], 0, wxALIGN_CENTRE | wxALL, 5);
		mctlCheckBoxes[i]->SetValue(true);

		mctlXAxis[i] =
		   new wxTextCtrl(parent, ID_FIRST_CURVE_X + i, "", wxDefaultPosition,
						  wxSize(40, -1), 0,
						  wxTextValidator(wxFILTER_NUMERIC, &mstrXAxis[i] ));
		flexGridSizer->Add(mctlXAxis[i], 0, wxALIGN_CENTRE | wxALL, 5);

		mctlYAxis[i] =
		   new wxTextCtrl(parent, ID_FIRST_CURVE_Y + i, "", wxDefaultPosition,
						  wxSize(40, -1), 0,
						  wxTextValidator(wxFILTER_NUMERIC, &mstrYAxis[i] ));
		flexGridSizer->Add(mctlYAxis[i], 0, wxALIGN_CENTRE | wxALL, 5);
	}
	mctlCheckBoxes[0]->Enable(false);
	mctlXAxis[0]->Enable(false);
	mctlYAxis[0]->Enable(false);
	mctlCheckBoxes[NUM_CURVE_POINTS-1]->Enable(false);
	mctlXAxis[NUM_CURVE_POINTS-1]->Enable(false);
	mctlYAxis[NUM_CURVE_POINTS-1]->Enable(false);

	// 2.end  Add group
	group->Add( flexGridSizer, 0,  wxALIGN_CENTRE|wxALL, 5 );
	horizontalSizer->Add( group, 0, wxALIGN_CENTRE|wxALL, 5 );

	mainSizer->Add( horizontalSizer, 0,  wxALIGN_CENTRE|wxALL, 5 );

	// Last:  Add buttons
	boxSizer = new wxBoxSizer(wxHORIZONTAL);

	// Add restore defaults button
	button =
       new wxButton(parent, ID_RESTORE_DEFAULTS, wxT("Restore Defaults"), wxDefaultPosition,
                    wxDefaultSize, 0);
	boxSizer->Add(button, 0, wxALIGN_CENTRE | wxALL, 5);

	// Add Cancel button
	button =
       new wxButton(parent, wxID_CANCEL, _("&Cancel"), wxDefaultPosition,
                    wxDefaultSize, 0);
	boxSizer->Add(button, 0, wxALIGN_CENTRE | wxALL, 5);

	// Add OK button
	button =
       new wxButton(parent, wxID_OK, _("OK"), wxDefaultPosition,
                    wxDefaultSize, 0);
	button->SetDefault();
	boxSizer->Add(button, 0, wxALIGN_CENTRE | wxALL, 5);

	mainSizer->Add(boxSizer, 0, wxALIGN_CENTRE | wxALL, 5);

	if (set_sizer) {
		parent->SetAutoLayout(TRUE);
		parent->SetSizer(mainSizer);
		if (call_fit) {
			mainSizer->Fit(parent);
			mainSizer->SetSizeHints(parent);
		}
	}

	return mainSizer;
}
Exemple #17
0
MapSidebar::MapSidebar(ScenarioEditor& scenarioEditor, wxWindow* sidebarContainer, wxWindow* bottomBarContainer)
	: Sidebar(scenarioEditor, sidebarContainer, bottomBarContainer), m_SimState(SimInactive)
{
	m_MapSettingsCtrl = new MapSettingsControl(this, m_ScenarioEditor);
	m_MainSizer->Add(m_MapSettingsCtrl, wxSizerFlags().Expand());

	{
		/////////////////////////////////////////////////////////////////////////
		// Random map settings
		wxStaticBoxSizer* sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Random map"));

		sizer->Add(new wxChoice(this, ID_RandomScript), wxSizerFlags().Expand());

		sizer->AddSpacer(5);

		sizer->Add(new wxButton(this, ID_OpenPlayerPanel, _T("Change players")), wxSizerFlags().Expand());

		sizer->AddSpacer(5);

		wxFlexGridSizer* gridSizer = new wxFlexGridSizer(2, 5, 5);
		gridSizer->AddGrowableCol(1);

		wxChoice* sizeChoice = new wxChoice(this, ID_RandomSize);
		gridSizer->Add(new wxStaticText(this, wxID_ANY, _("Map size")), wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT));
		gridSizer->Add(sizeChoice, wxSizerFlags().Expand());

		gridSizer->Add(new wxStaticText(this, wxID_ANY, _("Random seed")), wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT));
		wxBoxSizer* seedSizer = new wxBoxSizer(wxHORIZONTAL);
		seedSizer->Add(Tooltipped(new wxTextCtrl(this, ID_RandomSeed, _T("0"), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator(wxFILTER_NUMERIC)),
			_("Seed value for random map")), wxSizerFlags(1).Expand());
		seedSizer->Add(Tooltipped(new wxButton(this, ID_RandomReseed, _("R"), wxDefaultPosition, wxSize(24, -1)),
			_("New random seed")));
		gridSizer->Add(seedSizer, wxSizerFlags().Expand());

		sizer->Add(gridSizer, wxSizerFlags().Expand());

		sizer->AddSpacer(5);

		sizer->Add(Tooltipped(new wxButton(this, ID_RandomGenerate, _("Generate map")),
			_("Run selected random map script")), wxSizerFlags().Expand());

		m_MainSizer->Add(sizer, wxSizerFlags().Expand().Border(wxTOP, 10));
	}

	{
		/////////////////////////////////////////////////////////////////////////
		// Simulation buttons
		wxStaticBoxSizer* sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Simulation test"));
		wxGridSizer* gridSizer = new wxGridSizer(5);
		gridSizer->Add(Tooltipped(new wxButton(this, ID_SimPlay, _("Play")),
			_("Run the simulation at normal speed")), wxSizerFlags().Expand());
		gridSizer->Add(Tooltipped(new wxButton(this, ID_SimFast, _("Fast")),
			_("Run the simulation at 8x speed")), wxSizerFlags().Expand());
		gridSizer->Add(Tooltipped(new wxButton(this, ID_SimSlow, _("Slow")),
			_("Run the simulation at 1/8x speed")), wxSizerFlags().Expand());
		gridSizer->Add(Tooltipped(new wxButton(this, ID_SimPause, _("Pause")),
			_("Pause the simulation")), wxSizerFlags().Expand());
		gridSizer->Add(Tooltipped(new wxButton(this, ID_SimReset, _("Reset")),
			_("Reset the editor to initial state")), wxSizerFlags().Expand());
		sizer->Add(gridSizer, wxSizerFlags().Expand());
		UpdateSimButtons();
		m_MainSizer->Add(sizer, wxSizerFlags().Expand().Border(wxTOP, 10));
	}
}
void CAccountInfoPage::OnPageChanged( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;

    CWizardAttach*   pWA = ((CWizardAttach*)GetParent());
    CSkinAdvanced*   pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
    CSkinWizardATAM* pSkinWizardATAM = wxGetApp().GetSkinManager()->GetWizards()->GetWizardATAM();
    PROJECT_CONFIG&  pc = pWA->project_config;
    wxString         strBaseConfigLocation = wxString(wxT("/Wizards"));
    wxConfigBase*    pConfig = wxConfigBase::Get(FALSE);
 
    wxASSERT(pSkinAdvanced);
    wxASSERT(pSkinWizardATAM);
    wxASSERT(m_pTitleStaticCtrl);
    wxASSERT(m_pCookieDetectionFailedStaticCtrl);
    wxASSERT(m_pCookieDetectionFailedCtrl);
    wxASSERT(m_pAccountQuestionStaticCtrl);
    wxASSERT(m_pAccountInformationStaticCtrl);
    wxASSERT(m_pAccountCreateCtrl);
    wxASSERT(m_pAccountUseExistingCtrl);
    wxASSERT(m_pAccountEmailAddressStaticCtrl);
    wxASSERT(m_pAccountEmailAddressCtrl);
    wxASSERT(m_pAccountUsernameStaticCtrl);
    wxASSERT(m_pAccountUsernameCtrl);
    wxASSERT(m_pAccountPasswordStaticCtrl);
    wxASSERT(m_pAccountPasswordCtrl);
    wxASSERT(m_pAccountConfirmPasswordStaticCtrl);
    wxASSERT(m_pAccountConfirmPasswordCtrl);
    wxASSERT(m_pAccountPasswordRequirmentsStaticCtrl);
    wxASSERT(m_pAccountManagerLinkLabelStaticCtrl);
    wxASSERT(m_pAccountForgotPasswordCtrl);
    wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced));
    wxASSERT(wxDynamicCast(pSkinWizardATAM, CSkinWizardATAM));


    // We are entering this page, so reterieve the previously used email
    // address and/or username.
    pConfig->SetPath(strBaseConfigLocation);
    m_strAccountEmailAddress = pConfig->Read(wxT("DefaultEmailAddress"));
    m_strAccountUsername = pConfig->Read(wxT("DefaultUsername"));

    // Setup the desired controls and default values.
    static bool bRunOnce = true;
    if (bRunOnce) {
        bRunOnce = false;
        if (!IS_ACCOUNTMANAGERWIZARD()) {
            m_pAccountCreateCtrl->SetValue(true);
            m_pAccountUseExistingCtrl->SetValue(false);
        }
    }

    if (IS_ACCOUNTMANAGERWIZARD()) {
        if (!(pWA->m_bCookieRequired && !pWA->m_bCredentialsDetected)) {
            m_pCookieDetectionFailedStaticCtrl->Hide();
            m_pCookieDetectionFailedCtrl->Hide();
        } else {
            m_pCookieDetectionFailedStaticCtrl->Show();
            m_pCookieDetectionFailedCtrl->Show();
        }

        m_pAccountQuestionStaticCtrl->Hide();
        m_pAccountCreateCtrl->SetValue(false);
        m_pAccountCreateCtrl->Hide();
        m_pAccountUseExistingCtrl->SetValue(true);
        m_pAccountUseExistingCtrl->Hide();
        m_pAccountConfirmPasswordStaticCtrl->Hide();
        m_pAccountConfirmPasswordCtrl->Hide();
        m_pAccountPasswordRequirmentsStaticCtrl->Hide();

        if (pWA->m_bCookieRequired && !pWA->m_bCredentialsDetected) {
            m_pAccountManagerLinkLabelStaticCtrl->Hide();
            m_pAccountForgotPasswordCtrl->Hide();
        }
    } else {
        m_pCookieDetectionFailedStaticCtrl->Hide();
        m_pCookieDetectionFailedCtrl->Hide();
        if (pc.account_creation_disabled || pc.client_account_creation_disabled) {
            m_pAccountCreateCtrl->SetValue(false);
            m_pAccountCreateCtrl->Hide();
            m_pAccountUseExistingCtrl->SetValue(true);
            m_pAccountUseExistingCtrl->Hide();
        } else {
            m_pAccountCreateCtrl->Show();
            m_pAccountCreateCtrl->Enable();
            m_pAccountUseExistingCtrl->Show();
        }
        m_pAccountManagerLinkLabelStaticCtrl->Hide();
    }

    wxString str;
    wxString name = wxString(pc.name.c_str(), wxConvUTF8);
    str.Printf(_("Identify your account at %s"), name.c_str());
    m_pTitleStaticCtrl->SetLabel(str);

    if (!IS_ACCOUNTMANAGERWIZARD() && !IS_ACCOUNTMANAGERUPDATEWIZARD()) {
		if (pc.client_account_creation_disabled) {
			m_pAccountQuestionStaticCtrl->SetLabel(
				_("Please enter your account information\n(to create an account, visit the project's web site)")
			);
		} else if (pc.account_creation_disabled) {
			m_pAccountQuestionStaticCtrl->SetLabel(
				_("This project is not currently accepting new accounts.\nYou can add it only if you already have an account.")
			);
		} else {
			m_pAccountQuestionStaticCtrl->SetLabel(
				_("Are you already running this project?")
			);
		}
        m_pAccountCreateCtrl->SetLabel(
            _("&No, new user")
        );
        m_pAccountUseExistingCtrl->SetLabel(
            _("&Yes, existing user")
        );
    } else {
        if (pWA->m_bCookieRequired && !pWA->m_bCredentialsDetected) {
            m_pCookieDetectionFailedStaticCtrl->SetLabel(
                _("We were not able to set up your account information\nautomatically.\n\nPlease click on the 'Find login information' link\nbelow to find out what to put in the email address and\npassword fields.")
            );
            m_pCookieDetectionFailedCtrl->SetLabel(
                _("Find login information")
            );
            m_pCookieDetectionFailedCtrl->SetURL(
                pWA->m_strCookieFailureURL
            );
        }

        if (pSkinAdvanced->IsBranded() && 
            !pSkinWizardATAM->GetAccountInfoMessage().IsEmpty()) {
            m_pAccountInformationStaticCtrl->SetLabel(
                pSkinWizardATAM->GetAccountInfoMessage()
            );
        }
    }

    if (m_pAccountUseExistingCtrl->GetValue()) {
        m_pAccountConfirmPasswordStaticCtrl->Hide();
        m_pAccountConfirmPasswordCtrl->Hide();
        m_pAccountPasswordRequirmentsStaticCtrl->Hide();
        m_pAccountPasswordStaticCtrl->SetLabel(
            _("&Password:"******"Choose a &password:"******"C&onfirm password:"******"Are you already running %s?"),
            pWA->GetProjectName().c_str()
        );
        m_pAccountQuestionStaticCtrl->SetLabel(strQuestion);
    }

    if (pc.uses_username) {
        if (IS_ACCOUNTMANAGERWIZARD()) {
            if (pSkinAdvanced->IsBranded() && 
                !pSkinWizardATAM->GetAccountInfoMessage().IsEmpty()) {
                m_pAccountInformationStaticCtrl->SetLabel(
                    pSkinWizardATAM->GetAccountInfoMessage()
                );
            }
        }

        m_pAccountEmailAddressCtrl->SetValidator( 
            wxTextValidator(wxFILTER_NONE, &m_strAccountEmailAddress)
        );
        m_pAccountUsernameCtrl->SetValidator(
            wxTextValidator(wxFILTER_ASCII, &m_strAccountUsername)
        );

        m_pAccountEmailAddressStaticCtrl->Hide();
        m_pAccountEmailAddressCtrl->Hide();
        m_pAccountUsernameStaticCtrl->Show();
        m_pAccountUsernameCtrl->Show();

        m_pAccountUsernameStaticCtrl->SetLabel(
            _("&Username:"******"&Email address:")
        );
        m_pAccountEmailAddressCtrl->SetValue(m_strAccountEmailAddress);
    }

    if (pc.min_passwd_length) {
        wxString str;
        str.Printf(_("minimum length %d"), pc.min_passwd_length);
        m_pAccountPasswordRequirmentsStaticCtrl->SetLabel( str );
    }


    if (!IS_ACCOUNTMANAGERWIZARD()) {
        m_pAccountForgotPasswordCtrl->SetLabel(
            _("Forgot your password?")
        );
        m_pAccountForgotPasswordCtrl->SetURL(
            wxString(pWA->m_ProjectInfoPage->GetProjectURL() + _T("get_passwd.php"))
        );
    } else {
        m_pAccountManagerLinkLabelStaticCtrl->SetLabel(
            _("If you have not yet registered with this account manager,\nplease do so before proceeding.  Click on the link below\nto register or to retrieve a forgotten password." )
        );
        m_pAccountForgotPasswordCtrl->SetLabel(
            _("Account manager website")
        );
        m_pAccountForgotPasswordCtrl->SetURL(
            wxString(pWA->m_AccountManagerInfoPage->GetProjectURL())
        );
    }

    if (pc.uses_username) {
        m_pAccountUsernameCtrl->SetFocus();
    } else {
        m_pAccountEmailAddressCtrl->SetFocus();
    }

    Fit();
}
void CAccountInfoPage::CreateControls()
{    

////@begin CAccountInfoPage content construction
    CAccountInfoPage* itemWizardPage56 = this;

    wxBoxSizer* itemBoxSizer57 = new wxBoxSizer(wxVERTICAL);
    itemWizardPage56->SetSizer(itemBoxSizer57);

    m_pTitleStaticCtrl = new wxStaticText;
    m_pTitleStaticCtrl->Create( itemWizardPage56, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    m_pTitleStaticCtrl->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, FALSE, _T("Verdana")));
    itemBoxSizer57->Add(m_pTitleStaticCtrl, 0, wxALIGN_LEFT|wxGROW|wxALL, 5);

    m_pCookieDetectionFailedStaticCtrl = new wxStaticText;
    m_pCookieDetectionFailedStaticCtrl->Create( itemWizardPage56, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    m_pCookieDetectionFailedStaticCtrl->Hide();
    itemBoxSizer57->Add(m_pCookieDetectionFailedStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);

    m_pCookieDetectionFailedCtrl = new wxHyperlinkCtrl;
    m_pCookieDetectionFailedCtrl->Create( itemWizardPage56, ID_ACCOUNTCOOKIEDETECTIONFAILEDCTRL, wxT(" "), wxT(" "), wxDefaultPosition, wxDefaultSize, wxNO_BORDER | wxHL_ALIGN_LEFT | wxHL_CONTEXTMENU );
    m_pCookieDetectionFailedCtrl->Hide();
    itemBoxSizer57->Add(m_pCookieDetectionFailedCtrl, 0, wxALIGN_LEFT|wxALL, 5);

    m_pAccountQuestionStaticCtrl = new wxStaticText;
    m_pAccountQuestionStaticCtrl->Create( itemWizardPage56, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer57->Add(m_pAccountQuestionStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);

    wxFlexGridSizer* itemFlexGridSizer61 = new wxFlexGridSizer(1, 2, 0, 0);
    itemFlexGridSizer61->AddGrowableCol(1);
    itemBoxSizer57->Add(itemFlexGridSizer61, 0, wxGROW|wxALL, 5);

    m_pAccountCreateCtrl = new wxRadioButton;
    m_pAccountCreateCtrl->Create( itemWizardPage56, ID_ACCOUNTCREATECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
    m_pAccountCreateCtrl->SetValue(TRUE);
    itemFlexGridSizer61->Add(m_pAccountCreateCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_pAccountUseExistingCtrl = new wxRadioButton;
    m_pAccountUseExistingCtrl->Create( itemWizardPage56, ID_ACCOUNTUSEEXISTINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    m_pAccountUseExistingCtrl->SetValue(FALSE);
    itemFlexGridSizer61->Add(m_pAccountUseExistingCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_pAccountInformationStaticCtrl = new wxStaticText;
    m_pAccountInformationStaticCtrl->Create( itemWizardPage56, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer57->Add(m_pAccountInformationStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);

    wxFlexGridSizer* itemFlexGridSizer64 = new wxFlexGridSizer(4, 2, 0, 0);
    itemFlexGridSizer64->AddGrowableCol(1);
    itemBoxSizer57->Add(itemFlexGridSizer64, 0, wxEXPAND|wxALL, 0);

    m_pAccountEmailAddressStaticCtrl = new wxStaticText;
    m_pAccountEmailAddressStaticCtrl->Create( itemWizardPage56, ID_ACCOUNTEMAILADDRESSSTATICCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer64->Add(m_pAccountEmailAddressStaticCtrl, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_pAccountEmailAddressCtrl = new wxTextCtrl;
    m_pAccountEmailAddressCtrl->Create( itemWizardPage56, ID_ACCOUNTEMAILADDRESSCTRL, wxEmptyString, wxDefaultPosition, wxSize(200, 22), 0 );
    itemFlexGridSizer64->Add(m_pAccountEmailAddressCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_pAccountUsernameStaticCtrl = new wxStaticText;
    m_pAccountUsernameStaticCtrl->Create( itemWizardPage56, ID_ACCOUNTUSERNAMESTATICCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer64->Add(m_pAccountUsernameStaticCtrl, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_pAccountUsernameCtrl = new wxTextCtrl;
    m_pAccountUsernameCtrl->Create( itemWizardPage56, ID_ACCOUNTUSERNAMECTRL, wxEmptyString, wxDefaultPosition, wxSize(200, 22), 0 );
    itemFlexGridSizer64->Add(m_pAccountUsernameCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_pAccountPasswordStaticCtrl = new wxStaticText;
    m_pAccountPasswordStaticCtrl->Create( itemWizardPage56, ID_ACCOUNTPASSWORDSTATICCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer64->Add(m_pAccountPasswordStaticCtrl, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_pAccountPasswordCtrl = new wxTextCtrl;
    m_pAccountPasswordCtrl->Create( itemWizardPage56, ID_ACCOUNTPASSWORDCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
    itemFlexGridSizer64->Add(m_pAccountPasswordCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_pAccountConfirmPasswordStaticCtrl = new wxStaticText;
    m_pAccountConfirmPasswordStaticCtrl->Create( itemWizardPage56, ID_ACCOUNTCONFIRMPASSWORDSTATICCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer64->Add(m_pAccountConfirmPasswordStaticCtrl, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_pAccountConfirmPasswordCtrl = new wxTextCtrl;
    m_pAccountConfirmPasswordCtrl->Create( itemWizardPage56, ID_ACCOUNTCONFIRMPASSWORDCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
    itemFlexGridSizer64->Add(m_pAccountConfirmPasswordCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    itemFlexGridSizer64->Add( 0, 0 );

    m_pAccountPasswordRequirmentsStaticCtrl = new wxStaticText;
    m_pAccountPasswordRequirmentsStaticCtrl->Create( itemWizardPage56, ID_ACCOUNTREQUIREMENTSSTATICCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    m_pAccountPasswordRequirmentsStaticCtrl->SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE));
    itemFlexGridSizer64->Add(m_pAccountPasswordRequirmentsStaticCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_pAccountManagerLinkLabelStaticCtrl = new wxStaticText;
    m_pAccountManagerLinkLabelStaticCtrl->Create( itemWizardPage56, ID_ACCOUNTLINKLABELSTATICCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer57->Add(m_pAccountManagerLinkLabelStaticCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_pAccountForgotPasswordCtrl = new wxHyperlinkCtrl;
    m_pAccountForgotPasswordCtrl->Create( itemWizardPage56, ID_ACCOUNTFORGOTPASSWORDCTRL, wxT(" "), wxT(" "), wxDefaultPosition, wxDefaultSize, wxNO_BORDER | wxHL_ALIGN_LEFT | wxHL_CONTEXTMENU );
    itemBoxSizer57->Add(m_pAccountForgotPasswordCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    // Set validators
    // m_pAccountEmailAddressCtrl/m_pAccountUsernameCtrl is setup when the OnPageChange event is fired since
    //   it can be a username or an email address.
    m_pAccountEmailAddressCtrl->SetValidator( wxTextValidator(wxFILTER_NONE, &m_strAccountEmailAddress) );
    m_pAccountUsernameCtrl->SetValidator( wxTextValidator(wxFILTER_NONE, &m_strAccountUsername) );
    m_pAccountPasswordCtrl->SetValidator( wxTextValidator(wxFILTER_NONE, &m_strAccountPassword) );
    m_pAccountConfirmPasswordCtrl->SetValidator( wxTextValidator(wxFILTER_NONE, &m_strAccountConfirmPassword) );
    
#ifdef __WXMAC__
    //Accessibility
    HIViewRef buttonView = (HIViewRef)m_pAccountCreateCtrl->GetHandle();
    HIObjectRef   theObject = (HIObjectRef)HIViewGetSuperview(buttonView);
    HIObjectSetAccessibilityIgnored(theObject, true);
#endif
    ////@end CAccountInfoPage content construction

}
Exemple #20
0
NewPlaneDialog::NewPlaneDialog( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style )
{
	wxBoxSizer* mainSizer;
	mainSizer = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* newPlaneStaticSizer;
	newPlaneStaticSizer = new wxStaticBoxSizer( new wxStaticBox( this, -1, wxT("New Plane:") ), wxVERTICAL );
	
	wxGridSizer* mainGirdSizer;
	mainGirdSizer = new wxGridSizer( 2, 2, 0, 0 );
	
	xStaticText = new wxStaticText( this, ID_DEFAULT, wxT("x:"), wxDefaultPosition, wxDefaultSize, 0 );
	mainGirdSizer->Add( xStaticText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	xTextCtrl = new wxTextCtrl( this, ID_DEFAULT, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ,wxTextValidator(wxFILTER_NUMERIC,NULL));
	mainGirdSizer->Add( xTextCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	yStaticText = new wxStaticText( this, ID_DEFAULT, wxT("y:"), wxDefaultPosition, wxDefaultSize, 0 );
	mainGirdSizer->Add( yStaticText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	yTextCtrl = new wxTextCtrl( this, ID_DEFAULT, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ,wxTextValidator(wxFILTER_NUMERIC,NULL));
	mainGirdSizer->Add( yTextCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	zStaticText = new wxStaticText( this, ID_DEFAULT, wxT("z:"), wxDefaultPosition, wxDefaultSize, 0 );
	mainGirdSizer->Add( zStaticText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	zTextCtrl = new wxTextCtrl( this, ID_DEFAULT, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ,wxTextValidator(wxFILTER_NUMERIC,NULL));
	mainGirdSizer->Add( zTextCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	lengthStaticText = new wxStaticText( this, ID_DEFAULT, wxT("length:"), wxDefaultPosition, wxDefaultSize, 0 );
	mainGirdSizer->Add( lengthStaticText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	lengthTextCtrl = new wxTextCtrl( this, ID_DEFAULT, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ,wxTextValidator(wxFILTER_NUMERIC,NULL));
	mainGirdSizer->Add( lengthTextCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	widthStaticText = new wxStaticText( this, ID_DEFAULT, wxT("width:"), wxDefaultPosition, wxDefaultSize, 0 );
	mainGirdSizer->Add( widthStaticText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	widthTextCtrl = new wxTextCtrl( this, ID_DEFAULT, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ,wxTextValidator(wxFILTER_NUMERIC,NULL));
	mainGirdSizer->Add( widthTextCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	segmentLStaticText = new wxStaticText( this, ID_DEFAULT, wxT("segment length:"), wxDefaultPosition, wxDefaultSize, 0 );
	mainGirdSizer->Add( segmentLStaticText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	segmentLTextCtrl = new wxTextCtrl( this, ID_DEFAULT, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ,wxTextValidator(wxFILTER_NUMERIC,NULL));
	mainGirdSizer->Add( segmentLTextCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	segmentWStaticText = new wxStaticText( this, ID_DEFAULT, wxT("segment width:"), wxDefaultPosition, wxDefaultSize, 0 );
	mainGirdSizer->Add( segmentWStaticText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	segmentWTextCtrl = new wxTextCtrl( this, ID_DEFAULT, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ,wxTextValidator(wxFILTER_NUMERIC,NULL));
	mainGirdSizer->Add( segmentWTextCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	axisStaticText = new wxStaticText( this, ID_DEFAULT, wxT("axis:"), wxDefaultPosition, wxDefaultSize, 0 );
	mainGirdSizer->Add( axisStaticText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	wxString axisChoiceChoices[] = { wxT("x"), wxT("y"), wxT("z") };
	int axisChoiceNChoices = sizeof( axisChoiceChoices ) / sizeof( wxString );
	axisChoice = new wxChoice( this, ID_DEFAULT, wxDefaultPosition, wxDefaultSize, axisChoiceNChoices, axisChoiceChoices, 0 );
	mainGirdSizer->Add( axisChoice, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	newPlaneStaticSizer->Add( mainGirdSizer, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	mainSizer->Add( newPlaneStaticSizer, 1, wxEXPAND|wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
	
	wxBoxSizer* buttonSizer;
	buttonSizer = new wxBoxSizer( wxHORIZONTAL );
	
	OKButton = new wxButton( this, onOKButtonPressPlane, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
	buttonSizer->Add( OKButton, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	cancelButton = new wxButton( this, onCancelButtonPressPlane, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	buttonSizer->Add( cancelButton, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	mainSizer->Add( buttonSizer, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
	
	this->SetSizer( mainSizer );
	this->Layout();
	Fit();
	initializeData();
}
Exemple #21
0
sceneLoadOptionDialog::sceneLoadOptionDialog(wxWindow *parent,
                        const wxString& message,
                        const wxString& caption,
                        const wxString& defaultMeshParams,
                        const wxPoint& pos)
						: wxDialog(parent, wxID_ANY, caption,
                              pos, wxDefaultSize)
							  ,
							  epsilonValue(wxString::Format("%g",0.01))
{

    wxBeginBusyCursor();

	wxBoxSizer* topsizer = new wxBoxSizer( wxVERTICAL );

    // 1) text message
    topsizer->Add( CreateTextSizer( message ), 0, wxALL, 5 );

    // 2) prompt and text ctrl
    wxBoxSizer* vinputsizer = new wxBoxSizer(wxVERTICAL);
    //wxFlexGridSizer* vslidersizer = new wxFlexGridSizer(2,1,0,0);
	wxBoxSizer* vslidersizer=new wxBoxSizer(wxVERTICAL);

	//vinputsizer->SetVGap(5);
	//vinputsizer->SetHGap(5);


	cb_RemeshModel = new wxCheckBox(this,SL_CTRLS_ID_CHECKBOX_REMESH_MODEL,_("Average model remesh"));
	cb_RemeshModel->SetToolTip(_("With this option you are able to remesh the input model to make it compatible with all calculation core. Use this option as a last resort"));
	cb_RemeshModel->SetValue(false);
	topsizer->Add(cb_RemeshModel,0,wxLEFT | wxTOP, 5);
	//Champ choix de la correction du modèle
	cb_TryToRepairMesh = new wxCheckBox(this,wxID_ANY,_("Repair model"));
	cb_TryToRepairMesh->SetToolTip(_("If this option is activated, the scene will be imported with a correction process to improve compatibility with the mesh generator"));
	cb_TryToRepairMesh->SetValue(true);
	topsizer->Add(cb_TryToRepairMesh,0,wxLEFT | wxTOP,5);
	//Champ choix maillage de surface
	cb_TryToMeshSurface = new wxCheckBox(this,SL_CTRLS_ID_CHECKBOX_SURFACE_MESH,_("Surface meshing"));
	cb_TryToMeshSurface->SetToolTip(_("Faces of the scene will be meshed in order to enhance the resolution of the surface receivers display"));
	topsizer->Add(cb_TryToMeshSurface,0,wxLEFT | wxTOP,5);
	// Champ de paramètrage de tetgen
	vinputsizer->Add( new wxStaticText( this, wxID_ANY, _("TetGen parameters") ), 0);
	txt_ParamMesh = new wxTextCtrl(this,wxID_ANY,defaultMeshParams);
	txt_ParamMesh->Disable();
	cb_TryToMeshSurface->SetValue(false);
	vinputsizer->Add( txt_ParamMesh,0,wxGROW| wxALL,1);
	topsizer->Add( vinputsizer, 0, wxEXPAND | wxLEFT, 20);
	//Champ choix de conservation des liens entre les groupes et les faces
	cb_KeepExistingFaceLinks = new wxCheckBox(this,SL_CTRLS_ID_CHECKBOX_RESTOREGROUPS,_("Keep existing groups"));
	cb_KeepExistingFaceLinks->SetValue(true);
	cb_KeepExistingFaceLinks->SetToolTip(_("New faces with the same position than old faces keep materials and surface receivers"));
	topsizer->Add(cb_KeepExistingFaceLinks,0,wxLEFT | wxTOP,5);
	//Champ de choix de l'epsilon
	vslidersizer->Add( new wxStaticText( this, wxID_ANY, _("Association maximum distance (m)") ), 0);
	//slider_EpsilonLinkingFaceGroupe = new wxSlider(this,wxID_ANY,1,0,500,wxDefaultPosition,wxDefaultSize,wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS);
	//vslidersizer->Add(slider_EpsilonLinkingFaceGroupe,0,wxGROW| wxALL,1);
	wxTextCtrl* sliderCtrl=new wxTextCtrl(this, SL_CTRLS_ID_COMBO_EPSILON, epsilonValue, wxDefaultPosition, wxDefaultSize, 0,wxTextValidator(wxFILTER_NUMERIC, &epsilonValue));
	sliderCtrl->SetHelpText(_("Association maximum distance (m)"));
	vslidersizer->Add(sliderCtrl,0,wxGROW| wxALL,1);
	topsizer->Add( vslidersizer, 0, wxEXPAND | wxLEFT, 20);
	
    // 3) buttons if any
    wxSizer *buttonSizer = CreateSeparatedButtonSizer(wxOK | wxCANCEL);
    if ( buttonSizer )
    {
        topsizer->Add(buttonSizer, wxSizerFlags().Expand().DoubleBorder());
    }

    SetSizer( topsizer );
    SetAutoLayout( true );

    topsizer->SetSizeHints( this );
    topsizer->Fit( this );

    Centre( wxBOTH );

    wxEndBusyCursor();
}
Exemple #22
0
ChangePitchDialog::ChangePitchDialog(EffectChangePitch * effect, 
												 wxWindow * parent, wxWindowID id, 
												 const wxString & title, 
												 const wxPoint & position, 
												 const wxSize & size, 
												 long style)
: wxDialog(parent, id, title, position, size, style)
{
   m_bLoopDetect = false;
	m_pEffect = effect;

	// NULL out these control members because there are some cases where the 
	// event table handlers get called during this method, and those handlers that 
	// can cause trouble check for NULL.
   m_pChoice_FromPitch = NULL;
	m_pRadioBox_PitchUpDown = NULL;
	m_pChoice_ToPitch = NULL;
   
	m_pTextCtrl_SemitonesChange = NULL;

	m_pTextCtrl_FromFrequency = NULL;
	m_pTextCtrl_ToFrequency = NULL;
   
	m_pTextCtrl_PercentChange = NULL;
	m_pSlider_PercentChange = NULL;

	// effect parameters
	m_FromPitchIndex = -1;		// -1 => uninitialized
	m_bWantPitchDown = false;
	m_ToPitchIndex = -1;			// -1 => uninitialized

	m_SemitonesChange = 0.0;

   m_FromFrequency = 0.0;		// 0.0 => uninitialized
   m_ToFrequency = 0.0;			// 0.0 => uninitialized

	m_PercentChange = 0.0;

	
	// CREATE THE CONTROLS PROGRAMMATICALLY.
	wxStaticText * pStaticText;

   wxBoxSizer * pBoxSizer_Dialog = new wxBoxSizer(wxVERTICAL);

	// heading
   pStaticText = new wxStaticText(this, -1, 
												_("Change Pitch without Changing Tempo"),
												wxDefaultPosition, wxDefaultSize, 0);
   pBoxSizer_Dialog->Add(pStaticText, 0, wxALIGN_CENTER | wxALL, 8);

   pStaticText = new wxStaticText(this, -1, 
												_("by Vaughan Johnson && Dominic Mazzoni"),
												wxDefaultPosition, wxDefaultSize, 0);
   pBoxSizer_Dialog->Add(pStaticText, 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 8);

   pStaticText = new wxStaticText(this, -1, 
												_("using SoundTouch, by Olli Parviainen"),
												wxDefaultPosition, wxDefaultSize, 0);
   pBoxSizer_Dialog->Add(pStaticText, 0, wxALIGN_CENTER | wxBOTTOM | wxLEFT | wxRIGHT, 8);

   pBoxSizer_Dialog->Add(0, 8, 0); // spacer


	// from/to pitch controls
   wxBoxSizer * pBoxSizer_Pitch = new wxBoxSizer(wxHORIZONTAL);
   
   pStaticText = new wxStaticText(this, -1, _("Pitch:   from"),
												wxDefaultPosition, wxDefaultSize, 0);
   pBoxSizer_Pitch->Add(pStaticText, 0, 
								wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 4);

	const wxString strArray_PitchNames[] = 
		{"C", "C#/Db", "D", "D#/Eb", "E", "F", 
       "F#/Gb", "G", "G#/Ab", "A", "A#/Bb", "B"};
	const int numChoicesPitchNames = 12;
   m_pChoice_FromPitch = 
		new wxChoice(this, ID_CHOICE_FROMPITCH, wxDefaultPosition, wxSize(64, -1), 
							numChoicesPitchNames, strArray_PitchNames);
   pBoxSizer_Pitch->Add(m_pChoice_FromPitch, 0, 
								wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, 4);

	const wxString strArray_RadioPitchUpDown[] = {_("up"), _("down")};
	m_pRadioBox_PitchUpDown = 
		new wxRadioBox(this, ID_RADIOBOX_PITCHUPDOWN, "", wxDefaultPosition, wxDefaultSize, 
								2, strArray_RadioPitchUpDown, 1);
   pBoxSizer_Pitch->Add(m_pRadioBox_PitchUpDown, 0, 
								wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, 4);
   
	pStaticText = new wxStaticText(this, -1, _("to"), wxDefaultPosition, wxDefaultSize, 0);
   pBoxSizer_Pitch->Add(pStaticText, 0, 
								wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 4);

   m_pChoice_ToPitch = 
		new wxChoice(this, ID_CHOICE_TOPITCH, wxDefaultPosition, wxSize(64, -1), 
							numChoicesPitchNames, strArray_PitchNames);
   pBoxSizer_Pitch->Add(m_pChoice_ToPitch, 0, 
								wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, 4);

   pBoxSizer_Dialog->Add(pBoxSizer_Pitch, 0, wxALIGN_CENTER | wxALL, 4);


	// semitones change controls
   wxBoxSizer * pBoxSizer_SemitonesChange = new wxBoxSizer(wxHORIZONTAL);
   pStaticText = new wxStaticText(this, -1, _("Semitones (half-steps):"),
												wxDefaultPosition, wxDefaultSize, 0);
   pBoxSizer_SemitonesChange->Add(pStaticText, 0, 
												wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 4);

   m_pTextCtrl_SemitonesChange = 
		new wxTextCtrl(this, ID_TEXT_SEMITONESCHANGE, "0.0", 
							wxDefaultPosition, wxSize(40, -1), 0, 
							wxTextValidator(wxFILTER_NUMERIC));
   pBoxSizer_SemitonesChange->Add(m_pTextCtrl_SemitonesChange, 0, 
												wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, 4);

   pBoxSizer_Dialog->Add(pBoxSizer_SemitonesChange, 0, wxALIGN_CENTER | wxALL, 4);

	
	// from/to frequency controls
   pBoxSizer_Dialog->Add(0, 8, 0); // spacer
   wxBoxSizer * pBoxSizer_Frequency = new wxBoxSizer(wxHORIZONTAL);
   
   pStaticText = new wxStaticText(this, -1, _("Frequency (Hz):   from"),
									       wxDefaultPosition, wxDefaultSize, 0);
   pBoxSizer_Frequency->Add(pStaticText, 0, 
									wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 4);

   m_pTextCtrl_FromFrequency = 
		new wxTextCtrl(this, ID_TEXT_FROMFREQUENCY, "", 
							wxDefaultPosition, wxSize(64, -1), 0,
							wxTextValidator(wxFILTER_NUMERIC));
   pBoxSizer_Frequency->Add(m_pTextCtrl_FromFrequency, 0, 
									wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, 4);

   pStaticText = new wxStaticText(this, -1, _("to"),
									       wxDefaultPosition, wxDefaultSize, 0);
   pBoxSizer_Frequency->Add(pStaticText, 0, 
									wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 4);

   m_pTextCtrl_ToFrequency = 
		new wxTextCtrl(this, ID_TEXT_TOFREQUENCY, "", 
							wxDefaultPosition, wxSize(64, -1), 0,
							wxTextValidator(wxFILTER_NUMERIC));
   pBoxSizer_Frequency->Add(m_pTextCtrl_ToFrequency, 0, 
										wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, 4);

   pBoxSizer_Dialog->Add(pBoxSizer_Frequency, 0, wxALIGN_CENTER | wxALL, 4);


	// percent change control
	
	// Group percent controls with spacers, 
	// rather than static box, so they don't look isolated.
   pBoxSizer_Dialog->Add(0, 8, 0); // spacer

   wxBoxSizer * pBoxSizer_PercentChange = new wxBoxSizer(wxHORIZONTAL);
   
   pStaticText = new wxStaticText(this, -1, _("Percent Change:"),
												wxDefaultPosition, wxDefaultSize, 0);
   pBoxSizer_PercentChange->Add(pStaticText, 0, 
											wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 4);

	//v Override wxTextValidator to disallow negative values <= -100.0?
   m_pTextCtrl_PercentChange = 
		new wxTextCtrl(this, ID_TEXT_PERCENTCHANGE, "0.0", 
							wxDefaultPosition, wxSize(40, -1), 0,
							wxTextValidator(wxFILTER_NUMERIC));
   pBoxSizer_PercentChange->Add(m_pTextCtrl_PercentChange, 0, 
											wxALIGN_CENTER_VERTICAL | wxALL, 4);

   pBoxSizer_Dialog->Add(pBoxSizer_PercentChange, 0, wxALIGN_CENTER | wxALL, 4);

   m_pSlider_PercentChange = 
		new wxSlider(this, ID_SLIDER_PERCENTCHANGE, 
							0, PERCENTCHANGE_MIN, PERCENTCHANGE_MAX,
							wxDefaultPosition, wxSize(100, -1), wxSL_HORIZONTAL);
   pBoxSizer_Dialog->Add(m_pSlider_PercentChange, 1, 
									wxGROW | wxALIGN_CENTER | wxLEFT | wxRIGHT, 4);

   pBoxSizer_Dialog->Add(0, 8, 0); // spacer


	// Preview, OK, & Cancel buttons
   pBoxSizer_Dialog->Add(0, 8, 0); // spacer

   wxBoxSizer * pBoxSizer_OK = new wxBoxSizer(wxHORIZONTAL);

   wxButton * pButton_Preview = 
		new wxButton(this, ID_BUTTON_PREVIEW, m_pEffect->GetPreviewName());
   pBoxSizer_OK->Add(pButton_Preview, 0, wxALIGN_CENTER | wxALL, 4);
   pBoxSizer_OK->Add(32, 8); // horizontal spacer

   wxButton * pButton_Cancel =
       new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0);
   pBoxSizer_OK->Add(pButton_Cancel, 0, wxALIGN_CENTER | wxALL, 4);

   wxButton * pButton_OK =
       new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0);
   pButton_OK->SetDefault();
   pButton_OK->SetFocus();
   pBoxSizer_OK->Add(pButton_OK, 0, wxALIGN_CENTER | wxALL, 4);

   pBoxSizer_Dialog->Add(pBoxSizer_OK, 0, wxALIGN_CENTER | wxALL, 8);


   this->SetAutoLayout(true);
   this->SetSizer(pBoxSizer_Dialog);
   pBoxSizer_Dialog->Fit(this);
   pBoxSizer_Dialog->SetSizeHints(this);
}
//------------------------------------------------------------------------------
// 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
}
wxDumpOpenExternalDlg::wxDumpOpenExternalDlg(wxWindow *parent,
        const wxFileName& filename)
    : wxDialog(parent,
               wxID_ANY,
               wxString::Format
               (
                   _("Open file \"%s\""),
                   filename.GetFullPath().c_str()
               ))
{
    // create controls
    // ---------------

    wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
    sizerTop->Add(new wxStaticText(this, wxID_ANY,
                                   wxString::Format
                                   (
                                       _("Enter command to open file \"%s\":"),
                                       filename.GetFullName().c_str()
                                   )),
                  wxSizerFlags().Border());

    wxSizer *sizerH = new wxBoxSizer(wxHORIZONTAL);

    wxTextCtrl *command = new wxTextCtrl
    (
        this,
        wxID_ANY,
        wxEmptyString,
        wxDefaultPosition,
        wxSize(250, wxDefaultCoord),
        0
#if wxUSE_VALIDATORS
        ,wxTextValidator(wxFILTER_NONE, &m_command)
#endif
    );
    sizerH->Add(command,
                wxSizerFlags(1).Align(wxALIGN_CENTER_VERTICAL));

#if wxUSE_FILEDLG

    wxButton *browse = new wxButton(this, wxID_MORE, wxT(">>"),
                                    wxDefaultPosition, wxDefaultSize,
                                    wxBU_EXACTFIT);
    sizerH->Add(browse,
                wxSizerFlags(0).Align(wxALIGN_CENTER_VERTICAL). Border(wxLEFT));

#endif // wxUSE_FILEDLG

    sizerTop->Add(sizerH, wxSizerFlags(0).Expand().Border());

    sizerTop->Add(new wxStaticLine(this), wxSizerFlags().Expand().Border());

    sizerTop->Add(CreateStdDialogButtonSizer(wxOK | wxCANCEL),
                  wxSizerFlags().Align(wxALIGN_RIGHT).Border());

    // set the sizer &c
    // ----------------

    SetSizer(sizerTop);

    Layout();
    Fit();

    command->SetFocus();
}
Exemple #25
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 );
}
void ZMatrixCalculator::CreateControls()
{    
////@begin ZMatrixCalculator content construction
    ZMatrixCalculator* itemDialog1 = this;

    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
    itemDialog1->SetSizer(itemBoxSizer2);

    wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    wxStaticText* itemStaticText4 = new wxStaticText( itemDialog1, wxID_STATIC, _("Primary Atom:"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    mAtom1Edit = new wxTextCtrl( itemDialog1, ID_ATOM1EDIT, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer3->Add(mAtom1Edit, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer2->Add(itemBoxSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer7 = new wxBoxSizer(wxVERTICAL);
    itemBoxSizer6->Add(itemBoxSizer7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticText* itemStaticText8 = new wxStaticText( itemDialog1, wxID_STATIC, _("Second Atom:"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer7->Add(itemStaticText8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    mAtom2Edit = new wxTextCtrl( itemDialog1, ID_ATOM2EDIT, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer7->Add(mAtom2Edit, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxVERTICAL);
    itemBoxSizer6->Add(itemBoxSizer10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticText* itemStaticText11 = new wxStaticText( itemDialog1, wxID_STATIC, _("Third Atom:"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer10->Add(itemStaticText11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    mAtom3Edit = new wxTextCtrl( itemDialog1, ID_ATOM3EDIT, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer10->Add(mAtom3Edit, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL);
    itemBoxSizer6->Add(itemBoxSizer13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticText* itemStaticText14 = new wxStaticText( itemDialog1, wxID_STATIC, _("Fourth Atom:"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer13->Add(itemStaticText14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    mAtom4Edit = new wxTextCtrl( itemDialog1, ID_ATOM4EDIT, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer13->Add(mAtom4Edit, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer16 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer2->Add(itemBoxSizer16, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer17 = new wxBoxSizer(wxVERTICAL);
    itemBoxSizer16->Add(itemBoxSizer17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer18 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer17->Add(itemBoxSizer18, 0, wxALIGN_RIGHT|wxALL, 5);

    wxStaticText* itemStaticText19 = new wxStaticText( itemDialog1, wxID_STATIC, _("Bond Length:"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer18->Add(itemStaticText19, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    mBondLength = new wxTextCtrl( itemDialog1, ID_BONDLENGTHEDIT, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
    itemBoxSizer18->Add(mBondLength, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer21 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer17->Add(itemBoxSizer21, 0, wxALIGN_RIGHT|wxALL, 5);

    wxStaticText* itemStaticText22 = new wxStaticText( itemDialog1, wxID_STATIC, _("Bond Angle:"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer21->Add(itemStaticText22, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    mBondAngle = new wxTextCtrl( itemDialog1, ID_BONDANGLEEDIT, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
    itemBoxSizer21->Add(mBondAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer24 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer17->Add(itemBoxSizer24, 0, wxALIGN_RIGHT|wxALL, 5);

    wxStaticText* itemStaticText25 = new wxStaticText( itemDialog1, wxID_STATIC, _("Dihedral Angle:"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer24->Add(itemStaticText25, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    mDihedralAngle = new wxTextCtrl( itemDialog1, ID_DIHEDRALANGLEEDIT, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
    itemBoxSizer24->Add(mDihedralAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    // Set validators
    mAtom1Edit->SetValidator( wxTextValidator(wxFILTER_NUMERIC, & atom1) );
    mAtom2Edit->SetValidator( wxTextValidator(wxFILTER_NUMERIC, & atom2) );
    mAtom3Edit->SetValidator( wxTextValidator(wxFILTER_NUMERIC, & atom3) );
    mAtom4Edit->SetValidator( wxTextValidator(wxFILTER_NUMERIC, & atom4) );
////@end ZMatrixCalculator content construction
	mAtom1Edit->SetFocus();
}
DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bMainSizer;
	bMainSizer = new wxBoxSizer( wxVERTICAL );
	
	m_textControlSizer = new wxFlexGridSizer( 2, 2, 3, 3 );
	m_textControlSizer->AddGrowableCol( 1 );
	m_textControlSizer->AddGrowableRow( 0 );
	m_textControlSizer->SetFlexibleDirection( wxBOTH );
	m_textControlSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText1 = new wxStaticText( this, wxID_ANY, _("&Text:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1->Wrap( -1 );
	m_staticText1->SetToolTip( _("Enter the text to be used within the schematic") );
	
	m_textControlSizer->Add( m_staticText1, 0, wxRIGHT, 3 );
	
	wxBoxSizer* bSizeText;
	bSizeText = new wxBoxSizer( wxVERTICAL );
	
	m_textLabelSingleLine = new wxTextCtrl( this, wxID_VALUESINGLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
	m_textLabelSingleLine->SetValidator( wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, &m_labelText ) );
	
	bSizeText->Add( m_textLabelSingleLine, 0, wxEXPAND|wxLEFT, 3 );
	
	m_textLabelMultiLine = new wxTextCtrl( this, wxID_VALUEMULTI, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER );
	m_textLabelMultiLine->SetMaxLength( 0 ); 
	m_textLabelMultiLine->SetMinSize( wxSize( -1,60 ) );
	
	bSizeText->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 );
	
	
	m_textControlSizer->Add( bSizeText, 1, wxEXPAND, 3 );
	
	m_SizeTitle = new wxStaticText( this, wxID_ANY, _("&Size:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_SizeTitle->Wrap( -1 );
	m_textControlSizer->Add( m_SizeTitle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
	
	wxBoxSizer* bSizeCtrlSizer;
	bSizeCtrlSizer = new wxBoxSizer( wxHORIZONTAL );
	
	m_TextSize = new wxTextCtrl( this, wxID_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	bSizeCtrlSizer->Add( m_TextSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 3 );
	
	m_staticSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticSizeUnits->Wrap( -1 );
	bSizeCtrlSizer->Add( m_staticSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
	
	
	m_textControlSizer->Add( bSizeCtrlSizer, 1, wxEXPAND, 3 );
	
	
	bMainSizer->Add( m_textControlSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
	
	wxBoxSizer* m_OptionsSizer;
	m_OptionsSizer = new wxBoxSizer( wxHORIZONTAL );
	
	wxString m_TextOrientChoices[] = { _("Right"), _("Up"), _("Left"), _("Down") };
	int m_TextOrientNChoices = sizeof( m_TextOrientChoices ) / sizeof( wxString );
	m_TextOrient = new wxRadioBox( this, wxID_ANY, _("O&rientation"), wxDefaultPosition, wxDefaultSize, m_TextOrientNChoices, m_TextOrientChoices, 1, wxRA_SPECIFY_COLS );
	m_TextOrient->SetSelection( 0 );
	m_OptionsSizer->Add( m_TextOrient, 1, wxRIGHT|wxTOP, 3 );
	
	wxString m_TextStyleChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
	int m_TextStyleNChoices = sizeof( m_TextStyleChoices ) / sizeof( wxString );
	m_TextStyle = new wxRadioBox( this, wxID_ANY, _("St&yle"), wxDefaultPosition, wxDefaultSize, m_TextStyleNChoices, m_TextStyleChoices, 1, wxRA_SPECIFY_COLS );
	m_TextStyle->SetSelection( 0 );
	m_OptionsSizer->Add( m_TextStyle, 1, wxLEFT|wxRIGHT|wxTOP, 3 );
	
	wxString m_TextShapeChoices[] = { _("Input"), _("Output"), _("Bidirectional"), _("Tri-State"), _("Passive") };
	int m_TextShapeNChoices = sizeof( m_TextShapeChoices ) / sizeof( wxString );
	m_TextShape = new wxRadioBox( this, wxID_ANY, _("S&hape"), wxDefaultPosition, wxDefaultSize, m_TextShapeNChoices, m_TextShapeChoices, 1, wxRA_SPECIFY_COLS );
	m_TextShape->SetSelection( 0 );
	m_OptionsSizer->Add( m_TextShape, 1, wxALL|wxLEFT|wxTOP, 3 );
	
	
	bMainSizer->Add( m_OptionsSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
	
	m_sdbSizer1 = new wxStdDialogButtonSizer();
	m_sdbSizer1OK = new wxButton( this, wxID_OK );
	m_sdbSizer1->AddButton( m_sdbSizer1OK );
	m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
	m_sdbSizer1->Realize();
	
	bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 12 );
	
	
	this->SetSizer( bMainSizer );
	this->Layout();
	bMainSizer->Fit( this );
	
	// Connect Events
	m_textLabelSingleLine->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
	m_textLabelMultiLine->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
	m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnCancelClick ), NULL, this );
	m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnOkClick ), NULL, this );
}
Exemple #28
0
AmplifyDialog::AmplifyDialog(EffectAmplify * effect, 
                             wxWindow * parent, wxWindowID id, 
                             const wxString & title, 
                             const wxPoint & position, const wxSize & size, 
                             long style):
   wxDialog(parent, id, title, position, size, style)
{
   mLoopDetect = false;
	m_pEffect = effect;

   ratio = float(1.0);
   peak = float(0.0);

	wxStaticText * pStaticText;

   wxBoxSizer * pBoxSizer_Dialog = new wxBoxSizer(wxVERTICAL);

   pStaticText = new wxStaticText(this, -1,
                                  _("Amplify by Dominic Mazzoni"),
                                  wxDefaultPosition, wxDefaultSize, 0);
   pBoxSizer_Dialog->Add(pStaticText, 0, wxALIGN_CENTER | wxALL, 10);

   // Amplification text control
   wxBoxSizer *item2 = new wxBoxSizer(wxHORIZONTAL);

   pStaticText = new wxStaticText(this, -1, _("Amplification (dB):"),
                                  wxDefaultPosition, wxDefaultSize, 0);
   item2->Add(pStaticText, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);

   wxTextCtrl * item4 = new wxTextCtrl(this, ID_AMP_TEXT, wxT(""), 
                                       wxDefaultPosition, wxSize(60, -1), 
                                       0, wxTextValidator(wxFILTER_NUMERIC));
   item2->Add(item4, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);

   pBoxSizer_Dialog->Add(item2, 0, wxALIGN_CENTER | wxALL, 5);
   
   // slider
   wxSlider *item5 =
       new wxSlider(this, ID_AMP_SLIDER, 0, AMP_MIN, AMP_MAX,
                    wxDefaultPosition, wxSize(100, -1), wxSL_HORIZONTAL);
   pBoxSizer_Dialog->Add(item5, 1, wxGROW | wxALIGN_CENTER | wxALL, 5);

   // New Peak Amplitude text control
   wxBoxSizer *item6 = new wxBoxSizer(wxHORIZONTAL);
   
   pStaticText = new wxStaticText(this, -1, _("New Peak Amplitude (dB):"),
                                  wxDefaultPosition, wxDefaultSize, 0);
   item6->Add(pStaticText, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
   
   wxTextCtrl *item8 = new wxTextCtrl(this, ID_PEAK_TEXT, wxT(""), 
                                      wxDefaultPosition, wxSize(60, -1), 0);
   item6->Add(item8, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
   
   pBoxSizer_Dialog->Add(item6, 0, wxALIGN_CENTER | wxALL, 5);
   
   // "Allow clipping" checkbox
   wxCheckBox *item8b = new wxCheckBox(this, ID_CLIP_CHECKBOX,
                                       _("Allow clipping"),
                                       wxDefaultPosition, wxDefaultSize, 0);
   
   pBoxSizer_Dialog->Add(item8b, 0, wxALIGN_CENTER | wxALL, 5);

   // Preview, OK, & Cancel buttons
   pBoxSizer_Dialog->Add(CreateStdButtonSizer(this, ePreviewButton|eCancelButton|eOkButton), 0, wxEXPAND);
   
   SetAutoLayout(TRUE);
   SetSizer(pBoxSizer_Dialog);
   pBoxSizer_Dialog->Fit(this);
   pBoxSizer_Dialog->SetSizeHints(this);
}
wxSizer * GpsConfigPanel::GetSplitTargetContainer(){

	wxStaticBoxSizer *sizer = new wxStaticBoxSizer(new wxStaticBox(m_gpsOptionsPanel,-1,"Split Time Target"),wxHORIZONTAL);
	wxFlexGridSizer *innerSizer = new wxFlexGridSizer(3,4,8,8);
	innerSizer->AddGrowableCol(2);

	innerSizer->Add(new wxStaticText(m_gpsOptionsPanel,wxID_ANY,"Split Latitude/Longitude"),1,wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT);

	m_splitLatitudeTextCtrl = new wxTextCtrl(m_gpsOptionsPanel,wxID_ANY,"",wxDefaultPosition,wxDefaultSize,0,wxTextValidator(wxFILTER_NUMERIC));
	m_splitLatitudeTextCtrl->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(GpsConfigPanel::OnSplitLatitudeChanged),NULL,this);
	innerSizer->Add(m_splitLatitudeTextCtrl,1);

	m_splitLongitudeTextCtrl =new wxTextCtrl(m_gpsOptionsPanel,wxID_ANY,"",wxDefaultPosition,wxDefaultSize,0,wxTextValidator(wxFILTER_NUMERIC));
	m_splitLongitudeTextCtrl->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(GpsConfigPanel::OnSplitLongitudeChanged),NULL,this);
	innerSizer->Add(m_splitLongitudeTextCtrl,1);

	innerSizer->Add(new wxStaticText(m_gpsOptionsPanel,wxID_ANY,"Degrees"),1,wxALIGN_CENTER_VERTICAL);

	//next row
	innerSizer->Add(new wxStaticText(m_gpsOptionsPanel,wxID_ANY,"Target Radius"),1,wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT);

	m_splitTargetRadius = new wxTextCtrl(m_gpsOptionsPanel,wxID_ANY,"",wxDefaultPosition,wxDefaultSize,0,wxTextValidator(wxFILTER_NUMERIC));
	m_splitTargetRadius->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(GpsConfigPanel::OnSplitRadiusChanged),NULL,this);
	innerSizer->Add(m_splitTargetRadius,1);

	innerSizer->Add(new wxStaticText(m_gpsOptionsPanel,wxID_ANY,"Degrees"),1,wxALIGN_CENTER_VERTICAL);
	innerSizer->AddStretchSpacer(1);

	sizer->Add(innerSizer);
	sizer->Add(new BitmapWindow(m_gpsOptionsPanel,wxID_ANY,stopwatch_xpm),0, wxALIGN_CENTER_HORIZONTAL);

	return sizer;
}
Exemple #30
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
}