本文整理汇总了C++中wxGenericValidator函数的典型用法代码示例。如果您正苦于以下问题:C++ wxGenericValidator函数的具体用法?C++ wxGenericValidator怎么用?C++ wxGenericValidator使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wxGenericValidator函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wxBoxSizer
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: OnInit
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: wxASSERT
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: DestinationDlgBase
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: WXUNUSED
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: OnInit
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: FindWindow
// 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: MountOptionsDialogBase
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: wxBoxSizer
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: SetFont
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: wxBoxSizer
/*---------------------------------------------------------------------------*/
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: wxBoxSizer
/// 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, wxDefaultSize, 0 );
itemFlexGridSizer5->Add(itemStaticText8, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_ComputerPasswordCtrl = new wxTextCtrl;
m_ComputerPasswordCtrl->Create( itemDialog1, wxID_ANY, _T(""), 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: wxBoxSizer
//// 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: wxBoxSizer
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: wxASSERT
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();
}