本文整理汇总了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);
}
}
示例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();
}
示例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);
}
示例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();
}
}
示例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);
}
示例6: OnStyleNeeded
void FindResultsTab::OnStyleNeeded(wxStyledTextEvent& e)
{
wxStyledTextCtrl* ctrl = dynamic_cast<wxStyledTextCtrl*>(e.GetEventObject());
if(!ctrl) return;
StyleText(ctrl, e);
}
示例7: OnStyleNeeded
void FindUsageTab::OnStyleNeeded(wxStyledTextEvent& e)
{
wxStyledTextCtrl* ctrl = dynamic_cast<wxStyledTextCtrl*>(e.GetEventObject());
if(!ctrl) return;
m_styler->StyleText(ctrl, e, true);
}