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

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

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

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

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

示例1: reHex

void MemoryView::OnUpdate(wxCommandEvent& e){    static wxRegEx reHex(wxT("[0][x][0-9a-fA-F][0-9a-fA-F]"));    // extract the text memory from the text control and pass it to the debugger    wxString memory;    wxArrayString lines = wxStringTokenize(m_textCtrlMemory->GetValue(), wxT("/n"), wxTOKEN_STRTOK);    for (size_t i=0; i<lines.GetCount(); i++) {        wxString line = lines.Item(i).AfterFirst(wxT(':')).BeforeFirst(wxT(':')).Trim().Trim(false);        wxArrayString hexValues = wxStringTokenize(line, wxT(" "), wxTOKEN_STRTOK);        for (size_t y=0; y<hexValues.GetCount(); y++) {            wxString hex = hexValues.Item(y);            if (reHex.Matches( hex ) && hex.Len() == 4) {                // OK                continue;            } else {                wxMessageBox(wxString::Format(_("Invalid memory value: %s"), hex), _("CodeLite"), wxICON_WARNING|wxOK);                // update the pane to old value                ManagerST::Get()->UpdateDebuggerPane();                return;            }        }        if (line.IsEmpty() == false) {            memory << line << wxT(" ");        }    }    // set the new memory    memory = memory.Trim().Trim(false);    ManagerST::Get()->SetMemory(m_textCtrlExpression->GetValue(), GetSize(), memory);    // update the view    ManagerST::Get()->UpdateDebuggerPane();}
开发者ID:05storm26,项目名称:codelite,代码行数:35,


示例2: towxstring

void PWSGridTable::RestoreSettings(void) const{  wxString colShown = towxstring(PWSprefs::GetInstance()->GetPref(PWSprefs::ListColumns));  wxString colWidths = towxstring(PWSprefs::GetInstance()->GetPref(PWSprefs::ColumnWidths));  wxArrayString colShownArray = wxStringTokenize(colShown, wxT(" /r/n/t,"), wxTOKEN_STRTOK);  wxArrayString colWidthArray = wxStringTokenize(colWidths, wxT(" /r/n/t,"), wxTOKEN_STRTOK);    if (colShownArray.Count() != colWidthArray.Count() || colShownArray.Count() == 0)    return;  //turn off all the columns first  for(size_t n = 0; n < WXSIZEOF(PWSGridCellData); ++n) {    PWSGridCellData[n].visible = false;  }  //now turn on the selected columns  for( size_t idx = 0; idx < colShownArray.Count(); ++idx) {    const int fieldType = wxAtoi(colShownArray[idx]);    const int fieldWidth = wxAtoi(colWidthArray[idx]);    for(size_t n = 0; n < WXSIZEOF(PWSGridCellData); ++n) {      if (PWSGridCellData[n].ft == fieldType) {        PWSGridCellData[n].visible = true;        PWSGridCellData[n].width = fieldWidth;        PWSGridCellData[n].position = idx;        break;      }    }  }}
开发者ID:pwsafe,项目名称:pwsafe,代码行数:30,


示例3: wxStringTokenize

void ConnectionParams::Deserialize(wxString configStr){    Valid = true;    wxArrayString prms = wxStringTokenize( configStr, _T(";") );    if ( prms.Count() < 18 )    {        Valid = false;        return; //Old short format, we dump it    }    Type = (ConnectionType)wxAtoi(prms[0]);    NetProtocol = (NetworkProtocol)wxAtoi(prms[1]);    NetworkAddress = prms[2];    NetworkPort = (ConnectionType)wxAtoi(prms[3]);        Protocol = (DataProtocol)wxAtoi(prms[4]);    Port = prms[5];    Baudrate = wxAtoi(prms[6]);    Wordlen = wxAtoi(prms[7]);    Parity = (ParityType)wxAtoi(prms[8]);    Stopbits = wxAtoi(prms[9]);    RtsCts = !!wxAtoi(prms[10]);    XonXoff = !!wxAtoi(prms[11]);    EOS = (EOSType)wxAtoi(prms[12]);    ChecksumCheck = !!wxAtoi(prms[13]);    Output = !!wxAtoi(prms[14]);    InputSentenceListType = (ListType)wxAtoi(prms[15]);    InputSentenceList = wxStringTokenize(prms[16], _T(","));    OutputSentenceListType = (ListType)wxAtoi(prms[17]);    if (prms.Count() > 18) //If the list is empty, the tokenizer does not produce array item        OutputSentenceList = wxStringTokenize(prms[18], _T(","));    if (prms.Count() > 19)        Priority = wxAtoi(prms[19]);}
开发者ID:JONA-GA,项目名称:connector_pi,代码行数:33,


示例4: wxStringTokenize

void ConnectionParams::Deserialize(const wxString &configStr){    Valid = true;    wxArrayString prms = wxStringTokenize( configStr, _T(";") );    if (prms.Count() < 17) {        Valid = false;        return;    }    Type = (ConnectionType)wxAtoi(prms[0]);    NetProtocol = (NetworkProtocol)wxAtoi(prms[1]);    NetworkAddress = prms[2];    NetworkPort = (ConnectionType)wxAtoi(prms[3]);    Protocol = (DataProtocol)wxAtoi(prms[4]);    Port = prms[5];    Baudrate = wxAtoi(prms[6]);    ChecksumCheck = !!wxAtoi(prms[7]);    int iotval = wxAtoi(prms[8]);    IOSelect=((iotval <= 2)?static_cast <dsPortType>(iotval):DS_TYPE_INPUT);    InputSentenceListType = (ListType)wxAtoi(prms[9]);    InputSentenceList = wxStringTokenize(prms[10], _T(","));    OutputSentenceListType = (ListType)wxAtoi(prms[11]);    OutputSentenceList = wxStringTokenize(prms[12], _T(","));    Priority = wxAtoi(prms[13]);    Garmin = !!wxAtoi(prms[14]);    GarminUpload = !!wxAtoi(prms[15]);    FurunoGP3X = !!wxAtoi(prms[16]);    bEnabled = true;    if (prms.Count() >= 18)        bEnabled = !!wxAtoi(prms[17]);}
开发者ID:ariesmu,项目名称:OpenCPN,代码行数:32,


示例5: packageName

void Web::ParseFile(wxString whaturl){		if(whaturl == "/KIKU/packages.txt") {		wxString packageName(wxT("MSW"));		#if defined(__WXGTK__)			packageName = wxT("GTK");		#elif defined(__WXMAC__)			packageName = wxT("MAC");		#endif		wxArrayString lines = wxStringTokenize(m_dataRead, wxT("/n"));		for (size_t i=0; i<lines.GetCount(); i++) {			wxString line = lines.Item(i);			line = line.Trim().Trim(false);			if (line.StartsWith(wxT("#"))) {				//comment line				continue;			}			// parse the line			wxArrayString tokens = wxStringTokenize(line, wxT("|"));			if (tokens.GetCount() > 3) {				// find the entry with our package name				if (tokens.Item(0).Trim().Trim(false) == packageName) {					wxString url = tokens.Item(2).Trim().Trim(false);					wxString rev = tokens.Item(1).Trim().Trim(false);					wxString releaseNotesUrl = tokens.Item(3).Trim().Trim(false);					long currev;					long webrev(0);					// convert strings to long					wxString sCurRev(VERSION);					sCurRev.ToLong(&currev);					wxString sUrlRev(rev);					sUrlRev.ToLong(&webrev);					//wxMessageBox(rev);					if ( webrev > currev ) {						// notify the user that a new version is available						//e.SetClientData(new WebJobData(url.c_str(), releaseNotesUrl.c_str(), currev, webrev, false, m_userRequest));						wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, WEB_ID );						event.SetString(url);						wxGetApp().AddPendingEvent( event );						//m_pHandler->OnWeb(url, releaseNotesUrl, currev, webrev);					}					break;				}			}		}	}}
开发者ID:hihihippp,项目名称:kiku,代码行数:54,


示例6: GetName

wxArrayString Project::GetIncludePaths(){    wxArrayString paths;    BuildMatrixPtr matrix = WorkspaceST::Get()->GetBuildMatrix();    if(!matrix) {        return paths;    }    wxString workspaceSelConf = matrix->GetSelectedConfigurationName();    wxString projectSelConf = matrix->GetProjectSelectedConf(workspaceSelConf, GetName());    BuildConfigPtr buildConf = WorkspaceST::Get()->GetProjBuildConf(this->GetName(), projectSelConf);    // for non custom projects, take the settings from the build configuration    if(buildConf && !buildConf->IsCustomBuild()) {        // Get the include paths and add them        wxString projectIncludePaths = buildConf->GetIncludePath();        wxArrayString projectIncludePathsArr = wxStringTokenize(projectIncludePaths, wxT(";"), wxTOKEN_STRTOK);        for(size_t i=0; i<projectIncludePathsArr.GetCount(); i++) {            wxFileName fn;            if(projectIncludePathsArr.Item(i) == wxT("..")) {                fn = wxFileName(GetFileName().GetPath(), wxT(""));                fn.RemoveLastDir();            } else if(projectIncludePathsArr.Item(i) == wxT(".")) {                fn = wxFileName(GetFileName().GetPath(), wxT(""));            } else {                fn = projectIncludePathsArr.Item(i);                if(fn.IsRelative()) {                    fn.MakeAbsolute(GetFileName().GetPath());                }            }            paths.Add( fn.GetFullPath() );        }        // get the compiler options and add them        wxString projectCompileOptions = buildConf->GetCompileOptions();        wxArrayString projectCompileOptionsArr = wxStringTokenize(projectCompileOptions, wxT(";"), wxTOKEN_STRTOK);        for(size_t i=0; i<projectCompileOptionsArr.GetCount(); i++) {            wxString cmpOption (projectCompileOptionsArr.Item(i));            cmpOption.Trim().Trim(false);            // expand backticks, if the option is not a backtick the value remains            // unchanged            wxArrayString includePaths = DoBacktickToIncludePath(cmpOption);            if(includePaths.IsEmpty() == false)                paths.insert(paths.end(), includePaths.begin(), includePaths.end());        }    }    return paths;}
开发者ID:Hmaal,项目名称:codelite,代码行数:53,


示例7: sett

void ChatOptionsTab::OnApply( wxCommandEvent& /*unused*/ ){	sett().SetChatColorNormal ( m_normal_color->GetColor() );	sett().SetChatColorBackground( m_bg_color->GetColor() );	sett().SetChatColorAction( m_action_color->GetColor() );	sett().SetChatColorHighlight( m_highlight_color->GetColor() );	sett().SetChatColorJoinPart( m_joinleave_color->GetColor() );	sett().SetChatColorNotification( m_note_color->GetColor() );	sett().SetChatColorMine( m_my_color->GetColor() );	sett().SetChatColorServer( m_server_color->GetColor() );	sett().SetChatColorClient( m_client_color->GetColor() );	sett().SetChatColorError( m_error_color->GetColor() );	sett().SetChatColorTime( m_ts_color->GetColor() );	sett().SetChatFont( m_chat_font );	sett().SetUseIrcColors( m_irc_colors->IsChecked() );	//m_ui.mw().GetChatTab().ChangeUnreadChannelColour( m_note_color->GetBackgroundColour() );	//m_ui.mw().GetChatTab().ChangeUnreadPMColour( m_note_color->GetBackgroundColour() );	sett().SetHighlightedWords( wxStringTokenize( m_highlight_words->GetValue(), _T( ";" ) ) );	sett().SetRequestAttOnHighlight( m_highlight_req->IsChecked() );	//Chat Log	sett().SetChatLogEnable( m_save_logs->GetValue() );	sett().SetBroadcastEverywhere( m_broadcast_check->GetValue() );	// Behavior#ifndef DISABLE_SOUND	sett().SetChatPMSoundNotificationEnabled( m_play_sounds->IsChecked() );#endif    sett().SetAutoloadedChatlogLinesCount( m_num_lines->GetValue() );}
开发者ID:SpliFF,项目名称:springlobby,代码行数:31,


示例8: GetItem

wxCoordClueListBox::OnMeasureItem(size_t n) const{    XPuzzle::Clue clue = GetItem(n);    // Cache the wrapped clue's text if it isn't already    if (m_cachedClues.at(n).empty())    {        int maxWidth;        GetClientSize(&maxWidth, NULL);        m_cachedClues.at(n) = Wrap(this, clue.Text(),                                   maxWidth - m_numWidth - GetMargins().x);    }    int height = 0;    const wxArrayString lines = wxStringTokenize(m_cachedClues.at(n), _T("/n"));    for (wxArrayString::const_iterator it = lines.begin();         it != lines.end();         ++it)    {        int lineHeight;        GetTextExtent(*it, NULL, &lineHeight);        height += lineHeight;    }    return height;}
开发者ID:brho,项目名称:xword,代码行数:27,


示例9: wxStringTokenize

wxXmlNode *Project::GetVirtualDir(const wxString &vdFullPath){    wxArrayString paths = wxStringTokenize( vdFullPath, ":", wxTOKEN_STRTOK );    // test the cache    std::map<wxString, wxXmlNode*>::iterator iter = m_vdCache.find(vdFullPath);    if(iter != m_vdCache.end()) {        return iter->second;    }    wxString filename = m_fileName.GetFullPath();    wxXmlNode *parent = m_doc.GetRoot();    for(size_t i=0; i<paths.GetCount(); ++i) {        wxString curpath = paths.Item(i);        parent = XmlUtils::FindNodeByName(parent, wxT("VirtualDirectory"), curpath);        if ( !parent ) {            m_vdCache[vdFullPath] = NULL;            return NULL;        }    }    // cache the result    m_vdCache[vdFullPath] = parent;    return parent;}
开发者ID:Hmaal,项目名称:codelite,代码行数:26,


示例10: wxStringTokenize

wxArrayString QuickDebugDlg::GetStartupCmds(){    wxString cmds = m_textCtrlCmds->GetValue();    cmds.Trim().Trim(false);    return wxStringTokenize(cmds, wxT("/n/r"), wxTOKEN_STRTOK);}
开发者ID:05storm26,项目名称:codelite,代码行数:7,


示例11: wxStringTokenize

void TagsOptionsDlg::Parse(){    // Prepate list of files to work on    wxArrayString files = wxStringTokenize(m_textCtrlFilesList->GetValue(), wxT(" /t"), wxTOKEN_STRTOK);    wxArrayString searchPaths = GetCTagsSearchPaths();    wxArrayString fullpathsArr;    for(size_t i = 0; i < files.size(); i++) {        wxString file = files[i].Trim().Trim(false);        if(file.IsEmpty()) continue;        for(size_t xx = 0; xx < searchPaths.size(); xx++) {            wxString fullpath;            fullpath << searchPaths.Item(xx) << wxFileName::GetPathSeparator() << file;            wxFileName fn(fullpath);            if(fn.FileExists()) {                fullpathsArr.Add(fn.GetFullPath());                break;            }        }    }    // Clear the PreProcessor table    PPTable::Instance()->Clear();    for(size_t i = 0; i < fullpathsArr.size(); i++)        PPScan(fullpathsArr.Item(i), true);    // Open an editor and print out the results    IEditor* editor = PluginManager::Get()->NewEditor();    if(editor) {        editor->AppendText(PPTable::Instance()->Export());        CopyData();        EndModal(wxID_OK);    }}
开发者ID:stahta01,项目名称:codelite,代码行数:35,


示例12: main

int main(int argc, char **argv) {	//Initialize the wxWidgets library	wxInitializer initializer;	wxLog::EnableLogging(false);		//parse the input	wxCmdLineParser parser;	parser.SetCmdLine(argc, argv);	parser.SetDesc(cmdLineDesc);		if (parser.Parse() != 0) {		return -1;	}	for (size_t i=0; i< parser.GetParamCount(); i++) {		wxString argument = parser.GetParam(i);		if( !wxDir::Exists(argument) ){			argument.Replace(wxT("//"), wxT("/"));			wxArrayString arr = wxStringTokenize(argument, wxT("/"), wxTOKEN_STRTOK);			wxString path;			for(size_t i=0; i<arr.GetCount(); i++){				path << arr.Item(i) << wxT("/");				wxMkdir(path, 0777);			}		}	}	return 0;}
开发者ID:05storm26,项目名称:codelite,代码行数:30,


示例13: s

void SvnConsole::OnReadProcessOutput(wxCommandEvent& event){    ProcessEventData *ped = (ProcessEventData *)event.GetClientData();    if (ped) {        m_output.Append(ped->GetData().c_str());    }    wxString s (ped->GetData());    s.MakeLower();    if (m_currCmd.printProcessOutput)        AppendText( ped->GetData() );        static wxRegEx reUsername("username[ /t]*:", wxRE_DEFAULT|wxRE_ICASE);    wxArrayString lines = wxStringTokenize(s, wxT("/n"), wxTOKEN_STRTOK);    if( !lines.IsEmpty() && lines.Last().StartsWith(wxT("password for '")) ) {        m_output.Clear();        wxString pass = wxGetPasswordFromUser(ped->GetData(), wxT("Subversion"));        if(!pass.IsEmpty() && m_process) {            m_process->WriteToConsole(pass);        }    } else if ( !lines.IsEmpty() && reUsername.IsValid() && reUsername.Matches( lines.Last() ) ) {        // Prompt the user for "Username:"        wxString username = ::wxGetTextFromUser(ped->GetData(), "Subversion");        if ( !username.IsEmpty() && m_process ) {            m_process->Write(username + "/n");        }    }    delete ped;}
开发者ID:HTshandou,项目名称:codelite,代码行数:30,


示例14: DoMakeRegexFromPattern

wxString ChangeLogPage::DoFormatLinesToUrl(const wxString& text, const wxString& pattern, const wxString& url){	wxRegEx re;	DoMakeRegexFromPattern(pattern, re);	wxString tmpPat = pattern.c_str();	tmpPat.Trim().Trim(false);	if(re.IsValid() == false || tmpPat.IsEmpty()) {		return text;	}	wxArrayString lines = wxStringTokenize(text, wxT("/n"), wxTOKEN_STRTOK);	wxString      out;	for(size_t i=0; i<lines.size(); i++) {		wxString line = lines.Item(i).Trim().Trim(false);		if(re.Matches(line)) {			wxString bugFrId = re.GetMatch(line, 1);			// Convert the bugFrId into URLs			wxArrayString urls = DoMakeBugFrIdToUrl(bugFrId, url);			if(urls.IsEmpty() == false) {				for(size_t y=0; y<urls.size(); y++) {					out << urls.Item(y) << wxT("/n");				}			} else {				out << line << wxT("/n");			}		} else {			out << line << wxT("/n");		}	}	return out;}
开发者ID:05storm26,项目名称:codelite,代码行数:35,


示例15: compactMsg

wxString SvnLogHandler::Compact(const wxString& message){    wxString compactMsg (message);    compactMsg.Replace(wxT("/r/n"), wxT("/n"));    compactMsg.Replace(wxT("/r"),   wxT("/n"));    compactMsg.Replace(wxT("/v"),   wxT("/n"));    wxArrayString lines = wxStringTokenize(compactMsg, wxT("/n"), wxTOKEN_STRTOK);    compactMsg.Clear();    for(size_t i=0; i<lines.GetCount(); i++) {        wxString line = lines.Item(i);        line.Trim().Trim(false);        if(line.IsEmpty())            continue;        if(line.StartsWith(wxT("----------"))) {            continue;        }        if(line == wxT("/"")) {            continue;        }        static wxRegEx reRevisionPrefix(wxT("^(r[0-9]+)"));        if(reRevisionPrefix.Matches(line)) {            continue;        }        compactMsg << line << wxT("/n");    }    if(compactMsg.IsEmpty() == false) {        compactMsg.RemoveLast();    }    return compactMsg;}
开发者ID:05storm26,项目名称:codelite,代码行数:33,


示例16: fn

void BatchBuildDlg::DoInitialize(){    // load the previously saved batch build file    wxFileName fn(WorkspaceST::Get()->GetWorkspaceFileName());    fn.SetExt(wxT("batch_build"));    wxString content;    wxArrayString arr;    if (ReadFileWithConversion(fn.GetFullPath(), content)) {        arr = wxStringTokenize(content, wxT("/n"), wxTOKEN_STRTOK);        for (size_t i=0; i<arr.GetCount(); i++) {            int idx = m_checkListConfigurations->Append(arr.Item(i));            m_checkListConfigurations->Check((unsigned int)idx);        }    }    // loop over all projects, for each project collect all available    // build configurations and add them to the check list control    wxArrayString projects;    WorkspaceST::Get()->GetProjectList(projects);    for (size_t i=0; i<projects.GetCount(); i++) {        ProjectPtr p = ManagerST::Get()->GetProject(projects.Item(i));        if (p) {            ProjectSettingsPtr settings = p->GetSettings();            if (settings) {                ProjectSettingsCookie cookie;                BuildConfigPtr bldConf = settings->GetFirstBuildConfiguration(cookie);                while (bldConf) {                    wxString item(p->GetName() + wxT(" | ") + bldConf->GetName());                    int where = arr.Index(item);                    if (where == wxNOT_FOUND) {                        // append this item                        m_checkListConfigurations->Append(item);                    } else {                        // this item already been added,                        // remove it from the arr and continue                        arr.RemoveAt((size_t)where);                    }                    bldConf = settings->GetNextBuildConfiguration(cookie);                }            }        }    }    // check to see which configuration was left in 'arr'    // and remove them from the checklistbox    for (size_t i=0; i<arr.GetCount(); i++) {        int where = m_checkListConfigurations->FindString(arr.Item(i));        if (where != wxNOT_FOUND) {            m_checkListConfigurations->Delete((unsigned int)where);        }    }    arr.clear();    if (m_checkListConfigurations->GetCount()>0) {        m_checkListConfigurations->Select(0);    }}
开发者ID:05storm26,项目名称:codelite,代码行数:60,


示例17: wxStringTokenize

void GitCommitDlg::AppendDiff(const wxString& diff){    wxArrayString diffList = wxStringTokenize(diff, wxT("/n"), wxTOKEN_STRTOK);    unsigned index = 0;    wxString currentFile;    while(index < diffList.GetCount()) {        wxString line = diffList[index];        if(line.StartsWith(wxT("diff"))) {            line.Replace(wxT("diff --git a/"), wxT(""));            currentFile = line.Left(line.Find(wxT(" ")));        } else if(line.StartsWith(wxT("Binary"))) {            m_diffMap[currentFile] = wxT("Binary diff");        } else {            m_diffMap[currentFile].Append(line + wxT("/n"));        }        ++index;    }    index = 0;    for(std::map<wxString, wxString>::iterator it = m_diffMap.begin(); it != m_diffMap.end(); ++it) {        m_listBox->Append((*it).first);        m_listBox->Check(index++, true);    }    if(m_diffMap.size() != 0) {        std::map<wxString, wxString>::iterator it = m_diffMap.begin();        m_stcDiff->SetText((*it).second);        m_listBox->Select(0);        m_stcDiff->SetReadOnly(true);    }}
开发者ID:GaganJotSingh,项目名称:codelite,代码行数:32,


示例18: wxStringTokenize

void DbgGdb::OnDataRead(wxCommandEvent& e){	// Data arrived from the debugger	ProcessEventData *ped = (ProcessEventData *)e.GetClientData();	wxString bufferRead;	bufferRead << ped->GetData();	delete ped;	wxArrayString lines = wxStringTokenize(bufferRead, wxT("/n"), wxTOKEN_STRTOK);	for(size_t i=0; i<lines.GetCount(); i++) {		wxString line = lines.Item(i);		line.Replace(wxT("(gdb)"), wxT(""));		line.Trim().Trim(false);		if ( line.IsEmpty() == false ) {			m_gdbOutputArr.Add( line );			//wxPrintf(wxT("Debugger: %s/n"), line.c_str());		}	}	if ( m_gdbOutputArr.IsEmpty() == false ) {		// Trigger GDB processing		Poke();	}}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:25,


示例19: cairo_save

void wxCairoSVGRadialGradient::Op(cairo_t* cairo_image, bool preserve, wxCairoSVGPaintServerOp op) {	cairo_pattern_t *pat;	bool saved = false;	if (m_gradientUnits == _T("objectBoundingBox")) {		cairo_save(cairo_image);		saved = true;		double minx;		double miny;		double maxx;		double maxy;		cairo_path_extents(cairo_image, &minx, &miny, &maxx, &maxy);		cairo_matrix_t mat;		cairo_matrix_init(&mat, maxx-minx, 0, 0, maxy-miny, minx, miny);		cairo_transform(cairo_image, &mat);		wxLogTrace(_T("svg"), _T("wxCairoSVGRadialGradient::Op transformed to objectBoundingBox minx %f miny %f maxx %f maxy %f"),				minx, miny, maxx, maxy);	} else if (m_gradientTransform.Contains(_T("matrix"))) {		double m[6];		wxArrayString params = wxStringTokenize(m_gradientTransform.Mid(m_gradientTransform.Find(_T("matrix(")) + 7), _T(" "));		if (params.Count() == 6) {			for (int i = 0; i < 6; i++) {				params[i].Strip().ToDouble(&m[i]);			}			cairo_save(cairo_image);			saved = true;			cairo_matrix_t mat;			cairo_matrix_init(&mat, m[0], m[1], m[2], m[3], m[4], m[5]);			cairo_transform(cairo_image, &mat);			wxLogTrace(_T("svg"), _T("wxCairoSVGRadialGradient::Op matrix transform %f %f %f %f %f %f"),					m[0], m[1], m[2], m[3], m[4], m[5]);		}	}	pat = cairo_pattern_create_radial(m_cx, m_cy, 0, m_cx, m_cy, m_r);	wxLogTrace(_T("svg"), _T("wxCairoSVGRadialGradient::Op cairo_pattern_create_radial cx %f cy %f r %f"),			m_cx, m_cy, m_r);	for (wxCairoSVGGradientStopList::iterator i = m_stopList.begin(); i != m_stopList.end(); ++i) {		wxCairoSVGGradientStop* stop = *i;		if (stop->m_opacity == 1) {			cairo_pattern_add_color_stop_rgb(pat, stop->m_offset, (double) stop->m_r / 255.0, (double) stop->m_g / 255.0, (double) stop->m_b / 255.0);		} else {			cairo_pattern_add_color_stop_rgba(pat, stop->m_offset, (double) stop->m_r / 255.0, (double) stop->m_g / 255.0, (double) stop->m_b / 255.0, stop->m_opacity);		}	}	cairo_set_source(cairo_image, pat);	wxCairoSVGPaintServer::Op(cairo_image, preserve, op);	if (saved) cairo_restore(cairo_image);	cairo_pattern_destroy(pat);	wxLogTrace(_T("svg"), _T("wxCairoSVGRadialGradient::Op done"));}
开发者ID:johanvdb,项目名称:wxCairoSVG,代码行数:58,


示例20: FindFilesTraverser

 FindFilesTraverser(const wxString types,                    const wxArrayString& ignorefiles,                    const wxArrayString& excludes,                    const wxString& projFP)     : m_ignorefiles(ignorefiles)     , m_excludes(excludes)     , m_projFP(projFP) {     m_types = wxStringTokenize(types, ";,|"); // The tooltip says use ';' but cover all bases }
开发者ID:Alexpux,项目名称:codelite,代码行数:10,


示例21: wxMessageBox

void Copyright::OnBatchInsertCopyrights(wxCommandEvent& e){    // pop up the projects selection dialog    if(m_mgr->IsWorkspaceOpen() == false) {        wxMessageBox(_("Batch insert requires a workspace to be opened"), _("CodeLite"), wxICON_WARNING | wxOK);        return;    }    if(!m_mgr->SaveAll()) return;    // read configuration    CopyrightsConfigData data;    m_mgr->GetConfigTool()->ReadObject(wxT("CopyrightsConfig"), &data);    wxString content;    if(!Validate(content)) {        return;    }    CopyrightsProjectSelDlg dlg(m_mgr->GetTheApp()->GetTopWindow(), m_mgr->GetWorkspace());    if(dlg.ShowModal() == wxID_OK) {        wxArrayString projects;        dlg.GetProjects(projects);        // expand constants        wxString err_msg;        std::vector<wxFileName> files;        std::vector<wxFileName> filtered_files;        // loop over the project and collect list of files to work with        for(size_t i = 0; i < projects.size(); i++) {            ProjectPtr p = m_mgr->GetWorkspace()->FindProjectByName(projects.Item(i), err_msg);            if(p) {                p->GetFiles(files, true);            }        }        wxString mask(data.GetFileMasking());        mask.Replace(wxT("*."), wxEmptyString);        mask = mask.Trim().Trim(false);        wxArrayString exts = wxStringTokenize(mask, wxT(";"));        // filter out non-matching files (according to masking)        for(size_t i = 0; i < files.size(); i++) {            if(exts.Index(files.at(i).GetExt(), false) != wxNOT_FOUND) {                // valid file                filtered_files.push_back(files.at(i));            }        }        if(filtered_files.empty() == false) {            MassUpdate(filtered_files, content);        }    }}
开发者ID:nanolion,项目名称:codelite,代码行数:55,


示例22: wxStringTokenize

bool OutputViewControlBar::DoFindDockInfo(const wxString &saved_perspective, const wxString &dock_name, wxString &dock_info){	// search for the 'Output View' perspective	wxArrayString panes = wxStringTokenize(saved_perspective, wxT("|"), wxTOKEN_STRTOK);	for (size_t i=0; i<panes.GetCount(); i++) {		if ( panes.Item(i).StartsWith(dock_name) ) {			dock_info = panes.Item(i);			return true;		}	}	return false;}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:12,


示例23: wxStringTokenize

std::map<wxString,wxString> TagsOptionsData::GetTypesMap() const{	std::map<wxString, wxString> tokens;	wxArrayString typesArr = wxStringTokenize(m_types, wxT("/r/n"), wxTOKEN_STRTOK);	for (size_t i=0; i<typesArr.GetCount(); i++) {		wxString item = typesArr.Item(i).Trim().Trim(false);		wxString k = item.BeforeFirst(wxT('='));		wxString v = item.AfterFirst(wxT('='));		tokens[k] = v;	}	return tokens;}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:12,


示例24: wxStringTokenize

void CppCheckSettings::LoadProjectSpecificSettings(ProjectPtr project){    wxString rawData;    wxArrayString definitions, undefines;    if(project) {        rawData = project->GetPluginData("CppCheck");    }    wxArrayString configurations = wxStringTokenize(rawData, ";", wxTOKEN_RET_EMPTY_ALL);    if(configurations.GetCount() == 2) { // It'll either be empty or 2        if(!configurations.Item(0).empty()) {            definitions = wxStringTokenize(configurations.Item(0), ",");        }        if(!configurations.Item(1).empty()) {            undefines = wxStringTokenize(configurations.Item(1), ",");        }    }    // Note that we set these even if project == NULL, as this will clear any stale values    SetDefinitions(definitions);    SetUndefines(undefines);}
开发者ID:GaganJotSingh,项目名称:codelite,代码行数:21,


示例25: StringToPoint

    static wxPoint StringToPoint(const wxString & str)    {        wxArrayString tokens = wxStringTokenize(str, _T(", "), wxTOKEN_STRTOK);        long x, y;        if (tokens.size() != 2 ||            ! (tokens[0].ToLong(&x) && tokens[1].ToLong(&y)) )        {            throw ConversionError();        }        return wxPoint(x, y);    }
开发者ID:brho,项目名称:xword,代码行数:12,


示例26: fp

void SubversionLocalProperties::ReadProperties(){    m_values.clear();    wxString group;    wxFFile fp(GetConfigFile(), wxT("rb"));    if(fp.IsOpened()) {        wxString content;        fp.ReadAll(&content);        wxArrayString lines = wxStringTokenize(content, wxT("/n"), wxTOKEN_STRTOK);        for(size_t i = 0; i < lines.size(); i++) {            wxString entry = lines[i];            // remove the comment part            entry = entry.BeforeFirst(wxT(';'));            // trim the string            entry.Trim().Trim(false);            if(entry.IsEmpty()) continue;            if(entry.StartsWith(wxT("["))) {                // found new group                entry = entry.AfterFirst(wxT('['));                group = entry.BeforeFirst(wxT(']'));                group.Trim().Trim(false);                continue;            }            wxString key = entry.BeforeFirst(wxT('='));            wxString value = entry.AfterFirst(wxT('='));            key.Trim().Trim(false);            value.Trim().Trim(false);            if(group.IsEmpty()) {                // we dont have group yet - discard this entry                continue;            }            GroupTable::iterator iter = m_values.find(group);            if(iter == m_values.end()) {                // create new table and the value                SimpleTable tb;                tb[key] = value;                m_values[group] = tb;            } else {                m_values[group][key] = value;            }        }    }}
开发者ID:capturePointer,项目名称:codelite,代码行数:52,



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


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