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


C++ wxStyledTextEvent::GetEventObject方法代码示例

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


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

示例1: OnStcModified

void wxCodeCompletionBoxManager::OnStcModified(wxStyledTextEvent& event)
{
    event.Skip();
    if(m_box && m_box->IsShown() && m_box->m_stc == event.GetEventObject()) {
        m_box->StcModified(event);
    }
}
开发者ID:lpc1996,项目名称:codelite,代码行数:7,代码来源:wxCodeCompletionBoxManager.cpp

示例2: wxDynamicCast

void t4p::PhpCallTipProviderClass::OnCallTipClick(wxStyledTextEvent& evt) {
    wxStyledTextCtrl* ctrl = wxDynamicCast(evt.GetEventObject(), wxStyledTextCtrl);

    if (!CurrentCallTipResources.empty()) {
        size_t resourcesSize = CurrentCallTipResources.size();
        int position = evt.GetPosition();
        wxString callTip;

        // up arrow. if already at the first choice, then loop around
        // looping around looks better than hiding arrows; because hiding arrows changes the
        // rendering position and make the call tip jump around when clicking up/down
        if (1 == position) {
            CurrentCallTipIndex = ((CurrentCallTipIndex >= 1) && (CurrentCallTipIndex - 1) < resourcesSize) ? CurrentCallTipIndex - 1 : resourcesSize - 1;
            callTip =  PhpCallTipSignature(CurrentCallTipIndex, CurrentCallTipResources);
        } else if (2 == position) {
            // down arrow
            CurrentCallTipIndex = ((CurrentCallTipIndex + 1) < resourcesSize) ? CurrentCallTipIndex + 1 : 0;
            callTip = PhpCallTipSignature(CurrentCallTipIndex, CurrentCallTipResources);
        }
        if (!callTip.IsEmpty()) {
            ctrl->CallTipCancel();
            ctrl->CallTipShow(ctrl->GetCurrentPos(), callTip);
        }
    }
    evt.Skip();
}
开发者ID:62BRAINS,项目名称:triumph4php,代码行数:26,代码来源:PhpCodeCompletionViewClass.cpp

示例3: OnMarginClick

void wxSTEditorFindReplacePanel::OnMarginClick( wxStyledTextEvent &event )
{
    if (!m_resultEditor) return; // set after editor is fully created

    if (event.GetEventType() == wxEVT_STE_MARGINDCLICK)
        return;

    wxSTEditor *editor = (wxSTEditor*)event.GetEventObject();
    int pos = event.GetPosition();

    if (event.GetEventType() == wxEVT_STC_DOUBLECLICK) // event pos not set correctly
        pos = editor->GetCurrentPos();

    int line = editor->LineFromPosition(pos);

    if (editor->GetLine(line).Strip(wxString::both).IsEmpty())
        return;

    wxArrayString* findAllStrings = m_findReplaceData->GetFindAllStrings();

    if ((line < 0) || (line >= (int)findAllStrings->GetCount()))
        return;

    editor->MarkerDeleteAll(STE_MARKER_BOOKMARK);
    editor->MarkerAdd(line, STE_MARKER_BOOKMARK);

    wxFindDialogEvent fEvent(wxEVT_COMMAND_FIND_NEXT, GetId());
    fEvent.SetEventObject(this);
    fEvent.SetFindString(m_findCombo->GetValue());
    fEvent.SetFlags(GetFindFlags());
    fEvent.SetExtraLong(line);
    Send(fEvent);
}
开发者ID:Slulego,项目名称:GD,代码行数:33,代码来源:stefindr.cpp

示例4: onUpdateUI

void TextFrame::onUpdateUI(wxStyledTextEvent& event)
{
    if(event.GetUpdated()==wxSTC_UPDATE_SELECTION)
    {
        onSelectionChanged();
        wxObject *obj = event.GetEventObject();
        if(obj)
        {
          wxStyledTextCtrl* txt = dynamic_cast<wxStyledTextCtrl*>(obj);
          if(txt)
            updateBraceHilight(txt);
        }
    }
    else if(event.GetUpdated()==wxSTC_UPDATE_V_SCROLL)
    {
        UpdateMarkerPages();
    }
}
开发者ID:balooloo,项目名称:cody,代码行数:18,代码来源:text-frame.cpp

示例5: OnSTCUpdateUI

void wxSTEditorFrame::OnSTCUpdateUI(wxStyledTextEvent &event)
{
    event.Skip();
    if (!GetStatusBar()) // nothing to do
        return;

    wxStyledTextCtrl* editor = wxStaticCast(event.GetEventObject(), wxStyledTextCtrl);
    STE_TextPos pos = editor->GetCurrentPos();
    int line        = editor->GetCurrentLine() + 1; // start at 1
    int lines       = editor->GetLineCount();
    int col         = editor->GetColumn(pos) + 1;   // start at 1
    int chars       = editor->GetLength();

    wxString txt = wxString::Format("Line %6d of %6d, Col %4d, Chars %6d  ", line, lines, col, chars);
    txt += editor->GetOvertype() ? "[OVR]" : "[INS]";

    if (txt != GetStatusBar()->GetStatusText()) // minor flicker reduction
        SetStatusText(txt, 0);
}
开发者ID:burzumishi,项目名称:caprice32wx,代码行数:19,代码来源:steframe.cpp

示例6: OnStyleNeeded

void FindResultsTab::OnStyleNeeded(wxStyledTextEvent& e)
{
    wxStyledTextCtrl* ctrl = dynamic_cast<wxStyledTextCtrl*>(e.GetEventObject());
    if(!ctrl) return;
    StyleText(ctrl, e);
}
开发者ID:Jactry,项目名称:codelite,代码行数:6,代码来源:findresultstab.cpp

示例7: OnStyleNeeded

void FindUsageTab::OnStyleNeeded(wxStyledTextEvent& e)
{
    wxStyledTextCtrl* ctrl = dynamic_cast<wxStyledTextCtrl*>(e.GetEventObject());
    if(!ctrl) return;
    m_styler->StyleText(ctrl, e, true);
}
开发者ID:lpc1996,项目名称:codelite,代码行数:6,代码来源:findusagetab.cpp


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