• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ clCommandEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: OnEditorModified

void OpenWindowsPanel::OnEditorModified(clCommandEvent& event)
{
    event.Skip();
    if(!m_initDone) return;
    IEditor* editor = m_mgr->FindEditor(event.GetFileName());
    if(editor) { DoMarkModify(event.GetFileName(), editor->IsModified()); }
}
开发者ID:eranif,项目名称:codelite,代码行数:7,代码来源:openwindowspanel.cpp


示例2: OnFileSaved

void CodeCompletionManager::OnFileSaved(clCommandEvent& event)
{
    event.Skip();
    if(TagsManagerST::Get()->GetCtagsOptions().GetCcColourFlags() & CC_COLOUR_MACRO_BLOCKS) {
        ProcessMacros(clMainFrame::Get()->GetMainBook()->FindEditor(event.GetFileName()));
    }
}
开发者ID:05storm26,项目名称:codelite,代码行数:7,代码来源:code_completion_manager.cpp


示例3: OnToggleWorkspaceTab

void clTabTogglerHelper::OnToggleWorkspaceTab(clCommandEvent& event)
{
    if(event.GetString() != m_workspaceTabName) {
        event.Skip();
        return;
    }

    Notebook* book = clGetManager()->GetWorkspacePaneNotebook();
    if(event.IsSelected()) {
        // show it
        int where = IsTabInNotebook(book, m_workspaceTabName);
        if(where == wxNOT_FOUND) {
            // Only show it if it does not exists in the notebook
            clGetManager()->GetWorkspacePaneNotebook()->AddPage(m_workspaceTab, m_workspaceTabName, false,
                                                                m_workspaceTabBmp);
        } else {
            // The tab already in the notebook, just select it
            clGetManager()->GetWorkspacePaneNotebook()->SetSelection(where);
        }
    } else {
        int where = clGetManager()->GetWorkspacePaneNotebook()->GetPageIndex(m_workspaceTabName);
        if(where != wxNOT_FOUND) {
            clGetManager()->GetWorkspacePaneNotebook()->RemovePage(where);
        }
    }
}
开发者ID:lpc1996,项目名称:codelite,代码行数:26,代码来源:clTabTogglerHelper.cpp


示例4: fnLocalFile

void PhpPlugin::OnFileSaved(clCommandEvent& e)
{
    e.Skip();

    // Check to see if we got a remote-upload setup
    SSHWorkspaceSettings settings;
    settings.Load();

    if(settings.IsRemoteUploadSet() && settings.IsRemoteUploadEnabled()) {
        // Post an event to the SFTP plugin and ask it to save our file
        wxFileName fnLocalFile(e.GetString());

        fnLocalFile.MakeRelativeTo(PHPWorkspace::Get()->GetFilename().GetPath());
        fnLocalFile.MakeAbsolute(wxFileName(settings.GetRemoteFolder(), "", wxPATH_UNIX).GetPath());
        wxString remoteFile = fnLocalFile.GetFullPath(wxPATH_UNIX);
        wxString localFile = e.GetString();

        JSONRoot root(cJSON_Object);
        root.toElement().addProperty("account", settings.GetAccount());
        root.toElement().addProperty("local_file", localFile);
        root.toElement().addProperty("remote_file", remoteFile);

        clCommandEvent eventSave(XRCID("wxEVT_SFTP_SAVE_FILE"));
        eventSave.SetString(root.toElement().format());
        EventNotifier::Get()->AddPendingEvent(eventSave);
    }
}
开发者ID:nagyist,项目名称:eranit-codelite,代码行数:27,代码来源:php.cpp


示例5: OnNewWorkspace

void NodeJSWorkspace::OnNewWorkspace(clCommandEvent& e)
{
    e.Skip();
    if(e.GetString() == GetWorkspaceType()) {
        e.Skip(false);
        // Create a new NodeJS workspace
        NodeJSNewWorkspaceDlg dlg(NULL);
        if(dlg.ShowModal() != wxID_OK) return;

        wxFileName workspaceFile = dlg.GetWorkspaceFilename();
        if(!workspaceFile.GetDirCount()) {
            ::wxMessageBox(
                _("Can not create workspace in the root folder"), _("New Workspace"), wxICON_ERROR | wxOK | wxCENTER);
            return;
        }

        // Ensure that the path the workspace exists
        workspaceFile.Mkdir(wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);

        if(!Create(workspaceFile)) {
            ::wxMessageBox(_("Failed to create workspace\nWorkspace already exists"),
                           _("New Workspace"),
                           wxICON_ERROR | wxOK | wxCENTER);
            return;
        }
        Open(workspaceFile);
    }
}
开发者ID:GaganJotSingh,项目名称:codelite,代码行数:28,代码来源:NoteJSWorkspace.cpp


示例6: OnOutput

void DebuggerDisassemblyTab::OnOutput(clCommandEvent& e)
{
    e.Skip();
    DoClearDisassembleView();
    m_stc->SetReadOnly(false);

    BreakpointInfoVec_t memBps;
    wxStringSet_t addressSet;
    ManagerST::Get()->GetBreakpointsMgr()->GetAllMemoryBreakpoints(memBps);
    for(size_t i = 0; i < memBps.size(); ++i) {
        addressSet.insert(memBps.at(i).memory_address);
    }
    // Parse the output
    DebuggerEventData* ded = dynamic_cast<DebuggerEventData*>(e.GetClientObject());
    if(ded) {

        m_lines.insert(m_lines.end(), ded->m_disassembleLines.begin(), ded->m_disassembleLines.end());

        for(size_t i = 0; i < ded->m_disassembleLines.size(); ++i) {
            m_stc->AppendText(ded->m_disassembleLines.at(i).m_address + "  " + ded->m_disassembleLines.at(i).m_inst +
                              "\n");
            // restore breakpoints
            if(addressSet.count(ded->m_disassembleLines.at(i).m_address)) {
                m_stc->MarkerAdd(i, BREAKPOINT_MARKER);
            }
        }
    }
    clMainFrame::Get()->GetDebuggerPane()->GetBreakpointView()->Initialize();
    m_stc->SetReadOnly(true);
}
开发者ID:292388900,项目名称:codelite,代码行数:30,代码来源:DebuggerDisassemblyTab.cpp


示例7: OnCurLine

void DebuggerDisassemblyTab::OnCurLine(clCommandEvent& e)
{
    e.Skip();
    size_t curline = wxString::npos;
    DebuggerEventData* ded = dynamic_cast<DebuggerEventData*>(e.GetClientObject());
    if(ded && ded->m_disassembleLines.size()) {
        DisassembleEntry entry = ded->m_disassembleLines.at(0);
        for(size_t i = 0; i < m_lines.size(); ++i) {
            if(m_lines.at(i).m_address == entry.m_address) {
                curline = i;
                break;
            }
        }

        if(curline != wxString::npos) {
            m_stc->MarkerAdd(curline, CURLINE_MARKER);

            int pos = m_stc->PositionFromLine(curline);
            m_stc->SetCurrentPos(pos);
            m_stc->SetSelection(pos, pos);
            DoCentrLine(curline);
            // m_stc->EnsureCaretVisible();
            m_textCtrlCurFunction->ChangeValue(entry.m_function);
        }
    }
}
开发者ID:292388900,项目名称:codelite,代码行数:26,代码来源:DebuggerDisassemblyTab.cpp


示例8: OnToggleWorkspaceTab

void WorkspacePane::OnToggleWorkspaceTab(clCommandEvent& event)
{
    // Handle the core tabs
    if(m_tabs.count(event.GetString()) == 0) {
        event.Skip();
        return;
    }

    const Tab& t = m_tabs.find(event.GetString())->second;
    if(event.IsSelected()) {
        // Insert the page
        int where = clTabTogglerHelper::IsTabInNotebook(GetNotebook(), t.m_label);
        if(where == wxNOT_FOUND) {
            GetNotebook()->AddPage(t.m_window, t.m_label, false, t.m_bmp);
        } else {
            GetNotebook()->SetSelection(where);
        }
    } else {
        // hide the tab
        int where = GetNotebook()->GetPageIndex(t.m_label);
        if(where != wxNOT_FOUND) {
            GetNotebook()->RemovePage(where);
        }
    }
}
开发者ID:stahta01,项目名称:codelite,代码行数:25,代码来源:workspace_pane.cpp


示例9: OnOpenFile

void wxFormBuilder::OnOpenFile(clCommandEvent& e)
{
    e.Skip();
    // launch it with the default application
    wxFileName fullpath(e.GetFileName());
    if(fullpath.GetExt().MakeLower() != wxT("fbp")) { return; }

#ifdef __WXGTK__
    e.Skip(false);
    // Under Linux, use xdg-open
    wxString cmd;
    cmd << wxT("/bin/sh -c 'xdg-open \"") << fullpath.GetFullPath() << wxT("\"' 2> /dev/null");
    wxExecute(cmd);
    return;
#else
    wxMimeTypesManager* mgr = wxTheMimeTypesManager;
    wxFileType* type = mgr->GetFileTypeFromExtension(fullpath.GetExt());
    if(type) {
        wxString cmd = type->GetOpenCommand(fullpath.GetFullPath());
        wxDELETE(type);
        if(cmd.IsEmpty() == false) {
            e.Skip(false);
            wxExecute(cmd);
        }
    }
#endif
}
开发者ID:eranif,项目名称:codelite,代码行数:27,代码来源:wxformbuilder.cpp


示例10: clWARNING

void PHPWorkspace::OnProjectSyncEnd(clCommandEvent& event)
{
    const wxString& name = event.GetString();
    if(m_inSyncProjects.count(name) == 0) {
        clWARNING() << "PHPWorkspace::OnProjectSyncEnd: unable to find project '" << name << "' in the workspace..."
                    << clEndl;
        return;
    }

    clDEBUG() << "PHPWorkspace::OnProjectSyncEnd: project" << name << "completed sync" << clEndl;
    m_inSyncProjects.erase(name);

    // Load the project
    PHPProject::Ptr_t pProj = GetProject(name);
    CHECK_PTR_RET(pProj);

    // Update the project files
    pProj->SetFiles(event.GetStrings());

    if(m_inSyncProjects.empty()) {
        clDEBUG() << "PHPWorkspace::OnProjectSyncEnd: all projects completed sync" << clEndl;
        if(m_projectSyncOwner) {
            clCommandEvent endEvent(wxEVT_PHP_WORKSPACE_FILES_SYNC_END);
            m_projectSyncOwner->AddPendingEvent(endEvent);
        }
    }
}
开发者ID:stahta01,项目名称:codelite,代码行数:27,代码来源:php_workspace.cpp


示例11: OnGetFiFMask

void PhpPlugin::OnGetFiFMask(clCommandEvent& e)
{
    // always skip this event so other plugins could modify it as well
    e.Skip();
    if(PHPWorkspace::Get()->IsOpen()) {
        e.GetStrings().Add("*.php;*.inc;*.phtml;*.js;*.html;*.css");
    }
}
开发者ID:nagyist,项目名称:eranit-codelite,代码行数:8,代码来源:php.cpp


示例12: OnEditorSaved

void OutlineTab::OnEditorSaved(clCommandEvent& event)
{
    event.Skip();
    wxFileName filename(event.GetFileName());
    if(FileExtManager::IsPHPFile(filename)) {
        m_treeCtrlPhp->BuildTree(filename);
    }
}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:8,代码来源:outline_tab.cpp


示例13: OnCloseWorkspace

void NodeJSWorkspace::OnCloseWorkspace(clCommandEvent& e)
{
    e.Skip();
    if(IsOpen()) {
        e.Skip(false);
        Close();
    }
}
开发者ID:GaganJotSingh,项目名称:codelite,代码行数:8,代码来源:NoteJSWorkspace.cpp


示例14: OnFileSaved

void WebTools::OnFileSaved(clCommandEvent& event)
{
    event.Skip();
    DoRefreshColours(event.GetFileName());
    IEditor* editor = m_mgr->GetActiveEditor();
    if(editor && m_jsCodeComplete && IsJavaScriptFile(editor) && !InsideJSComment(editor)) {
        m_jsCodeComplete->ResetTern(editor);
    }
}
开发者ID:capturePointer,项目名称:codelite,代码行数:9,代码来源:webtools.cpp


示例15: OnNodeOutput

void NodeJSDebugger::OnNodeOutput(clCommandEvent& event)
{
    wxUnusedVar(event);
    CL_DEBUG("Node debugger:\n%s", event.GetString());

    clDebugEvent eventLog(wxEVT_NODEJS_DEBUGGER_CONSOLE_LOG);
    eventLog.SetString(event.GetString());
    EventNotifier::Get()->AddPendingEvent(eventLog);
}
开发者ID:capturePointer,项目名称:codelite,代码行数:9,代码来源:NodeJSDebugger.cpp


示例16: OnFindInFilesDismissed

void PhpPlugin::OnFindInFilesDismissed(clCommandEvent& e)
{
    e.Skip();
    if(PHPWorkspace::Get()->IsOpen()) {
        // store the find in files mask
        PHPConfigurationData conf;
        conf.Load().SetFindInFilesMask(e.GetString()).Save();
    }
}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:9,代码来源:php.cpp


示例17: OnSaveSession

void NodeJSWorkspace::OnSaveSession(clCommandEvent& event)
{
    event.Skip();
    if(IsOpen()) {
        // Call event.Skip(false) so no other session are kept beside ours
        event.Skip(false);
        clGetManager()->StoreWorkspaceSession(m_filename);
    }
}
开发者ID:GaganJotSingh,项目名称:codelite,代码行数:9,代码来源:NoteJSWorkspace.cpp


示例18: OnOpenWithDBE

void DatabaseExplorer::OnOpenWithDBE(clCommandEvent& e)
{
    // get the file name
    e.Skip();
    const wxFileName& filename = e.GetFileName();
    if(filename.GetExt() == wxT("erd")) {
        e.Skip(false);
        DoOpenFile(filename);
    }
}
开发者ID:jcowgill,项目名称:codelite,代码行数:10,代码来源:databaseexplorer.cpp


示例19: OnIsWorkspaceOpen

void PhpPlugin::OnIsWorkspaceOpen(clCommandEvent& e)
{
    e.Skip();
    bool isOpen = PHPWorkspace::Get()->IsOpen();
    e.SetAnswer(isOpen);
    if(isOpen) {
        e.SetFileName(PHPWorkspace::Get()->GetFilename().GetFullPath());
        e.SetString(e.GetFileName());
    }
}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:10,代码来源:php.cpp


示例20: OnOpenWithDBE

void DatabaseExplorer::OnOpenWithDBE(clCommandEvent& e)
{
    // get the file name
    e.Skip();
    if(FileExtManager::IsFileType(e.GetFileName(), FileExtManager::TypeDatabase)) {
        e.Skip(false);
        // Open the databse file
        DoOpenFile(e.GetFileName());
    }
}
开发者ID:eranif,项目名称:codelite,代码行数:10,代码来源:databaseexplorer.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ clDebugEvent类代码示例发布时间:2022-05-31
下一篇:
C++ clCodeCompletionEvent类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap