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


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

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


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

示例1: DoRefreshItemRecursively

void DebuggerTreeListCtrlBase::DoRefreshItemRecursively(IDebugger *dbgr, const wxTreeItemId &item, wxArrayString &itemsToRefresh)
{
    if(itemsToRefresh.IsEmpty())
        return;

    wxTreeItemIdValue cookieOne;
    wxTreeItemId exprItem = m_listTable->GetFirstChild(item, cookieOne);
    while( exprItem.IsOk() ) {

        DbgTreeItemData* data = static_cast<DbgTreeItemData*>(m_listTable->GetItemData(exprItem));
        if(data) {
            int where = itemsToRefresh.Index(data->_gdbId);
            if(where != wxNOT_FOUND) {
                dbgr->EvaluateVariableObject(data->_gdbId, m_DBG_USERR);
                m_gdbIdToTreeId[data->_gdbId] = exprItem;
                itemsToRefresh.RemoveAt((size_t)where);
            }
        }

        if(m_listTable->HasChildren(exprItem)) {
            DoRefreshItemRecursively(dbgr, exprItem, itemsToRefresh);
        }
        exprItem = m_listTable->GetNextChild(item, cookieOne);
    }
}
开发者ID:since2014,项目名称:codelite,代码行数:25,代码来源:simpletablebase.cpp

示例2: DoAddNode

void SubversionView::DoAddNode(const wxString& title, int imgId, SvnTreeData::SvnNodeType nodeType, const wxArrayString& files)
{
	wxTreeItemId root = m_treeCtrl->GetRootItem();
	wxString basePath = m_textCtrlRootDir->GetValue();

	// Add the basic four root items
	if (files.IsEmpty() == false) {

		wxTreeItemId parent = m_treeCtrl->AppendItem(root, title, imgId, imgId, new SvnTreeData(nodeType, wxT("")));

		// Set the parent node with bold font
		wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
		font.SetWeight(wxBOLD);
		m_treeCtrl->SetItemFont(parent, font);

		// Add all children items
		for (size_t i=0; i<files.GetCount(); i++) {
			wxString filename(files.Item(i));
			m_treeCtrl->AppendItem(parent, files.Item(i), DoGetIconIndex(filename), DoGetIconIndex(filename), new SvnTreeData(SvnTreeData::SvnNodeTypeFile, files.Item(i)));
		}

		if ( nodeType != SvnTreeData::SvnNodeTypeUnversionedRoot) {
			m_treeCtrl->Expand(parent);
		}
	}
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:26,代码来源:subversion_view.cpp

示例3: DoAddFilesToFolder

void PHPWorkspaceView::DoAddFilesToFolder(const wxArrayString& paths, PHPProject::Ptr_t pProject, bool notify)
{
    if(paths.IsEmpty()) return;

    CHECK_PTR_RET(pProject);

    wxString folder_path = PHPFolder::GetFolderPathFromFileFullPath(paths.Item(0), pProject->GetFilename().GetPath());
    wxTreeItemId folderItem =
        EnsureFolderExists(DoGetProjectItem(pProject->GetName()), folder_path, pProject->GetName());
    PHPFolder::Ptr_t pFolder = pProject->AddFolder(folder_path);
    CHECK_PTR_RET(pFolder);

    wxArrayString newPaths;
    for(size_t i = 0; i < paths.GetCount(); i++) {
        if(pFolder->AddFile(paths.Item(i))) {
            newPaths.Add(paths.Item(i));
        }
    }
    if(newPaths.IsEmpty()) return;

    if(notify) {
        DoAddFilesToTreeView(folderItem, pProject, pFolder, newPaths);
        // Notify the plugins
        clCommandEvent evtFilesAdded(wxEVT_PROJ_FILE_ADDED);
        evtFilesAdded.SetStrings(newPaths);
        EventNotifier::Get()->AddPendingEvent(evtFilesAdded);
    }
}
开发者ID:raresp,项目名称:codelite,代码行数:28,代码来源:php_workspace_view.cpp

示例4: DoNotifyFilesRemoved

void PHPWorkspace::DoNotifyFilesRemoved(const wxArrayString& files)
{
    if(!files.IsEmpty()) {

        wxBusyInfo info(_("Updating workspace..."));
        wxYieldIfNeeded();
        EventNotifier::Get()->PostFileRemovedEvent(files);
    }
}
开发者ID:stahta01,项目名称:codelite,代码行数:9,代码来源:php_workspace.cpp

示例5: clSingleChoiceDialogBase

clSingleChoiceDialog::clSingleChoiceDialog(wxWindow* parent, const wxArrayString& options, int initialSelection)
    : clSingleChoiceDialogBase(parent)
{
    if(!options.IsEmpty()) {
        m_listBox->Append(options);
        if(initialSelection >= 0 && initialSelection < (int)options.size()) {
            m_listBox->Select(initialSelection);
        }
    }
    CenterOnParent();
}
开发者ID:Jactry,项目名称:codelite,代码行数:11,代码来源:clSingleChoiceDialog.cpp

示例6: LoadDirHistory

void myFindReplaceDlg::LoadDirHistory () {
    if (!m_finddirHist.IsEmpty()) return;
    wxConfig *cfg = new wxConfig (g_appname);
    wxString group = FINDREPLACEDLG + _T("/") + DIRECTORYHISTORY;
    wxString key;
    wxString value;
    int i;
    for (i = 0; i < MAXHISTORY; ++i) {
        key = group + wxString::Format (_T("%d"), i);
        if (cfg->Read (key, &value)) m_finddirHist.Add (value);
    }
    delete cfg;
}
开发者ID:stahta01,项目名称:EmBlocks,代码行数:13,代码来源:finddialogs.cpp

示例7: SvnCommitDialogBaseClass

SvnCommitDialog::SvnCommitDialog(wxWindow* parent, const wxArrayString &paths, const wxString &url, Subversion2 *plugin, const wxString &repoPath)
    : SvnCommitDialogBaseClass(parent)
    , m_plugin(plugin)
    , m_url(url)
    , m_repoPath(repoPath)
    , m_process(NULL)
{
    m_stcDiff->SetReadOnly(true);
    wxString title = GetTitle();
    title << wxT(" - ") << url;
    SetTitle(title);

    for (size_t i=0; i<paths.GetCount(); i++) {
        int index = m_checkListFiles->Append(paths.Item(i));
        m_checkListFiles->Check((unsigned int)index);
    }

    wxArrayString lastMessages, previews;
    m_plugin->GetCommitMessagesCache().GetMessages(lastMessages, previews);

    for(size_t i=0; i<previews.GetCount(); i++) {
        m_choiceMessages->Append(previews.Item(i), new CommitMessageStringData(lastMessages.Item(i)));
    }
    
    if ( !paths.IsEmpty() ) {
        m_checkListFiles->Select(0);
        DoShowDiff(0);
    }
    
    WindowAttrManager::Load(this, wxT("SvnCommitDialog"), m_plugin->GetManager()->GetConfigTool());
    int sashPos = m_plugin->GetSettings().GetCommitDlgSashPos();
    if ( sashPos != wxNOT_FOUND ) {
        m_splitterH->SetSashPosition(sashPos);
    }
    
    int sashHPos = m_plugin->GetSettings().GetCommitDlgHSashPos();
    if ( sashHPos != wxNOT_FOUND ) {
        m_splitterV->SetSashPosition(sashHPos);
    }
    
    LexerConfPtr diffLexer = EditorConfigST::Get()->GetLexer("Diff");
    if ( diffLexer ) {
        m_stcDiff->SetLexer(wxSTC_LEX_DIFF);
        diffLexer->Apply( m_stcDiff );
    }
    
    LexerConfPtr textLexer = EditorConfigST::Get()->GetLexer("text");
    if ( textLexer ) {
        textLexer->Apply( m_stcMessage );
    }
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:51,代码来源:SvnCommitDialog.cpp

示例8: SvnCommitDialogBaseClass

SvnCommitDialog::SvnCommitDialog(
    wxWindow* parent, const wxArrayString& paths, const wxString& url, Subversion2* plugin, const wxString& repoPath)
    : SvnCommitDialogBaseClass(parent)
    , m_plugin(plugin)
    , m_url(url)
    , m_repoPath(repoPath)
    , m_process(NULL)
{
    Bind(wxEVT_ASYNC_PROCESS_OUTPUT, &SvnCommitDialog::OnProcessOutput, this);
    Bind(wxEVT_ASYNC_PROCESS_TERMINATED, &SvnCommitDialog::OnProcessTerminatd, this);

    m_stcDiff->SetReadOnly(true);
    wxString title = GetTitle();
    title << wxT(" - ") << url;
    SetTitle(title);

    for(size_t i = 0; i < paths.GetCount(); i++) {
        int index = m_checkListFiles->Append(paths.Item(i));
        m_checkListFiles->Check((unsigned int)index);
    }

    if(!paths.IsEmpty()) {
        m_checkListFiles->Select(0);
        DoShowDiff(0);
    }

    SetName("SvnCommitDialog");
    WindowAttrManager::Load(this);
    int sashPos = m_plugin->GetSettings().GetCommitDlgSashPos();
    if(sashPos != wxNOT_FOUND) {
        m_splitterH->SetSashPosition(sashPos);
    }

    int sashHPos = m_plugin->GetSettings().GetCommitDlgHSashPos();
    if(sashHPos != wxNOT_FOUND) {
        m_splitterV->SetSashPosition(sashHPos);
    }

    LexerConf::Ptr_t diffLexer = EditorConfigST::Get()->GetLexer("Diff");
    if(diffLexer) {
        m_stcDiff->SetLexer(wxSTC_LEX_DIFF);
        diffLexer->Apply(m_stcDiff);
    }

    LexerConf::Ptr_t textLexer = EditorConfigST::Get()->GetLexer("text");
    if(textLexer) {
        textLexer->Apply(m_stcMessage);
    }
}
开发者ID:292388900,项目名称:codelite,代码行数:49,代码来源:SvnCommitDialog.cpp

示例9: OnServerReply

bool NetDebugReport::OnServerReply( const wxArrayString& reply )
{
	if ( reply.IsEmpty() ) {
		wxLogError( _T( "Didn't receive the expected server reply." ) );
		return false;
	}

	wxString s( _T( "Server replied:\n" ) );
	const size_t count = reply.GetCount();
	for ( size_t n = 0; n < count; n++ ) {
		s << _T( '\t' ) << reply[n] << _T( '\n' );
	}

	wxLogMessage( _T( "%s" ), s.c_str() );
	return true;
}
开发者ID:renemilk,项目名称:springlobby,代码行数:16,代码来源:crashreport.cpp

示例10:

wxString
join(const wxString &pattern,
     wxArrayString const &strings) {
  wxString dst;
  uint32_t i;

  if (strings.IsEmpty())
    return wxEmptyString;
  dst = strings[0];
  for (i = 1; strings.Count() > i; ++i) {
    dst += pattern;
    dst += strings[i];
  }

  return dst;
}
开发者ID:ProfOh,项目名称:mkvtoolnix,代码行数:16,代码来源:helpers.cpp

示例11: IsMatchFilter

bool GitCommitListDlg::IsMatchFilter(const wxArrayString& filters, const wxArrayString& columns)
{
    if(filters.IsEmpty()) return true;

    bool match = true;
    for(size_t i = 0; i < filters.GetCount() && match; ++i) {
        wxString filter = filters.Item(i).Lower();
        wxString col1, col2, col3, col4;
        col1 = columns.Item(0).Lower();
        col2 = columns.Item(1).Lower();
        col3 = columns.Item(2).Lower();
        col4 = columns.Item(3).Lower();
        match = (col1.Contains(filter) || col2.Contains(filter) || col3.Contains(filter) || col4.Contains(filter));
    }
    return match;
}
开发者ID:05storm26,项目名称:codelite,代码行数:16,代码来源:gitCommitListDlg.cpp

示例12: GetMapImagePaths

bool CslGameRedEclipse::GetMapImagePaths(wxArrayString& paths) const
{
    wxInt32 pos;
    wxString path;

    if (!m_clientSettings.GamePath.IsEmpty())
    {
        path<<m_clientSettings.GamePath<<wxT("data")<<PATHDIV<<wxT("maps")<<PATHDIV;
        paths.Add(path);
    }

    //TODO look for extra package directories
    if ((pos=m_clientSettings.Options.Find(wxT("-k")))!=wxNOT_FOUND)
    {
    }

    return !paths.IsEmpty();
}
开发者ID:MorganBorman,项目名称:Cube-Server-Lister,代码行数:18,代码来源:CslGameRedEclipse.cpp

示例13: FilesDeleted

void PHPProject::FilesDeleted(const wxArrayString& files, bool notify)
{
    if(files.IsEmpty()) return;

    // Normalize the folder name by using wxFileName
    for(size_t i=0; i<files.GetCount(); ++i) {
        int where = m_files.Index(files.Item(i));
        if(where != wxNOT_FOUND) {
            m_files.RemoveAt(where);
        }
    }
    
    if(notify) {
        clCommandEvent event(wxEVT_PROJ_FILE_REMOVED);
        event.SetStrings(files);
        EventNotifier::Get()->AddPendingEvent(event);
    }
}
开发者ID:05storm26,项目名称:codelite,代码行数:18,代码来源:php_project.cpp

示例14: WildMatch

bool FileUtils::WildMatch(const wxArrayString& masks, const wxString& filename)
{
    if(masks.IsEmpty()) { return false; }

    if(masks.Index("*") != wxNOT_FOUND) {
        // If one of the masks is plain "*" - we match everything
        return true;
    }

    for(size_t i = 0; i < masks.size(); ++i) {
        const wxString& pattern = masks.Item(i);
        if((!pattern.Contains("*") && filename == pattern) ||
           (pattern.Contains("*") && ::wxMatchWild(pattern, filename))) {
            // use exact match
            return true;
        }
    }
    return false;
}
开发者ID:eranif,项目名称:codelite,代码行数:19,代码来源:fileutils.cpp

示例15: CompileCommandsFileProcessed

void CodeCompletionManager::CompileCommandsFileProcessed(const wxArrayString& includePaths)
{
    if(m_compileCommandsThread) {
        m_compileCommandsThread->join();
        wxDELETE(m_compileCommandsThread);
    }
    if(includePaths.IsEmpty()) { return; }

    // Update the parser search paths
    wxArrayString inc, exc;
    ParseThreadST::Get()->GetSearchPaths(inc, exc);
    for(size_t i = 0; i < includePaths.size(); ++i) {
        if(inc.Index(includePaths.Item(i)) == wxNOT_FOUND) { inc.Add(includePaths.Item(i)); }
    }
    ParseThreadST::Get()->SetSearchPaths(inc, exc);
    clDEBUG() << "Parser thread search paths are now updated to:" << inc;

    // Trigger a quick parse
    wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED, XRCID("retag_workspace"));
    clMainFrame::Get()->GetEventHandler()->AddPendingEvent(event);
}
开发者ID:jiapei100,项目名称:codelite,代码行数:21,代码来源:code_completion_manager.cpp


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