コード例 #1
0
ファイル: settingsdlg.cpp プロジェクト: ryoon/eCos
void ecConflictResolutionOptionsDialog::CreateControls( wxPanel *parent)
{
    wxSizer *item0 = new wxBoxSizer( wxVERTICAL );

    wxStaticBox *item2 = new wxStaticBox( parent, -1, _("Check for conflicts:") );
    wxSizer *item1 = new wxStaticBoxSizer( item2, wxVERTICAL );

    wxCheckBox *item3 = new wxCheckBox( parent, ecID_CONFLICT_OPTIONS_AFTER_ITEM_CHANGED, _("After any item changed"), wxDefaultPosition, wxDefaultSize, 0 );
    item1->Add( item3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );

    wxCheckBox *item4 = new wxCheckBox( parent, ecID_CONFLICT_OPTIONS_BEFORE_SAVING, _("Before &saving configuration"), wxDefaultPosition, wxDefaultSize, 0 );
    item1->Add( item4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );

    wxCheckBox *item5 = new wxCheckBox( parent, ecID_CONFLICT_OPTIONS_AUTOSUGGEST, _("&Automatically suggest fixes"), wxDefaultPosition, wxDefaultSize, 0 );
    item1->Add( item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );

    item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

    parent->SetAutoLayout( TRUE );
    parent->SetSizer( item0 );

    // Add context-sensitive help
    item2->SetHelpText(_("Options related to conflict resolution."));
    item3->SetHelpText(_("Check for configuration option conflicts after any configuration option value is changed."));
    item4->SetHelpText(_("Check for configuration option conflicts before saving the configuration."));
    item5->SetHelpText(_("When configuration conflicts are found, provide possible solutions."));

    // Add validators
    FindWindow(ecID_CONFLICT_OPTIONS_AFTER_ITEM_CHANGED)->SetValidator(wxGenericValidator(& m_immediate));
    FindWindow(ecID_CONFLICT_OPTIONS_BEFORE_SAVING)->SetValidator(wxGenericValidator(& m_deferred));
    FindWindow(ecID_CONFLICT_OPTIONS_AUTOSUGGEST)->SetValidator(wxGenericValidator(& m_suggestFixes));
}
コード例 #2
0
void udDiagramDialog::OnInit(wxInitDialogEvent& event)
{
	// set validators
	m_eName->SetValidator(wxGenericValidator(&m_Name));
	m_eDescription->SetValidator(wxGenericValidator(&m_Description));
	m_cbGenerate->SetValidator(wxGenericValidator(&m_GenerateCode));
	
	// initialize controls
	bool fSubmachine = (m_pDiagram->GetSubdiagramElement() != NULL);
	
	m_fpOutputFile->Enable( !fSubmachine ); 
	m_chGenerator->Enable( !fSubmachine ); 
	//m_chAlgorithm->Enable( !fSubmachine );
	
	// initialize choices
	udFRAME::FillGeneratorsChoice( m_chGenerator, m_pLanguage, m_pDiagram );
	
	//udGenerator *pGen = wxGetApp().GetMainFrame()->CreateSelectedGenerator();	
	udGenerator *pGen = udPROJECT::CreateGenerator( m_chGenerator->GetStringSelection() );	
    if(pGen)
    {
		udFRAME::FillAlgorithmsChoice( m_chAlgorithm, m_pLanguage, m_pDiagram, pGen );
		delete pGen;
	}
	
	// initialize other controls
	m_fpOutputFile->SetPath( m_OutputFile );
	
	// use validators to transfer a dataOnGeneratorChange
	TransferDataToWindow();
	m_pageAdv->TransferDataToWindow();
	m_pageGen->TransferDataToWindow();
}
コード例 #3
0
ファイル: Leveller.cpp プロジェクト: MartynShaw/audacity
void EffectLeveller::PopulateOrExchange(ShuttleGui & S)
{
   wxASSERT(kNumPasses == WXSIZEOF(kPassStrings));

   wxArrayString passChoices;
   for (int i = 0; i < kNumPasses; i++)
   {
      passChoices.Add(wxGetTranslation(kPassStrings[i]));
   }

   wxArrayString dBChoices(Enums::NumDbChoices,Enums::GetDbChoices());

   S.SetBorder(5);

   S.StartVerticalLay();
   {
      S.AddSpace(5);
      S.StartMultiColumn(2, wxALIGN_CENTER);
      {
         S.AddChoice(_("Degree of Leveling:"),
                     wxT(""),
                     &passChoices)->SetValidator(wxGenericValidator(&mPassIndex));
         S.AddChoice(_("Noise Threshold:"),
                     wxT(""),
                     &dBChoices)->SetValidator(wxGenericValidator(&mDbIndex));
      }
      S.EndMultiColumn();
   }
   S.EndVerticalLay();

   return;
}
コード例 #4
0
ファイル: destination_dlg.cpp プロジェクト: aka2006/RapidSVN
DestinationDlg::DestinationDlg(wxWindow* parent,
                               const wxString & title,
                               const wxString & descr,
                               int flags,
                               const wxString & dst,
                               const wxString & history)
  : DestinationDlgBase(parent, -1, title)
{
  m = new Data(flags, dst, history);

  // The destination:
  if (m->history.IsEmpty())
    m_comboDestination->SetValidator(wxGenericValidator(&m->destination));
  else
    m_comboDestination->SetValidator(HistoryValidator(m->history, &m->destination, false, false));

  m_staticQuestion->SetLabel(descr);
  m_checkForce->SetValidator(wxGenericValidator(&m->force));

  if (!m->withForce)
    m_checkForce->Show(false);
  
  m_mainSizer->SetSizeHints(this);
  m_mainSizer->Fit(this);

  Layout();
  CentreOnParent();

  CheckControls();
}
コード例 #5
0
MyDialog::MyDialog( wxWindow *parent, const wxString& title,
                    const wxPoint& pos, const wxSize& size, const long WXUNUSED(style) ) :
    wxDialog(parent, VALIDATE_DIALOG_ID, title, pos, size, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
{
    // Sizers automatically ensure a workable layout.
    wxBoxSizer *mainsizer = new wxBoxSizer( wxVERTICAL );
    wxFlexGridSizer *flexgridsizer = new wxFlexGridSizer(2, 2, 5, 5);

    // Create and add controls to sizers. Note that a member variable
    // of g_data is bound to each control upon construction. There is
    // currently no easy way to substitute a different validator or a
    // different transfer variable after a control has been constructed.

    // Pointers to some of these controls are saved in member variables
    // so that we can use them elsewhere, like this one.
    text = new wxTextCtrl(this, VALIDATE_TEXT, wxT(""),
        wxPoint(10, 10), wxSize(120, -1), 0,
        wxTextValidator(wxFILTER_ALPHA, &g_data.m_string));
    flexgridsizer->Add(text);

    // This wxCheckBox* doesn't need to be assigned to any pointer
    // because we don't use it elsewhere--it can be anonymous.
    // We don't need any such pointer to query its state, which
    // can be gotten directly from g_data.
    flexgridsizer->Add(new wxCheckBox(this, VALIDATE_CHECK, wxT("Sample checkbox"),
        wxPoint(130, 10), wxSize(120, -1), 0,
        wxGenericValidator(&g_data.m_checkbox_state)));

    flexgridsizer->Add(new wxListBox((wxWindow*)this, VALIDATE_LIST,
        wxPoint(10, 30), wxSize(120, -1),
        3, g_listbox_choices, wxLB_MULTIPLE,
        wxGenericValidator(&g_data.m_listbox_choices)));

    combobox = new wxComboBox((wxWindow*)this, VALIDATE_COMBO, wxT(""),
        wxPoint(130, 30), wxSize(120, -1),
        3, g_combobox_choices, 0L,
        wxGenericValidator(&g_data.m_combobox_choice));
    flexgridsizer->Add(combobox);

    mainsizer->Add(flexgridsizer, 1, wxGROW | wxALL, 10);

    mainsizer->Add(new wxRadioBox((wxWindow*)this, VALIDATE_RADIO, wxT("Pick a color"),
        wxPoint(10, 100), wxSize(-1, -1),
        3, g_radiobox_choices, 1, wxRA_SPECIFY_ROWS,
        wxGenericValidator(&g_data.m_radiobox_choice)),
        0, wxGROW | wxALL, 10);

    wxGridSizer *gridsizer = new wxGridSizer(2, 2, 5, 5);

    wxButton *ok_button = new wxButton(this, wxID_OK, wxT("OK"), wxPoint(250, 70), wxSize(80, 30));
    ok_button->SetDefault();
    gridsizer->Add(ok_button);
    gridsizer->Add(new wxButton(this, wxID_CANCEL, wxT("Cancel"), wxPoint(250, 100), wxSize(80, 30)));

    mainsizer->Add(gridsizer, 0, wxGROW | wxALL, 10);

    SetSizer(mainsizer);
    mainsizer->SetSizeHints(this);
}
コード例 #6
0
void udEnumElementDialog::OnInit(wxInitDialogEvent& event)
{
	// set validators
	m_eName->SetValidator(wxGenericValidator(&m_Name));
	m_eDescription->SetValidator(wxGenericValidator(&m_Description));
	m_eValue->SetValidator(wxGenericValidator(&m_Value));
	
	// use validators to transfer a data
	TransferDataToWindow();
	m_pageAdv->TransferDataToWindow();
}
コード例 #7
0
// Set the validators for the dialog controls
void BookDialog::SetDialogValidators()
{
    FindWindow(ID_ENABLED)->SetValidator(
        wxGenericValidator(& dat.m_enabled));
    FindWindow(ID_SUGGEST)->SetValidator(
        wxGenericValidator(& dat.m_suggest));
    FindWindow(ID_LIMIT_MOVES)->SetValidator(
        wxGenericValidator(& dat.m_limit_moves));
    FindWindow(ID_POST_LIMIT_PERCENT)->SetValidator(
        wxGenericValidator(& dat.m_post_limit_percent));
}
コード例 #8
0
	MountOptionsDialog::MountOptionsDialog (wxWindow *parent, MountOptions &options, const wxString &title, bool disableMountOptions)
		: MountOptionsDialogBase (parent, wxID_ANY, wxString()
#ifdef __WXGTK__ // GTK apparently needs wxRESIZE_BORDER to support dynamic resizing
		, wxDefaultPosition, wxSize (-1,-1), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
#endif
		), Options (options)
	{
		if (!title.empty())
			this->SetTitle (title);
		else if (options.Path && !options.Path->IsEmpty())
			this->SetTitle (StringFormatter (LangString["ENTER_PASSWORD_FOR"], wstring (*options.Path)));
		else
			this->SetTitle (LangString["ENTER_TC_VOL_PASSWORD"]);

		if (disableMountOptions)
			OptionsButton->Show (false);

		PasswordPanel = new VolumePasswordPanel (this, &options, options.Password, disableMountOptions, options.Keyfiles, !disableMountOptions, true, true, false, true, true);
		PasswordPanel->SetCacheCheckBoxValidator (wxGenericValidator (&Options.CachePassword));

		PasswordSizer->Add (PasswordPanel, 1, wxALL | wxEXPAND);

#ifdef __WXGTK__
		FilesystemOptionsSizer->Remove (FilesystemSpacer);
		OptionsPanel->Show (false);
		Fit();
		Layout();
		SetMinSize (GetSize());
#endif

		NoFilesystemCheckBox->SetValidator (wxGenericValidator (&Options.NoFilesystem));
		RemovableCheckBox->SetValidator (wxGenericValidator (&Options.Removable));
		PartitionInSystemEncryptionScopeCheckBox->SetValidator (wxGenericValidator (&Options.PartitionInSystemEncryptionScope));

		TransferDataToWindow();

		if (Options.MountPoint && !Options.MountPoint->IsEmpty())
			 MountPointTextCtrl->SetValue (wstring (*Options.MountPoint));

		FilesystemOptionsTextCtrl->SetValue (Options.FilesystemOptions);

		ReadOnlyCheckBox->SetValue (Options.Protection == VolumeProtection::ReadOnly);
		ProtectionCheckBox->SetValue (Options.Protection == VolumeProtection::HiddenVolumeReadOnly);

		OptionsButtonLabel = OptionsButton->GetLabel();
		OptionsButton->SetLabel (OptionsButtonLabel + L" >");
		OptionsPanel->Show (false);

		ProtectionPasswordPanel = new VolumePasswordPanel (OptionsPanel, &options, options.ProtectionPassword, true, options.ProtectionKeyfiles, false, true, true, false, true, true, _("P&assword to hidden volume:"));
		ProtectionPasswordSizer->Add (ProtectionPasswordPanel, 1, wxALL | wxEXPAND);

		UpdateDialog();
		Center();
	}
コード例 #9
0
void CSafeCombinationSetup::CreateControls()
{
////@begin CSafeCombinationSetup content construction
  CSafeCombinationSetup* itemDialog1 = this;

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

  wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1, wxID_STATIC, _("A new password database will be created.\nThe safe combination will be used to encrypt the password database file.\nYou can use any keyboard character. The combination is case-sensitive."), wxDefaultPosition, wxDefaultSize, 0 );
  itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_LEFT|wxALL, 5);

  wxGridSizer* itemGridSizer4 = new wxGridSizer(2, 0, -50);
  itemBoxSizer2->Add(itemGridSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

  wxStaticText* itemStaticText5 = new wxStaticText( itemDialog1, wxID_STATIC, _("Safe Combination:"), wxDefaultPosition, wxDefaultSize, 0 );
  itemGridSizer4->Add(itemStaticText5, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

  wxTextCtrl* itemTextCtrl6 = new wxTextCtrl( itemDialog1, ID_PASSWORD, wxEmptyString, wxDefaultPosition, wxSize(itemDialog1->ConvertDialogToPixels(wxSize(120, -1)).x, -1), wxTE_PASSWORD );
  itemGridSizer4->Add(itemTextCtrl6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

  wxStaticText* itemStaticText7 = new wxStaticText( itemDialog1, wxID_STATIC, _("Verify:"), wxDefaultPosition, wxDefaultSize, 0 );
  itemGridSizer4->Add(itemStaticText7, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

  wxTextCtrl* itemTextCtrl8 = new wxTextCtrl( itemDialog1, ID_VERIFY, wxEmptyString, wxDefaultPosition, wxSize(itemDialog1->ConvertDialogToPixels(wxSize(120, -1)).x, -1), wxTE_PASSWORD );
  itemGridSizer4->Add(itemTextCtrl8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

#ifndef NO_YUBI
  m_YubiBtn = new wxBitmapButton( itemDialog1, ID_YUBIBTN, itemDialog1->GetBitmapResource(wxT("graphics/Yubikey-button.xpm")), wxDefaultPosition, itemDialog1->ConvertDialogToPixels(wxSize(40, 15)), wxBU_AUTODRAW );
  itemGridSizer4->Add(m_YubiBtn, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM|wxSHAPED, 5);

  m_yubiStatusCtrl = new wxStaticText( itemDialog1, ID_YUBISTATUS, _("Please insert your YubiKey"), wxDefaultPosition, wxDefaultSize, 0 );
  itemGridSizer4->Add(m_yubiStatusCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
#endif

  wxStdDialogButtonSizer* itemStdDialogButtonSizer11 = new wxStdDialogButtonSizer;

  itemBoxSizer2->Add(itemStdDialogButtonSizer11, 0, wxALIGN_LEFT|wxALL, 5);
  wxButton* itemButton12 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
  itemStdDialogButtonSizer11->AddButton(itemButton12);

  wxButton* itemButton13 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
  itemStdDialogButtonSizer11->AddButton(itemButton13);

  wxButton* itemButton14 = new wxButton( itemDialog1, wxID_HELP, _("&Help"), wxDefaultPosition, wxDefaultSize, 0 );
  itemStdDialogButtonSizer11->AddButton(itemButton14);

  itemStdDialogButtonSizer11->Realize();

  // Set validators
  itemTextCtrl6->SetValidator( wxGenericValidator(& m_password) );
  itemTextCtrl8->SetValidator( wxGenericValidator(& m_verify) );
////@end CSafeCombinationSetup content construction
}
コード例 #10
0
void KiDisplayOptionsFrame::CreateControls()
{    
	SetFont(*g_DialogFont);

////@begin KiDisplayOptionsFrame content construction
    // Generated by DialogBlocks, 17/02/2006 18:31:55 (unregistered)

    KiDisplayOptionsFrame* itemDialog1 = this;

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

    wxFlexGridSizer* itemFlexGridSizer3 = new wxFlexGridSizer(3, 2, 0, 0);
    itemBoxSizer2->Add(itemFlexGridSizer3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_IsShowPadNum = new wxCheckBox( itemDialog1, PADNUM_OPT, _("Pad &Num"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_IsShowPadNum->SetValue(false);
    itemFlexGridSizer3->Add(m_IsShowPadNum, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxButton* itemButton5 = new wxButton( itemDialog1, ID_SAVE_CONFIG, _("Save Cfg"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer3->Add(itemButton5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_IsShowPadFill = new wxCheckBox( itemDialog1, PADFILL_OPT, _("&Pad Fill"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_IsShowPadFill->SetValue(false);
    itemFlexGridSizer3->Add(m_IsShowPadFill, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    itemFlexGridSizer3->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);

    wxString m_EdgesDisplayOptionStrings[] = {
        _("&Filaire"),
        _("&Filled"),
        _("&Sketch")
    };
    m_EdgesDisplayOption = new wxRadioBox( itemDialog1, EDGE_SELECT, _("Edges:"), wxDefaultPosition, wxDefaultSize, 3, m_EdgesDisplayOptionStrings, 1, wxRA_SPECIFY_COLS );
    itemFlexGridSizer3->Add(m_EdgesDisplayOption, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxString m_TextDisplayOptionStrings[] = {
        _("&Filaire"),
        _("&Filled"),
        _("&Sketch")
    };
    m_TextDisplayOption = new wxRadioBox( itemDialog1, TEXT_SELECT, _("Texts:"), wxDefaultPosition, wxDefaultSize, 3, m_TextDisplayOptionStrings, 1, wxRA_SPECIFY_COLS );
    itemFlexGridSizer3->Add(m_TextDisplayOption, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    // Set validators
    m_IsShowPadNum->SetValidator( wxGenericValidator(& DisplayOpt.DisplayPadNum) );
    m_IsShowPadFill->SetValidator( wxGenericValidator(& DisplayOpt.DisplayPadFill) );
    m_EdgesDisplayOption->SetValidator( wxGenericValidator(& DisplayOpt.DisplayModEdge) );
    m_TextDisplayOption->SetValidator( wxGenericValidator(& DisplayOpt.DisplayModText) );
////@end KiDisplayOptionsFrame content construction
}
コード例 #11
0
ファイル: dropobject.cpp プロジェクト: eriser/wxsqlite3
/*---------------------------------------------------------------------------*/
void wxDropObject::CreateControls()
{    
   wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL);
   SetSizer(bSizer1);

   wxStaticText* iStatic1 = new wxStaticText(this, wxID_STATIC,
                                             _("Object Type :"),
                                             wxDefaultPosition, wxDefaultSize, 0);
   bSizer1->Add(iStatic1, 0, wxALIGN_LEFT|wxALL, 5);

   wxArrayString m_ChoiceObjTypeStrings;
   m_ChoiceObjTypeStrings.Add(_("TABLE"));
   m_ChoiceObjTypeStrings.Add(_("VIEW"));
   m_ChoiceObjTypeStrings.Add(_("INDEX"));
   m_ChoiceObjTypeStrings.Add(_("TRIGGER"));
   m_ChoiceObjType = new wxChoice(this, ID_OBJ_TYPE, wxDefaultPosition,
                                  wxSize(200, -1), m_ChoiceObjTypeStrings, 0);
   bSizer1->Add(m_ChoiceObjType, 0, wxGROW|wxALL, 5);

   wxStaticText* iStatic2 = new wxStaticText(this, wxID_STATIC,
                                             _("Object Name :"),
                                             wxDefaultPosition, wxDefaultSize, 0);
   bSizer1->Add(iStatic2, 0, wxALIGN_LEFT|wxALL, 5);

   wxArrayString m_TextObjNameStrings;
   m_TextObjName = new wxChoice(this, ID_OBJ_NAME, wxDefaultPosition,
                                wxSize(200, -1), m_TextObjNameStrings, 0);
   bSizer1->Add(m_TextObjName, 0, wxGROW|wxALL, 5);

   bSizer1->Add(5, 5, 1, wxGROW|wxALL, 5);

   wxStdDialogButtonSizer* dBtnSizer1 = new wxStdDialogButtonSizer;

   bSizer1->Add(dBtnSizer1, 0, wxALIGN_RIGHT|wxALL, 5);
   wxButton* btnOk = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition,
                                  wxDefaultSize, 0);
   btnOk->SetDefault();
   dBtnSizer1->AddButton(btnOk);

   wxButton* btnCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"),
                                      wxDefaultPosition, wxDefaultSize, 0);
   dBtnSizer1->AddButton(btnCancel);

   dBtnSizer1->Realize();

   // Set validators
   m_ChoiceObjType->SetValidator(wxGenericValidator(& m_ObjectType));
   m_TextObjName->SetValidator(wxGenericValidator(& m_ObjectName));
}
コード例 #12
0
/// Creates the controls and sizers.
void CDlgSelectComputer::CreateControls()
{    
    CDlgSelectComputer* itemDialog1 = this;

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

    wxFlexGridSizer* itemFlexGridSizer3 = new wxFlexGridSizer(1, 2, 0, 0);
    itemBoxSizer2->Add(itemFlexGridSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL);
    itemFlexGridSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxFlexGridSizer* itemFlexGridSizer5 = new wxFlexGridSizer(2, 2, 0, 0);
    itemBoxSizer4->Add(itemFlexGridSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    wxStaticText* itemStaticText6 = new wxStaticText;
    itemStaticText6->Create( itemDialog1, wxID_STATIC, _("Host name:"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer5->Add(itemStaticText6, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxString* m_ComputerNameCtrlStrings = NULL;
    m_ComputerNameCtrl = new wxComboBox;
    m_ComputerNameCtrl->Create( itemDialog1, ID_SELECTCOMPUTERNAME, _T(""), wxDefaultPosition, wxSize(250, -1), 0, m_ComputerNameCtrlStrings, wxCB_DROPDOWN );
    itemFlexGridSizer5->Add(m_ComputerNameCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticText* itemStaticText8 = new wxStaticText;
    itemStaticText8->Create( itemDialog1, wxID_STATIC, _("Password:"******""), wxDefaultPosition, wxSize(250, -1), wxTE_PASSWORD );
    itemFlexGridSizer5->Add(m_ComputerPasswordCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxVERTICAL);
    itemFlexGridSizer3->Add(itemBoxSizer10, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_TOP|wxALL, 5);

    wxButton* itemButton11 = new wxButton;
    itemButton11->Create( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
    itemButton11->SetDefault();
    itemBoxSizer10->Add(itemButton11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    wxButton* itemButton12 = new wxButton;
    itemButton12->Create( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer10->Add(itemButton12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    // Set validators
    m_ComputerNameCtrl->SetValidator(wxGenericValidator(&m_strComputerName));
    m_ComputerPasswordCtrl->SetValidator(wxGenericValidator(&m_strComputerPassword));
}
コード例 #13
0
ファイル: configitem.cpp プロジェクト: ryoon/eCos
//// Operations
void ecEditStringDialog::CreateControls(wxWindow* parent)
{
    wxSizer *item0 = new wxBoxSizer( wxVERTICAL );

    wxSizer *item1 = new wxBoxSizer( wxHORIZONTAL );

    item1->Add( 20, 20, 10, wxALIGN_CENTRE|wxALL, 5 );

    wxButton *item2 = new wxButton( parent, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
    item2->SetDefault();
    item1->Add( item2, 0, wxALIGN_CENTRE|wxALL, 5 );

    wxButton *item3 = new wxButton( parent, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
    item1->Add( item3, 0, wxALIGN_CENTRE|wxALL, 5 );

    item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP, 5 );

    wxTextCtrl *item4 = new wxTextCtrl( parent, ecID_STRING_EDIT_TEXTCTRL, _(""), wxDefaultPosition, wxSize(420,250), wxTE_MULTILINE );
    item0->Add( item4, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );

    parent->SetAutoLayout( TRUE );
    parent->SetSizer( item0 );
    parent->Layout();
    item0->Fit( parent );
    item0->SetSizeHints( parent );

    FindWindow(ecID_STRING_EDIT_TEXTCTRL)->SetValidator(wxGenericValidator(& m_value));
    FindWindow(ecID_STRING_EDIT_TEXTCTRL)->SetFocus();
}
コード例 #14
0
ファイル: opennodedialog.cpp プロジェクト: glennspr/iCanPic
void OpenNodeDialog::CreateControls()
{    
////@begin OpenNodeDialog content construction
    // Generated by DialogBlocks, 17/06/2008 09:29:15 (Personal Edition)

    OpenNodeDialog* itemDialog1 = this;

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

    wxStaticBox* itemStaticBoxSizer3Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Select node"));
    wxStaticBoxSizer* itemStaticBoxSizer3 = new wxStaticBoxSizer(itemStaticBoxSizer3Static, wxVERTICAL);
    itemBoxSizer2->Add(itemStaticBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    wxSpinCtrl* itemSpinCtrl4 = new wxSpinCtrl( itemDialog1, GSI_ID_CLIENT_TEST_SPINCTRL1, _T("254"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 255, 254 );
    itemSpinCtrl4->SetHelpText(_("Hardware node to open (254 is the node physically attached to device)"));
    if (OpenNodeDialog::ShowToolTips())
        itemSpinCtrl4->SetToolTip(_("Hardware node to open (254 is the node physically attached to device)"));
    itemStaticBoxSizer3->Add(itemSpinCtrl4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

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

    wxButton* itemButton6 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer5->Add(itemButton6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxButton* itemButton7 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer5->Add(itemButton7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    // Set validators
    itemSpinCtrl4->SetValidator( wxGenericValidator(& m_node) );
////@end OpenNodeDialog content construction
}
コード例 #15
0
ファイル: Noise.cpp プロジェクト: MartynShaw/audacity
void EffectNoise::PopulateOrExchange(ShuttleGui & S)
{
   wxASSERT(kNumTypes == WXSIZEOF(kTypeStrings));

   wxArrayString typeChoices;
   for (int i = 0; i < kNumTypes; i++)
   {
      typeChoices.Add(wxGetTranslation(kTypeStrings[i]));
   }

   S.StartMultiColumn(2, wxCENTER);
   {
      S.AddChoice(_("Noise type:"), wxT(""), &typeChoices)->SetValidator(wxGenericValidator(&mType));

      FloatingPointValidator<double> vldAmp(6, &mAmp, NUM_VAL_NO_TRAILING_ZEROES);
      vldAmp.SetRange(MIN_Amp, MAX_Amp);
      S.AddTextBox(_("Amplitude (0-1):"), wxT(""), 12)->SetValidator(vldAmp);

      S.AddPrompt(_("Duration:"));
      mNoiseDurationT = new
         NumericTextCtrl(NumericConverter::TIME,
                         S.GetParent(),
                         wxID_ANY,
                         GetDurationFormat(),
                         GetDuration(),
                         mProjectRate,
                         wxDefaultPosition,
                         wxDefaultSize,
                         true);
      mNoiseDurationT->SetName(_("Duration"));
      mNoiseDurationT->EnableMenu();
      S.AddWindow(mNoiseDurationT, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL);
   }
   S.EndMultiColumn();
}
コード例 #16
0
ファイル: Noise.cpp プロジェクト: finefin/audacity
void EffectNoise::PopulateOrExchange(ShuttleGui & S)
{
   wxASSERT(nTypes == WXSIZEOF(kTypeStrings));

   S.StartMultiColumn(2, wxCENTER);
   {
      auto typeChoices = LocalizedStrings(kTypeStrings, nTypes);
      S.AddChoice(_("Noise type:"), wxT(""), &typeChoices)->SetValidator(wxGenericValidator(&mType));

      FloatingPointValidator<double> vldAmp(6, &mAmp, NumValidatorStyle::NO_TRAILING_ZEROES);
      vldAmp.SetRange(MIN_Amp, MAX_Amp);
      S.AddTextBox(_("Amplitude (0-1):"), wxT(""), 12)->SetValidator(vldAmp);

      S.AddPrompt(_("Duration:"));
      mNoiseDurationT = safenew
         NumericTextCtrl(S.GetParent(), wxID_ANY,
                         NumericConverter::TIME,
                         GetDurationFormat(),
                         GetDuration(),
                         mProjectRate,
                         NumericTextCtrl::Options{}
                            .AutoPos(true));
      mNoiseDurationT->SetName(_("Duration"));
      S.AddWindow(mNoiseDurationT, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL);
   }
   S.EndMultiColumn();
}
コード例 #17
0
// Set the validators for the dialog controls
void GameDetailsDialog::SetDialogValidators()
{
    FindWindow(ID_WHITE_PLAYER_NAME)->SetValidator(
        wxTextValidator(wxFILTER_NONE, &white));
    FindWindow(ID_BLACK_PLAYER_NAME)->SetValidator(
        wxTextValidator(wxFILTER_NONE, &black)); 
    FindWindow(ID_EVENT)->SetValidator(
        wxTextValidator(wxFILTER_NONE, &event));
    FindWindow(ID_SITE)->SetValidator(
        wxTextValidator(wxFILTER_NONE, &site));
    FindWindow(ID_DATE)->SetValidator(
        wxTextValidator(wxFILTER_ASCII, &date));
    FindWindow(ID_ROUND)->SetValidator(
        wxTextValidator(wxFILTER_ASCII, &round));
//    FindWindow(ID_BOARD_NBR)->SetValidator(
//        wxTextValidator(wxFILTER_ASCII, &board_nbr));
    FindWindow(ID_RESULT)->SetValidator(
        wxGenericValidator(&result));
    FindWindow(ID_ECO)->SetValidator(
        wxTextValidator(wxFILTER_ASCII, &eco));
    FindWindow(ID_WHITE_ELO)->SetValidator(
        wxTextValidator(wxFILTER_ASCII, &white_elo));
    FindWindow(ID_BLACK_ELO)->SetValidator(
        wxTextValidator(wxFILTER_ASCII, &black_elo));
}
コード例 #18
0
void ConnectToDialog::InitControls()
{
    wxStaticText *stIPAddress = new wxStaticText(this, wxID_ANY, wxT("IP"));
    wxTextCtrl *editIPAddress = new wxTextCtrl(this, wxID_ANY);
    editIPAddress->SetValidator(wxTextValidator(wxFILTER_ASCII, &m_ipAddress));
    wxStaticText *stPort = new wxStaticText(this, wxID_ANY, wxT("Port"));
    wxTextCtrl *editPort = new wxTextCtrl(this, wxID_ANY);
    editPort->SetValidator(wxGenericValidator(&m_port));

    wxFlexGridSizer *gridSizer = new wxFlexGridSizer(2);
    gridSizer->AddGrowableCol(1);
    gridSizer->Add(stIPAddress, 0, wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL, 5);
    gridSizer->Add(editIPAddress, 1, wxALL | wxEXPAND, 5);
    gridSizer->Add(stPort, 0, wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL, 5);
    gridSizer->Add(editPort, 1, wxALL | wxEXPAND, 5);

    wxStdDialogButtonSizer *btnSizer = new wxStdDialogButtonSizer();
    wxButton *btnOK = new wxButton(this, wxID_OK);
    wxButton *btnCancel = new wxButton(this, wxID_CANCEL);
    btnSizer->AddButton(btnOK);
    btnSizer->AddButton(btnCancel);
    btnSizer->Realize();

    wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);

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

    SetSizerAndFit(mainSizer);
}
コード例 #19
0
/*---------------------------------------------------------------------------*/
void wxPrefDlg::CreateControls()
{
   CreatePanelGeneral();
   CreatePanelEditor();
   CreatePanelSyntax();
   // Set validators
   m_MaxHistory->SetValidator(wxGenericValidator(& m_Val_MaxHistory));
   m_SaveWinPos->SetValidator(wxGenericValidator(& m_Val_SavePos));
   m_SaveWinPers->SetValidator(wxGenericValidator(& m_Val_SavePers));
   m_ShowEdgeLine->SetValidator(wxGenericValidator(& m_Val_ShowEdge));
   m_ShowLineNumber->SetValidator(wxGenericValidator(& m_Val_ShowLineNumber));
   m_UseTab->SetValidator(wxGenericValidator(& m_Val_UseTab));
   m_TabIndent->SetValidator(wxGenericValidator(& m_Val_TabIndent));
   m_BackspaceUnindent->SetValidator(wxGenericValidator(& m_Val_BackUnindent));
   m_TabWidth->SetValidator(wxGenericValidator(& m_Val_TabWidth));
   m_IdentWidth->SetValidator(wxGenericValidator(& m_Val_IndentWidth));
}
コード例 #20
0
ファイル: EditStringDlg.cpp プロジェクト: omegaonline/oocore
EditStringDlg::EditStringDlg(wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long /*style*/):
    wxDialog(parent, id, title, pos, size, wxDEFAULT_DIALOG_STYLE)
{
    // begin wxGlade: EditStringDlg::EditStringDlg
    m_lblName = new wxStaticText(this, -1, _("Value &name:"));
    m_txtName = new wxTextCtrl(this, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
    m_lblValue = new wxStaticText(this, -1, _("&Value data:"));
    m_txtValue = new wxTextCtrl(this, -1, wxT(""));
    m_buttons = new wxStdButtons(this, -1, wxOK|wxCANCEL);

    set_properties();
    do_layout();
    // end wxGlade

	m_txtValue->SetValidator(wxGenericValidator(&m_strValue));
	m_txtName->SetValidator(wxGenericValidator(&m_strName));
}
コード例 #21
0
void AddParameterDialog::CreateControls()
{    
////@begin AddParameterDialog content construction
    AddParameterDialog* itemDialog1 = this;

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

    wxFlexGridSizer* itemFlexGridSizer3 = new wxFlexGridSizer(2, 2, 0, 0);
    itemFlexGridSizer3->AddGrowableCol(1);
    itemBoxSizer2->Add(itemFlexGridSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxTOP, 5);

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

    wxArrayString m_ParamTypeChoiceStrings;
    m_ParamTypeChoiceStrings.Add(_("None"));
    m_ParamTypeChoiceStrings.Add(_("Numeric"));
    m_ParamTypeChoiceStrings.Add(_("Boolean"));
    m_ParamTypeChoice = new wxChoice( itemDialog1, ID_PARAM_TYPE_CHOICE, wxDefaultPosition, wxDefaultSize, m_ParamTypeChoiceStrings, 0 );
    itemFlexGridSizer3->Add(m_ParamTypeChoice, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticText* itemStaticText6 = new wxStaticText( itemDialog1, wxID_STATIC, _("Label:"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer3->Add(itemStaticText6, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxTextCtrl* itemTextCtrl7 = new wxTextCtrl( itemDialog1, ID_PARAM_LABEL_TEXTCTRL, _T(""), wxDefaultPosition, wxSize(200, -1), 0 );
    itemFlexGridSizer3->Add(itemTextCtrl7, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStdDialogButtonSizer* itemStdDialogButtonSizer8 = new wxStdDialogButtonSizer;

    itemBoxSizer2->Add(itemStdDialogButtonSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    wxButton* itemButton9 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
    itemStdDialogButtonSizer8->AddButton(itemButton9);

    wxButton* itemButton10 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
    itemStdDialogButtonSizer8->AddButton(itemButton10);

    itemStdDialogButtonSizer8->Realize();

    // Set validators
    m_ParamTypeChoice->SetValidator( wxGenericValidator(& m_ParamType) );
    itemTextCtrl7->SetValidator( wxGenericValidator(& m_ParamLabel) );
////@end AddParameterDialog content construction
    TransferDataToWindow();
}
コード例 #22
0
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();
}
コード例 #23
0
ファイル: constantEditor.cpp プロジェクト: carrierlxk/rcc
ConstantEditor::ConstantEditor(wxWindow* parent, DialCut *dc) : 
  wxDialog(parent,-1,"ConstantEditor",wxDefaultPosition, wxSize(300,300)), _dc(dc) {
  
  wxGridSizer *sizer = new wxGridSizer(2,5,5);
  SetSizer(sizer);
  _edgeThres = 100.;
  
  sizer->Add(new wxStaticText(this,-1, "Inertia:"));
  sizer->Add(new wxFloatCtrl(this, wxFloatValidator(&(dc->_inertia))));

  sizer->Add(new wxStaticText(this,-1, "Potts:"));
  sizer->Add(new wxFloatCtrl(this, wxFloatValidator(&(dc->_potts))));

  sizer->Add(new wxStaticText(this,-1, "Seam:"));
  sizer->Add(new wxFloatCtrl(this, wxFloatValidator(&(dc->_regular_inter))));

  sizer->Add(new wxStaticText(this,-1, "Brightness:"));
  sizer->Add(new wxFloatCtrl(this, wxFloatValidator(&(dc->_bright))));

  sizer->Add(new wxStaticText(this,-1, "Edge Threshold:"));
  sizer->Add(new wxFloatCtrl(this, wxFloatValidator(&_edgeThres)));

  sizer->Add(new wxStaticText(this,-1, "Seam Cost Type:"));
  wxString strs[4] = {wxT("Image only"), wxT("Image + Gradient"), wxT("Gradients only"), wxT("Both")};
  _choice = new wxChoice(this,-1,wxDefaultPosition, wxDefaultSize, 4,strs, 0);
  setSelectorRight();
  sizer->Add(_choice);

  sizer->Add(new wxStaticText(this,-1, "Num Dial:"));
  sizer->Add(new wxIntCtrl(this, wxIntValidator(&dc->_numDial)));

  sizer->Add(new wxStaticText(this,-1, "Force Stroke:"));
  sizer->Add(new wxCheckBox(this, -1, "", wxDefaultPosition, wxDefaultSize, 0, 
			    wxGenericValidator(&(dc->_forceStroke))));

  sizer->Add(new wxStaticText(this,-1, "Multi-region brush:"));
  sizer->Add(new wxCheckBox(this, -1, "", wxDefaultPosition, wxDefaultSize, 0, 
			    wxGenericValidator(&(dc->_multiRegion))));

  sizer->Add(new wxButton(this, wxID_OK, "Apply"));

}
コード例 #24
0
void udAggregationDialog::OnInit(wxInitDialogEvent& event)
{
	// set validators
	m_eName->SetValidator(wxGenericValidator(&m_Name));
	m_eDescription->SetValidator(wxGenericValidator(&m_Description));
	m_chbIncludeClass->SetValidator(wxGenericValidator(&m_IncludeClass));
	
	// initialize choice
	wxString sAT;
	int i = 0;
	
	while( (sAT = m_Lang->GetAccessTypeString( (udLanguage::ACCESSTYPE)i++ )) != wxEmptyString )
	{
		m_chAccess->Append( sAT );
	}
	if( i ) m_chAccess->SetSelection( m_AccessType );
	
	// use validators to transfer a data
	TransferDataToWindow();
	m_pageAdv->TransferDataToWindow();
}
コード例 #25
0
void VncImageSettingsDialog::CreateControls()
{
////@begin VncImageSettingsDialog content construction
    if (!wxXmlResource::Get()->LoadDialog(this, GetParent(), _T("ID_DIALOG_IMAGE_VNC")))
        wxLogError(wxT("Missing wxXmlResource::Get()->Load() in OnInit()?"));
    m_pCtrlUseJpegQuality = XRCCTRL(*this, "ID_CHECKBOX_X11_JPEG_CUSTOMQUALITY", wxCheckBox);
    m_pCtrlJpegQuality = XRCCTRL(*this, "ID_SLIDER_X11_JPEG_QALITY", wxSlider);
    // Set validators
    if (FindWindow(XRCID("ID_RADIOBUTTON_VNC_JPEG_AND_RGB")))
        FindWindow(XRCID("ID_RADIOBUTTON_VNC_JPEG_AND_RGB"))->SetValidator( wxGenericValidator(& m_bImageEncodingBoth) );
    if (FindWindow(XRCID("ID_RADIOBUTTON_VNC_JPEG")))
        FindWindow(XRCID("ID_RADIOBUTTON_VNC_JPEG"))->SetValidator( wxGenericValidator(& m_bImageEncodingJpeg) );
    if (FindWindow(XRCID("ID_RADIOBUTTON_VNC_PNG")))
        FindWindow(XRCID("ID_RADIOBUTTON_VNC_PNG"))->SetValidator( wxGenericValidator(& m_bImageEncodingPNG) );
    if (FindWindow(XRCID("ID_RADIOBUTTON_VNC_PLAIN")))
        FindWindow(XRCID("ID_RADIOBUTTON_VNC_PLAIN"))->SetValidator( wxGenericValidator(& m_bImageEncodingPlainX) );
    if (FindWindow(XRCID("ID_CHECKBOX_X11_JPEG_CUSTOMQUALITY")))
        FindWindow(XRCID("ID_CHECKBOX_X11_JPEG_CUSTOMQUALITY"))->SetValidator( wxGenericValidator(& m_bUseJpegQuality) );
    if (FindWindow(XRCID("ID_SLIDER_X11_JPEG_QALITY")))
        FindWindow(XRCID("ID_SLIDER_X11_JPEG_QALITY"))->SetValidator( wxGenericValidator(& m_iJpegQuality) );
////@end VncImageSettingsDialog content construction

    // Create custom windows not generated automatically here.

////@begin VncImageSettingsDialog content initialisation
////@end VncImageSettingsDialog content initialisation
    UpdateDialogConstraints(false);
}
コード例 #26
0
ファイル: revert_dlg.cpp プロジェクト: aka2006/RapidSVN
RevertDlg::RevertDlg(wxWindow* parent)
  : RevertDlgBase(parent)
{
  m = new Data();

  m_checkRecursive->SetValidator(wxGenericValidator(&m->recursive));

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

  Layout();
  CentreOnParent();
}
コード例 #27
0
ファイル: unlock_dlg.cpp プロジェクト: aka2006/RapidSVN
UnlockDlg::UnlockDlg(wxWindow * parent)
  : UnlockDlgBase(parent)
{
  m = new Data();

  m_checkForce->SetValidator(wxGenericValidator(&m->force));

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

  Layout();
  CentreOnParent();
}
コード例 #28
0
ファイル: addproxydlg.cpp プロジェクト: kerneltravel/multiget
void CAddProxy::Init()
{
    wxBoxSizer * all = new wxBoxSizer( wxVERTICAL );
    wxBoxSizer* name = new wxStaticBoxSizer( wxHORIZONTAL, this, _("Proxy Name") );

    name->Add(
        new wxTextCtrl( this, -1, _( "" ), wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator( &m_name ) ),
        100, wxALL );
    all->Add( name, 0, wxEXPAND );

    wxBoxSizer* mid = new wxBoxSizer( wxHORIZONTAL );
    wxBoxSizer* arg = new wxStaticBoxSizer( wxVERTICAL, this, _("Proxy Args") );
    arg->AddSpacer( 5 );
    arg->Add( new wxStaticText( this, -1, _("Server") ) );
    arg->Add( new wxTextCtrl( this, -1, _( "" ), wxDefaultPosition, wxSize( 180, 25 ), 0, wxGenericValidator( &m_server ) ), 0, wxALL );
    arg->Add( new wxStaticText( this, -1, _("Port") ) );
    arg->Add( new wxTextCtrl( this, -1, _( "" ), wxDefaultPosition, wxSize( 180, 25 ), 0, wxGenericValidator( &m_port ) ), 0, wxALL );
    arg->Add( new wxStaticText( this, -1, _("User[option]") ) );
    arg->Add( new wxTextCtrl( this, -1, _( "" ), wxDefaultPosition, wxSize( 180, 25 ), 0, wxGenericValidator( &m_user ) ), 0, wxALL );
    arg->Add( new wxStaticText( this, -1, _("Password[option]") ) );
    arg->Add( new wxTextCtrl( this, -1, _( "" ), wxDefaultPosition, wxSize( 180, 25 ), 0, wxGenericValidator( &m_pass ) ), 0, wxALL );
    arg->SetMinSize( 200, 200 );
    mid->Add( arg, 0, wxEXPAND );
    mid->AddSpacer( 20 );

    wxString choices[ 6 ] =
    {
        _( "socks auto version" ),
        _( "socks version 4" ),
        _( "socks version 4a" ),
        _( "socks version 5 " ),
        _( "ftp proxy" ),
        _( "http proxy" )
    };
    mid->Add(
        new wxRadioBox( this, -1, _("Type"), wxDefaultPosition, wxSize( 180, 200 ), 6, choices, 0, wxRA_SPECIFY_ROWS, wxGenericValidator( &m_type ) ),
        0,
        wxEXPAND | wxALIGN_RIGHT );

    all->Add( mid, 0, wxEXPAND );


    wxBoxSizer* but = new wxBoxSizer( wxHORIZONTAL );


    but->Add( new wxButton( this, wxID_CANCEL, _( "Cancel" ) ), 0, wxALL, 5 );
    but->Add( new wxButton( this, wxID_OK, _( "OK" ) ), 0, wxALL, 5 );
    all->Add( but, 0, wxALIGN_RIGHT );

    SetSizer( all );
}
コード例 #29
0
ファイル: addproxydlg.cpp プロジェクト: coolshou/multiget
void CAddProxy::Init()
{
    wxBoxSizer * all = new wxBoxSizer( wxVERTICAL );
    wxBoxSizer* name = new wxStaticBoxSizer( wxHORIZONTAL, this, _MGSTR( _S_ADDPROXYDLG_PROXYNAME ) );

    name->Add(
        new wxTextCtrl( this, -1, wxT( "" ), wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator( &m_name ) ),
        100, wxALL );
    all->Add( name, 0, wxEXPAND );

    wxBoxSizer* mid = new wxBoxSizer( wxHORIZONTAL );
    wxBoxSizer* arg = new wxStaticBoxSizer( wxVERTICAL, this, _MGSTR( _S_ADDPROXYDLG_PROXYARGS ) );
    arg->AddSpacer( 5 );
    arg->Add( new wxStaticText( this, -1, _MGSTR( _S_ADDPROXYDLG_SERVER ) ) );
    arg->Add( new wxTextCtrl( this, -1, wxT( "" ), wxDefaultPosition, wxSize( 180, 25 ), 0, wxGenericValidator( &m_server ) ), 0, wxALL );
    arg->Add( new wxStaticText( this, -1, _MGSTR( _S_ADDPROXYDLG_PORT ) ) );
    arg->Add( new wxTextCtrl( this, -1, wxT( "" ), wxDefaultPosition, wxSize( 180, 25 ), 0, wxGenericValidator( &m_port ) ), 0, wxALL );
    arg->Add( new wxStaticText( this, -1, _MGSTR( _S_ADDPROXYDLG_USER ) ) );
    arg->Add( new wxTextCtrl( this, -1, wxT( "" ), wxDefaultPosition, wxSize( 180, 25 ), 0, wxGenericValidator( &m_user ) ), 0, wxALL );
    arg->Add( new wxStaticText( this, -1, _MGSTR( _S_ADDPROXYDLG_PASS ) ) );
    arg->Add( new wxTextCtrl( this, -1, wxT( "" ), wxDefaultPosition, wxSize( 180, 25 ), 0, wxGenericValidator( &m_pass ) ), 0, wxALL );
    arg->SetMinSize( 200, 200 );
    mid->Add( arg, 0, wxEXPAND );
    mid->AddSpacer( 20 );

    wxString choices[ 6 ] =
        {
            wxT( "socks auto version" ),
            wxT( "socks version 4" ),
            wxT( "socks version 4a" ),
            wxT( "socks version 5 " ),
            wxT( "ftp proxy" ),
            wxT( "http proxy" )
        };
    mid->Add(
        new wxRadioBox( this, -1, _MGSTR( _S_ADDPROXYDLG_PROXYTYPE ), wxDefaultPosition, wxSize( 180, 200 ), 6, choices, 0, wxRA_SPECIFY_ROWS, wxGenericValidator( &m_type ) ),
        0,
        wxEXPAND | wxALIGN_RIGHT );

    all->Add( mid, 0, wxEXPAND );


    wxBoxSizer* but = new wxBoxSizer( wxHORIZONTAL );


    but->Add( new wxButton( this, wxID_CANCEL, wxT( "Cancel" ) ), 0, wxALL, 5 );
    but->Add( new wxButton( this, wxID_OK, wxT( "OK" ) ), 0, wxALL, 5 );
    all->Add( but, 0, wxALIGN_RIGHT );

    SetSizer( all );
}
コード例 #30
0
void CSafeCombinationSetup::CreateControls()
{    
////@begin CSafeCombinationSetup content construction
  CSafeCombinationSetup* itemDialog1 = this;

  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);

  wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1, wxID_STATIC, _("A new password database will be created.\nThe safe combination will be used to encrypt the password database file.\nYou can use any keyboard character. The combination is case-sensitive.\n"), wxDefaultPosition, wxDefaultSize, 0 );
  itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_LEFT|wxALL, 5);

  wxGridSizer* itemGridSizer4 = new wxGridSizer(2, 2, 0, -50);
  itemBoxSizer2->Add(itemGridSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

  wxStaticText* itemStaticText5 = new wxStaticText( itemDialog1, wxID_STATIC, _("Safe Combination:"), wxDefaultPosition, wxDefaultSize, 0 );
  itemGridSizer4->Add(itemStaticText5, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

  wxTextCtrl* itemTextCtrl6 = new wxTextCtrl( itemDialog1, ID_PASSWORD, wxEmptyString, wxDefaultPosition, wxSize(itemDialog1->ConvertDialogToPixels(wxSize(120, -1)).x, -1), wxTE_PASSWORD );
  itemGridSizer4->Add(itemTextCtrl6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

  wxStaticText* itemStaticText7 = new wxStaticText( itemDialog1, wxID_STATIC, _("Verify:"), wxDefaultPosition, wxDefaultSize, 0 );
  itemGridSizer4->Add(itemStaticText7, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

  wxTextCtrl* itemTextCtrl8 = new wxTextCtrl( itemDialog1, ID_VERIFY, wxEmptyString, wxDefaultPosition, wxSize(itemDialog1->ConvertDialogToPixels(wxSize(120, -1)).x, -1), wxTE_PASSWORD );
  itemGridSizer4->Add(itemTextCtrl8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

  wxStdDialogButtonSizer* sizer = CreateStdDialogButtonSizer(wxOK|wxCANCEL|wxHELP);
  sizer->Add(new ExternalKeyboardButton(itemDialog1), wxSizerFlags().Border(wxLEFT));
  itemBoxSizer2->Add(sizer, wxSizerFlags().Border().Expand().Proportion(0));

  SetSizerAndFit(itemBoxSizer2);

  // Set validators
  itemTextCtrl6->SetValidator( wxGenericValidator(& m_password) );
  itemTextCtrl8->SetValidator( wxGenericValidator(& m_verify) );
////@end CSafeCombinationSetup content construction
}