当前位置: 首页>>代码示例>>C++>>正文


C++ wxArrayString::begin方法代码示例

本文整理汇总了C++中wxArrayString::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ wxArrayString::begin方法的具体用法?C++ wxArrayString::begin怎么用?C++ wxArrayString::begin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wxArrayString的用法示例。


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

示例1: SetSearchHistory

void DirectoryParamsPanel::SetSearchHistory(const wxArrayString& searchDirs, const wxArrayString& searchMasks)
{
    for (wxArrayString::const_iterator it = searchDirs.begin(); it != searchDirs.end(); ++it)
    {
        if (!it->empty())
            m_pSearchDirPath->Append(*it);
    }
    for (wxArrayString::const_iterator it = searchMasks.begin(); it != searchMasks.end(); ++it)
    {
        if (!it->empty())
            m_pMask->Append(*it);
    }
}
开发者ID:simple-codeblocks,项目名称:Codeblocks,代码行数:13,代码来源:DirectoryParamsPanel.cpp

示例2: setValue

bool Config::setValue(const wxString& key, const wxArrayString& value)
{
    wxString s;
    for (wxArrayString::const_iterator it = value.begin(); it != value.end();
        it++)
    {
        if (it != value.begin())
            s += ",";
        // this is just a parachute, if this should ever be triggered we
        // will need to quote and unquote this wxString or all in value
        wxASSERT((*it).find(',') == wxString::npos);
        s += *it;
    }
    return setValue(key, s);
}
开发者ID:AlfiyaZi,项目名称:flamerobin,代码行数:15,代码来源:Config.cpp

示例3: SetExcludeConfigForFile

void Project::SetExcludeConfigForFile(const wxString& filename, const wxString& virtualDirPath, const wxArrayString& configs)
{
    wxXmlNode *vdNode = GetVirtualDir(virtualDirPath);
    if ( !vdNode ) {
        return ;
    }
    
    // locate our file
    wxFileName tmp(filename);
    tmp.MakeRelativeTo(m_fileName.GetPath());
    wxString filepath = tmp.GetFullPath(wxPATH_UNIX);
    wxXmlNode *fileNode = XmlUtils::FindNodeByName(vdNode, "File", filepath);
    if ( !fileNode ) {
        return ;
    }
    
    // Make sure the list is unique
    wxStringSet_t unique_set;
    unique_set.insert(configs.begin(), configs.end());
    wxArrayString uniqueArr;
    wxStringSet_t::iterator iter = unique_set.begin();
    for( ; iter != unique_set.end(); ++iter ) {
        uniqueArr.Add( *iter );
    }
    
    wxString excludeConfigs = ::wxJoin(uniqueArr, ';');
    XmlUtils::UpdateProperty(fileNode, EXCLUDE_FROM_BUILD_FOR_CONFIG, excludeConfigs );
    SaveXmlFile();
}
开发者ID:Hmaal,项目名称:codelite,代码行数:29,代码来源:project.cpp

示例4: DoAutoCompleteStrings

bool wxTextEntry::DoAutoCompleteStrings(const wxArrayString& choices)
{
    GtkEntry* const entry = (GtkEntry*)GetEditable();
    wxCHECK_MSG(GTK_IS_ENTRY(entry), false, "auto completion doesn't work with this control");

    GtkListStore * const store = gtk_list_store_new(1, G_TYPE_STRING);
    GtkTreeIter iter;

    for ( wxArrayString::const_iterator i = choices.begin();
          i != choices.end();
          ++i )
    {
        gtk_list_store_append(store, &iter);
        gtk_list_store_set(store, &iter,
                           0, (const gchar *)i->utf8_str(),
                           -1);
    }

    GtkEntryCompletion * const completion = gtk_entry_completion_new();
    gtk_entry_completion_set_model(completion, GTK_TREE_MODEL(store));
    gtk_entry_completion_set_text_column(completion, 0);
    gtk_entry_set_completion(entry, completion);
    g_object_unref(completion);
    return true;
}
开发者ID:CodeTickler,项目名称:wxWidgets,代码行数:25,代码来源:textentry.cpp

示例5: modFileName

bool ModEditWindow::JarModsDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString &filenames)
{
	int flags = wxLIST_HITTEST_ONITEM;
	
	long index = 0;
	
	if (m_owner->GetItemCount() > 0)
	{
		index = m_owner->HitTest(wxPoint(x, y), flags);
	}
	
	m_owner->SetInsertMark(-1);
	
	for (wxArrayString::const_iterator iter = filenames.begin(); iter != filenames.end(); iter++)
	{
		// just skip the dirs here...
		if(wxFileName::DirExists(*iter))
			continue;
		wxFileName modFileName(*iter);
		m_inst->GetModList()->InsertMod(index, modFileName.GetFullPath());
		m_owner->UpdateItems();
	}

	return true;
}
开发者ID:Kuchikixx,项目名称:MultiMC4,代码行数:25,代码来源:modeditwindow.cpp

示例6: get_valid

wxArrayString ArrayVariableProperty::get_valid(const wxArrayString& val) {
	std::set<wxString> set = get_set(dataset_vars_);
	wxArrayString ret;
	for (wxArrayString::const_iterator it = val.begin(); it != val.end(); it++)
		if (set.find(*it) != set.end()) ret.Add(*it);
	return ret;
}
开发者ID:jcasse,项目名称:xperimenter,代码行数:7,代码来源:arrayvariableproperty.cpp

示例7: switch

GameDatabaseListView& GameDatabaseListView::SortBy( GameDataColumnId column )
{
    const bool isDescending = false;

    wxArrayString::iterator begin	= m_GamesInView.begin();
    wxArrayString::iterator end		= m_GamesInView.end();

    // Note: std::sort does not pass predicate instances by reference, which means we can't use
    // object polymorphism to simplify the code below. --air

    switch( column )
    {
    case GdbCol_Serial:
        std::sort(begin, end, GLSort_bySerial(isDescending));
        break;
    case GdbCol_Title:
        std::sort(begin, end, GLSort_byTitle(isDescending));
        break;
    case GdbCol_Region:
        std::sort(begin, end, GLSort_byRegion(isDescending));
        break;
    case GdbCol_Compat:
        std::sort(begin, end, GLSort_byCompat(isDescending));
        break;
    case GdbCol_Patches:
        std::sort(begin, end, GLSort_byPatches(isDescending));
        break;

    default:
        break; // for GdbCol_Count
    }
    //m_GamesInView.(  );

    return *this;
}
开发者ID:hy9902,项目名称:pcsx2,代码行数:35,代码来源:GameDatabasePanel.cpp

示例8: GetFiles

void SearchThread::GetFiles(const SearchData* data, wxArrayString& files)
{
    std::set<wxString> scannedFiles;

    const wxArrayString& rootDirs = data->GetRootDirs();
    files = data->GetFiles();

    // Remove files that do not match our search criteria
    FilterFiles(files, data);

    // Populate "scannedFiles" with list of files to scan
    scannedFiles.insert(files.begin(), files.end());

    for(size_t i = 0; i < rootDirs.size(); ++i) {
        // make sure it's really a dir (not a fifo, etc.)
        DirTraverser traverser(data->GetExtensions());
        wxDir dir(rootDirs.Item(i));
        dir.Traverse(traverser);
        wxArrayString& someFiles = traverser.GetFiles();

        for(size_t j = 0; j < someFiles.Count(); ++j) {
            if(scannedFiles.count(someFiles.Item(j)) == 0) {
                files.Add(someFiles.Item(j));
                scannedFiles.insert(someFiles.Item(j));
            }
        }
    }

    files.clear();
    std::for_each(scannedFiles.begin(), scannedFiles.end(), [&](const wxString& file) { files.Add(file); });
}
开发者ID:292388900,项目名称:codelite,代码行数:31,代码来源:search_thread.cpp

示例9: display_invalid_params

void ParamsDialog::display_invalid_params(const wxArrayString& params) {
	if (params.empty()) return;
	wxString msg = "The following parameters are invalid.\n";
	wxArrayString::const_iterator it;
	for (it = params.begin(); it != params.end(); it++) msg += '\n' + *it;
	wxMessageBox(msg, "Error", wxICON_ERROR);
}
开发者ID:jcasse,项目名称:xperimenter,代码行数:7,代码来源:paramsdialog.cpp

示例10:

const std::set<wxString> ArrayVariableProperty::get_set(
		const wxArrayString& val) const {
	std::set<wxString> ret;
	for (wxArrayString::const_iterator it = val.begin(); it != val.end(); it++)
		ret.emplace(*it);
	return ret;
}
开发者ID:jcasse,项目名称:xperimenter,代码行数:7,代码来源:arrayvariableproperty.cpp

示例11: DoAutoCompleteStrings

bool wxTextEntry::DoAutoCompleteStrings(const wxArrayString& choices)
{
    GtkEntry* const entry = (GtkEntry*)GetEditable();
    wxCHECK_MSG(GTK_IS_ENTRY(entry), false, "auto completion doesn't work with this control");

    GtkListStore * const store = gtk_list_store_new(1, G_TYPE_STRING);
    GtkTreeIter iter;

#if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */
#   pragma ivdep
#   pragma swp
#   pragma unroll
#   pragma prefetch
#   if 0
#       pragma simd noassert
#   endif
#endif /* VDM auto patch */
    for ( wxArrayString::const_iterator i = choices.begin();
          i != choices.end();
          ++i )
    {
        gtk_list_store_append(store, &iter);
        gtk_list_store_set(store, &iter,
                           0, (const gchar *)i->utf8_str(),
                           -1);
    }

    GtkEntryCompletion * const completion = gtk_entry_completion_new();
    gtk_entry_completion_set_model(completion, GTK_TREE_MODEL(store));
    gtk_entry_completion_set_text_column(completion, 0);
    gtk_entry_set_completion(entry, completion);
    g_object_unref(completion);
    return true;
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:34,代码来源:textentry.cpp

示例12: GetItem

wxCoord
ClueListBox::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,代码来源:ClueListBox.cpp

示例13: GetFiles

void SearchThread::GetFiles(const SearchData* data, wxArrayString& files)
{
    wxStringSet_t scannedFiles;

    const wxArrayString& rootDirs = data->GetRootDirs();
    files = data->GetFiles();

    // Populate "scannedFiles" with list of files to scan
    scannedFiles.insert(files.begin(), files.end());

    for(size_t i = 0; i < rootDirs.size(); ++i) {
        // make sure it's really a dir (not a fifo, etc.)
        clFilesScanner scanner;
        std::vector<wxString> filesV;
        if(scanner.Scan(rootDirs.Item(i), filesV, data->GetExtensions())) {
            std::for_each(filesV.begin(), filesV.end(), [&](const wxString& file) { scannedFiles.insert(file); });
        }
    }

    files.clear();
    files.Alloc(scannedFiles.size());
    std::for_each(scannedFiles.begin(), scannedFiles.end(), [&](const wxString& file) { files.Add(file); });

    // Filter all non matching files
    FilterFiles(files, data);
}
开发者ID:eranif,项目名称:codelite,代码行数:26,代码来源:search_thread.cpp

示例14: SetSearchPaths

void FindReplaceData::SetSearchPaths(const wxArrayString& searchPaths)
{
    // filter duplicate items
    wxStringSet_t paths;
    paths.insert(searchPaths.begin(), searchPaths.end());
    m_searchPaths.clear();
    std::for_each(paths.begin(), paths.end(), [&](const wxString& path) { m_searchPaths.Add(path); });
}
开发者ID:lpc1996,项目名称:codelite,代码行数:8,代码来源:findreplacedlg.cpp

示例15: CreateHtml

/**
 * @brief Joins array of strings into single string.
 *
 * @param array Input array.
 *
 * @return Result string.
 */
static wxString CreateHtml(const wxArrayString& array)
{
    wxString result;

    for (wxArrayString::const_iterator it = array.begin(), ite = array.end(); it != ite; ++it) {
        if (it != array.begin()) {
            result += "<br />";
        }
        wxString esc = *it;
        // Escape
        esc.Replace("<", "&lt;");
        esc.Replace(">", "&gt;");
        result += esc;
    }

    return result;
}
开发者ID:05storm26,项目名称:codelite,代码行数:24,代码来源:CMake.cpp


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