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


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

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


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

示例1: onModified

/* TextEditor::onModified
 * Called when the text is modified
 *******************************************************************/
void TextEditor::onModified(wxStyledTextEvent& e)
{
	// (Re)start update timer
	timer_update.Start(1000, true);

	e.Skip();
}
开发者ID:Gaerzi,项目名称:SLADE,代码行数:10,代码来源:TextEditor.cpp

示例2: OnMarginClick

void ctlSQLBox::OnMarginClick(wxStyledTextEvent &event)
{
	if (event.GetMargin() == 2)
		ToggleFold(LineFromPosition(event.GetPosition()));

	event.Skip();
}
开发者ID:Joe-xXx,项目名称:pgadmin3,代码行数:7,代码来源:ctlSQLBox.cpp

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

示例4: OnPHPCSFixerOptionsUpdated

void CodeFormatterDlg::OnPHPCSFixerOptionsUpdated(wxStyledTextEvent& event)
{
    m_isDirty = true;
    m_options.SetPHPCSFixerPharOptions(m_stc->GetText());
    CallAfter(&CodeFormatterDlg::UpdatePreview);
    event.Skip();
}
开发者ID:Alexpux,项目名称:codelite,代码行数:7,代码来源:codeformatterdlg.cpp

示例5: OnMarkDirty

void AbbreviationsSettingsDlg::OnMarkDirty(wxStyledTextEvent& event)
{
    event.Skip();
    if(m_activeItemName.IsEmpty() == false) {
        m_dirty = true;
    }
}
开发者ID:uxprogrammer,项目名称:codelite,代码行数:7,代码来源:abbreviationssettingsdlg.cpp

示例6: zoomEvent

void fbtTextFile::zoomEvent(wxStyledTextEvent& evt)
{
	evt.Skip();

	// dsiable zoom
	if (GetZoom() != 0) SetZoom(0);
}
开发者ID:Ali-il,项目名称:gamekit,代码行数:7,代码来源:fbtTextFile.cpp

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

示例8: OnTextModified

void TextFrame::OnTextModified(wxStyledTextEvent& event)
{
    wxStyledTextCtrl* txt = getCurrentTextCtrl();
    if(txt)
    {
        int line  = txt->LineFromPosition(event.GetPosition()),
            lines = event.GetLinesAdded(),
            linecount = txt->GetLineCount();

        getDocument()->setModified(txt->IsModified());

        if(lines!=0)
        {
            // Add or remove lines
            updateLineNbMargin();
            _fastFindLine->SetRange(1, linecount);

            // Bookmarks
            if(getDocument()->getBookmarks().addLines(line, lines))
                UpdateBookmarkPanel();

            // Markers
            _markbar->SetMax(linecount);
            _markbar->MoveMarkers(line, lines);
        }
    }

    event.Skip();
}
开发者ID:balooloo,项目名称:cody,代码行数:29,代码来源:text-frame.cpp

示例9: OnDoubleClick

void SubsTextEditCtrl::OnDoubleClick(wxStyledTextEvent &evt) {
	auto bounds = GetBoundsOfWordAtPosition(evt.GetPosition());
	if (bounds.second != 0)
		SetSelection(bounds.first, bounds.first + bounds.second);
	else
		evt.Skip();
}
开发者ID:KagamiChan,项目名称:Aegisub,代码行数:7,代码来源:subs_edit_ctrl.cpp

示例10: onCharAdded

/* TextEditor::onCharAdded
 * Called when a character is added to the text
 *******************************************************************/
void TextEditor::onCharAdded(wxStyledTextEvent& e)
{
	// Update line numbers margin width
	string numlines = S_FMT("0%d", GetNumberOfLines());
	SetMarginWidth(0, TextWidth(wxSTC_STYLE_LINENUMBER, numlines));

	// Auto indent
	int currentLine = GetCurrentLine();
	if (txed_auto_indent && e.GetKey() == '\n')
	{
		// Get indentation amount
		int lineInd = 0;
		if (currentLine > 0)
			lineInd = GetLineIndentation(currentLine - 1);

		// Do auto-indent if needed
		if (lineInd != 0)
		{
			SetLineIndentation(currentLine, lineInd);

			// Skip to end of tabs
			while (1)
			{
				int chr = GetCharAt(GetCurrentPos());
				if (chr == '\t' || chr == ' ')
					GotoPos(GetCurrentPos()+1);
				else
					break;
			}
		}
	}

	// The following require a language to work
	if (language)
	{
		// Call tip
		if (e.GetKey() == '(' && txed_calltips_parenthesis)
		{
			openCalltip(GetCurrentPos());
		}

		// End call tip
		if (e.GetKey() == ')')
		{
			CallTipCancel();
		}

		// Comma, possibly update calltip
		if (e.GetKey() == ',' && txed_calltips_parenthesis)
		{
			//openCalltip(GetCurrentPos());
			//if (CallTipActive())
			updateCalltip();
		}
	}

	// Continue
	e.Skip();
}
开发者ID:macressler,项目名称:SLADE,代码行数:62,代码来源:TextEditor.cpp

示例11: onUpdateUI

/* TextEditor::onUpdateUI
 * Called when anything is modified in the text editor (cursor
 * position, styling, text, etc)
 *******************************************************************/
void TextEditor::onUpdateUI(wxStyledTextEvent& e)
{
	// Check for brace match
	if (txed_brace_match)
		checkBraceMatch();

	// If a calltip is open, update it
	if (call_tip->IsShown())
		updateCalltip();

	// Do word matching if appropriate
	if (txed_match_cursor_word && language)
	{
		int word_start = WordStartPosition(GetCurrentPos(), true);
		int word_end = WordEndPosition(GetCurrentPos(), true);
		string current_word = GetTextRange(word_start, word_end);
		if (!current_word.IsEmpty() && HasFocus())
		{
			if (current_word != prev_word_match)
			{
				prev_word_match = current_word;

				SetIndicatorCurrent(8);
				IndicatorClearRange(0, GetTextLength());
				SetTargetStart(0);
				SetTargetEnd(GetTextLength());
				SetSearchFlags(0);
				while (SearchInTarget(current_word) != -1)
				{
					IndicatorFillRange(GetTargetStart(), GetTargetEnd() - GetTargetStart());
					SetTargetStart(GetTargetEnd());
					SetTargetEnd(GetTextLength());
				}
			}
		}
		else
		{
			SetIndicatorCurrent(8);
			IndicatorClearRange(0, GetTextLength());
			prev_word_match = "";
		}
	}

	// Hilight current line
	MarkerDeleteAll(1);
	MarkerDeleteAll(2);
	if (txed_hilight_current_line > 0 && HasFocus())
	{
		int line = LineFromPosition(GetCurrentPos());
		MarkerAdd(line, 1);
		if (txed_hilight_current_line > 1)
			MarkerAdd(line, 2);
	}

	e.Skip();
}
开发者ID:Gaerzi,项目名称:SLADE,代码行数:60,代码来源:TextEditor.cpp

示例12: OnUpdateUI

void SvnConsole::OnUpdateUI(wxStyledTextEvent& event)
{
    //if(m_sci->GetCurrentPos() < m_inferiorEnd) {
    //	m_sci->SetCurrentPos(m_inferiorEnd);
    //	m_sci->SetSelectionStart(m_inferiorEnd);
    //	m_sci->SetSelectionEnd(m_inferiorEnd);
    //	m_sci->EnsureCaretVisible();
    //}
    event.Skip();
}
开发者ID:HTshandou,项目名称:codelite,代码行数:10,代码来源:svn_console.cpp

示例13: OnPositionStc

void ctlSQLBox::OnPositionStc(wxStyledTextEvent &event)
{
	int pos = GetCurrentPos();
	wxChar ch = GetCharAt(pos - 1);
	int st = GetStyleAt(pos - 1);
	int match;


	// Line numbers
	// Ensure we don't recurse through any paint handlers on Mac
#ifdef __WXMAC__
	Freeze();
#endif
	UpdateLineNumber();
#ifdef __WXMAC__
	Thaw();
#endif

	// Clear all highlighting
	BraceBadLight(wxSTC_INVALID_POSITION);

	// Check for braces that aren't in comment styles,
	// double quoted styles or single quoted styles
	if ((ch == '{' || ch == '}' ||
	        ch == '[' || ch == ']' ||
	        ch == '(' || ch == ')') &&
	        st != 2 && st != 6 && st != 7)
	{
		match = BraceMatch(pos - 1);
		if (match != wxSTC_INVALID_POSITION)
			BraceHighlight(pos - 1, match);
	}

	// Roll back through the doc and highlight any unmatched braces
	while ((pos--) >= 0)
	{
		ch = GetCharAt(pos);
		st = GetStyleAt(pos);

		if ((ch == '{' || ch == '}' ||
		        ch == '[' || ch == ']' ||
		        ch == '(' || ch == ')') &&
		        st != 2 && st != 6 && st != 7)
		{
			match = BraceMatch(pos);
			if (match == wxSTC_INVALID_POSITION)
			{
				BraceBadLight(pos);
				break;
			}
		}
	}

	event.Skip();
}
开发者ID:Timosha,项目名称:pgadmin3,代码行数:55,代码来源:ctlSQLBox.cpp

示例14: OnCharAdded

void CodeEdit::OnCharAdded(wxStyledTextEvent& event)
{

    // Indent the line to the same indentation as the previous line.
    // Adapted from http://STCntilla.sourceforge.net/STCntillaUsage.html

    char ch = event.GetKey();

    if  (ch == '\r' || ch == '\n')
    {

        int line        = GetCurrentLine();
        int lineLength  = LineLength(line);

        if (line > 0 && lineLength <= 2)
        {

            wxString buffer = GetLine(line - 1);
                
            for (unsigned int i =  0; i < buffer.Length();  ++i)
            {
                if (buffer[i] != ' ' && buffer[i] != '\t')
                {
                    buffer.Truncate(i);
                    break;
                }
            }

            ReplaceSelection(buffer);
            
            // Remember that we just auto-indented so that the backspace
            // key will un-autoindent us.
            m_autoIndented = true;
            
        }
        
    }
    else if (m_enableAutoComplete && m_autoCompleteManager != NULL)
    {

        // Handle auto completion.

        wxString token;
        
        if (GetTokenFromPosition(GetCurrentPos() - 1, ".:", token))
        {
            StartAutoCompletion(token);
        }

    }

    event.Skip();

}
开发者ID:Halfbrick,项目名称:decoda,代码行数:54,代码来源:CodeEdit.cpp

示例15: onUpdateUI

/* TextEditor::onUpdateUI
 * Called when anything is modified in the text editor (cursor
 * position, styling, text, etc)
 *******************************************************************/
void TextEditor::onUpdateUI(wxStyledTextEvent& e)
{
	// Check for brace match
	if (txed_brace_match)
		checkBraceMatch();

	// If a calltip is open, update it
	if (CallTipActive())
		updateCalltip();

	e.Skip();
}
开发者ID:macressler,项目名称:SLADE,代码行数:16,代码来源:TextEditor.cpp


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