您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wxGetTextFromUser函数代码示例

51自学网 2021-06-03 10:10:17
  C++
这篇教程C++ wxGetTextFromUser函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中wxGetTextFromUser函数的典型用法代码示例。如果您正苦于以下问题:C++ wxGetTextFromUser函数的具体用法?C++ wxGetTextFromUser怎么用?C++ wxGetTextFromUser使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了wxGetTextFromUser函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: wxGetTextFromUser

void frmDatabaseDesigner::OnAddDiagram(wxCommandEvent &event){	wxString newName = wxGetTextFromUser(_("New Diagram Name"), _("Diagram Name"), _("unnamed"), this);	if (!newName.IsEmpty())	{		diagrams->AddPage(design->createDiagram(diagrams, newName, false)->getView(), newName);		setModelChanged(true);	}	UpdateToolbar();}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:12,


示例2: wxGetTextFromUser

/* * buttonNewsAddClick */void panelAdmin::buttonNewsAddClick(wxCommandEvent& event) {    string Message;    Message = (const char *) wxGetTextFromUser( wxT("Enter your news"), wxT("New News" )).mb_str(wxConvUTF8);	if( Message.size() < 5 ) {		wxMessageBox( wxT("Minimum of 5 characters for the news"));        return;	}	_mainApp->serverGet()->moduleGet< moduleMessages >( modMESSAGES )->newsNew( Message );}
开发者ID:segrax,项目名称:KiLLARMY,代码行数:15,


示例3: _

void HTMLButcherAssortedFileGroupsDialog::do_add(){    wxString groupname=wxGetTextFromUser(_("Group name"), _("Add Assorted File Group"),        wxEmptyString, this);    if (!groupname.IsEmpty()) {        ButcherProjectBaseAutoUpdate upd(GetProject());        unsigned long newid=GetProject()->AssortedFileGroups().Add(groupname);        item_add(make_description(GetProject()->AssortedFileGroups().Get(newid)), newid);    }}
开发者ID:RangelReale,项目名称:htmlbutcher,代码行数:12,


示例4: wxGetTextFromUser

void MyFrame::OnSetArgs(wxCommandEvent& event){	wxString args = wxGetTextFromUser(_T("Please enter command line arguments"), _T("MakeSplash"),		wxGetApp().m_cmdLine);	if (!args.IsEmpty())	{		wxGetApp().SetDefaults();		wxGetApp().m_cmdLine = args;		wxGetApp().m_parser.SetCmdLine(wxGetApp().m_cmdLine);		wxGetApp().ProcessCommandLine(this);	}}
开发者ID:stahta01,项目名称:wxCode_components,代码行数:12,


示例5: wxGetTextFromUser

void mmCategDialog::OnEdit(wxCommandEvent& /*event*/){    if (selectedItemId_ == root_ || !selectedItemId_)        return;    const wxString& old_name = m_treeCtrl->GetItemText(selectedItemId_);    const wxString& msg = wxString::Format(_("Enter a new name for %s"), old_name);    const wxString text = wxGetTextFromUser(msg        , _("Edit Category"), m_textCtrl->GetValue());    if (text.IsEmpty())        return;    m_textCtrl->SetValue(text);    mmTreeItemCateg* iData = dynamic_cast<mmTreeItemCateg*>        (m_treeCtrl->GetItemData(selectedItemId_));    if (iData->getSubCategData()->SUBCATEGID == -1) // not subcateg    {        Model_Category::Data_Set categories = Model_Category::instance().find(Model_Category::CATEGNAME(text));        if (!categories.empty())        {            wxString errMsg = _("Category with same name exists");            wxMessageBox(errMsg, _("Organise Categories: Editing Error"), wxOK | wxICON_ERROR);            return;        }        Model_Category::Data* category = iData->getCategData();        category->CATEGNAME = text;        Model_Category::instance().save(category);        mmWebApp::MMEX_WebApp_UpdateCategory();    }    else    {        Model_Category::Data* category = iData->getCategData();        const auto &subcategories = Model_Category::sub_category(category);        for (const auto &entry : subcategories)        {            if (entry.SUBCATEGNAME == text)            {                wxString errMsg = _("Sub Category with same name exists");                wxMessageBox(errMsg, _("Organise Categories: Editing Error"), wxOK | wxICON_ERROR);                return;            }        }        Model_Subcategory::Data* sub_category = iData->getSubCategData();        sub_category->SUBCATEGNAME = text;        Model_Subcategory::instance().save(sub_category);        mmWebApp::MMEX_WebApp_UpdateCategory();    }    m_treeCtrl->SetItemText(selectedItemId_, text);    refreshRequested_ = true;}
开发者ID:bacanhtai,项目名称:moneymanagerex,代码行数:53,


示例6: WXUNUSED

void MyFrame::OnPlay(wxCommandEvent& WXUNUSED(event)){    wxString str = wxGetTextFromUser                   (                    _("Enter your number:"),                    _("Try to guess my number!"),                    wxEmptyString,                    this                   );    if ( str.empty() )    {        // cancelled        return;    }    long num;    if ( !str.ToLong(&num) || num < 0 )    {        str = _("You've probably entered an invalid number.");    }    else if ( num == 9 )    {        // this message is not translated (not in catalog) because we used wxT()        // and not _() around it        str = wxT("You've found a bug in this program!");    }    else if ( num == 17 )    {        str.clear();        // string must be split in two -- otherwise the translation would't be        // found        str << _("Congratulations! you've won. Here is the magic phrase:")            << _("cannot create fifo `%s'");    }    else    {        // this is a more implicit way to write _() but note that if you use it        // you must ensure that the strings get extracted in the message        // catalog as by default xgettext won't do it; it only knows of _(),        // not of wxTRANSLATE(). As internat's readme.txt says you should thus        // call xgettext with -kwxTRANSLATE.        str = wxGetTranslation(wxTRANSLATE("Bad luck! try again..."));        // note also that if we want 'str' to contain a localized string        // we need to use wxGetTranslation explicitly as wxTRANSLATE just        // tells xgettext to extract the string but has no effect on the        // runtime of the program!    }    wxMessageBox(str, _("Result"), wxOK | wxICON_INFORMATION);}
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:53,


示例7: wxGetTextFromUser

void frmDatabaseDesigner::OnRenameDiagram(wxCommandEvent &event){	hdDrawingView *view = (hdDrawingView *) diagrams->GetPage(diagrams->GetSelection());	int diagramIndex = view->getIdx();	wxString name = wxGetTextFromUser(_("Rename diagram ") + diagrams->GetPageText(diagramIndex) + _(" to:"), _("Rename diagram..."), diagrams->GetPageText(diagramIndex), this);	if(!name.IsEmpty() && !name.IsSameAs(diagrams->GetPageText(diagramIndex), false))	{		view->getDrawing()->setName(name);		diagrams->SetPageText(diagramIndex, name);		setModelChanged(true);	}}
开发者ID:dragansah,项目名称:pgadmin3,代码行数:12,


示例8: WXUNUSED

void MainFrame::on_rename_file(wxCommandEvent& WXUNUSED(event)){    MetalinkFile file = editor_.get_file();    wxString filename = wxGetTextFromUser(        wxT("Please enter a file name:"),        wxT("Rename file"),        file.get_filename()    );    if(filename == wxT("")) return;    file.set_filename(filename);    editor_.set_file(file);}
开发者ID:hampus,项目名称:metalink-editor,代码行数:12,


示例9: wxGetTextFromUser

bool hdSimpleTextTool::callDialog(hdDrawingView *view){	wxString sNewValue = wxGetTextFromUser(dlgMessage, dlgCaption, txtFigure->getText(), view);	if (!sNewValue.IsEmpty())	{		txtFigure->setText(sNewValue);		view->notifyChanged();		return true;	}	else		return false;}
开发者ID:kleopatra999,项目名称:pgadmin3,代码行数:12,


示例10: XRCCTRL

void ProjectsFileMasksDlg::OnEdit(wxCommandEvent& /*event*/){    wxListBox* pList = XRCCTRL(*this, "lstCategories", wxListBox);    wxString oldName = pList->GetStringSelection();    wxString groupName = wxGetTextFromUser(_("Rename the group:"),                                            _("Edit group"), oldName);    if (!groupName.IsEmpty() && groupName != oldName)    {        m_FileGroupsAndMasksCopy.RenameGroup(pList->GetSelection(), groupName);        pList->SetString(pList->GetSelection(), groupName);    }}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:12,


示例11: wxGetTextFromUser

// Go to move... menu commandvoid SimpleGoFrame::GoToMove(wxCommandEvent& event){	panel->gnugopause = true;	wxString input = wxGetTextFromUser(wxString::Format("Enter the move number to go to, between 0 and %d:", panel->totmove), "Go to move", "");	if(!input.IsSameAs(""))	{	int num = wxAtoi(input);		if(num>=0 && num<=panel->totmove)		{	panel->gnugopause = true;			panel->gnugoscore = false;			panel->curmove = num;			panel->UpdateBoard();		}	}}
开发者ID:curtisbright,项目名称:simplego,代码行数:14,


示例12: wxGetTextFromUser

void ProjectsFileMasksDlg::OnAdd(wxCommandEvent& /*event*/){    wxString groupName = wxGetTextFromUser(_("Enter the new group name:"),                                            _("New group"));    if (groupName.IsEmpty())        return;    m_FileGroupsAndMasksCopy.AddGroup(groupName);    wxListBox* pList = XRCCTRL(*this, "lstCategories", wxListBox);    pList->Append(groupName);    pList->SetSelection(pList->GetCount() - 1);    ListChange();    XRCCTRL(*this, "txtFileMasks", wxTextCtrl)->SetFocus();}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:13,


示例13: WXUNUSED

void MyFrame::OnHostname( wxCommandEvent& WXUNUSED(event) ){    if (GetHostname()->GetStringSelection() == wxT("..."))    {        wxString s = wxGetTextFromUser(wxT("Specify the name of the host (ignored under DDE)"),            wxT("Host Name"), wxEmptyString, this);        if (!s.IsEmpty() && s != IPC_HOST)        {            GetHostname()->Insert(s, 0);            GetHostname()->SetSelection(0);        }    }}
开发者ID:BauerBox,项目名称:wxWidgets,代码行数:13,


示例14: wxGetTextFromUser

void ConfigDialog::OnLibraryPathsDClick(wxCommandEvent& event){	wxString def = listLibraryPaths->GetStringSelection();	wxString path = wxGetTextFromUser("Enter path:", "Library", def, this);	if (!path.IsEmpty())	{		if (listLibraryPaths->GetSelection() >= 0)		{			listLibraryPaths->SetString(listLibraryPaths->GetSelection(), path);		}	}}
开发者ID:mihazet,项目名称:avr-ide,代码行数:13,


示例15: wxGetTextFromUser

/* TextureXPanel::newTexture * Creates a new, empty texture *******************************************************************/void TextureXPanel::newTexture(){	// Prompt for new texture name	string name = wxGetTextFromUser("Enter a texture name:", "New Texture");	// Do nothing if no name entered	if (name.IsEmpty())		return;	// Process name	name = name.Upper().Truncate(8);	// Create new texture	CTexture* tex = new CTexture();	tex->setName(name);	tex->setState(2);	// Default size = 64x128	tex->setWidth(64);	tex->setHeight(128);	// Setup texture scale	if (texturex.getFormat() == TXF_TEXTURES)	{		tex->setScale(1, 1);		tex->setExtended(true);	}	else		tex->setScale(0, 0);	// Add it after the last selected item	int selected = list_textures->getLastSelected();	if (selected == -1) selected = texturex.nTextures() - 1; // Add to end of the list if nothing selected	texturex.addTexture(tex, selected + 1);	// Record undo level	undo_manager->beginRecord("New Texture");	undo_manager->recordUndoStep(new TextureCreateDeleteUS(this, tex, true));	undo_manager->endRecord(true);	// Update texture list	list_textures->updateList();	// Select the new texture	list_textures->clearSelection();	list_textures->selectItem(selected + 1);	list_textures->EnsureVisible(selected + 1);	// Update variables	modified = true;}
开发者ID:Blzut3,项目名称:SLADE,代码行数:54,


示例16: WXUNUSED

void MyFrame::OnGotoLine (wxCommandEvent& WXUNUSED(event)) {    if (stc==0)        return;    wxString lineString = wxGetTextFromUser(_(Lang[221]), _(Lang[222]), _(""), this);    //Go To Line Number: / Go To Line    if (lineString.IsEmpty())        return;    if (lineString.Contains(":")) {        wxString line, col;        line = lineString.BeforeFirst(':');        col = lineString.AfterFirst(':');        if ((line.IsNumber() || line == "e") && (col.IsNumber() || col == "e")) {            long lineNumber, colNumber;            if (line.IsNumber())                line.ToLong(&lineNumber);            else                lineNumber = stc->GetLineCount();            lineNumber--;            if (col.IsNumber()) {                col.ToLong(&colNumber);                colNumber--;            }            else                colNumber = stc->GetLineEndPosition(lineNumber) -                            stc->PositionFromLine(lineNumber);            if (lineNumber >= 0 && lineNumber < stc->GetLineCount())                stc->GotoLine(lineNumber);            if (colNumber >= 0 && colNumber <=                    stc->GetLineEndPosition(lineNumber) -                    stc->PositionFromLine(lineNumber))                stc->GotoPos(stc->GetCurrentPos() + colNumber);        }    }    else if (lineString == "e")        stc->GotoLine(stc->GetLineCount() - 1);    else if (lineString.IsNumber()) {        long lineNumber;        lineString.ToLong(&lineNumber);        lineNumber--;        if (lineNumber >= 0 && lineNumber <= stc->GetLineCount())            stc->GotoLine(lineNumber);    }}
开发者ID:bihai,项目名称:fbide,代码行数:51,


示例17: wxMessageBox

void PathBehaviorEditor::OnpreviewPnlRightUp(wxMouseEvent& event){    int selectedPoint;    if((selectedPoint = GetPointOnMouse(event)) != -1)    {        if(previewPnlState.state == NOTHING)        {            int menuSelection = previewPnl->GetPopupMenuSelectionFromUser(pointMenu, event.GetPosition());            if(menuSelection == coordsBtID)            {                wxMessageBox(_("Point position:") + gd::String::From(path->at(selectedPoint).x) + ";" + gd::String::From(path->at(selectedPoint).y));            }            else if(menuSelection == positionBtID)            {                int posX = gd::String(wxGetTextFromUser(_("X position:"), _("Position precisely"), gd::String::From(path->at(selectedPoint).x), this)).To<int>();                int posY = gd::String(wxGetTextFromUser(_("Y position:"), _("Position precisely"), gd::String::From(path->at(selectedPoint).y), this)).To<int>();                path->at(selectedPoint).x = posX;                path->at(selectedPoint).y = posY;            }            else if(menuSelection == addPointAfterBtID)            {                if(selectedPoint < (path->size() - 1))                {                    path->insert(path->begin() + selectedPoint + 1, sf::Vector2f((path->at(selectedPoint) + path->at(selectedPoint + 1)) / 2.f));                }            }            else if(menuSelection == removePointBtID)            {                path->erase(path->begin() + selectedPoint);            }        }        previewPnl->Refresh();        previewPnl->Update();    }}
开发者ID:alcemirfernandes,项目名称:GD,代码行数:38,


示例18: wxGetTextFromUser

void QMakeSettingsDlg::OnRename(wxCommandEvent& event){    if ( m_rightClickTabIdx != wxNOT_FOUND ) {        wxString qmakeSettingsName = m_notebook->GetPageText( (size_t) m_rightClickTabIdx );        wxString newName           = wxGetTextFromUser(_("New name:"), _("Rename..."));        if ( newName.empty() == false ) {            QmakeSettingsTab *tab = dynamic_cast<QmakeSettingsTab*>(m_notebook->GetPage(m_rightClickTabIdx));            if (tab) {                tab->SetTabName( newName );                m_notebook->SetPageText( (size_t) m_rightClickTabIdx, newName );            }        }    }}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:14,


示例19: wxGetTextFromUser

bool FilterCompressor::Prepare(WaveTrack *t, double t0, double t1, 	sampleCount total){	wxString temp;	wxWindow *parent = NULL;		temp = wxGetTextFromUser("Please enter an increment (in milliseconds) to apply the filter to", "Increment: ","1", parent, -1, -1, TRUE);	if(temp == "") return false;		while (sscanf((const char *)temp, "%d", &increment) < 0)	{	  temp = wxGetTextFromUser("Please enter a value greater than zero:",	    "Increment: ", "1", parent, -1, -1, TRUE);	  if (temp == "") return false;	}		how_far = 0;	increment *= t->rate / 100; 	return true;}
开发者ID:ruthmagnus,项目名称:audacity,代码行数:23,


示例20: prompt

void UserWizardP2::OnAddNet(wxCommandEvent &event){  wxListCtrl * listctrl = (wxListCtrl *)FindWindow(ID_U_CONFNETS);  wxListBox * listbox = (wxListBox *)FindWindow(ID_U_ALLNETS);  if (listbox->GetSelection() < 0)    return;  wxString prompt(wxT("What is your "));  if (listbox->GetStringSelection() == wxT("ICQ"))    prompt += wxT("UIN/non ICQ Network");  else  {    prompt += wxT(" screen-name/non ");    prompt += listbox->GetStringSelection();    prompt += wxT(" Network?");  }    wxString screenname = wxGetTextFromUser(prompt, wxT("Contact Information"),wxT(""), this);  if (screenname.IsEmpty())    return;  long fingstr = listctrl->FindItem(-1, screenname);  if (fingstr >= 0)  {    if (listctrl->GetItemData(fingstr) == listbox->GetSelection())    {      wxMessageBox(wxT("Sorry, you can't have the same name/network twice."), wxT("Duplicate Info"), wxOK, this);      return;    }  }  wxString prompt2(wxT("Please enter the password for "));  prompt2 += screenname;  prompt2 += wxT(" on network ");  prompt2 += listbox->GetStringSelection();  wxString pw = wxGetPasswordFromUser(prompt2);  m_pwords.insert(m_pwords.begin(), SecByteBlock((const unsigned char *)pw.c_str(), pw.length()));  //pw = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";  listctrl->InsertItem(0, screenname);  listctrl->SetItemData(0, listbox->GetSelection());  listctrl->SetItem(0,1, listbox->GetStringSelection());}
开发者ID:mentat,项目名称:nnim,代码行数:50,


示例21: wxGetTextFromUser

void RAIN::GUI::ChatMain::OnConnect(wxCommandEvent &e){    wxString addr = wxGetTextFromUser(wxT("Enter address:"), wxT("Connect Peer"));    if (addr == wxEmptyString)        return;    if (!addr.Contains(wxT(":")))    {        addr.Append(wxT(":1322"));    }    this->app->connections->ConnectPeer(addr);}
开发者ID:ctz,项目名称:rain,代码行数:14,


示例22: wxGetTextFromUser

/* PaletteEntryPanel::testPalette * A "lite" version of addCustomPalette, which does not add to the * palette folder so the palette is only available for the current * session. *******************************************************************/bool PaletteEntryPanel::testPalette(){	// Get name to export as	string name = "Test: " + wxGetTextFromUser("Enter name for Palette:", "Test Palettes");	// Add to palette manager and main palette chooser	Palette8bit* pal = new Palette8bit();	pal->copyPalette(palettes[cur_palette]);	thePaletteManager->addPalette(pal, name);	thePaletteChooser->addPalette(name);	thePaletteChooser->selectPalette(name);	return true;}
开发者ID:Blue-Shadow,项目名称:SLADE,代码行数:19,


示例23: GetParent

int wxFileDialog::ShowModal(){    wxWindow* parentWindow = GetParent();    if (!parentWindow)        parentWindow = wxTheApp->GetTopWindow();    wxString str = wxGetTextFromUser(m_message, _("File"), m_fileName, parentWindow);    if (str.empty())        return wxID_CANCEL;    m_fileName = str;    m_fileNames.Add(str);    return wxID_OK;}
开发者ID:Annovae,项目名称:Dolphin-Core,代码行数:14,


示例24: SearchHelp

void SearchHelp(wxWindow * parent){   InitHelp(parent);   if (gHelp) {      wxString key = wxGetTextFromUser(_("Search for?"),                                       _("Search help for keyword"),                                       "",                                       parent);      if (!key.IsEmpty())         gHelp->KeywordSearch(key);   }}
开发者ID:andreipaga,项目名称:audacity,代码行数:14,


示例25: WXUNUSED

void ctCustomPropertyDialog::OnPropertyChoiceAdd( wxCommandEvent& WXUNUSED(event) ){    if(m_customPrototype)    {        if ( m_customPropertyEditorType->GetSelection() > -1 && m_customPropertyEditorType->GetStringSelection() == wxT("choice") )        {            wxString str = wxGetTextFromUser(_T("New choice"), _("Add choice"));            if (!str.empty() && m_propertyChoices)            {                m_propertyChoices->Append(str);                m_choices.Add(str);            }        }    }}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:15,


示例26: executeExpressionWindow

bool executeExpressionWindow(wxWindow* parent, DebugInterface* cpu, u64& dest, const wxString& defaultValue){	wxString result = wxGetTextFromUser(L"Enter expression",L"Expression",defaultValue,parent);	if (result.empty())		return false;	wxCharBuffer expression = result.ToUTF8();	if (parseExpression(expression, cpu, dest) == false)	{		displayExpressionError(parent);		return false;	}	return true;}
开发者ID:Coderx7,项目名称:pcsx2,代码行数:15,


示例27: wxGetTextFromUser

/* PatchTablePanel::onBtnAddPatch * Called when the 'New Patch' button is clicked *******************************************************************/void PatchTablePanel::onBtnAddPatch(wxCommandEvent& e) {	// Prompt for new patch name	string patch = wxGetTextFromUser("Enter patch entry name:", "Add Patch", wxEmptyString, this);	// Check something was entered	if (patch.IsEmpty())		return;	// Add to patch table	patch_table->addPatch(patch);	// Update list	list_patches->updateList();	parent->pnamesModified(true);}
开发者ID:doomtech,项目名称:slade,代码行数:18,



注:本文中的wxGetTextFromUser函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ wxGetTranslation函数代码示例
C++ wxGetStockLabel函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。