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


C++ clCommandEvent::GetString方法代码示例

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


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

示例1: OnFileSaved

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

示例2: 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

示例3: 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

示例4: 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

示例5: OnSocketConnectError

void NodeJSSocket::OnSocketConnectError(clCommandEvent& event)
{
    CL_DEBUG("CodeLite >>>> connect error");
    m_errorString = event.GetString();
    m_debugger->CallAfter(&NodeJSDebugger::ConnectError, m_errorString);
    Destroy();
}
开发者ID:292388900,项目名称:codelite,代码行数:7,代码来源:NodeJSSocket.cpp

示例6: OnSocketInput

void NodeJSSocket::OnSocketInput(clCommandEvent& event)
{
    CL_DEBUG("CodeLite >>>> Got something on the socket...");
    m_inBuffer << event.GetString();
    CL_DEBUG("Node.js  <<<< %s", m_inBuffer);
    ProcessInputBuffer();
}
开发者ID:292388900,项目名称:codelite,代码行数:7,代码来源:NodeJSSocket.cpp

示例7: OnSocketError

void NodeJSSocket::OnSocketError(clCommandEvent& event)
{
    m_errorString = event.GetString();
    CL_DEBUG("Socket error: %s", m_errorString);
    Destroy();
    m_debugger->CallAfter(&NodeJSDebugger::ConnectionLost, m_errorString);
}
开发者ID:292388900,项目名称:codelite,代码行数:7,代码来源:NodeJSSocket.cpp

示例8: 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

示例9: OnProjectSyncEnd

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

示例10: 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

示例11: OnFileSaved

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

    if(e.GetString() == m_curfile) {
        // Update the file content
        m_curfile.Clear();
        DoUpdate();
    }
}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:10,代码来源:zoomnavigator.cpp

示例12: OnFileSaved

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

    // --------------------------------------
    // Sanity
    // --------------------------------------
    wxString local_file = e.GetString();
    local_file.Trim().Trim(false);
    DoFileSaved(local_file);
}
开发者ID:Jactry,项目名称:codelite,代码行数:11,代码来源:sftp.cpp

示例13: OnProjectAdded

void WorkspaceTab::OnProjectAdded(clCommandEvent& e)
{
    e.Skip();
    const wxString& projName = e.GetString();
    m_fileView->BuildTree();
    if(!projName.IsEmpty()) {
        m_fileView->ExpandToPath(projName, wxFileName());
    }
    DoUpdateChoiceWithProjects();
    SendCmdEvent(wxEVT_FILE_VIEW_REFRESHED);
}
开发者ID:05storm26,项目名称:codelite,代码行数:11,代码来源:workspacetab.cpp

示例14: OnToggleTab

void OutputPane::OnToggleTab(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
        GetNotebook()->InsertPage(0, t.m_window, t.m_label, true, t.m_bmp);
    } else {
        // hide the tab
        int where = GetNotebook()->GetPageIndex(t.m_label);
        if(where != wxNOT_FOUND) {
            GetNotebook()->RemovePage(where);
        }
    }
}
开发者ID:292388900,项目名称:codelite,代码行数:20,代码来源:output_pane.cpp

示例15: OnSocketInput

void WebUpdateJob::OnSocketInput(clCommandEvent& e)
{
    m_dataRead << e.GetString();
    int where = m_dataRead.Find("\r\n\r\n");
    if(where != wxNOT_FOUND) {
        wxString headers = m_dataRead.Mid(0, where);
        m_dataRead = m_dataRead.Mid(where + 4);
        ParseFile();
        Clear();
    }
}
开发者ID:eranif,项目名称:codelite,代码行数:11,代码来源:webupdatethread.cpp


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